/*  NielloSoft Market — Design System v2
    Premium marketplace aesthetic. Dark warm-neutral base with light editorial
    sections for rhythm. Instrument Serif for display, Inter for body,
    JetBrains Mono for specs. Amber gold accent inspired by niello craft.
    Layered depth via elevated surfaces and considered shadows.  */

:root {
    /* Dark surface hierarchy (near-black warm neutrals) */
    --bg:            #0c0a09;
    --surface:       #14110f;
    --surface-2:     #1c1917;
    --surface-3:     #292524;
    --rule-dark:     #292524;
    --rule-dark-2:   #3f3a37;
    --text:          #fafaf9;
    --text-muted:    #a8a29e;
    --text-dim:      #78716c;

    /* Light surface hierarchy (warm papers) */
    --paper:         #faf9f5;
    --paper-2:       #f3f0e7;
    --paper-3:       #e7e2d1;
    --rule:          #e7e2d1;
    --rule-strong:   #d6cfb8;
    --ink:           #0c0a09;
    --stone:         #57534e;
    --stone-2:       #78716c;

    /* Accents */
    --gold:          #c9a961;
    --gold-bright:   #e5c78a;
    --gold-deep:     #a08544;
    --gold-ink:      #4a3d1e;

    /* States */
    --error:         #ef4444;
    --error-bg:      #fef2f2;
    --success:       #16a34a;
    --success-bg:    #f0fdf4;
    --warning:       #f59e0b;
    --info-bg:       #f5f3ee;

    /* Type */
    --serif: 'Fraunces', 'Times New Roman', Georgia, serif;
    --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Rhythm */
    --max:   1200px;
    --max-w: 1320px;
    --gap:   clamp(20px, 4vw, 40px);

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px -2px rgba(0,0,0,0.10), 0 4px 20px -4px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 40px -12px rgba(0,0,0,0.18), 0 12px 30px -8px rgba(0,0,0,0.10);
    --shadow-dark: 0 20px 40px -12px rgba(0,0,0,0.5), 0 8px 20px -6px rgba(0,0,0,0.35);
    --shadow-gold: 0 8px 24px -6px rgba(201,169,97,0.35);

    /* Motion */
    --ease: cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Legacy aliases (kept for admin panel + older partials) */
    --brass: var(--gold);
    --dark:  var(--bg);
    --white: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--sans);
    background: var(--paper);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'ss01', 'cv11';
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select, button { font-family: inherit; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }

/* ============================================================
   Containers
   ============================================================ */
.wrap    { max-width: var(--max);   margin: 0 auto; padding: 0 var(--gap); }
.wrap-w  { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gap); }
.narrow  { max-width: 780px; margin: 0 auto; padding: 0 var(--gap); }

/* ============================================================
   Typography
   ============================================================ */
h1, .h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(40px, 5.5vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 0 0 24px;
    font-optical-sizing: auto;
    font-variation-settings: 'opsz' 96, 'SOFT' 50;
}
h2, .h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    font-optical-sizing: auto;
    font-variation-settings: 'opsz' 64, 'SOFT' 50;
}
h3, .h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(22px, 2.6vw, 30px);
    line-height: 1.2;
    letter-spacing: -0.012em;
    margin: 0 0 12px;
    font-optical-sizing: auto;
    font-variation-settings: 'opsz' 32;
}
h4, .h4 {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.3;
    margin: 0 0 8px;
    letter-spacing: -0.005em;
}
p { margin: 0 0 16px; }

.lede {
    font-size: clamp(17px, 1.5vw, 21px);
    line-height: 1.55;
    color: var(--stone);
    max-width: 640px;
    letter-spacing: -0.005em;
}
.eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-deep);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
}
.eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--gold);
}

.mono, code { font-family: var(--mono); font-feature-settings: normal; }

/* Body-level muted text */
.muted { color: var(--stone-2); }
.balance { text-wrap: balance; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; }

/* ============================================================
   Site header (dark, elegant)
   ============================================================ */
.site-hdr {
    background: rgba(12, 10, 9, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--rule-dark);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-hdr-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 16px var(--gap);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-family: var(--serif);
    font-weight: 400;
    font-size: 22px;
    letter-spacing: -0.015em;
}
.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
    box-shadow: var(--shadow-gold);
    position: relative;
}
.brand-mark::after {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg);
}
.brand small {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-left: 10px;
    border-left: 1px solid var(--rule-dark-2);
    margin-left: 6px;
}
.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.nav-link {
    padding: 8px 14px;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: 6px;
    transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-cta {
    padding: 8px 16px;
    background: var(--text);
    color: var(--ink);
    border-radius: 8px;
    font-weight: 500;
    font-size: 13.5px;
    transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -6px rgba(255,255,255,0.2); }
.nav-cart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--rule-dark-2);
    border-radius: 999px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    transition: border-color 0.15s;
}
.nav-cart:hover { border-color: var(--gold); }
.nav-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--gold);
    color: var(--ink);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
}

/* ============================================================
   Sections (dark / light rhythm)
   ============================================================ */
.section {
    padding: clamp(64px, 10vw, 120px) 0;
    position: relative;
}
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }
.section-dark {
    background: var(--bg);
    color: var(--text);
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--text); }
.section-dark .lede { color: var(--text-muted); }
.section-dark .muted { color: var(--text-dim); }

.section-paper { background: var(--paper); }
.section-paper-2 { background: var(--paper-2); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-family: var(--sans);
    font-weight: 500;
    font-size: 15px;
    letter-spacing: -0.005em;
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--ink);
    border-radius: 10px;
    transition: transform 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
    cursor: pointer;
    line-height: 1;
    text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn.ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--rule-strong);
}
.btn.ghost:hover { background: var(--paper-2); border-color: var(--ink); }
.section-dark .btn,
.hero .btn,
.product-hero .btn { background: var(--text); color: var(--ink); border-color: var(--text); }
.section-dark .btn:hover,
.hero .btn:hover,
.product-hero .btn:hover { background: var(--gold-bright); border-color: var(--gold-bright); box-shadow: var(--shadow-gold); }
.section-dark .btn.ghost,
.hero .btn.ghost,
.product-hero .btn.ghost { background: transparent; color: var(--text); border-color: var(--rule-dark-2); }
.section-dark .btn.ghost:hover,
.hero .btn.ghost:hover,
.product-hero .btn.ghost:hover { background: var(--surface-2); border-color: var(--text); }

.btn.gold { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.btn.gold:hover { background: var(--gold-bright); border-color: var(--gold-bright); box-shadow: var(--shadow-gold); }

.btn.sm { padding: 9px 16px; font-size: 13.5px; border-radius: 7px; }
.btn.lg { padding: 17px 32px; font-size: 16px; border-radius: 12px; }
.btn.wide { width: 100%; }
.btn.arrow::after {
    content: '→';
    margin-left: 4px;
    transition: transform 0.15s var(--ease);
    font-family: var(--sans);
}
.btn.arrow:hover::after { transform: translateX(4px); }

/* ============================================================
   HERO — dark, dramatic, with product mockup on the right
   ============================================================ */
.hero {
    background: var(--bg);
    color: var(--text);
    padding: clamp(80px, 12vw, 140px) 0 clamp(80px, 12vw, 120px);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201,169,97,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: center;
    position: relative;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 48px; } }
.hero h1 { color: var(--text); }
.hero h1 em { font-style: italic; color: var(--gold-bright); font-weight: 400; }
.hero .lede { color: var(--text-muted); font-size: clamp(17px, 1.5vw, 20px); max-width: 500px; }
.hero-ctas { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.hero-meta {
    display: flex;
    gap: 32px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--rule-dark-2);
    flex-wrap: wrap;
}
.hero-meta-item { display: flex; flex-direction: column; gap: 4px; }
.hero-meta-item .n {
    font-family: var(--serif);
    font-size: 32px;
    color: var(--text);
    line-height: 1;
}
.hero-meta-item .l {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* Product mockup showcase */
.hero-visual {
    position: relative;
    padding: 0;
}
.mockup-frame {
    background: var(--surface);
    border: 1px solid var(--rule-dark-2);
    border-radius: 12px;
    box-shadow: var(--shadow-dark);
    overflow: hidden;
    position: relative;
    transform: perspective(1400px) rotateY(-4deg) rotateX(1deg);
    transform-origin: left center;
}
.mockup-frame::before {
    content: '';
    display: block;
    padding: 10px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--rule-dark-2);
    height: 32px;
    box-sizing: border-box;
    background-image: radial-gradient(circle, #ef4444 3px, transparent 3px), radial-gradient(circle, #f59e0b 3px, transparent 3px), radial-gradient(circle, #22c55e 3px, transparent 3px);
    background-size: 12px 12px, 12px 12px, 12px 12px;
    background-position: 12px center, 28px center, 44px center;
    background-repeat: no-repeat;
}
.mockup-frame img, .mockup-frame svg { display: block; width: 100%; height: auto; }

/* ============================================================
   Trust bar (thin band with stats/badges)
   ============================================================ */
.trust-bar {
    background: var(--paper-2);
    border-bottom: 1px solid var(--rule);
    padding: 20px 0;
}
.trust-bar-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gap);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--stone-2);
}
.trust-bar-inner b { color: var(--ink); font-weight: 500; }

/* ============================================================
   Feature grid (icon-based cards)
   ============================================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 56px;
}
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
    background: var(--surface);
    border: 1px solid var(--rule-dark);
    border-radius: 12px;
    padding: 28px 24px;
    transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.feature-card:hover { transform: translateY(-2px); border-color: var(--rule-dark-2); }
.section-paper .feature-card {
    background: var(--paper);
    border-color: var(--rule);
    box-shadow: var(--shadow-sm);
}
.section-paper .feature-card:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-md); }
.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(201,169,97,0.12);
    border: 1px solid rgba(201,169,97,0.25);
    border-radius: 10px;
    margin-bottom: 18px;
    color: var(--gold);
}
.feature-card h4 { font-size: 17px; margin-bottom: 6px; }
.feature-card p { font-size: 14.5px; color: var(--text-muted); margin: 0; line-height: 1.55; }
.section-paper .feature-card p { color: var(--stone); }

/* ============================================================
   Featured product section (huge screenshot + copy alongside)
   ============================================================ */
.featured-product {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: center;
}
@media (max-width: 900px) { .featured-product { grid-template-columns: 1fr; } }
.featured-product .num {
    font-family: var(--serif);
    font-size: clamp(48px, 6vw, 80px);
    line-height: 1;
    color: var(--gold);
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    display: block;
    font-variation-settings: 'opsz' 96, 'SOFT' 30;
}
.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin: 32px 0 0;
    border-top: 1px solid var(--rule);
    border-left: 1px solid var(--rule);
}
.spec-grid > div {
    padding: 16px 20px;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.spec-grid dt {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--stone-2);
    margin-bottom: 6px;
}
.spec-grid dd {
    margin: 0;
    font-size: 15px;
    color: var(--ink);
    font-weight: 500;
}

/* ============================================================
   Product cards on landing grid
   ============================================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 48px;
}
.product-card {
    display: block;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--rule-strong);
}
.product-card-image {
    aspect-ratio: 16/10;
    background: var(--paper-2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.product-card-image img { width: 100%; height: 100%; object-fit: cover; }
.product-card-image .placeholder {
    font-family: var(--serif);
    font-size: 64px;
    color: var(--gold);
}
.product-card-body { padding: 24px 24px 22px; }
.product-card h3 { font-size: 22px; margin: 0 0 6px; }
.product-card p { font-size: 14.5px; color: var(--stone); margin: 0 0 16px; }
.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--rule);
}
.product-card-price {
    font-family: var(--mono);
    font-size: 13.5px;
    color: var(--gold-deep);
    font-weight: 500;
}
.product-card-cat {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--stone-2);
}

/* ============================================================
   Pricing tiers (three cards, one featured)
   ============================================================ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 56px;
}
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }
.tier {
    background: var(--surface);
    border: 1px solid var(--rule-dark);
    border-radius: 14px;
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
}
.tier.featured-tier {
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
    border: 1px solid var(--gold);
    box-shadow: var(--shadow-gold);
    transform: scale(1.02);
    z-index: 2;
}
@media (max-width: 900px) { .tier.featured-tier { transform: none; } }
.tier .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    background: var(--gold);
    color: var(--gold-ink);
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: 600;
}
.tier h4 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 24px;
    color: var(--text);
    margin-bottom: 4px;
}
.tier .tier-desc {
    font-size: 13.5px;
    color: var(--text-dim);
    margin-bottom: 24px;
    height: 40px;
}
.tier .price {
    font-family: var(--serif);
    font-size: 56px;
    line-height: 1;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}
.tier .price small {
    font-family: var(--sans);
    font-size: 15px;
    color: var(--text-dim);
    font-weight: 400;
    letter-spacing: 0;
    margin-left: 6px;
}
.tier .price-note {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 28px;
}
.tier ul {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    flex-grow: 1;
}
.tier ul li {
    display: flex;
    gap: 10px;
    padding: 9px 0;
    font-size: 14.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--rule-dark);
}
.tier ul li:last-child { border-bottom: 0; }
.tier ul li::before {
    content: '';
    flex-shrink: 0;
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-top: 3px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23c9a961'%3E%3Cpath fill-rule='evenodd' d='M16.7 5.3a1 1 0 010 1.4l-8 8a1 1 0 01-1.4 0l-4-4a1 1 0 011.4-1.4L8 12.6l7.3-7.3a1 1 0 011.4 0z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ============================================================
   Stat band (numbers band on dark background)
   ============================================================ */
.stat-band {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding: 48px 0;
    border-top: 1px solid var(--rule-dark);
    border-bottom: 1px solid var(--rule-dark);
    margin: 0;
}
@media (max-width: 700px) { .stat-band { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
.stat-band-item { text-align: left; }
.stat-band-item .n {
    font-family: var(--serif);
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1;
    color: var(--text);
    letter-spacing: -0.03em;
    display: block;
    margin-bottom: 8px;
}
.stat-band-item .n em { color: var(--gold); font-style: normal; }
.stat-band-item .l {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* ============================================================
   FAQ accordion
   ============================================================ */
.faq {
    max-width: 780px;
    margin: 48px auto 0;
}
.faq-item {
    border-bottom: 1px solid var(--rule);
    padding: 24px 0;
}
.faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    list-style: none;
    font-family: var(--sans);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.005em;
    color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-family: var(--sans);
    font-weight: 300;
    font-size: 28px;
    color: var(--stone-2);
    transition: transform 0.2s var(--ease);
    line-height: 1;
    flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
    color: var(--stone);
    font-size: 15.5px;
    line-height: 1.7;
    margin: 12px 0 0;
    max-width: 640px;
}

/* ============================================================
   Product page — hero + gallery + comprehensive layout
   ============================================================ */
.product-hero {
    background: var(--bg);
    color: var(--text);
    padding: clamp(60px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
}
.product-hero h1 { color: var(--text); }
.product-hero .lede { color: var(--text-muted); }
.product-hero-meta {
    display: flex;
    gap: 12px;
    margin: 20px 0 32px;
    flex-wrap: wrap;
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    background: var(--surface-2);
    border: 1px solid var(--rule-dark-2);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.pill.gold {
    background: rgba(201,169,97,0.12);
    border-color: rgba(201,169,97,0.3);
    color: var(--gold-bright);
}
.section-paper .pill {
    background: var(--paper-2);
    border-color: var(--rule);
    color: var(--stone);
}
.section-paper .pill.gold {
    background: rgba(201,169,97,0.15);
    border-color: rgba(160, 133, 68, 0.3);
    color: var(--gold-deep);
}

/* Product gallery */
.gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    margin-top: 40px;
}
.gallery > *:first-child { grid-row: span 2; }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } .gallery > *:first-child { grid-row: auto; } }
.shot {
    background: var(--surface);
    border: 1px solid var(--rule-dark-2);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
    position: relative;
}
.section-paper .shot {
    background: var(--paper);
    border-color: var(--rule);
    box-shadow: var(--shadow-md);
}
.shot img, .shot svg { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Product two-column layout */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 64px;
    align-items: start;
    margin-top: 48px;
}
@media (max-width: 900px) { .product-layout { grid-template-columns: 1fr; gap: 32px; } }
.product-sidebar { position: sticky; top: 100px; }

/* Feature category sections in product pages */
.feature-cat { margin: 48px 0; }
.feature-cat-title {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 24px;
}
.feature-cat-title h3 { margin: 0; }
.feature-cat-title .n {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--gold-deep);
    letter-spacing: 0.14em;
}
.feature-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}
@media (max-width: 600px) { .feature-cat-grid { grid-template-columns: 1fr; } }
.feature-cat-item {
    padding: 14px 16px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 8px;
    display: flex;
    gap: 12px;
    align-items: baseline;
    font-size: 14.5px;
    color: var(--ink);
    line-height: 1.5;
}
.feature-cat-item::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-top: 2px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23c9a961'%3E%3Cpath fill-rule='evenodd' d='M16.7 5.3a1 1 0 010 1.4l-8 8a1 1 0 01-1.4 0l-4-4a1 1 0 011.4-1.4L8 12.6l7.3-7.3a1 1 0 011.4 0z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Purchase sidebar card */
.buy-card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 14px;
    padding: 28px;
    box-shadow: var(--shadow-md);
}
.buy-card h3 { font-size: 20px; margin: 0 0 4px; }
.buy-card .buy-desc { font-size: 13.5px; color: var(--stone-2); margin-bottom: 20px; }
.tier-option {
    display: block;
    padding: 16px;
    border: 1.5px solid var(--rule);
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
}
.tier-option:hover { border-color: var(--gold-deep); }
.tier-option:has(input:checked) { border-color: var(--ink); background: var(--paper-2); }
.tier-option .tier-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}
.tier-option .tier-name { font-weight: 600; font-size: 15px; }
.tier-option .tier-price { font-family: var(--mono); font-weight: 500; color: var(--gold-deep); font-size: 15px; }
.tier-option .tier-info { font-size: 12.5px; color: var(--stone-2); }
.tier-option input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.tier-option .badge-inline {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    background: var(--gold);
    color: var(--gold-ink);
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    border-radius: 3px;
    vertical-align: middle;
}

/* ============================================================
   Long-form product content
   ============================================================ */
.longform h2 { margin: 48px 0 20px; font-size: clamp(28px, 3.5vw, 40px); }
.longform h3 { margin: 32px 0 12px; }
.longform p { font-size: 16.5px; line-height: 1.7; color: var(--ink); }
.longform ul { padding-left: 22px; }
.longform li { font-size: 16px; line-height: 1.7; margin-bottom: 6px; }
.longform code {
    font-family: var(--mono);
    font-size: 13.5px;
    background: var(--paper-2);
    padding: 2px 7px;
    border-radius: 4px;
    color: var(--gold-deep);
    border: 1px solid var(--rule);
}
.longform pre {
    background: var(--bg);
    color: var(--text);
    padding: 20px 24px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 13.5px;
    line-height: 1.6;
    margin: 20px 0;
}
.longform pre code { background: none; border: 0; color: inherit; padding: 0; }
.longform blockquote {
    margin: 24px 0;
    padding: 20px 24px;
    background: var(--paper-2);
    border-left: 3px solid var(--gold);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--stone);
    font-size: 17px;
}

/* Changelog styling */
.changelog-entry {
    padding: 20px 0;
    border-bottom: 1px solid var(--rule);
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 24px;
}
@media (max-width: 600px) { .changelog-entry { grid-template-columns: 1fr; gap: 8px; } }
.changelog-entry:last-child { border-bottom: 0; }
.changelog-ver {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--gold-deep);
    font-weight: 500;
    padding-top: 3px;
}
.changelog-entry ul { margin: 0; padding-left: 20px; font-size: 14.5px; color: var(--stone); }

/* ============================================================
   Forms
   ============================================================ */
.form-field { margin-bottom: 16px; }
.form-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--stone);
    letter-spacing: 0.01em;
}
.form-field input[type=text],
.form-field input[type=email],
.form-field input[type=password],
.form-field input[type=number],
.form-field input[type=url],
.form-field textarea,
.form-field select,
.form-field .input {
    width: 100%;
    padding: 12px 14px;
    font-family: var(--sans);
    font-size: 15px;
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    border-radius: 8px;
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus, .form-field .input:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(12,10,9,0.08);
}
.form-field textarea { min-height: 96px; resize: vertical; font-family: var(--sans); }
.form-help { font-size: 12.5px; color: var(--stone-2); margin-top: 6px; }

.card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 14px;
    padding: 32px;
    box-shadow: var(--shadow-sm);
}
.card h2 { font-size: 26px; margin: 0 0 8px; }

/* ============================================================
   Flash messages
   ============================================================ */
.flash {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14.5px;
    background: var(--info-bg);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--gold);
}
.flash.error { border-color: #fecaca; background: var(--error-bg); color: #7f1d1d; border-left-color: var(--error); }
.flash.success { border-color: #bbf7d0; background: var(--success-bg); color: #14532d; border-left-color: var(--success); }
.flash.warning { border-color: #fde68a; background: #fefce8; color: #713f12; border-left-color: var(--warning); }

/* ============================================================
   Line item tables (cart, orders)
   ============================================================ */
.line-items {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}
.line-items th, .line-items td {
    padding: 16px 12px;
    text-align: left;
    border-bottom: 1px solid var(--rule);
    font-size: 14.5px;
    vertical-align: middle;
}
.line-items th {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--stone-2);
    font-weight: 500;
    border-bottom: 1px solid var(--ink);
    padding: 12px;
}
.line-items td.num { font-family: var(--mono); text-align: right; }

/* ============================================================
   License key display
   ============================================================ */
.license-key {
    font-family: var(--mono);
    font-size: 14px;
    background: var(--paper-2);
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px dashed var(--rule-strong);
    color: var(--ink);
    user-select: all;
    display: inline-block;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.download-row {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 20px 0;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid var(--rule);
}

/* ============================================================
   Footer — rich, multi-column, editorial
   ============================================================ */
.site-ftr {
    background: var(--bg);
    color: var(--text-muted);
    padding: clamp(64px, 8vw, 96px) 0 32px;
    margin-top: 0;
    font-size: 13.5px;
}
.site-ftr-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gap);
}
.site-ftr-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}
@media (max-width: 900px) { .site-ftr-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.site-ftr-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-family: var(--serif);
    font-size: 22px;
    margin-bottom: 12px;
}
.site-ftr-blurb {
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.6;
    font-size: 13.5px;
}
.site-ftr h4 {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 0 0 16px;
}
.site-ftr ul { list-style: none; padding: 0; margin: 0; }
.site-ftr li { padding: 5px 0; }
.site-ftr a { color: var(--text-muted); transition: color 0.15s; }
.site-ftr a:hover { color: var(--gold-bright); }
.site-ftr-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--rule-dark-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
}

/* ============================================================
   Utility
   ============================================================ */
.center { text-align: center; }
.right  { text-align: right; }
.mt-0   { margin-top: 0 !important; }
.mt-2   { margin-top: 8px; }
.mt-4   { margin-top: 16px; }
.mt-6   { margin-top: 24px; }
.mt-8   { margin-top: 32px; }
.mt-12  { margin-top: 48px; }
.mt-16  { margin-top: 64px; }
.mb-0   { margin-bottom: 0 !important; }
.mb-8   { margin-bottom: 32px; }
.mb-12  { margin-bottom: 48px; }

/* Focus rings */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* Selection color */
::selection { background: var(--gold-bright); color: var(--ink); }

/* ============================================================
   Category-grouped catalogue (multi-category products)
   ============================================================ */
.category-block { margin-top: 48px; }
.category-block:first-of-type { margin-top: 32px; }
.category-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--rule);
}
.category-head h3 {
    margin: 0;
    font-size: clamp(22px, 2.4vw, 28px);
}

/* Optional "Featured" badge on individual product cards */
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: var(--gold);
    color: var(--gold-ink);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    border-radius: 3px;
    z-index: 2;
}

/* ============================================================
   Testimonial grid
   ============================================================ */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}
.testimonial {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 28px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.testimonial blockquote {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    font-style: normal;
    font-size: 16px;
    color: var(--ink);
    line-height: 1.6;
    position: relative;
}
.testimonial blockquote::before {
    content: '“';
    font-family: var(--serif);
    font-size: 48px;
    color: var(--gold);
    line-height: 0.5;
    position: absolute;
    top: 20px;
    left: -8px;
    opacity: 0.4;
}
.testimonial blockquote p { margin: 0; padding-left: 12px; }
.testimonial figcaption {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 16px;
    border-top: 1px solid var(--rule);
}
.testimonial figcaption .name {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 14px;
    color: var(--ink);
}
.testimonial figcaption .role {
    font-size: 13px;
    color: var(--stone-2);
}

/* ============================================================
   Admin status pills (used in list tables)
   ============================================================ */
.status-pill {
    display: inline-block;
    padding: 3px 10px;
    background: var(--paper-3);
    color: var(--stone);
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 500;
}
.status-pill.active {
    background: rgba(22, 163, 74, 0.12);
    color: #14532d;
}
