/* ==========================================================================
   LS Inteligência Tributária — Design System
   Navy / paper / white. Serif display (Playfair Display) + Inter body + Plex Mono
   for coordinate-style labels. Signature motif: the knight's L-move,
   rendered as a small angular bracket used wherever a marker is needed.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap');

:root{
  /* --- color --- */
  --navy-950:#0B1226;
  --navy-900:#141F42;
  --navy-800:#1C2C58;   /* near logo background */
  --navy-700:#26386E;
  --navy-600:#33478A;
  --navy-400:#6A7CB5;
  --navy-200:#C4CCE6;

  --ink:#161C33;
  --muted:#5B6178;
  --muted-2:#848AA0;

  --paper:#EEF1F8;
  --paper-dim:#E3E9F5;
  --line:#DCE3F0;
  --line-on-navy:rgba(255,255,255,.14);
  --white:#FFFFFF;

  /* --- type --- */
  --f-display:'Playfair Display', ui-serif, Georgia, serif;
  --f-body:'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-mono:'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  /* --- scale --- */
  --container: 1160px;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 18px;

  --shadow-card: 0 1px 2px rgba(11,18,38,.04), 0 8px 24px -12px rgba(11,18,38,.14);
  --shadow-card-hover: 0 4px 10px rgba(11,18,38,.06), 0 20px 40px -16px rgba(11,18,38,.22);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}

body{
  margin:0;
  font-family:var(--f-body);
  color:var(--ink);
  background:var(--white);
  -webkit-font-smoothing:antialiased;
  line-height:1.5;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family:inherit; }

h1,h2,h3,h4{
  font-family:var(--f-display);
  font-weight:500;
  line-height:1.12;
  margin:0;
  color:var(--navy-900);
  letter-spacing:-0.01em;
}

.container{
  width:100%;
  max-width:var(--container);
  margin:0 auto;
  padding:0 28px;
}

:focus-visible{
  outline:2px solid var(--navy-600);
  outline-offset:3px;
  border-radius:3px;
}

/* --- eyebrow / knight-move marker ---
   The signature glyph: a small angular path echoing the knight's L-move.
   Used instead of numbering wherever a section needs a marker. */
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family:var(--f-mono);
  font-size:12px;
  font-weight:500;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--navy-600);
}
.eyebrow .move{
  width:16px; height:16px;
  flex:none;
}
.eyebrow .move path{
  stroke:currentColor;
  stroke-width:1.6;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.eyebrow.on-navy{ color:var(--navy-200); }

.kicker{
  font-family:var(--f-mono);
  font-size:11px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--muted-2);
}

/* ============================= Header ============================= */
.site-header{
  position:sticky; top:0; z-index:50;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 100%),
    #0c1430;
  background-blend-mode:screen, normal;
  backdrop-filter:blur(10px);
  box-shadow:0 2px 10px rgba(0,0,0,.18);
  transition:background .25s ease, box-shadow .25s ease, backdrop-filter .25s ease;
}
.site-header.transparent-header{
  position:fixed;
  left:0; right:0;
  background:transparent;
  box-shadow:none;
  backdrop-filter:none;
}
.site-header.transparent-header.scrolled{
  background:
    linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 100%),
    #0c1430;
  background-blend-mode:screen, normal;
  backdrop-filter:blur(10px);
  box-shadow:0 2px 10px rgba(0,0,0,.18);
}
.site-header .bar{
  display:flex; align-items:center; justify-content:space-between;
  gap:24px; padding:14px 0;
}
.brand{ display:flex; align-items:center; gap:11px; flex:none; }
.brand img.brand-icon{ width:44px; height:44px; border-radius:10px; flex:none; }
.brand-word{ display:flex; flex-direction:column; line-height:1.15; white-space:nowrap; }
.brand-word strong{ font-family:var(--f-display); font-size:18px; font-weight:600; color:var(--white); white-space:nowrap; }
.main-nav{ flex:1; justify-content:flex-end; }

.main-nav{ display:flex; align-items:center; gap:2px; }
.main-nav a{
  padding:9px 13px; border-radius:999px;
  font-size:14px; font-weight:500; color:var(--navy-200);
  transition:background .15s ease, color .15s ease;
  white-space:nowrap;
}
.main-nav a:hover{ color:var(--white); background:rgba(255,255,255,.08); }
.main-nav a.active{ color:var(--white); background:rgba(255,255,255,.16); }

.header-actions{ display:flex; align-items:center; gap:10px; }
.icon-btn{
  width:38px; height:38px; border-radius:999px;
  display:flex; align-items:center; justify-content:center;
  border:1px solid rgba(255,255,255,.18); background:rgba(255,255,255,.06);
  color:var(--white); cursor:pointer;
  transition:border-color .15s ease, background .15s ease;
}
.icon-btn:hover{ background:rgba(255,255,255,.14); border-color:rgba(255,255,255,.35); }
.icon-btn svg{ width:17px; height:17px; }

.nav-toggle{ display:none; }

.search-panel{
  position:fixed; inset:0; z-index:100;
  background:rgba(11,18,38,.55);
  display:none; align-items:flex-start; justify-content:center;
  padding:12vh 20px 0;
}
.search-panel.open{ display:flex; }
.search-box{
  width:100%; max-width:560px; background:var(--white);
  border-radius:var(--radius-l); padding:8px; box-shadow:var(--shadow-card-hover);
}
.search-box form{ display:flex; align-items:center; gap:10px; padding:10px 14px; }
.search-box input{
  flex:1; border:0; outline:0; font-family:var(--f-body); font-size:16px; color:var(--ink); background:transparent;
}
.search-box .close-search{ border:0; background:none; cursor:pointer; color:var(--muted); padding:6px; }
.search-hint{ padding:10px 18px 14px; font-size:12px; color:var(--muted-2); border-top:1px solid var(--line); margin-top:4px; }

/* ============================= Buttons ============================= */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:12px 22px; border-radius:999px;
  font-size:14.5px; font-weight:600;
  border:1px solid transparent; cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary{ background:var(--navy-900); color:var(--white); }
.btn-primary:hover{ background:var(--navy-800); box-shadow:0 8px 20px -8px rgba(20,31,66,.55); }
.btn-ghost{ background:transparent; color:var(--navy-900); border-color:var(--line); }
.btn-ghost:hover{ border-color:var(--navy-400); background:var(--paper); }
.btn-on-navy{ background:var(--white); color:var(--navy-900); }
.btn-on-navy:hover{ background:var(--navy-200); }
.btn-ghost-on-navy{ background:transparent; color:var(--white); border-color:var(--line-on-navy); }
.btn-ghost-on-navy:hover{ border-color:rgba(255,255,255,.4); }
.btn-sm{ padding:9px 16px; font-size:13.5px; }

/* ============================= Hero ============================= */
.hero{
  position:relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 55%, rgba(255,255,255,.12) 100%),
    linear-gradient(180deg, #0c1430 0%, #16234e 55%, #243970 100%);
  background-blend-mode:screen, normal;
  color:var(--white);
  overflow:hidden;
  padding:0 0 56px;
}
.title-mark-wrap{ display:flex; align-items:center; gap:14px; max-width:100%; }
.title-mark{
  width:30px; height:auto;
  flex:none;
  opacity:.9;
}

@media (max-width: 640px){
  .title-mark{ width:24px; }
}
.hero .container{ position:relative; z-index:1; }
.hero-inner{ max-width:680px; }
.hero h1{
  color:var(--white);
  font-size:clamp(32px, 5vw, 52px);
  margin:18px 0 20px;
}
.hero h1 em{ font-style:italic; color:var(--navy-200); font-weight:400; }
.hero p.lead{
  font-size:17px; color:var(--navy-200); max-width:520px; margin:0 0 32px;
}
.hero-actions{ display:flex; gap:12px; flex-wrap:wrap; }

.hero-banner-wrap{ overflow:hidden; margin-bottom:32px; position:relative; }
.hero-banner-img{ display:block; width:100%; height:auto; will-change:transform, opacity; }
.hero-actions-below{ justify-content:center; margin-top:0; }

@media (max-width: 640px){
  .hero-actions-below{ justify-content:flex-start; }
}

.shortcut-row{
  display:grid; grid-template-columns:repeat(5,1fr); gap:12px;
  margin-top:56px; position:relative; z-index:1;
}
.shortcut-card{
  background:rgba(255,255,255,.05);
  border:1px solid var(--line-on-navy);
  border-radius:var(--radius-m);
  padding:16px 14px;
  transition:background .15s ease, border-color .15s ease, transform .15s ease;
}
.shortcut-card:hover{ background:rgba(255,255,255,.09); border-color:rgba(255,255,255,.3); transform:translateY(-2px); }
.shortcut-card svg{ width:20px; height:20px; color:var(--navy-200); margin-bottom:10px; }
.shortcut-card span{ display:block; font-size:13.5px; font-weight:600; color:var(--white); }

/* ============================= Sections ============================= */
.section{ padding:76px 0; }
.section.on-paper{ background:var(--paper); }
.section-head{
  display:flex; align-items:flex-end; justify-content:space-between; gap:24px;
  margin-bottom:36px; flex-wrap:wrap;
}
.section-head h2{ font-size:clamp(24px,3vw,32px); margin-top:10px; }
.section-head .sub{ color:var(--muted); font-size:15px; max-width:480px; margin-top:8px; }
.section-head .see-all{ font-size:14px; font-weight:600; color:var(--navy-700); white-space:nowrap; }
.section-head .see-all:hover{ text-decoration:underline; }

/* ============================= Cards ============================= */
.card-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:22px; }
.card{
  background:var(--white); border:1px solid var(--line); border-radius:var(--radius-l);
  overflow:hidden; display:flex; flex-direction:column;
  transition:box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card:hover{ box-shadow:var(--shadow-card-hover); transform:translateY(-3px); border-color:transparent; }
.card-cover{
  height:150px; background:linear-gradient(135deg,var(--navy-800),var(--navy-600));
  position:relative; display:flex; align-items:flex-end; padding:14px;
  overflow:hidden;
}
.card-cover::before{
  content:'';
  position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.38) 100%);
  pointer-events:none;
}
.card-cover::after{
  content:'';
  position:absolute; right:-24px; bottom:-30px; width:140px; height:140px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M20 88 L20 45 Q20 20 45 20 L82 20' fill='none' stroke='white' stroke-width='2'/%3E%3Cpath d='M66 6 L82 20 L66 32' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat:no-repeat; opacity:.16; pointer-events:none;
}
.card-cover .cat-tag{
  font-family:var(--f-mono); font-size:10.5px; letter-spacing:.06em; text-transform:uppercase;
  color:var(--white); background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.28);
  padding:4px 9px; border-radius:999px;
  position:relative; z-index:1;
}
.card-body{ padding:18px 20px 22px; display:flex; flex-direction:column; gap:10px; flex:1; }
.card-body .meta{ font-family:var(--f-mono); font-size:11px; color:var(--muted-2); letter-spacing:.03em; }
.card-body h3{ font-size:18px; line-height:1.3; }
.card-body p{ font-size:14px; color:var(--muted); margin:0; line-height:1.55; flex:1; }
.card-body .read-more{ font-size:13.5px; font-weight:600; color:var(--navy-700); margin-top:6px; }

/* topic pill grid */
.topic-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.topic-pill{
  border:1px solid var(--line); border-radius:var(--radius-m);
  padding:16px; background:var(--white);
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  font-size:14px; font-weight:600; color:var(--navy-900);
  transition:border-color .15s ease, background .15s ease;
}
.topic-pill:hover{ border-color:var(--navy-400); background:var(--paper); }
.topic-pill .count{ font-family:var(--f-mono); font-size:11px; color:var(--muted-2); font-weight:500; }

/* ============================= Page header (interior pages) ============================= */
.page-hero{
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 55%, rgba(255,255,255,.12) 100%),
    linear-gradient(180deg, #0c1430 0%, #16234e 55%, #243970 100%);
  background-blend-mode:screen, normal;
  color:var(--white);
  padding:64px 0 56px; position:relative; overflow:hidden;
}
.page-hero .container{ position:relative; z-index:1; }
.page-hero h1{ color:var(--white); font-size:clamp(28px,4vw,42px); margin:14px 0 14px; }
.page-hero p{ color:var(--navy-200); max-width:600px; font-size:16px; margin:0; }


.breadcrumbs{ display:flex; gap:8px; align-items:center; font-size:13px; color:var(--muted-2); margin-bottom:8px; }
.breadcrumbs a:hover{ color:var(--navy-800); }
.breadcrumbs .sep{ opacity:.5; }

/* ============================= Filters (Aprenda) ============================= */
.filter-bar{
  display:flex; flex-wrap:wrap; gap:8px; padding:22px 0 8px;
  border-bottom:1px solid var(--line); margin-bottom:36px;
}
.filter-chip{
  font-size:13px; font-weight:600; color:var(--muted);
  border:1px solid var(--line); border-radius:999px; padding:8px 15px;
  background:var(--white); cursor:pointer; transition:all .15s ease;
}
.filter-chip:hover{ border-color:var(--navy-400); color:var(--navy-900); }
.filter-chip.active{ background:var(--navy-900); border-color:var(--navy-900); color:var(--white); }

.empty-state{
  text-align:center; padding:60px 20px; color:var(--muted);
  border:1px dashed var(--line); border-radius:var(--radius-l);
}
.empty-state strong{ display:block; color:var(--navy-900); font-family:var(--f-display); font-size:20px; margin-bottom:6px; font-weight:500; }

/* ============================= Feature banner (in-development areas) ============================= */
.dev-banner{
  display:flex; align-items:flex-start; gap:14px;
  background:var(--paper-dim); border:1px solid var(--line);
  border-radius:var(--radius-l); padding:20px 22px; margin-bottom:44px;
}
.dev-banner svg{ width:20px; height:20px; color:var(--navy-700); flex:none; margin-top:2px; }
.dev-banner strong{ display:block; font-size:14.5px; color:var(--navy-900); margin-bottom:3px; }
.dev-banner p{ margin:0; font-size:14px; color:var(--muted); line-height:1.55; }

.tool-grid, .table-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.tool-card, .table-card{
  border:1px solid var(--line); border-radius:var(--radius-l); padding:24px;
  background:var(--white); position:relative; opacity:.8;
  display:block; color:inherit; transition:box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
a.table-card{ opacity:1; }
a.table-card:hover{ box-shadow:var(--shadow-card-hover); transform:translateY(-2px); border-color:transparent; }
.tool-card .icon-wrap, .table-card .icon-wrap{
  width:42px; height:42px; border-radius:var(--radius-s);
  background:var(--paper); display:flex; align-items:center; justify-content:center;
  margin-bottom:16px; color:var(--navy-700);
}
.tool-card .icon-wrap svg, .table-card .icon-wrap svg{ width:20px; height:20px; }
.tool-card h3, .table-card h3{ font-size:16px; margin-bottom:8px; }
.tool-card p, .table-card p{ font-size:13.5px; color:var(--muted); margin:0 0 14px; line-height:1.55; }
.status-tag{
  font-family:var(--f-mono); font-size:10.5px; letter-spacing:.06em; text-transform:uppercase;
  color:var(--navy-700); background:var(--navy-200); padding:4px 10px; border-radius:999px;
}
.status-tag.ready{ background:#DCEFE1; color:#1F6B3C; }

/* ============================= Timeline (Reforma) ============================= */
.timeline{ display:flex; flex-direction:column; gap:0; border-left:1px solid var(--line); margin-left:8px; }
.timeline-item{ position:relative; padding:0 0 40px 32px; }
.timeline-item:last-child{ padding-bottom:0; }
.timeline-item::before{
  content:''; position:absolute; left:-6.5px; top:2px;
  width:12px; height:12px; border-radius:50%;
  background:var(--white); border:2px solid var(--navy-700);
}
.timeline-item .kicker{ margin-bottom:6px; }
.timeline-item h3{ font-size:18px; margin-bottom:8px; }
.timeline-item p{ font-size:14.5px; color:var(--muted); margin:0; max-width:600px; line-height:1.6; }

.pillar-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.pillar-card{ border:1px solid var(--line); border-radius:var(--radius-l); padding:26px; background:var(--white); }
.pillar-card .tag{ font-family:var(--f-mono); font-size:11px; letter-spacing:.06em; color:var(--navy-700); text-transform:uppercase; }
.pillar-card h3{ font-size:20px; margin:10px 0 10px; }
.pillar-card p{ font-size:14px; color:var(--muted); margin:0; line-height:1.6; }

/* ============================= Treinamentos ============================= */
.audience-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.audience-card{
  border:1px solid var(--line); border-radius:var(--radius-m); padding:18px 20px;
  display:flex; align-items:center; gap:12px; background:var(--white);
}
.audience-card svg{ width:20px; height:20px; color:var(--navy-700); flex:none; }
.audience-card span{ font-size:14px; font-weight:600; color:var(--navy-900); }

.principle-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.principle-card{ padding:4px; }
.principle-card .num{ font-family:var(--f-mono); font-size:12px; color:var(--navy-400); }
.principle-card h3{ font-size:17px; margin:10px 0 8px; }
.principle-card p{ font-size:13.5px; color:var(--muted); line-height:1.6; margin:0; }

/* ============================= Quem somos ============================= */
.founder-block{
  display:grid; grid-template-columns:220px 1fr; gap:36px; align-items:start;
  padding:36px 0 8px;
}
.founder-block--text-only{ display:block; max-width:680px; padding:8px 0 8px; }
.founder-mark{
  width:100%; aspect-ratio:1; border-radius:var(--radius-l);
  background:var(--navy-900); display:flex; align-items:center; justify-content:center;
  position:relative; overflow:hidden;
}
.founder-mark svg{ width:64%; height:64%; opacity:.9; }
.founder-mark svg path{ stroke:var(--navy-200); }
.founder-name{ font-family:var(--f-display); font-size:15px; color:var(--muted-2); margin-top:14px; text-align:center; }
.founder-role{ font-family:var(--f-mono); font-size:11px; color:var(--muted-2); text-transform:uppercase; letter-spacing:.06em; text-align:center; }

/* ============================= Footer ============================= */
.site-footer{
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 55%, rgba(255,255,255,.08) 100%),
    linear-gradient(180deg, #070c1c 0%, #101a38 55%, #1c2c5c 100%);
  background-blend-mode:screen, normal;
  color:var(--navy-200); padding:56px 0 28px;
}
.footer-top{
  display:grid; grid-template-columns:1.4fr repeat(3,1fr); gap:40px;
  padding-bottom:40px; border-bottom:1px solid var(--line-on-navy);
}
.footer-brand{ display:flex; gap:10px; align-items:center; margin-bottom:14px; }
.footer-brand img{ width:34px; height:34px; border-radius:7px; }
.footer-brand strong{ font-family:var(--f-display); font-size:16px; color:var(--white); font-weight:600; }
.site-footer p.tagline{ font-size:14px; color:var(--navy-200); max-width:280px; line-height:1.6; margin:0; }
.footer-col h4{ font-family:var(--f-mono); font-size:11px; text-transform:uppercase; letter-spacing:.07em; color:var(--muted-2); margin-bottom:14px; font-weight:500; }
.footer-col ul{ display:flex; flex-direction:column; gap:10px; }
.footer-col a{ font-size:14px; color:var(--navy-200); transition:color .15s ease; }
.footer-col a:hover{ color:var(--white); }
.footer-bottom{
  display:flex; justify-content:space-between; align-items:center; padding-top:24px;
  font-size:12.5px; color:var(--muted-2); flex-wrap:wrap; gap:12px;
}
.footer-bottom .placeholder-note{ font-style:italic; opacity:.8; }

/* ============================= Article page ============================= */
.article-shell{ max-width:720px; margin:0 auto; }
.article-head{ padding:52px 0 30px; }
.article-head .kicker{ margin-bottom:14px; }
.article-head h1{ font-size:clamp(28px,4vw,40px); margin-bottom:16px; }
.article-head .meta-row{ display:flex; gap:16px; align-items:center; font-size:13.5px; color:var(--muted); font-family:var(--f-mono); }
.article-cover{
  height:280px; border-radius:var(--radius-l); margin:0 0 40px;
  background:linear-gradient(135deg,var(--navy-800),var(--navy-600));
  overflow:hidden;
}
.article-cover img{ width:100%; height:100%; object-fit:cover; display:block; }
.article-body{ font-size:16.5px; line-height:1.8; color:var(--ink); }
.article-body h2{ font-size:23px; margin:40px 0 14px; font-weight:500; }
.article-body h3{ font-size:19px; margin:30px 0 12px; font-weight:600; font-family:var(--f-body); color:var(--navy-900); }
.article-body p{ margin:0 0 18px; }
.article-body ul{ margin:0 0 18px; padding-left:22px; list-style:disc; }
.article-body li{ margin-bottom:8px; }
.article-body strong{ color:var(--navy-900); }
.article-callout{
  background:var(--paper); border-left:3px solid var(--navy-700);
  border-radius:0 var(--radius-m) var(--radius-m) 0; padding:16px 20px; margin:24px 0;
  font-size:14.5px; color:var(--navy-900);
}
.related-block{ padding:60px 0 80px; border-top:1px solid var(--line); margin-top:20px; }
.related-block h2{ font-size:20px; margin-bottom:24px; }

/* ============================= Misc pages (Ferramentas/Consultas intro) ============================= */
.intro-lead{ max-width:640px; font-size:16px; color:var(--muted); line-height:1.7; margin-bottom:44px; }

/* ============================= Responsive ============================= */
@media (max-width: 980px){
  .main-nav{ display:none; }
  .nav-toggle{ display:flex; }
  .shortcut-row{ grid-template-columns:repeat(3,1fr); }
  .card-grid{ grid-template-columns:repeat(2,1fr); }
  .topic-grid{ grid-template-columns:repeat(2,1fr); }
  .tool-grid, .table-grid{ grid-template-columns:repeat(2,1fr); }
  .footer-top{ grid-template-columns:1fr 1fr; row-gap:32px; }
  .principle-grid{ grid-template-columns:repeat(2,1fr); }
  .founder-block{ grid-template-columns:150px 1fr; }
}

@media (max-width: 640px){
  .container{ padding:0 20px; }
  .shortcut-row{ grid-template-columns:repeat(2,1fr); margin-top:40px; }
  .card-grid{ grid-template-columns:1fr; }
  .topic-grid{ grid-template-columns:1fr; }
  .tool-grid, .table-grid{ grid-template-columns:1fr; }
  .footer-top{ grid-template-columns:1fr; }
  .principle-grid{ grid-template-columns:1fr; }
  .pillar-grid{ grid-template-columns:1fr; }
  .audience-grid{ grid-template-columns:1fr; }
  .founder-block{ grid-template-columns:1fr; }
  .founder-mark{ max-width:170px; }
  .hero{ padding:56px 0 64px; }
  .section{ padding:52px 0; }
  .header-actions .btn{ display:none; }
  .site-header .brand-word span{ display:none; }
}

/* mobile nav drawer */
.mobile-nav{
  position:fixed; inset:0 0 0 auto; width:min(320px,86vw); z-index:110;
  background:var(--white); box-shadow:-16px 0 40px rgba(11,18,38,.2);
  transform:translateX(100%); transition:transform .25s ease;
  display:flex; flex-direction:column; padding:22px;
}
.mobile-nav.open{ transform:translateX(0); }
.mobile-nav .close-mobile{ align-self:flex-end; background:none; border:0; color:var(--muted); cursor:pointer; padding:8px; }
.mobile-nav a{ padding:14px 4px; font-size:16px; font-weight:600; color:var(--navy-900); border-bottom:1px solid var(--line); }
.mobile-scrim{ position:fixed; inset:0; background:rgba(11,18,38,.5); z-index:105; display:none; }
.mobile-scrim.open{ display:block; }

/* ============================================================================
   Tabelas de consulta (CFOP, CST, alíquotas)
   ============================================================================ */
.data-table-wrap{
  border:1px solid var(--line); border-radius:var(--radius-l); overflow:hidden;
  background:var(--white);
}
.data-table{ width:100%; border-collapse:collapse; font-size:14px; }
.data-table thead th{
  background:var(--navy-900); color:var(--white); text-align:left;
  padding:12px 16px; font-family:var(--f-mono); font-size:11px; text-transform:uppercase;
  letter-spacing:.04em; font-weight:500; white-space:nowrap;
}
.data-table tbody td{ padding:12px 16px; border-bottom:1px solid var(--line); vertical-align:top; }
.data-table tbody tr:last-child td{ border-bottom:none; }
.data-table tbody tr:hover{ background:var(--paper); }
.data-table .code-cell{ font-family:var(--f-mono); font-weight:600; color:var(--navy-800); white-space:nowrap; }
.data-table .tag-cell{ font-family:var(--f-mono); font-size:11px; color:var(--muted-2); white-space:nowrap; }

.consulta-toolbar{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:20px; }
.consulta-search{
  flex:1; min-width:220px; padding:11px 14px; border:1px solid var(--line); border-radius:var(--radius-m);
  font-size:14.5px; font-family:var(--f-body);
}
.consulta-search:focus{ outline:none; border-color:var(--navy-600); }
.consulta-count{ font-family:var(--f-mono); font-size:12px; color:var(--muted-2); margin-bottom:14px; display:block; }

.cst-tab-row{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:28px; }
.cst-tab{
  font-size:13.5px; font-weight:600; color:var(--muted);
  border:1px solid var(--line); border-radius:999px; padding:9px 16px;
  background:var(--white); cursor:pointer;
}
.cst-tab.active{ background:var(--navy-900); border-color:var(--navy-900); color:var(--white); }
.cst-panel{ display:none; }
.cst-panel.active{ display:block; }
.cst-panel-intro{ font-size:14.5px; color:var(--muted); max-width:680px; margin-bottom:20px; line-height:1.6; }
.cst-subhead{ font-family:var(--f-mono); font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:var(--navy-700); margin:28px 0 12px; font-weight:600; }
.cst-subhead:first-child{ margin-top:0; }

.matrix-scroll{ overflow-x:auto; border:1px solid var(--line); border-radius:var(--radius-l); }
.matrix-table{ border-collapse:collapse; font-size:12.5px; min-width:100%; }
.matrix-table th, .matrix-table td{ padding:7px 9px; text-align:center; border:1px solid var(--line); white-space:nowrap; }
.matrix-table thead th{ background:var(--navy-900); color:var(--white); font-family:var(--f-mono); font-size:11px; position:sticky; top:0; }
.matrix-table tbody th{ background:var(--paper); font-family:var(--f-mono); font-size:11px; text-align:left; position:sticky; left:0; }
.matrix-table td.rate-7{ background:#E3EEE6; color:#1F6B3C; font-weight:600; }
.matrix-table td.rate-12{ background:var(--white); color:var(--ink); }
.matrix-table td.diag{ background:var(--navy-200); color:var(--navy-700); font-size:10.5px; }

.legend-row{ display:flex; gap:18px; flex-wrap:wrap; margin-top:14px; font-size:12.5px; color:var(--muted); }
.legend-row .swatch{ display:inline-block; width:12px; height:12px; border-radius:3px; margin-right:6px; vertical-align:middle; }

.back-link{ display:flex; width:fit-content; align-items:center; gap:6px; font-size:13.5px; font-weight:600; color:var(--navy-700); margin-bottom:14px; }
.back-link:hover{ text-decoration:underline; }

.consulta-note{
  background:var(--paper-dim); border:1px solid var(--line); border-radius:var(--radius-m);
  padding:14px 18px; font-size:13.5px; color:var(--muted); line-height:1.6; margin-top:24px;
}
.consulta-note strong{ color:var(--navy-900); }

/* ============================================================================
   Selo de fonte + data (todas as páginas de Consultas)
   ============================================================================ */
.source-badge{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--f-mono); font-size:11.5px; color:var(--navy-200);
  background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.16);
  border-radius:999px; padding:7px 14px; margin-top:18px;
}
.source-badge svg{ width:14px; height:14px; flex:none; }

/* ============================================================================
   Alíquotas interestaduais — abas Consulta Rápida / Matriz Completa
   ============================================================================ */
.icms-tab-row{ display:flex; gap:8px; margin-bottom:24px; }
.icms-tab{
  font-size:14px; font-weight:600; color:var(--muted);
  border:1px solid var(--line); border-radius:999px; padding:10px 20px;
  background:var(--white); cursor:pointer;
}
.icms-tab.active{ background:var(--navy-900); border-color:var(--navy-900); color:var(--white); }
.icms-panel{ display:none; }
.icms-panel.active{ display:block; }

.lookup-card{
  border:1px solid var(--line); border-radius:var(--radius-l); background:var(--white);
  padding:28px; max-width:640px;
}
.lookup-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:18px; }
.lookup-field label{ display:block; font-family:var(--f-mono); font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted-2); margin-bottom:6px; }
.lookup-field select{
  width:100%; padding:11px 14px; border:1px solid var(--line); border-radius:var(--radius-m);
  font-size:14.5px; font-family:var(--f-body); background:var(--white);
}
.lookup-checkbox{ display:flex; align-items:flex-start; gap:10px; padding:12px 14px; background:var(--paper); border-radius:var(--radius-m); margin-bottom:20px; }
.lookup-checkbox input{ margin-top:3px; flex:none; }
.lookup-checkbox span{ font-size:13.5px; color:var(--muted); line-height:1.5; }

.lookup-result{
  display:flex; align-items:center; gap:20px;
  background:var(--paper); border:1px solid var(--line); border-radius:var(--radius-l);
  padding:22px 24px;
}
.lookup-result .pct{ font-family:var(--f-display); font-size:44px; font-weight:700; color:var(--navy-900); flex:none; min-width:110px; }
.lookup-result .detail strong{ display:block; font-size:15px; color:var(--navy-900); margin-bottom:4px; }
.lookup-result .detail span{ font-size:13.5px; color:var(--muted); line-height:1.5; }

.matrix-table td.diag-known{ background:#7A2E2E; color:#fff; font-weight:700; }
.matrix-table td.diag-unknown{ background:var(--navy-200); color:var(--navy-700); font-size:10.5px; }

@media (max-width: 640px){
  .lookup-grid{ grid-template-columns:1fr; }
  .lookup-result{ flex-direction:column; align-items:flex-start; }
}
