:root {
  --ink: #14181d;
  --paper: #f6f4ef;
  --card: #ffffff;
  --accent: #d8541f;     /* hot-metal orange */
  --accent-ink: #fff;
  --muted: #6b7280;
  --line: #e3ded4;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,24,29,.06), 0 8px 24px rgba(20,24,29,.06);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.55 ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
a { color: inherit; }

.site-header { border-bottom: 1px solid var(--line); background: rgba(246,244,239,.85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; letter-spacing: -.02em; font-size: 20px; text-decoration: none; }
.brand span { color: var(--accent); }
.site-header nav a { margin-left: 22px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.site-header nav a:hover { color: var(--ink); }

.hero { padding: 84px 0 56px; border-bottom: 1px solid var(--line);
  background: radial-gradient(120% 100% at 100% 0%, #fff6ef 0%, var(--paper) 60%); }
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 18px; max-width: 16ch; }
.hero .lede { font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); max-width: 56ch; margin: 0 0 28px; }
.cta { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none;
  padding: 13px 22px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow); }
.cta:hover { filter: brightness(1.05); }

main { padding: 48px 0 72px; }
.filters { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.filters label { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.filters select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20,24,29,.08), 0 16px 36px rgba(20,24,29,.10); }
.card-cat { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.card h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.01em; }
.card-sum { color: var(--muted); margin: 0 0 16px; flex: 1; }
.card-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 16px; }
.card-tags li { font-size: 11px; color: var(--muted); background: var(--paper); border: 1px solid var(--line); padding: 3px 8px; border-radius: 999px; }
.card-foot { display: flex; align-items: center; gap: 12px; }
.card-foot .ver { font-size: 12px; color: var(--muted); }
.card-foot .price { margin-left: auto; font-weight: 800; font-size: 18px; }
.card-foot button { background: var(--ink); color: #fff; border: 0; padding: 10px 16px; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; }
.card-foot button:hover:not(:disabled) { background: var(--accent); }
.card-foot button:disabled { opacity: .45; cursor: not-allowed; }

.site-footer { border-top: 1px solid var(--line); padding: 36px 0; background: #fff; }
.site-footer p { margin: 0 0 6px; }
.site-footer .fine { color: var(--muted); font-size: 13px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); max-width: 620px; margin: 40px auto; }
.panel h1 { margin-top: 0; }
.field { display: block; margin: 0 0 16px; }
.field span { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.field textarea { min-height: 130px; resize: vertical; }
.btn { background: var(--accent); color: #fff; border: 0; padding: 12px 20px; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; }
.note { color: var(--muted); font-size: 14px; }

/* Card link wrapper */
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:hover h3 { color: var(--accent); }
.card-thumb { width: 100%; height: 150px; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; background: #e9e6df; }
.shot-link { display: block; }
.shot-link:hover .shot { outline: 2px solid var(--accent); }
.price .per { font-size: 13px; color: var(--muted); font-weight: 600; }

/* Product detail page */
.product-page { padding: 40px 0 72px; }
.back { display: inline-block; margin-bottom: 20px; color: var(--muted); text-decoration: none; font-weight: 600; }
.back:hover { color: var(--ink); }
.product-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
@media (max-width: 820px) { .product-grid { grid-template-columns: 1fr; } }
.product-main h1 { font-size: clamp(26px, 4vw, 40px); letter-spacing: -.02em; margin: 6px 0 12px; }
.product-main .lede { font-size: 19px; color: var(--muted); margin: 0 0 24px; }
.product-main .prose { line-height: 1.65; margin: 0 0 24px; }
.product-main h3 { margin: 28px 0 12px; }
.feats { padding-left: 20px; margin: 0 0 20px; }
.feats li { margin: 6px 0; }
.shots { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 0 0 28px; }
.shot { width: 100%; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.product-buy { position: sticky; top: 84px; }
.buybox { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.buybox .price { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.buybox .ver { color: var(--muted); font-size: 13px; margin: 4px 0 16px; }
.buybox button { width: 100%; background: var(--ink); color: #fff; border: 0; padding: 13px; border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; }
.buybox button:hover:not(:disabled) { background: var(--accent); }
.buybox button:disabled { opacity: .45; cursor: not-allowed; }
.buybox .note { margin: 14px 0 0; }
.buybox .trydemo { display:block; text-align:center; margin-top:10px; padding:11px; border:1px solid var(--line); border-radius:10px; text-decoration:none; color:var(--ink); font-weight:700; }
.buybox .trydemo:hover { border-color:var(--accent); color:var(--accent); }

/* Account / downloads table */
.acct-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.acct-table th, .acct-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.acct-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--paper); }
.acct-table tr:last-child td { border-bottom: 0; }
.btn-sm { display: inline-block; background: var(--ink); color: #fff; text-decoration: none; padding: 7px 14px; border-radius: 8px; font-weight: 700; font-size: 14px; }
.btn-sm:hover { background: var(--accent); }

/* Make any table scrollable rather than overflowing the viewport */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  /* Header: let the nav wrap under the brand instead of overflowing */
  .site-header .wrap { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; row-gap: 6px; }
  .brand { font-size: 18px; }
  .site-header nav { width: 100%; display: flex; flex-wrap: wrap; gap: 8px 16px; }
  .site-header nav a { margin-left: 0; font-size: 13px; }

  .hero { padding: 44px 0 32px; }
  .hero h1 { max-width: none; }
  .cta { display: block; text-align: center; }

  main { padding: 28px 0 48px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .filters { flex-wrap: wrap; }

  /* Product detail: single column, buy box no longer sticky */
  .product-grid { grid-template-columns: 1fr; gap: 24px; }
  .product-buy { position: static; }
  .shots { grid-template-columns: 1fr; }

  /* Forms / panels full-width-friendly */
  .panel { margin: 24px 16px; padding: 22px; }

  /* Tables: don't blow out the layout */
  .acct-table { font-size: 14px; }
  .acct-table th, .acct-table td { padding: 10px 10px; }

  /* Tap targets */
  .card-foot button, .btn, .buybox button { min-height: 44px; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 30px; }
  .card-foot { flex-wrap: wrap; gap: 8px; }
  .card-foot .price { margin-left: 0; }
  .card-foot button { width: 100%; }
}
