/* =====================================================================
   El Buen Oficio — site stylesheet (oficio.css)
   Design system "Taller": dark ink + brass, drafting-grid paper,
   tape-measure edges, Lora (display) + Inter (text), self-hosted.

    1 Fonts            8 Sections & headings   15 Trades
    2 Tokens           9 Signals & legend      16 Forms
    3 Base            10 Filters               17 Legal pages
    4 Utilities       11 Listing cards         18 Coming soon & 404
    5 Header          12 Method                19 Footer
    6 Hero            13 Tips & FAQ            20 Responsive
    7 Ledger          14 Calls to action       21 Motion, contrast, print

   All colour pairs used for text meet WCAG 2.2 AA (4.5:1; 3:1 for
   large text and UI parts). Edit the tokens in section 2, not values.
   ===================================================================== */

/* 1 · Fonts ------------------------------------------------------------ */
@font-face {
    font-family: "Lora"; font-style: normal; font-weight: 600; font-display: swap;
    src: url("fonts/lora-600.woff2") format("woff2");
}
@font-face {
    font-family: "Lora"; font-style: italic; font-weight: 500; font-display: swap;
    src: url("fonts/lora-500-italic.woff2") format("woff2");
}
@font-face {
    font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("fonts/inter-400.woff2") format("woff2");
}
@font-face {
    font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
    src: url("fonts/inter-600.woff2") format("woff2");
}

/* 2 · Tokens ----------------------------------------------------------- */
:root {
    /* surfaces */
    --ink: #1d1b22;
    --ink-2: #2a2731;
    --ink-3: #3a3642;
    --paper: #f5f0e6;
    --paper-2: #ece4d4;
    --card: #fffdf9;
    --line: #e0d6c3;
    --line-2: #cfc3ab;

    /* text */
    --text: #29262f;
    --muted: #615b66;          /* 5.8:1 on paper */
    --subtle: #6b645b;         /* 5.1:1 on paper — small print */
    --cream: #f3ead9;
    --on-dark: #d9d1c3;        /* body text on ink */
    --on-dark-2: #a9a196;      /* secondary text on ink (6.7:1) */

    /* brand */
    --brass: #c9973f;
    --brass-light: #e3b866;
    --brass-ink: #7f5b1b;      /* brass for text on light (5.4:1) */
    --brass-soft: #f4e6c8;

    /* trade accent — each trade page overrides on <body> */
    --trade: #2c6e8f;
    --trade-soft: #e2edf2;

    /* signals */
    --good: #2d7650;  --good-soft: #e2f0e7;
    --seal: #9a3c25;  --seal-soft: #f5e1d9;
    --wait: #865709;  --wait-soft: #fbeed6;

    /* type */
    --serif: "Lora", Georgia, "Times New Roman", serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* shape */
    --radius: 14px;
    --radius-lg: 18px;
    --wrap: 1180px;
    --header-h: 68px;
    --shadow: 0 1px 2px rgba(29,27,34,.06), 0 6px 20px -8px rgba(29,27,34,.14);
    --shadow-lift: 0 2px 4px rgba(29,27,34,.06), 0 18px 40px -14px rgba(29,27,34,.28);

    --focus: var(--ink);
}

/* 3 · Base ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(29,27,34,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(29,27,34,.035) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-synthesis-weight: none;
}
.i18n-pending body { visibility: hidden; }   /* see inline script: avoids a flash of Spanish */
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.01em;
    color: var(--ink);
    text-wrap: balance;
}
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--brass-soft); color: var(--ink); }

/* Focus rings drawn over dark areas use light brass instead of ink */
.site-header, .hero, .join, .site-footer, .disclaimer, .side-card.dark { --focus: var(--brass-light); }

/* 4 · Utilities -------------------------------------------------------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 16px; top: -80px; z-index: 100;
    background: var(--brass); color: var(--ink);
    padding: .65rem 1.1rem; border-radius: 10px;
    font-weight: 600; text-decoration: none;
    --focus: var(--ink);
}
.skip-link:focus { top: 12px; }
.icon {
    width: 1.15em; height: 1.15em; flex: none;
    fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* 5 · Header ----------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(29,27,34,.96);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid rgba(201,151,63,.35);
    color: var(--cream);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.25rem; min-height: var(--header-h); }
.brand {
    display: inline-flex; align-items: center; gap: .65rem; margin-right: auto;
    color: #fff; text-decoration: none; white-space: nowrap;
    font-family: var(--serif); font-weight: 600; font-size: 1.3rem; letter-spacing: -.01em;
}
.brand-mark { width: 34px; height: 34px; }
.brand em { font-style: italic; font-weight: 500; color: var(--brass); }

.site-nav ul { display: flex; gap: .25rem; }
.site-nav a {
    display: block; padding: .5rem .8rem; border-radius: 8px;
    color: #d8d1c4; text-decoration: none; font-size: .95rem;
    transition: color .2s, background-color .2s;
}
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.site-nav a[aria-current="page"] { color: #fff; background: rgba(201,151,63,.16); box-shadow: inset 0 -2px 0 var(--brass); }

.lang-switch {
    display: inline-flex; padding: 3px; gap: 2px;
    border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
    background: rgba(255,255,255,.05);
}
.lang-switch button {
    min-width: 2.6rem; padding: .3rem .7rem; border: 0; border-radius: 999px; cursor: pointer;
    background: transparent; color: #c6bdb0;
    font-size: .8rem; font-weight: 600; letter-spacing: .06em;
    transition: background-color .2s, color .2s;
}
.lang-switch button:hover { color: #fff; }
.lang-switch button[aria-pressed="true"] { background: var(--brass); color: var(--ink); }

/* 6 · Hero ------------------------------------------------------------- */
.hero {
    position: relative; overflow: hidden;
    color: var(--cream);
    background:
        radial-gradient(ellipse 60% 70% at 85% 30%, rgba(44,110,143,.28), transparent 70%),
        radial-gradient(ellipse 50% 60% at 10% 100%, rgba(201,151,63,.14), transparent 70%),
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(rgba(201,151,63,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201,151,63,.05) 1px, transparent 1px),
        var(--ink);
    background-size: auto, auto, 96px 96px, 96px 96px, 24px 24px, 24px 24px, auto;
    border-bottom: 4px solid var(--brass);
    padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(5.5rem, 9vw, 7rem);
}
/* tape-measure edge: short ticks every 10px, long ticks every 50px */
.hero::after, .site-footer::before {
    content: ""; position: absolute; left: 0; right: 0; height: 12px; pointer-events: none;
    background:
        repeating-linear-gradient(90deg, rgba(201,151,63,.55) 0 1px, transparent 1px 10px) 0 100% / 100% 5px no-repeat,
        repeating-linear-gradient(90deg, rgba(201,151,63,.9) 0 1px, transparent 1px 50px) 0 100% / 100% 12px no-repeat;
}
.hero::after { bottom: 0; }
.hero .wrap {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 2.5rem; align-items: center;
}

.crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.75rem; font-size: .85rem; color: var(--on-dark-2); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: #8a8278; }
.crumbs a { color: #d8d1c4; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--brass); }

.eyebrow {
    display: inline-flex; align-items: center; gap: .6rem;
    margin: 0 0 1rem;
    font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--brass);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; flex: none; background: currentColor; }

.hero h1 {
    margin-bottom: 1.25rem;
    color: #fff;
    font-size: clamp(2.3rem, 5vw, 3.75rem);
    line-height: 1.04;
    letter-spacing: -.025em;
}
.hero h1 em { display: block; font-style: italic; font-weight: 500; color: var(--brass); }
.hero-lead { max-width: 36em; margin-bottom: 1.5rem; font-size: clamp(1.08rem, 1.6vw, 1.22rem); color: var(--on-dark); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 1.5rem; }
.hero-actions .btn { padding: .95rem 1.4rem; font-size: 1rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; margin: 0; font-size: .9rem; color: var(--on-dark-2); }
.hero-meta > span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-meta .icon { color: var(--brass); }

.hero-art { position: relative; }
.hero-art > svg { width: 100%; max-width: 520px; height: auto; margin-left: auto; }
.drip { animation: drip 2.8s cubic-bezier(.55,0,.8,.4) infinite; transform-box: fill-box; transform-origin: center; }
@keyframes drip {
    0%        { transform: translateY(0) scale(.2); opacity: 0; }
    15%       { transform: translateY(0) scale(1); opacity: 1; }
    68%       { transform: translateY(46px) scale(1); opacity: 1; }
    78%, 100% { transform: translateY(52px) scale(1.5, .25); opacity: 0; }
}
.needle { animation: needle 6s ease-in-out infinite; transform-origin: 0 0; }
@keyframes needle { 0%, 100% { transform: rotate(0); } 45% { transform: rotate(-9deg); } 60% { transform: rotate(4deg); } }

.hero--home { padding-bottom: clamp(6rem, 10vw, 8rem); }
.hero--home h1 em { display: inline; }

.hero--page { padding: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(2.75rem, 5vw, 3.75rem); }
.hero--page .wrap { grid-template-columns: minmax(0, 1fr); }
.hero--page .wrap > div { max-width: 52rem; }
.hero--page h1 { margin-bottom: .9rem; font-size: clamp(2.1rem, 4.6vw, 3.3rem); }
.hero--page .hero-lead { margin-bottom: 0; }
.hero--page .crumbs ol { margin-bottom: 1.25rem; }

/* azulejo tile board (home) */
.tile-board {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
    max-width: 400px; margin-left: auto;
    transform: rotate(-3deg);
}
.tile {
    position: relative; aspect-ratio: 1;
    display: grid; place-items: center;
    border: 1px solid rgba(201,151,63,.32); border-radius: 18px;
    color: var(--brass);
    background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.06), transparent 60%), rgba(255,255,255,.025);
    animation: tileIn .6s ease-out backwards;
}
.tile::after { content: ""; position: absolute; inset: 7px; border: 1px dashed rgba(201,151,63,.16); border-radius: 12px; }
.tile svg { width: 42%; height: 42%; stroke-width: 1.5; opacity: .75; }
.tile.is-live {
    color: var(--ink);
    background: linear-gradient(145deg, var(--brass-light), var(--brass) 55%, #a5772a);
    border-color: var(--brass-light);
    box-shadow: 0 18px 40px -16px rgba(201,151,63,.7);
}
.tile.is-live::after { border-color: rgba(29,27,34,.25); }
.tile.is-live svg { opacity: 1; stroke-width: 1.8; }
.tile-label {
    position: absolute; left: 0; right: 0; bottom: 9%;
    text-align: center; font-size: .64rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.tile:nth-child(2) { animation-delay: .05s; } .tile:nth-child(3) { animation-delay: .1s; }
.tile:nth-child(4) { animation-delay: .15s; } .tile:nth-child(5) { animation-delay: .2s; }
.tile:nth-child(6) { animation-delay: .25s; } .tile:nth-child(7) { animation-delay: .3s; }
.tile:nth-child(8) { animation-delay: .35s; } .tile:nth-child(9) { animation-delay: .4s; }
@keyframes tileIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }

/* 7 · Ledger (stat strip overlapping the hero edge) -------------------- */
.ledger { position: relative; z-index: 2; margin-top: clamp(-4.5rem, -7vw, -3.75rem); }
.ledger ul {
    display: grid; grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lift);
}
.ledger li { position: relative; padding: 1.35rem 1.5rem; }
.ledger li + li { border-left: 1px dashed var(--line-2); }
.ledger .n {
    display: block; line-height: 1;
    font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 3.4vw, 2.6rem);
    color: var(--ink); font-variant-numeric: lining-nums;
}
.ledger .n small { font-size: .55em; color: var(--subtle); letter-spacing: 0; }
.ledger .l { display: flex; align-items: center; gap: .45rem; margin-top: .45rem; font-size: .92rem; line-height: 1.35; color: var(--muted); }
.ledger .l .icon { color: var(--trade); }

/* 8 · Sections & headings ---------------------------------------------- */
.section { padding: clamp(3rem, 6vw, 4.75rem) 0; }
.section--flush { padding-top: 0; }
.band { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: 2rem; }
.section-head .eyebrow { color: var(--brass-ink); }
.section-head h2 { margin-bottom: .75rem; font-size: clamp(1.75rem, 3.2vw, 2.4rem); }
.section-head p { margin: 0; font-size: 1.08rem; color: var(--muted); }

/* 9 · Signals & legend ------------------------------------------------- */
.sig {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .3rem .7rem .3rem .55rem;
    border: 1px solid transparent; border-radius: 999px;
    font-size: .84rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.sig .icon { width: 1.05em; height: 1.05em; stroke-width: 2; }
.sig-wa    { background: var(--good-soft);  color: var(--good); }
.sig-email { background: var(--trade-soft); color: var(--trade); }
.sig-quote { background: var(--brass-soft); color: var(--brass-ink); }
.sig-remp  { background: var(--seal-soft);  color: var(--seal); }
.sig-wait  { background: var(--wait-soft);  color: var(--wait); }
.sig-ok    { background: var(--good);       color: #fff; }
.sig.is-off { background: transparent; border: 1px dashed #c4b9a5; color: var(--subtle); font-weight: 400; }
.sig.is-off .icon { opacity: .6; }

.legend {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
    overflow: hidden;
    background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
}
.legend--4 { grid-template-columns: repeat(4, 1fr); }
.legend li { padding: 1.1rem 1.15rem; background: var(--card); }
.legend .sig { margin: 0 .3rem .6rem 0; }
.legend p { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--muted); }
.legend-note {
    display: flex; gap: .75rem; align-items: flex-start;
    margin-top: 1rem; padding: 1rem 1.15rem;
    background: var(--brass-soft); border-left: 3px solid var(--brass); border-radius: 0 10px 10px 0;
    font-size: .95rem; color: #4d4030;
}
.legend-note .icon { margin-top: .2rem; color: var(--brass-ink); }
.legend-note p { margin: 0; }

/* 10 · Filters --------------------------------------------------------- */
.toolbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
    margin-bottom: 1.25rem; padding: .9rem 1rem;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.filters-label { margin-right: .25rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.chip {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .5rem .9rem; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--line-2); background: var(--paper);
    font-size: .9rem; font-weight: 600; color: var(--ink-3);
    transition: background-color .2s, border-color .2s, color .2s, transform .15s;
}
.chip:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] .icon { color: var(--brass); }
.count { margin: 0; font-size: .9rem; color: var(--muted); text-align: right; }
.sort-note { display: block; font-size: .8rem; color: var(--subtle); }
.empty { padding: 2.5rem 1rem; border: 2px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty p { margin: 0; }
.empty button {
    margin-top: .75rem; padding: .25rem .5rem; border: 0; background: none; cursor: pointer;
    color: var(--trade); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}

/* 11 · Listing cards --------------------------------------------------- */
.listings { display: grid; gap: 1.1rem; }
.card {
    position: relative;
    display: grid; grid-template-columns: 64px 156px minmax(0, 1fr) 248px;
    overflow: hidden;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    animation: rise .55s ease-out backwards;
}
.listings > li:nth-child(2) .card { animation-delay: .05s; }
.listings > li:nth-child(3) .card { animation-delay: .1s; }
.listings > li:nth-child(4) .card { animation-delay: .15s; }
.listings > li:nth-child(5) .card { animation-delay: .2s; }
.listings > li:nth-child(n+6) .card { animation-delay: .25s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: rgba(201,151,63,.55); }
.listings > li:target .card { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(201,151,63,.35), var(--shadow-lift); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.card-rank {
    display: flex; justify-content: center; padding-top: 1.4rem;
    background: var(--ink); color: var(--brass);
    font-family: var(--serif); font-style: italic; font-weight: 500;
}
.card-rank .n { font-size: 1.9rem; line-height: 1; font-variant-numeric: lining-nums; }

.card-photo {
    position: relative; margin: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .65rem;
    padding: 1rem .75rem;
    color: var(--trade);
    background-color: var(--trade-soft);
    background-image:
        linear-gradient(rgba(44,110,143,.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44,110,143,.12) 1px, transparent 1px);
    background-size: 14px 14px;
    border-right: 1px solid var(--line);
}
.card-photo .icon { width: 58px; height: 58px; stroke-width: 1.4; }
.card-photo figcaption {
    padding: .25rem .5rem; border-radius: 6px;
    background: rgba(255,255,255,.8);
    font-size: .72rem; font-weight: 600; letter-spacing: .03em; line-height: 1.3; text-align: center;
    color: #3f6b80;
}
.card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.card-main { min-width: 0; padding: 1.35rem 1.5rem 1.4rem; }
.card-title { margin-bottom: .35rem; font-size: clamp(1.3rem, 2vw, 1.55rem); }
.card-place { display: inline-flex; align-items: center; gap: .35rem; margin: 0 0 .75rem; font-size: .88rem; color: var(--muted); }
.card-place .icon { color: var(--brass-ink); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .85rem; }
.tags li { padding: .2rem .55rem; border-radius: 6px; background: var(--paper-2); font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--ink-3); }
.tags li.tag-multi { background: transparent; border: 1px solid var(--line-2); color: var(--muted); }
.card-desc { max-width: 46em; margin-bottom: 1rem; color: #48434d; }
.signals { display: flex; flex-wrap: wrap; gap: .45rem; }

.card-side {
    display: flex; flex-direction: column; justify-content: center; gap: .6rem;
    padding: 1.35rem;
    background: var(--paper);
    border-left: 2px dashed var(--line);
}
.status { align-self: flex-start; margin: 0 0 .1rem; }
.status-sub { margin: -.25rem 0 .35rem; font-size: .76rem; line-height: 1.4; color: var(--subtle); }

/* buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .75rem 1rem; border: 1px solid transparent; border-radius: 10px;
    font-size: .95rem; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, color .2s, box-shadow .2s, transform .15s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-call { flex-direction: column; gap: .15rem; padding: .7rem 1rem; background: var(--ink); color: #fff; }
.btn-call .row { display: inline-flex; align-items: center; gap: .5rem; }
.btn-call .num { font-size: .82rem; font-weight: 400; letter-spacing: .03em; color: #d2c9bb; font-variant-numeric: tabular-nums; }
.btn-call .icon { color: var(--brass); }
.btn-call:hover { background: var(--ink-3); box-shadow: 0 8px 18px -8px rgba(29,27,34,.6); }
.btn-wa { background: var(--good); color: #fff; }
.btn-wa:hover { background: #256243; }
.btn-ghost { background: var(--card); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost .icon { color: var(--trade); }
.btn-gold { padding: .9rem 1.4rem; font-size: 1rem; background: var(--brass); color: var(--ink); }
.btn-gold:hover { background: #d8a74c; box-shadow: 0 10px 24px -10px rgba(201,151,63,.8); }
.btn-dark { padding: .9rem 1.4rem; font-size: 1rem; background: var(--ink); color: #fff; }
.btn-dark .icon { color: var(--brass); }
.btn-dark:hover { background: var(--ink-3); }
.btn-outline-light { padding: .9rem 1.4rem; font-size: 1rem; border-color: rgba(255,255,255,.35); color: #fff; }
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,.06); }

/* 12 · Method ---------------------------------------------------------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.steps::before {
    content: ""; position: absolute; top: calc(1.6rem + 23px); left: 8%; right: 8%;
    border-top: 2px dashed var(--line-2);
}
.step { position: relative; z-index: 1; padding: 1.6rem 1.5rem 1.5rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.step-n {
    display: inline-grid; place-items: center; width: 46px; height: 46px; margin-bottom: 1rem;
    border-radius: 50%; background: var(--ink); color: var(--brass);
    font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.3rem;
    box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px var(--line-2);
}
.step h3 { margin-bottom: .5rem; font-size: 1.25rem; }
.step p { margin: 0 0 .9rem; font-size: .98rem; color: var(--muted); }
.step .sig { font-size: .8rem; }

.disclaimer {
    display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start;
    margin-top: 1.75rem; padding: 1.4rem 1.5rem;
    background: var(--ink); border-radius: var(--radius); color: var(--on-dark);
}
.disclaimer > .icon { width: 30px; height: 30px; stroke-width: 1.5; color: var(--brass); }
.disclaimer h3 { margin-bottom: .4rem; font-size: 1.15rem; color: #fff; }
.disclaimer p { margin: 0; font-size: .97rem; }
.disclaimer a { color: var(--brass-light); }

/* 13 · Tips & FAQ ------------------------------------------------------ */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.tips { display: grid; gap: .9rem; }
.tips--3 { grid-template-columns: repeat(3, 1fr); }
.tip {
    display: grid; grid-template-columns: 48px 1fr; gap: 1rem; align-items: start; align-content: start;
    padding: 1.15rem 1.2rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.tip-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--trade-soft); color: var(--trade); }
.tip-ico .icon { width: 24px; height: 24px; }
.tip h3 { margin-bottom: .25rem; font-family: var(--sans); font-size: 1.02rem; font-weight: 600; letter-spacing: 0; }
.tip p { margin: 0; font-size: .96rem; color: var(--muted); }
.tips--3 .tip { grid-template-columns: 1fr; gap: .9rem; padding: 1.5rem; }
.tips--3 .tip h3 { margin-bottom: .4rem; font-family: var(--serif); font-size: 1.3rem; letter-spacing: -.01em; }

.faq details { border-bottom: 1px solid var(--line-2); }
.faq details:first-of-type { border-top: 1px solid var(--line-2); }
.faq summary {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1.1rem .25rem; cursor: pointer; list-style: none;
    font-family: var(--serif); font-weight: 600; font-size: 1.12rem; line-height: 1.35; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px;
    border: 1px solid var(--line-2); border-radius: 50%;
    font-family: var(--sans); font-weight: 400; font-size: 1.2rem; color: var(--brass-ink);
    transition: transform .25s, background-color .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); background: var(--brass-soft); }
.faq details p { margin: 0; padding: 0 .25rem 1.1rem; color: var(--muted); }
.faq a { color: var(--trade); font-weight: 600; }

/* 14 · Calls to action ------------------------------------------------- */
.join {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 2rem; align-items: center;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    color: var(--on-dark);
    background:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
        radial-gradient(ellipse at 100% 0%, rgba(201,151,63,.28), transparent 60%),
        var(--ink);
    background-size: 24px 24px, 24px 24px, auto, auto;
    border: 1px solid rgba(201,151,63,.4); border-radius: calc(var(--radius) + 6px);
}
.join h2 { margin-bottom: .6rem; font-size: clamp(1.6rem, 3vw, 2.2rem); color: #fff; }
.join p { max-width: 40em; margin: 0; }
.join-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* 15 · Trades ---------------------------------------------------------- */
.trade-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.trade-grid > li { display: flex; }
.trade-card {
    position: relative; flex: 1;
    display: flex; flex-direction: column; gap: .55rem;
    min-height: 228px; padding: 1.5rem 1.5rem 1.3rem;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); color: var(--text); text-decoration: none;
    transition: transform .25s, box-shadow .25s, border-color .25s;
    animation: rise .55s ease-out backwards;
}
.trade-grid > li:nth-child(2) .trade-card { animation-delay: .04s; }
.trade-grid > li:nth-child(3) .trade-card { animation-delay: .08s; }
.trade-grid > li:nth-child(4) .trade-card { animation-delay: .12s; }
.trade-grid > li:nth-child(5) .trade-card { animation-delay: .16s; }
.trade-grid > li:nth-child(6) .trade-card { animation-delay: .2s; }
.trade-grid > li:nth-child(n+7) .trade-card { animation-delay: .24s; }
.trade-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: rgba(201,151,63,.6); }
.trade-ico {
    display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: .5rem;
    border-radius: 16px; background: var(--paper-2); color: var(--ink-3);
    transition: background-color .25s, color .25s;
}
.trade-ico .icon { width: 28px; height: 28px; stroke-width: 1.6; }
.trade-card:hover .trade-ico { background: var(--brass-soft); color: var(--brass-ink); }
.trade-card h3 { font-size: 1.5rem; }
.trade-card p { margin: 0; font-size: .97rem; line-height: 1.5; color: var(--muted); }
.trade-foot {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    margin-top: auto; padding-top: .9rem; border-top: 1px dashed var(--line-2);
    font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle);
}
.trade-foot .icon { width: 1.2em; height: 1.2em; transition: transform .25s; }
.trade-card:hover .trade-foot .icon { transform: translateX(4px); }
.trade-card.is-live {
    color: var(--on-dark);
    background:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
        radial-gradient(ellipse at 100% 0%, rgba(44,110,143,.35), transparent 60%),
        var(--ink);
    background-size: 24px 24px, 24px 24px, auto, auto;
    border-color: rgba(201,151,63,.55);
}
.trade-card.is-live h3 { color: #fff; }
.trade-card.is-live p { color: #cfc6b8; }
.trade-card.is-live .trade-ico { background: var(--brass); color: var(--ink); }
.trade-card.is-live .trade-foot { color: var(--brass); border-top-color: rgba(201,151,63,.35); }
.live-badge, .soon-badge {
    position: absolute; top: 1.2rem; right: 1.2rem;
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .28rem .65rem; border-radius: 999px;
    font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.live-badge { background: rgba(45,118,80,.18); border: 1px solid rgba(143,211,173,.35); color: #8fd3ad; }
.live-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5fd193; box-shadow: 0 0 0 3px rgba(95,209,147,.2); }
.soon-badge { border: 1px dashed var(--line-2); color: var(--subtle); }

/* compact trade links (trade pages, coming soon, 404) */
.trades { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.trades a {
    display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; height: 100%;
    padding: .95rem 1.1rem; border-radius: 12px; text-decoration: none;
    background: var(--card); border: 1px solid var(--line);
    font-weight: 600; color: var(--ink);
    transition: border-color .2s, transform .15s, box-shadow .2s;
}
.trades a:hover { border-color: var(--brass); transform: translateY(-2px); }
.trades small { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.trades a.is-live { border-color: var(--brass); }
.trades a.is-live small { color: var(--good); }
.trades a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; --focus: var(--ink); }
.trades a[aria-current="page"] small { color: var(--brass); }
.trades li.is-picked a { border: 2px solid var(--brass); box-shadow: 0 0 0 4px rgba(201,151,63,.2); }

/* 16 · Forms ----------------------------------------------------------- */
.form-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
.form-panel {
    padding: clamp(1.4rem, 3.5vw, 2.4rem);
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    animation: rise .55s ease-out backwards;
}
.form-panel h2 { margin-bottom: .35rem; font-size: 1.6rem; }
.form-intro { margin-bottom: 1.5rem; color: var(--muted); }
.field { margin-bottom: 1.15rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.field label { display: block; margin-bottom: .4rem; font-size: .92rem; font-weight: 600; color: var(--ink); }
.field .hint { font-weight: 400; color: var(--subtle); }
.field input, .field select, .field textarea {
    width: 100%; padding: .8rem .95rem;
    font: inherit; font-size: 1rem; color: var(--text);
    background: var(--paper); border: 1px solid var(--line-2); border-radius: 10px;
    -webkit-appearance: none; appearance: none;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field input::placeholder, .field textarea::placeholder { color: #6f675d; opacity: 1; }  /* 4.9:1 */
.field select {
    padding-right: 2.6rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f5b1b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .8rem center; background-size: 18px;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #a99b80; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; background-color: #fff; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(201,151,63,.45);
}
.check {
    display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start;
    margin: .4rem 0 1.25rem; padding: .9rem 1rem;
    background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
    font-size: .95rem; cursor: pointer;
}
.check input { width: 20px; height: 20px; margin: .15rem 0 0; accent-color: var(--brass-ink); }
.check a { color: var(--trade); font-weight: 600; }
.form-submit {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    width: 100%; padding: 1rem 1.4rem; border: 0; border-radius: 12px; cursor: pointer;
    background: var(--ink); color: #fff; font-size: 1.05rem; font-weight: 600;
    transition: background-color .2s, transform .15s, box-shadow .2s, opacity .2s;
}
.form-submit .icon { color: var(--brass); }
.form-submit:hover { background: var(--ink-3); transform: translateY(-1px); box-shadow: 0 12px 24px -12px rgba(29,27,34,.7); }
.form-submit[disabled] { opacity: .7; cursor: progress; transform: none; }
.form-note { margin: 1rem 0 0; font-size: .86rem; line-height: 1.5; color: var(--subtle); }
.form-note a { color: var(--trade); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-done { padding: 1rem 0 .5rem; text-align: center; }
.form-done:focus { outline: none; }
.form-done-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 1rem; border-radius: 50%; background: var(--good-soft); color: var(--good); }
.form-done-ico .icon { width: 32px; height: 32px; stroke-width: 2; }
.form-done h2 { margin-bottom: .5rem; }
.form-done p { max-width: 30em; margin: 0 auto 1.25rem; color: var(--muted); }

.aside-stack { display: grid; gap: 1rem; }
.side-card { padding: 1.4rem 1.4rem 1.3rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.side-card h3 { display: flex; align-items: center; gap: .55rem; margin-bottom: .5rem; font-size: 1.2rem; }
.side-card h3 .icon { width: 1.1em; height: 1.1em; color: var(--brass-ink); }
.side-card p { margin: 0 0 .6rem; font-size: .96rem; color: var(--muted); }
.side-card p:last-child { margin-bottom: 0; }
.side-card a { color: var(--trade); font-weight: 600; }
.side-card.dark { background: var(--ink); border-color: rgba(201,151,63,.4); color: var(--on-dark); }
.side-card.dark h3 { color: #fff; }
.side-card.dark h3 .icon { color: var(--brass); }
.side-card.dark p { color: #cfc6b8; }
.side-card.dark a { color: var(--brass-light); }
.mail-link { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.05rem; word-break: break-all; }
.checklist { display: grid; gap: .65rem; margin-top: .4rem; }
.checklist li { display: grid; grid-template-columns: auto 1fr; gap: .65rem; align-items: start; font-size: .95rem; line-height: 1.45; color: #e6dece; }
.checklist .sig { padding: .3rem; border-radius: 8px; }
.checklist .sig .icon { width: 1.1em; height: 1.1em; }

/* 17 · Legal pages ----------------------------------------------------- */
.doc-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); }
.toc h2 { margin-bottom: .8rem; font-family: var(--sans); font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-ink); }
.toc ol { border-left: 2px solid var(--line); counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc ol a {
    display: block; margin-left: -2px; padding: .4rem 0 .4rem 1rem;
    border-left: 2px solid transparent;
    font-size: .93rem; line-height: 1.35; color: var(--muted); text-decoration: none;
    transition: color .2s, border-color .2s;
}
.toc ol a::before { content: counter(toc, decimal-leading-zero) "\2002"; font-family: var(--serif); font-style: italic; color: var(--brass-ink); }
.toc ol a:hover { color: var(--ink); border-left-color: var(--brass); }
.toc-more { display: grid; gap: .4rem; margin-top: 1.5rem; font-size: .9rem; }
.toc-more a { color: var(--trade); font-weight: 600; text-decoration: none; }
.toc-more a:hover { text-decoration: underline; text-underline-offset: 3px; }

.doc-card {
    padding: clamp(1.5rem, 4vw, 3rem);
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.doc-card h2 { display: flex; align-items: baseline; gap: .75rem; margin: 2.25rem 0 .8rem; font-size: clamp(1.35rem, 2.3vw, 1.65rem); }
.doc-card h2:first-child { margin-top: 0; }
.doc-card h2 .n { min-width: 1.6em; font-style: italic; font-weight: 500; font-size: .85em; color: var(--brass-ink); }
.doc-card p, .doc-card li { font-size: 1.02rem; line-height: 1.75; color: #46414b; }
.doc-card ul { overflow: hidden; margin: 0 0 1rem; border: 1px solid var(--line); border-radius: 12px; }
.doc-card ul li { padding: .7rem 1rem; background: var(--paper); }
.doc-card ul li + li { border-top: 1px solid var(--line); }
.doc-card a { color: var(--trade); font-weight: 600; }
.updated {
    display: inline-flex; align-items: center; gap: .5rem;
    margin: 2rem 0 0; padding: .45rem .8rem; border-radius: 999px;
    background: var(--paper-2); font-size: .85rem; color: var(--muted);
}
.doc-card .updated { font-size: .85rem; color: var(--muted); }

/* 17b · Guides --------------------------------------------------------- */
.guide-grid { grid-template-columns: repeat(2, 1fr); }
.guide-card { min-height: 0; }
.guide-card h3 { font-size: 1.32rem; line-height: 1.25; }
.guide-note { margin-top: 1.5rem; }
.doc-card--guide h2[id="fuentes"] { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px dashed var(--line-2); font-size: 1.2rem; }
.doc-steps { display: grid; gap: .8rem; margin: 0 0 1.25rem; counter-reset: paso; }
.doc-steps li { position: relative; padding-left: 3rem; counter-increment: paso; }
.doc-steps li::before {
    content: counter(paso); position: absolute; left: 0; top: .1rem;
    display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
    background: var(--brass-soft); color: var(--brass-ink);
    font-family: var(--serif); font-size: 1rem; font-weight: 600; line-height: 1;
}
.callout {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem;
    margin: 1.25rem 0; padding: 1rem 1.2rem;
    background: var(--trade-soft); border: 1px solid var(--line); border-left: 4px solid var(--trade); border-radius: 12px;
}
.callout > .icon { width: 1.4rem; height: 1.4rem; margin-top: .15rem; color: var(--trade); }
.doc-card .callout p { margin: 0; font-size: .98rem; line-height: 1.6; color: var(--text); }
.doc-card .callout .callout-title { margin-bottom: .2rem; font-weight: 600; color: var(--ink); }
.callout--alerta { background: var(--seal-soft); border-left-color: var(--seal); }
.callout--alerta > .icon { color: var(--seal); }
.doc-card .sources li { font-size: .93rem; line-height: 1.5; }
.doc-card .doc-note { display: flex; gap: .5rem; margin: .9rem 0 0; font-size: .88rem; line-height: 1.5; color: var(--subtle); }
.doc-note .icon { flex: none; width: 1.1em; height: 1.1em; margin-top: .2em; }
.doc-cta {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem;
    margin-top: 2rem; padding: 1.4rem 1.5rem;
    background: var(--ink); border-radius: var(--radius); --focus: var(--brass-light);
}
.doc-card .doc-cta p { flex: 1 1 18rem; margin: 0; font-size: .98rem; line-height: 1.55; color: var(--on-dark); }
.doc-cta strong { display: block; margin-bottom: .2rem; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: #fff; }
.doc-card .doc-cta .btn { color: var(--ink); }

/* 18 · Coming soon & 404 ----------------------------------------------- */
.soon-panel {
    display: grid; grid-template-columns: auto 1fr; gap: clamp(1.25rem, 3vw, 2.25rem); align-items: center;
    margin-bottom: 2.5rem; padding: clamp(1.5rem, 4vw, 2.5rem);
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.soon-mark {
    display: grid; place-items: center; width: clamp(88px, 12vw, 120px); aspect-ratio: 1;
    border-radius: 24px; color: var(--brass);
    background-color: var(--ink);
    background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 12px 12px;
}
.soon-mark .icon { width: 48%; height: 48%; stroke-width: 1.5; }
.soon-mark .big { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1; }
.soon-panel h2 { margin-bottom: .5rem; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.soon-panel p { margin-bottom: 1.1rem; color: var(--muted); }

/* 19 · Footer ---------------------------------------------------------- */
.site-footer {
    position: relative;
    background: var(--ink); border-top: 4px solid var(--brass);
    font-size: .93rem; color: var(--on-dark-2);
}
.site-footer::before {
    top: 0;
    background:
        repeating-linear-gradient(90deg, rgba(201,151,63,.55) 0 1px, transparent 1px 10px) 0 0 / 100% 5px no-repeat,
        repeating-linear-gradient(90deg, rgba(201,151,63,.9) 0 1px, transparent 1px 50px) 0 0 / 100% 12px no-repeat;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; padding: 3.25rem 0 2rem; }
.footer-grid h2 { margin-bottom: .9rem; font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.footer-grid li { margin-bottom: .45rem; }
.footer-grid a { color: #d8d1c4; text-decoration: none; }
.footer-grid a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-brand .brand { margin-bottom: .9rem; }
.footer-brand p { max-width: 30em; margin: 0; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: 1.25rem 0 1.5rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .84rem; }

/* ads (collapse while empty) */
.ad-slot { max-width: var(--wrap); min-height: 90px; margin: 1.5rem auto; padding: 0 1rem; }
.ad-slot:empty { display: none; }

/* 20 · Responsive ------------------------------------------------------ */
@media (max-width: 1080px) {
    .card { grid-template-columns: 56px 132px minmax(0, 1fr); }
    .card-side {
        grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center;
        padding: 1rem 1.25rem; border-left: 0; border-top: 2px dashed var(--line);
    }
    .status { margin: 0 auto 0 0; align-self: center; }
    .status-sub { display: none; }
    .legend { grid-template-columns: repeat(3, 1fr); }
    .legend--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .hero .wrap { grid-template-columns: 1fr; }
    .hero-art { display: none; }
    .ledger ul { grid-template-columns: repeat(2, 1fr); }
    .ledger li:nth-child(3) { border-left: 0; }
    .ledger li:nth-child(n+3) { border-top: 1px dashed var(--line-2); }
    .steps { grid-template-columns: 1fr; }
    .steps::before { display: none; }
    .two-col, .join, .form-layout, .doc-layout { grid-template-columns: 1fr; }
    .trade-grid { grid-template-columns: repeat(2, 1fr); }
    .tips--3 { grid-template-columns: 1fr; }
    .toc { position: static; padding: 1.1rem 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
    .toc-more { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    html { scroll-padding-top: 16px; }
    .site-header { position: static; }
    .site-header .wrap { flex-wrap: wrap; gap: .5rem 1rem; padding-top: .6rem; padding-bottom: .1rem; }
    .site-nav { order: 3; width: calc(100% + 16px); margin: 0 -8px; overflow-x: auto; scrollbar-width: none; }
    .site-nav::-webkit-scrollbar { display: none; }
    .site-nav ul { gap: 0; }
    .site-nav li.nav-home { display: none; }   /* the logo already links home */
    .site-nav a { padding: .55rem .5rem; font-size: .88rem; white-space: nowrap; }
}
@media (max-width: 640px) {
    body { font-size: 1rem; }
    .card { grid-template-columns: 1fr; }
    .card-rank {
        position: absolute; top: 12px; left: 12px; z-index: 2;
        padding: .35rem .7rem; border-radius: 999px;
    }
    .card-rank .n { font-size: 1.15rem; }
    .card-photo { flex-direction: row; justify-content: flex-end; min-height: 96px; padding-right: 1.1rem; border-right: 0; border-bottom: 1px solid var(--line); }
    .card-photo .icon { width: 44px; height: 44px; }
    .card-main { padding: 1.15rem 1.15rem 1.1rem; }
    .card-side { flex-direction: column; align-items: stretch; padding: 1rem 1.15rem 1.15rem; }
    .status { margin: 0 0 .25rem; align-self: flex-start; }
    .card-side .btn, .hero-actions .btn, .join-actions .btn { width: 100%; }
    .legend { grid-template-columns: 1fr 1fr; }
    .legend > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .toolbar { padding: .85rem; }
    .filters-label { width: 100%; }
    .count { text-align: left; }
    .trade-grid { grid-template-columns: 1fr; }
    .trade-card { min-height: 0; }
    .field-row { grid-template-columns: 1fr; }
    .soon-panel { grid-template-columns: 1fr; }
    .tip { grid-template-columns: 40px 1fr; }
    .tip-ico { width: 40px; height: 40px; }
    .tips--3 .tip { grid-template-columns: 1fr; }
    .doc-card ul li { padding: .65rem .85rem; }
    .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .legend { grid-template-columns: 1fr; }
    .ledger li { padding: 1rem 1.1rem; }
    .ledger .l { font-size: .84rem; }
    .brand { font-size: 1.15rem; }
    .brand-mark { width: 30px; height: 30px; }
}

/* 21 · Motion, contrast, print ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
    .sig, .chip, .btn, .tile, .card, .trade-card, .toolbar, .lang-switch button, .trades a { border: 1px solid CanvasText; }
    .sig.is-off { border-style: dashed; }
    .chip[aria-pressed="true"], .lang-switch button[aria-pressed="true"] { outline: 2px solid Highlight; }
    .hero::after, .site-footer::before { display: none; }
}
@media print {
    .site-header, .toolbar, .ad-slot, .join, .site-footer, .hero-art, .skip-link, .lang-switch { display: none !important; }
    body { background: #fff; font-size: 11pt; }
    .hero { padding: 0 0 1rem; background: #fff; border: 0; color: #000; }
    .hero::after { display: none; }
    .hero h1, .hero h1 em, .hero-lead, .hero-meta, .crumbs ol, .eyebrow { color: #000; }
    .ledger { margin-top: 0; }
    .card, .trade-card, .form-panel, .doc-card { box-shadow: none; animation: none; break-inside: avoid; }
    .card-side { background: #fff; }
}
