/* Tigrinho Legal – style.css */
/* Swiss grid, bold sans-serif headlines, serif body */
/* Colors: #0D1B2A (navy), #F4A918 (amber), #FFFFFF (white) */

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0D1B2A;
  --amber: #F4A918;
  --white: #FFFFFF;
  --gray-100: #F5F6F7;
  --gray-200: #E8EAED;
  --gray-400: #9AA0A8;
  --gray-700: #3C4043;
  --text: #1A1A2E;
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'IBM Plex Serif', Georgia, serif;
  --max-w: 1180px;
  --col-gap: 2rem;
  --radius: 4px;
  --header-h: 64px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ── Skip link ───────────────────────────────────────────── */
.skip-wrap { position: absolute; top: 0; left: 0; z-index: 9999; }
.skip-link {
  display: inline-block;
  padding: .5rem 1rem;
  background: var(--amber);
  color: var(--navy);
  font-family: var(--font-sans);
  font-weight: 700;
  transform: translateY(-100%);
  transition: transform .2s;
}
.skip-link:focus { transform: translateY(0); }

/* ── Utility ─────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--navy);
  color: var(--white);
  border-bottom: 3px solid var(--amber);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
  height: var(--header-h);
}

.brand {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.brand-logo { border-radius: 2px; }
.brand--footer { color: var(--white); }

/* Nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 2px solid var(--amber);
  border-radius: var(--radius);
  cursor: pointer;
  flex-shrink: 0;
}
.toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
  transition: transform .2s, opacity .2s;
}

/* CTA buttons in header */
.header-ctas {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  flex-shrink: 0;
}

.cta {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: .85rem;
  padding: 0 1rem;
  height: 44px;
  line-height: 44px;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
  transition: opacity .15s;
}
.cta:hover { opacity: .85; }
.cta-signup {
  background: var(--amber);
  color: var(--navy);
}
.cta-login {
  background: transparent;
  color: var(--amber);
  border: 2px solid var(--amber);
  line-height: 40px;
}

/* Header nav aside (desktop inline) */
.header-nav-aside {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
  background: var(--navy);
}
.header-nav-aside nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  padding: .5rem 0;
}
.header-nav-aside nav ul li a {
  display: inline-block;
  padding: .5rem .85rem;
  font-family: var(--font-sans);
  font-size: .85rem;
  color: var(--gray-200);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
  min-height: 44px;
  line-height: 1.2;
  display: flex;
  align-items: center;
}
.header-nav-aside nav ul li a:hover { color: var(--amber); background: rgba(255,255,255,.06); }

/* ── Main layout patterns ────────────────────────────────── */

/* Home */
.home-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
}

.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--col-gap);
  align-items: center;
  padding: 3rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.hero-figure {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--gray-100);
  margin: 0;
}
.hero-figure--empty { border: 2px dashed var(--gray-200); }
.hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-copy h1 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: .75rem;
}
.hero-intro { margin-top: 1rem; }

.home-topics {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--col-gap);
  padding: 2.5rem 0 3rem;
}

.home-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  align-self: start;
}

/* Topic */
.topic-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}
.topic-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: var(--col-gap);
  align-items: start;
}
.topic-primary { min-width: 0; }
.topic-intro {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 2rem;
}
.topic-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  align-self: start;
}

/* Article */
.article-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}
.article-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: var(--col-gap);
  align-items: start;
}
.article-primary { min-width: 0; }

.article-head-section {
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--amber);
  margin-bottom: 2rem;
}
.article-head-section h1 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  color: var(--navy);
  line-height: 1.25;
  margin: .75rem 0 .5rem;
}

.article-hero {
  width: 100%;
  margin-bottom: 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.article-hero-img { width: 100%; height: auto; display: block; }

.article-meta-aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}

.article-body-section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--col-gap);
  align-items: start;
}

.article-toc-aside {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  padding: 1rem;
  background: var(--gray-100);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
}
.toc-heading {
  font-family: var(--font-sans);
  font-size: .85rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .5rem;
}
.toc-heading span { display: block; }
.toc-desc { font-size: .85rem; line-height: 1.5; color: var(--gray-700); }

.article-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  align-self: start;
}

/* Inner (about / privacy) */
.inner-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}
.inner-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: var(--col-gap);
  align-items: start;
}
.inner-primary { min-width: 0; }
.inner-primary h1 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  color: var(--navy);
  margin: .75rem 0 1.25rem;
  line-height: 1.25;
}
.inner-label-aside { margin-bottom: .25rem; }
.inner-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  align-self: start;
}

/* ── Sidebar common ──────────────────────────────────────── */
.sidebar-heading {
  font-family: var(--font-sans);
  font-size: .8rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .6rem;
  padding-bottom: .3rem;
  border-bottom: 2px solid var(--amber);
}
.sidebar-heading span { display: block; }

.topic-sidebar nav ul,
.article-sidebar nav ul,
.inner-sidebar nav ul,
.home-sidebar nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.topic-sidebar nav ul li a,
.article-sidebar nav ul li a,
.inner-sidebar nav ul li a,
.home-sidebar nav ul li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .4rem .6rem;
  font-family: var(--font-sans);
  font-size: .88rem;
  color: var(--navy);
  text-decoration: none;
  border-radius: var(--radius);
  transition: background .15s, color .15s;
}
.topic-sidebar nav ul li a:hover,
.article-sidebar nav ul li a:hover,
.inner-sidebar nav ul li a:hover,
.home-sidebar nav ul li a:hover {
  background: var(--gray-100);
  color: var(--amber);
}
.topic-sidebar nav ul li.active > a {
  font-weight: 700;
  color: var(--amber);
  background: rgba(244,169,24,.08);
}

.sidebar-related,
.sidebar-trust,
.sidebar-author-card {
  margin-top: 1.5rem;
}
.sidebar-related ul,
.sidebar-trust ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.sidebar-related ul li a,
.sidebar-trust ul li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .3rem .6rem;
  font-family: var(--font-sans);
  font-size: .85rem;
  color: var(--navy);
  text-decoration: underline;
  border-radius: var(--radius);
  transition: color .15s;
}
.sidebar-related ul li a:hover,
.sidebar-trust ul li a:hover { color: var(--amber); }

.sidebar-text {
  font-size: .875rem;
  line-height: 1.55;
  color: var(--gray-700);
  margin-bottom: 1rem;
}
.sidebar-author-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .9rem;
  color: var(--navy);
  margin-bottom: .25rem;
}
.sidebar-author-cred {
  font-size: .82rem;
  color: var(--gray-400);
  margin-bottom: .5rem;
}
.sidebar-author-link {
  font-family: var(--font-sans);
  font-size: .85rem;
  color: var(--amber);
  font-weight: 600;
  text-decoration: none;
}
.sidebar-author-link:hover { text-decoration: underline; }

/* ── Child cards ─────────────────────────────────────────── */
.child-articles {
  margin-top: 2rem;
}
.section-heading {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.section-heading span { display: block; }

/* Cards: direct children of .child-articles article */
.child-articles > section.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
  transition: box-shadow .15s;
}
.child-articles > section.card:hover { box-shadow: 0 4px 16px rgba(13,27,42,.1); }
.card-body { padding: 1.1rem 1.25rem .75rem; flex: 1; }
.card-title { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; margin-bottom: .35rem; }
.card-title a { color: var(--navy); text-decoration: none; }
.card-title a:hover { color: var(--amber); }
.card-desc { font-size: .88rem; color: var(--gray-700); line-height: 1.5; margin-bottom: .4rem; }
.card-date { font-family: var(--font-sans); font-size: .78rem; color: var(--gray-400); }
.card-accent { height: 4px; background: var(--amber); }

/* ── Prose ───────────────────────────────────────────────── */
.prose {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  max-width: 72ch;
}
.prose h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--navy);
  margin: 2rem 0 .75rem;
  line-height: 1.25;
}
.prose h2 span { display: block; }
.prose h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--navy);
  margin: 1.5rem 0 .5rem;
}
.prose h3 span { display: block; }
.prose p { margin-bottom: 1rem; }
.prose a { color: var(--navy); text-decoration: underline; font-weight: 500; }
.prose a:hover { color: var(--amber); }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: .35rem; }
.prose blockquote {
  border-left: 4px solid var(--amber);
  margin: 1.5rem 0;
  padding: .75rem 1.25rem;
  background: var(--gray-100);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; font-size: .9rem; }
.prose th { background: var(--navy); color: var(--white); padding: .6rem .75rem; text-align: left; font-family: var(--font-sans); font-size: .85rem; }
.prose td { padding: .55rem .75rem; border-bottom: 1px solid var(--gray-200); }
.prose tr:nth-child(even) td { background: var(--gray-100); }
.prose img { max-width: 100%; border-radius: var(--radius); display: block; margin: 1.25rem 0; }
.prose strong { font-weight: 700; color: var(--navy); }

/* ── Labels / badges ─────────────────────────────────────── */
.page-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--amber);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: .15rem .5rem;
}
.stage-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: var(--radius);
  padding: .15rem .55rem;
}
.stage-awareness { background: #E8F4FD; color: #1A6EA8; }
.stage-consideration { background: #FEF9E7; color: #9A6F00; }
.stage-decision { background: #E8F8F0; color: #1A7A45; }

/* ── Byline ──────────────────────────────────────────────── */
.byline {
  font-family: var(--font-sans);
  font-size: .85rem;
  color: var(--gray-400);
  margin-bottom: .75rem;
}
.byline time { font-weight: 600; color: var(--gray-700); }

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  list-style: none;
  font-family: var(--font-sans);
  font-size: .8rem;
  color: var(--gray-400);
  align-items: center;
}
.breadcrumb-nav ul li + li::before { content: '/'; margin-right: .3rem; }
.breadcrumb-nav ul li a { color: var(--navy); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
.breadcrumb-nav ul li a:hover { text-decoration: underline; }
.breadcrumb-nav ul li[aria-current] { color: var(--gray-400); }

/* ── Author profile (about) ──────────────────────────────── */
.author-profile {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--amber);
}
.author-card { display: flex; gap: 1.25rem; align-items: flex-start; margin-top: 1rem; }
.author-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: .2rem;
}
.author-credentials {
  font-family: var(--font-sans);
  font-size: .85rem;
  color: var(--gray-400);
  margin-bottom: .6rem;
}
.author-bio { font-size: .95rem; line-height: 1.65; }

/* ── Topic label aside ───────────────────────────────────── */
.topic-label-aside { margin-bottom: .5rem; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: var(--white);
  margin-top: 3rem;
  border-top: 3px solid var(--amber);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.5rem;
  flex: 1 1 auto;
}
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .75rem;
  list-style: none;
}
.footer-nav ul li a {
  font-family: var(--font-sans);
  font-size: .82rem;
  color: var(--gray-200);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .25rem .1rem;
  transition: color .15s;
}
.footer-nav ul li a:hover { color: var(--amber); }
.footer-meta {
  flex: 0 1 auto;
  max-width: 360px;
}
.rg-notice {
  font-family: var(--font-sans);
  font-size: .78rem;
  color: var(--gray-400);
  line-height: 1.5;
  margin-bottom: .4rem;
}
.footer-copy {
  font-family: var(--font-sans);
  font-size: .78rem;
  color: var(--gray-400);
}

/* ── Mobile (≤768px) ─────────────────────────────────────── */
@media (max-width: 768px) {
  /* Header */
  .nav-toggle { display: flex; }

  .header-nav-aside {
    max-height: 0;
    overflow: hidden;
    transition: max-height .28s ease;
    padding: 0 1rem;
  }
  .header-nav-aside.is-open {
    max-height: 600px;
    padding: .5rem 1rem .75rem;
  }
  .header-nav-aside[aria-hidden="true"] { max-height: 0; overflow: hidden; }
  .header-nav-aside[aria-hidden="false"] { max-height: 600px; padding: .5rem 1rem .75rem; }

  .header-nav-aside nav ul { flex-direction: column; gap: 0; }
  .header-nav-aside nav ul li a {
    min-height: 44px;
    font-size: .95rem;
    padding: .6rem .5rem;
  }

  /* CTA buttons: compact, always visible */
  .header-ctas { gap: .4rem; }
  .cta {
    font-size: .78rem;
    padding: 0 .6rem;
    height: 44px;
    line-height: 44px;
  }
  .cta-login { line-height: 40px; }

  /* Home hero: stack */
  .hero-section {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.5rem 0;
  }
  .home-topics { grid-template-columns: 1fr; }
  .home-sidebar { position: static; }

  /* Topic layout: stack */
  .topic-layout { grid-template-columns: 1fr; }
  .topic-sidebar { position: static; }

  /* Article layout: stack */
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .article-body-section { grid-template-columns: 1fr; }
  .article-toc-aside { position: static; }

  /* Inner layout: stack */
  .inner-layout { grid-template-columns: 1fr; }
  .inner-sidebar { position: static; }

  /* Footer: stack */
  .footer-inner { flex-direction: column; }
  .footer-meta { max-width: 100%; }

  /* Prose max-width full on mobile */
  .prose { max-width: 100%; }
}

@media (max-width: 480px) {
  .hero-copy h1 { font-size: 1.4rem; }
  .article-head-section h1 { font-size: 1.35rem; }
  .inner-primary h1 { font-size: 1.3rem; }
}

a[data-cta],button[aria-controls]{min-height:44px;min-width:44px;box-sizing:border-box}main p a{text-decoration:underline}.tbl-scroll{overflow-x:auto;max-width:100%}