/* ===========================================================================
   GUIAS — shared stylesheet for the resource hub and every guide page.

   Built ON TOP of styles.css, never beside it: every colour here resolves to a
   token already defined in that file's :root. If a value is hard-coded below it
   is because it is a one-off tint of an existing token, not a new brand colour.

   WHY THIS FILE EXISTS AT ALL (and why there is no component library):
   tandom.com.br is static HTML with no build step. tandom.ai is Next + React +
   Tailwind + shadcn, which is why shadcn lives there and not here. On a content
   site, consistency comes from a GENERATOR, not from components: every page
   under /guias is rendered by build_guias.py through one template, so drift is
   impossible by construction. Add a guide by writing markdown, not HTML.

   Palette note: the landing page runs periwinkle (--primary) as its accent.
   The hub runs GOLD (--gold1/--gold2), which is the site's warm signature, so
   editorial content reads as a distinct surface from the sales page while
   staying inside the same system.
   =========================================================================== */

/* ---------- shared shell ---------- */
.gwrap{max-width:1200px;margin:0 auto;padding:0 40px}
.gnarrow{max-width:760px}

/* the hub and the guides sit on cream, not white: warmer than the LP body and
   it makes the gold rules read as part of the surface rather than decoration */
/* white, like every other page; the cream survives only inside .ghead */
body.guias{background:var(--background)}

/* ---------- header, with the trade-lane map behind it ----------
   Same shape as tandom.ai's Resource Center hero, inverted: theirs is a navy
   band with a white-on-dark canvas, ours is cream with gold lanes, because
   this site's whole surface is warm. The canvas is decorative and aria-hidden;
   a radial scrim keeps the type off the busiest part of the animation. */
.ghead{position:relative;isolation:isolate;overflow:hidden;
  /* symmetric: header.site is sticky, so it occupies flow space and the band
     does not need extra top padding to clear it. 132/54 sat the text low;
     93/93 centres it and keeps the band the same height. */
  padding:93px 0;border-bottom:1px solid rgba(156,122,32,.18);
  background:linear-gradient(180deg,#faf7f0 0%,#f4eddf 100%)}
.ghead canvas{position:absolute;inset:0;width:100%;height:100%;z-index:-2;display:block}
.ghead::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:radial-gradient(62% 66% at 24% 50%, rgba(250,247,240,.94) 0%, rgba(250,247,240,.70) 44%, rgba(250,247,240,0) 100%)}
.ghead .eyebrow{color:#8a7440}
.ghead h1{font-family:"Fraunces",Georgia,serif;font-variation-settings:"opsz" 26;
  font-weight:530;letter-spacing:-.015em;font-size:clamp(38px,4.4vw,60px);line-height:1.06;margin:0}
.ghead p{margin:14px 0 0;max-width:60ch;font-size:16px;line-height:1.62;color:#5b5343}
/* the one-line "what this is", between the title and the longer description */
.ghead .glede{margin-top:16px;font-size:19px;line-height:1.45;color:#3f3a2e;font-weight:500;max-width:46ch}
.ghead .gback{display:inline-flex;align-items:center;gap:6px;font-size:13.5px;color:#8a7440;
  text-decoration:none;font-weight:600}
.ghead .gback:hover{color:var(--ink)}
.ghead .gartmeta{margin:16px 0 0;display:flex;flex-wrap:wrap;gap:10px;align-items:center;
  font-size:12.5px;color:#8a8578}
.ghead .gartmeta i{font-style:normal;width:3px;height:3px;border-radius:50%;background:#c4b48c}
/* guide pages get a shorter version of the same band */
.ghead.compact{padding:78px 0}
.ghead.compact h1{font-size:clamp(30px,3.4vw,44px);line-height:1.14;margin:16px 0 0}

/* ---------- two-column body with the index pinned on the left ----------
   Mirrors tandom.ai's GuideLayout grid (220px + content, sticky at lg+). Below
   the breakpoint it collapses to one column and the index moves inline, which
   is what you want on a phone: nobody wants a sticky sidebar eating a 390px
   viewport. */
.rgrid{display:grid;grid-template-columns:220px minmax(0,1fr);gap:56px;
  max-width:1200px;margin:0 auto;padding:52px 40px 96px}
.rside{position:sticky;top:104px;align-self:start}
.rside b{display:block;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:#97927f;margin-bottom:12px}
.rside ul{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.rside a{display:block;padding:5px 0 5px 12px;border-left:2px solid rgba(156,122,32,.22);
  font-size:13.5px;line-height:1.45;color:#6b6146;text-decoration:none;
  transition:color .15s ease,border-color .15s ease}
.rside a:hover{color:var(--ink);border-left-color:var(--gold1)}
.rside a.on{color:var(--ink);font-weight:600;border-left-color:var(--gold1)}
@media(max-width:1000px){
  .rgrid{grid-template-columns:1fr;gap:0;padding:34px 22px 64px}
  .rside{position:static;margin-bottom:26px;padding:16px 18px;
    background:rgba(255,255,255,.62);border:1px solid rgba(156,122,32,.16);border-radius:12px}
}

/* ---------- hub sections + cards ---------- */
.gsec{padding:0}
.gsec + .gsec{padding-top:52px}
.rmain{min-width:0}
.rmain .gcta{margin-top:52px}
.gsectitle{display:flex;align-items:baseline;gap:14px;margin:0 0 22px}
.gsectitle h2{font-family:"Fraunces",Georgia,serif;font-variation-settings:"opsz" 26;
  font-weight:530;letter-spacing:-.01em;font-size:26px;margin:0;color:var(--ink)}
.gsectitle span{font-size:13.5px;color:#97927f}

/* topic filter pills — same gold family as the card kickers, so "filter" and
   "category label" read as one system. Active pill inverts to the kicker
   brown; the count sits as a quiet numeral, not a badge. */
.gpills{display:flex;flex-wrap:wrap;gap:9px;margin:0 0 22px}
.gpill{appearance:none;font:inherit;font-size:13.5px;font-weight:600;line-height:1;
  color:#6b6146;background:#fff;border:1px solid rgba(156,122,32,.28);border-radius:999px;
  padding:9px 15px;cursor:pointer;display:inline-flex;align-items:center;gap:7px;
  transition:border-color .15s ease,background .15s ease,color .15s ease}
.gpill:hover{border-color:rgba(156,122,32,.55);color:var(--ink)}
.gpill i{font-style:normal;font-size:11.5px;font-weight:700;color:#97927f}
.gpill.on{background:#8a7440;border-color:#8a7440;color:#fff}
.gpill.on i{color:rgba(255,255,255,.72)}

.gcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:16px}
/* the filter sets [hidden]; without this rule the .gcard display:flex below
   would override the UA's [hidden]{display:none} and the filter would count
   right while hiding nothing */
.gcard[hidden]{display:none}
.gcard{display:flex;flex-direction:column;background:#fff;border:1px solid rgba(156,122,32,.18);
  border-radius:14px;padding:22px 22px 20px;text-decoration:none;color:inherit;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.gcard:hover{border-color:rgba(156,122,32,.42);box-shadow:0 10px 28px rgba(90,70,20,.10);transform:translateY(-2px)}
.gcard .gk{display:inline-flex;align-items:center;gap:7px;font-size:11px;font-weight:700;
  letter-spacing:.1em;text-transform:uppercase;color:#8a7440;margin-bottom:12px}
.gcard .gk svg{width:15px;height:15px;color:var(--gold1)}
.gcard h3{font-size:18.5px;font-weight:650;line-height:1.32;letter-spacing:-.012em;
  color:var(--ink);margin:0 0 9px}
.gcard p{margin:0;font-size:14.5px;line-height:1.55;color:#5b5343;flex:1}
.gcard .gmeta{margin-top:16px;padding-top:13px;border-top:1px solid rgba(156,122,32,.14);
  display:flex;gap:12px;align-items:center;font-size:12px;color:#97927f}
.gcard .gmeta .gdot{width:3px;height:3px;border-radius:50%;background:#c9bfa4}

/* "planned" cards are not links: they must not look clickable */
.gcard.soon{background:rgba(255,255,255,.5);border-style:dashed;cursor:default}
.gcard.soon:hover{transform:none;box-shadow:none;border-color:rgba(156,122,32,.24)}
.gcard.soon h3{color:#6b6146}

/* ---------- guide page ---------- */
.gart{padding:0;min-width:0}
.gart .gback{display:inline-flex;align-items:center;gap:6px;font-size:13.5px;color:#8a7440;
  text-decoration:none;font-weight:600}
.gart .gback:hover{color:var(--ink)}
.gart h1{font-family:"Fraunces",Georgia,serif;font-variation-settings:"opsz" 26;font-weight:530;
  letter-spacing:-.015em;font-size:clamp(32px,3.6vw,46px);line-height:1.12;margin:20px 0 0;color:var(--ink)}
.gartmeta{margin:18px 0 0;display:flex;flex-wrap:wrap;gap:10px;align-items:center;
  font-size:12.5px;color:#97927f}
.gartmeta i{font-style:normal;width:3px;height:3px;border-radius:50%;background:#c9bfa4}

/* the answer-in-brief block: first thing a reader (or an LLM) should find */
.gbrief{margin:30px 0 0;background:#fff;border:1px solid rgba(156,122,32,.2);border-left:3px solid var(--gold1);
  border-radius:12px;padding:20px 22px}
.gbrief b{display:block;font-size:11.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:#8a7440;margin-bottom:9px}
.gbrief p{margin:0;font-size:16px;line-height:1.62;color:#3f3a2e}

.gtoc{margin:30px 0 0;padding:18px 22px;background:rgba(255,255,255,.6);
  border:1px solid rgba(156,122,32,.16);border-radius:12px}
.gtoc b{display:block;font-size:11.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:#8a7440;margin-bottom:10px}
/* the source headings already carry their own "1." / "2." numbering, so the TOC
   must NOT add a second set. Unstyled ul, not ol. */
.gtoc ul{margin:0;padding:0;list-style:none}
.gtoc li{font-size:14.5px;line-height:1.75;color:#5b5343}
.gtoc a{color:#5b5343;text-decoration:none}
.gtoc a:hover{color:var(--ink);text-decoration:underline}

/* ---------- guide body typography ---------- */
.gbody{margin:44px 0 0;font-size:16.5px;line-height:1.72;color:#3f3a2e}
.gbody > * + *{margin-top:18px}
.gbody h2{font-family:"Fraunces",Georgia,serif;font-variation-settings:"opsz" 26;font-weight:530;
  letter-spacing:-.01em;font-size:27px;line-height:1.22;color:var(--ink);
  margin-top:52px;padding-top:22px;border-top:1px solid rgba(156,122,32,.16);scroll-margin-top:90px}
.gbody h3{font-size:19px;font-weight:650;letter-spacing:-.01em;color:var(--ink);margin-top:34px;scroll-margin-top:90px}
.gbody p{margin-top:16px}
.gbody b,.gbody strong{font-weight:650;color:var(--ink)}
.gbody a{color:#8a6a1c;text-decoration:underline;text-underline-offset:2px}
.gbody a:hover{color:var(--ink)}
.gbody ul,.gbody ol{margin-top:16px;padding-left:22px}
.gbody li{margin-top:8px}
.gbody li::marker{color:var(--gold1)}
.gbody blockquote{margin:22px 0;padding:16px 20px;background:rgba(255,255,255,.7);
  border-left:3px solid var(--gold1);border-radius:0 10px 10px 0;color:#4a4436}
.gbody blockquote p{margin:0}
.gbody code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.88em;
  background:rgba(156,122,32,.10);border-radius:5px;padding:2px 6px;color:#5a4a1e}
.gbody pre{margin-top:18px;background:var(--footer);color:#dbe4f8;border-radius:12px;
  padding:18px 20px;overflow-x:auto;font-size:13.5px;line-height:1.6}
.gbody pre code{background:none;padding:0;color:inherit}
.gbody hr{border:0;border-top:1px solid rgba(156,122,32,.2);margin:34px 0}

/* tables scroll inside their own box; the page never scrolls sideways */
.gtable{margin-top:20px;overflow-x:auto;border:1px solid rgba(156,122,32,.18);border-radius:12px;background:#fff}
.gbody table{border-collapse:collapse;width:100%;font-size:14.5px;font-variant-numeric:tabular-nums}
.gbody th,.gbody td{padding:11px 15px;text-align:left;border-bottom:1px solid rgba(156,122,32,.13);white-space:nowrap}
.gbody thead th{background:rgba(156,122,32,.07);font-size:12px;font-weight:700;letter-spacing:.05em;
  text-transform:uppercase;color:#7a6420;white-space:nowrap}
.gbody tbody tr:last-child td{border-bottom:0}

/* ---------- FAQ + glossary ---------- */
.gfaq{margin-top:52px;padding-top:22px;border-top:1px solid rgba(156,122,32,.16)}
.gfaq > h2{font-family:"Fraunces",Georgia,serif;font-variation-settings:"opsz" 26;font-weight:530;
  font-size:27px;margin:0 0 6px;color:var(--ink)}
.gfaq details{border-bottom:1px solid rgba(156,122,32,.16)}
.gfaq summary{padding:18px 34px 18px 0;font-size:16.5px;font-weight:650;color:var(--ink);
  list-style:none;position:relative;cursor:pointer}
.gfaq summary::-webkit-details-marker{display:none}
.gfaq summary::after{content:'+';position:absolute;right:4px;top:50%;transform:translateY(-52%);
  font-size:22px;font-weight:400;color:var(--gold1);transition:transform .2s}
.gfaq details[open] summary::after{transform:translateY(-52%) rotate(45deg)}
.gfaq .ga{padding:0 0 20px;font-size:15.5px;line-height:1.68;color:#4a4436;max-width:72ch}

.gloss{margin-top:44px;padding-top:22px;border-top:1px solid rgba(156,122,32,.16)}
.gloss h2{font-family:"Fraunces",Georgia,serif;font-variation-settings:"opsz" 26;font-weight:530;
  font-size:23px;margin:0 0 16px;color:var(--ink)}
.gloss dl{margin:0;display:grid;gap:12px}
.gloss dt{font-size:15px;font-weight:650;color:var(--ink)}
.gloss dd{margin:3px 0 0;font-size:15px;line-height:1.62;color:#5b5343}

/* ---------- closing CTA on every guide ---------- */
.gcta{margin:60px 0 0;background:linear-gradient(180deg,#faf7f0 0%,#f3ecdc 100%);
  border:1px solid rgba(156,122,32,.2);border-radius:16px;padding:34px 34px 32px;text-align:center}
.gcta h2{font-family:"Fraunces",Georgia,serif;font-variation-settings:"opsz" 26;font-weight:530;
  font-size:clamp(23px,2.4vw,30px);line-height:1.18;letter-spacing:-.012em;margin:0;color:var(--ink)}
.gcta p{margin:12px auto 20px;max-width:52ch;font-size:16px;line-height:1.6;color:#5b5343}

.grelated{margin-top:48px;padding-top:22px;border-top:1px solid rgba(156,122,32,.16)}
.grelated b{display:block;font-size:11.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:#8a7440;margin-bottom:14px}
.grelated .gcards{grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.grelated .gcard{padding:18px 18px 16px}
.grelated .gcard h3{font-size:16px;margin-bottom:7px}
.grelated .gcard p{font-size:13.5px;line-height:1.5}

.gfootnote{margin:40px 0 0;font-size:12.5px;line-height:1.6;color:#97927f}

@media(max-width:760px){
  .gwrap{padding:0 22px}
  .ghead{padding:66px 0}
  .gart{padding:92px 0 0}
  .gbody{font-size:16px}
  .gbody h2{font-size:23px;margin-top:40px}
  .gcta{padding:26px 22px 24px}
}
