/* ==========================================================================
   PILADO — MARINHA GRANDE (piladocity.pt)
   SISTEMA VISUAL: ATLAS CONTEMPORÂNEO & DESIGN ARQUITETÓNICO BENTO
   Paleta: Areia Atlântica, Terracota de Forno Vidreiro, Pinhal Profundo e Ardósia
   ========================================================================== */

:root {
  /* Paleta Principal — Modo Claro (Areia Quente, Forno Terracota & Pinhal) */
  --bg-body: #EFECE6;
  --bg-card: #FFFFFF;
  --bg-subtle: #E5E0D5;
  --bg-elevated: #FAF8F5;
  --bg-dark-banner: #13221B;

  --text-main: #141816;
  --text-body: #2C3530;
  --text-muted: #5A655E;

  --accent-primary: #C84B31;       /* Terracota / Forno Vidreiro & Carvoaria */
  --accent-primary-hover: #A63820;
  --accent-forest: #1B4332;        /* Verde Pinhal de Leiria */
  --accent-ocean: #1D5B79;         /* Azul Atlântico do Samouco */
  --accent-gold: #D97706;          /* Âmbar Resina */

  --border-light: #D5CFC2;
  --border-dark: #141816;
  --border-card: rgba(20, 24, 22, 0.12);

  /* Sombras Arquitetónicas e Raios Modernos */
  --shadow-card: 0 10px 30px -10px rgba(20, 24, 22, 0.08), 0 2px 6px -1px rgba(20, 24, 22, 0.04);
  --shadow-hover: 0 18px 36px -12px rgba(20, 24, 22, 0.14);
  --shadow-hard: 4px 4px 0px #141816;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Tipografia de Contraste (Display + Geométrica + Técnica) */
  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

[data-theme="dark"] {
  --bg-body: #0D1310;
  --bg-card: #151E19;
  --bg-subtle: #1C2822;
  --bg-elevated: #19241E;
  --bg-dark-banner: #070B09;

  --text-main: #F3F1EC;
  --text-body: #CBD5CF;
  --text-muted: #8E9E95;

  --accent-primary: #E06348;
  --accent-primary-hover: #F07B62;
  --accent-forest: #3B8564;
  --accent-ocean: #4EA8DE;
  --accent-gold: #F59E0B;

  --border-light: #26352D;
  --border-dark: #3B5246;
  --border-card: rgba(255, 255, 255, 0.1);

  --shadow-card: 0 14px 34px -10px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 20px 40px -12px rgba(0, 0, 0, 0.65);
  --shadow-hard: 4px 4px 0px #26352D;
}

/* ==========================================================================
   1. RESET E ESTRUTURA BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-body);
  background-image: radial-gradient(var(--border-light) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--text-body);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

p {
  margin-bottom: 1rem;
}
p:last-child {
  margin-bottom: 0;
}

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   2. TOPBAR & CABEÇALHO FLUTUANTE COM DOCK DE PÍLULAS
   ========================================================================== */
.topbar {
  background-color: #0F1713;
  color: #D8E2DC;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.topbar-badge-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.topbar-pill {
  background-color: var(--accent-primary);
  color: #FFFFFF;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}

.topbar-location {
  font-weight: 500;
  letter-spacing: 0.04em;
}

.topbar-coords {
  color: #95A89D;
}

/* Cabeçalho Principal Moderno */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(239, 236, 230, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 0;
}

[data-theme="dark"] .site-header {
  background-color: rgba(13, 19, 16, 0.88);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.brand-monogram {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-primary), #9E331C);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  box-shadow: 0 4px 12px rgba(200, 75, 49, 0.35);
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.05;
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
  margin-top: 0.12rem;
}

/* Dock de Navegação por Pílulas */
.tabs-bar {
  flex: 1;
  display: flex;
  justify-content: center;
}

.tabs-list {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--bg-subtle);
  padding: 0.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
}

.tab-trigger {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.tab-trigger:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.45);
}

[data-theme="dark"] .tab-trigger:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

.tab-trigger.active {
  background-color: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.tab-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.38rem;
  border-radius: 99px;
  background-color: rgba(200, 75, 49, 0.12);
  color: var(--accent-primary);
}

.tab-trigger.active .tab-num {
  background-color: var(--accent-primary);
  color: #FFFFFF;
}

/* Botão de Tema */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.theme-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background-color: var(--bg-card);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.theme-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
}

[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="dark"] .icon-moon  { display: none; }
[data-theme="dark"] .icon-sun   { display: block; }

/* ==========================================================================
   3. PAINÉIS DE CONTEÚDO & BANNER HERO PANORÂMICO ESCURO
   ========================================================================== */
.main-wrapper {
  padding-top: 2rem;
  padding-bottom: 4.5rem;
}

.tab-panel {
  display: none;
  animation: panelSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-panel.active {
  display: block;
}

@keyframes panelSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero Panorâmico de Alto Contraste */
.editorial-hero {
  position: relative;
  background: linear-gradient(135deg, #13241C 0%, #1B3529 55%, #231D1A 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.75rem 2.25rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 20px 45px -15px rgba(15, 25, 20, 0.35);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.editorial-hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(200, 75, 49, 0.28) 0%, transparent 70%);
  pointer-events: none;
}

.hero-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #FDBA74;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(253, 186, 116, 0.3);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}

.hero-Title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.35rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #FFFFFF;
  margin-bottom: 1rem;
}

.hero-deck {
  font-size: 1.12rem;
  line-height: 1.65;
  color: #D8E2DC;
  max-width: 78ch;
}

/* Strip de Indicadores estilo Bento Glass dentro do Hero */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.metric-item {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  backdrop-filter: blur(8px);
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #A7F3D0;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.15;
}

.metric-note {
  font-size: 0.78rem;
  color: #CBD5CF;
}

/* ==========================================================================
   4. SECÇÕES E CARTÕES BENTO (GRELHAS MODERNAS)
   ========================================================================== */
.editorial-section {
  margin-bottom: 3rem;
}

.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-light);
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: 0.3rem;
}

.section-main-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.15;
}

.section-side-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 44ch;
  margin: 0;
}

/* Grelha 3 Colunas estilo Bento Cards */
.grid-3-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.editorial-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.editorial-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-forest));
}

.editorial-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.box-index {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  background-color: rgba(200, 75, 49, 0.1);
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.85rem;
}

.box-heading {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  line-height: 1.25;
}

.editorial-box p {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.68;
}

.clean-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.clean-bullet-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.93rem;
  line-height: 1.55;
}

.clean-bullet-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: 800;
}

/* ==========================================================================
   5. CARTÕES DOS 5 OFÍCIOS (BENTO DOSSIER CARDS)
   ========================================================================== */
.pillars-dossier-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.dossier-card {
  display: grid;
  grid-template-columns: 260px 1.4fr 1fr;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dossier-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.dossier-left {
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #FFFFFF;
  position: relative;
}

.theme-forest .dossier-left { background: linear-gradient(160deg, #1B4332, #0F291E); }
.theme-amber  .dossier-left { background: linear-gradient(160deg, #B45309, #7C2D12); }
.theme-earth  .dossier-left { background: linear-gradient(160deg, #5C4033, #36241C); }
.theme-slate  .dossier-left { background: linear-gradient(160deg, #1E3A5F, #0F2138); }

.dossier-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background-color: rgba(255, 255, 255, 0.15);
  align-self: flex-start;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
}

.dossier-symbol {
  font-size: 2.3rem;
  margin: 0.75rem 0 0.35rem;
}

.dossier-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.15;
  margin-bottom: 0.3rem;
}

.dossier-sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1rem;
}

.dossier-period {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

.dossier-center {
  padding: 1.75rem;
  border-right: 1px solid var(--border-light);
}

.dossier-center h4,
.dossier-right h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.dossier-center p {
  font-size: 0.95rem;
  line-height: 1.68;
}

.dossier-right {
  padding: 1.75rem;
  background-color: var(--bg-elevated);
}

.spec-dl {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.spec-dl div {
  padding-bottom: 0.7rem;
  border-bottom: 1px dashed var(--border-light);
}

.spec-dl div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.spec-dl dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.spec-dl dd {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
}

/* ==========================================================================
   6. LAYOUT ASSIMÉTRICO DE DOIS BLOCOS (ARTIGO + FICHA TÉCNICA)
   ========================================================================== */
.two-col-asymmetric {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.main-narrative-col {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.article-heading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0.35rem 0 0.85rem;
  line-height: 1.22;
}

.mt-large {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.editorial-callout {
  margin-top: 1.5rem;
  padding: 1.25rem 1.4rem;
  background-color: var(--bg-elevated);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.94rem;
}

.side-dossier-col {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.technical-sheet {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.65rem;
  box-shadow: var(--shadow-card);
}

.sheet-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--accent-primary);
}

.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.sheet-table th,
.sheet-table td {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  vertical-align: top;
}

.sheet-table th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  width: 40%;
  padding-right: 0.75rem;
}

.sheet-table td {
  font-weight: 600;
  color: var(--text-main);
}

.route-steps {
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.88rem;
}

/* ==========================================================================
   7. ABA 03: LEITOR DE CRÓNICAS ESTILO REVISTA INTERATIVA
   ========================================================================== */
.stories-workspace {
  display: grid;
  grid-template-columns: 340px 1fr;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.stories-sidebar {
  background-color: var(--bg-elevated);
  border-right: 1px solid var(--border-light);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 760px;
  overflow-y: auto;
}

.story-nav-btn {
  appearance: none;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: all 0.18s ease;
}

.story-nav-btn:hover {
  background-color: var(--bg-card);
  border-color: var(--border-light);
}

.story-nav-btn.active {
  background-color: var(--accent-forest);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(27, 67, 50, 0.25);
}

.s-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background-color: var(--bg-subtle);
  color: var(--accent-primary);
  flex-shrink: 0;
}

.story-nav-btn.active .s-num {
  background-color: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.s-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.s-meta strong {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.story-nav-btn.active .s-meta strong {
  color: #FFFFFF;
}

.s-meta small {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.story-nav-btn.active .s-meta small {
  color: rgba(255, 255, 255, 0.8);
}

.story-Viewport {
  padding: 2.5rem 3rem;
}

.story-doc {
  display: none;
}

.story-doc.active {
  display: block;
  animation: panelSlideIn 0.22s ease;
}

.story-doc-header {
  padding-bottom: 1.4rem;
  margin-bottom: 1.65rem;
  border-bottom: 2px solid var(--border-light);
}

.story-doc-cat {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  background-color: rgba(200, 75, 49, 0.1);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.65rem;
}

.story-doc-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.18;
  margin-bottom: 0.45rem;
}

.story-doc-sub {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

.story-prose p {
  font-size: 1.06rem;
  line-height: 1.82;
  color: var(--text-body);
  margin-bottom: 1.25rem;
}

.story-prose blockquote {
  margin: 1.65rem 0;
  padding: 1.35rem 1.6rem;
  background-color: var(--bg-elevated);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--text-main);
}

.story-reader-footer {
  margin-top: 2.25rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.story-pager-btn,
.story-index-btn {
  appearance: none;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.story-pager-btn:hover,
.story-index-btn:hover {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #FFFFFF;
}

/* ==========================================================================
   8. ABA 04: PLACA TOPONÍMICA PORTUGUESA & TABELAS DE HONRA
   ========================================================================== */
.street-sign-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.65rem;
  box-shadow: var(--shadow-card);
}

.plaque-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.pt-street-plaque {
  background-color: #FFFFFF;
  color: #0F172A;
  border: 4px solid #1E3A8A;
  border-radius: 12px;
  padding: 1.35rem 1.25rem;
  text-align: center;
  box-shadow: inset 0 0 0 2px #93C5FD, 0 8px 20px rgba(30, 58, 138, 0.15);
  margin-bottom: 1rem;
}

.plaque-crest {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #1E3A8A;
  border-bottom: 1px solid #93C5FD;
  padding-bottom: 0.25rem;
  margin-bottom: 0.55rem;
}

.plaque-street {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: 0.02em;
  margin-bottom: 0.3rem;
}

.plaque-sub {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}

.plaque-cp {
  display: inline-block;
  margin-top: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  background-color: #EFF6FF;
  color: #1E40AF;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-pill);
}

.plaque-caption {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Tabelas de Dados Modernas */
.table-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table thead th {
  background-color: var(--bg-elevated);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.95rem 1.1rem;
  text-align: left;
  border-bottom: 2px solid var(--border-light);
}

.data-table tbody td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-body);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background-color: var(--bg-elevated);
}

.data-table tbody tr.row-featured {
  background-color: rgba(200, 75, 49, 0.08);
}

.badge-pilado {
  display: inline-block;
  margin-left: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  background-color: var(--accent-primary);
  color: #FFFFFF;
  padding: 0.12rem 0.48rem;
  border-radius: var(--radius-pill);
  vertical-align: middle;
}

/* ==========================================================================
   9. ABA 05: SIMULADOR DE CHINQUILHO E GLOSSÁRIO
   ========================================================================== */
.scoreboard-panel {
  background: linear-gradient(155deg, #13241C, #1D352B);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}

.sb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.sb-reset {
  background-color: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.sb-reset:hover {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.sb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.sb-team {
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
  text-align: center;
}

.sb-name {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  color: #A7F3D0;
  margin-bottom: 0.35rem;
}

.sb-points {
  display: block;
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.9rem;
}

.sb-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sb-actions button {
  background-color: #FFFFFF;
  color: #13241C;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.sb-actions button:hover {
  background-color: #FDBA74;
  transform: translateY(-1px);
}

.sb-status {
  margin-top: 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #D8E2DC;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.glossary-entry {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
}

.glossary-entry strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--accent-primary);
  margin-bottom: 0.4rem;
}

.glossary-entry p {
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.55;
}

/* ==========================================================================
   10. ABA 06: MAPA COMPLETO DO PILADO & LIVRO DE REGISTOS
   ========================================================================== */
.village-map-card,
.osm-embed-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.village-map-toolbar,
.osm-embed-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.8rem;
}

.osm-embed-footer {
  border-bottom: none;
  border-top: 1px solid var(--border-light);
}

.vmap-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
  text-transform: uppercase;
}

.vmap-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.vmap-ext-link {
  display: inline-block;
  font-weight: 700;
  font-size: 0.78rem;
  color: #FFFFFF;
  background-color: var(--accent-forest);
  padding: 0.42rem 0.9rem;
  border-radius: var(--radius-pill);
}

.vmap-ext-link:hover {
  background-color: var(--accent-primary);
}

.village-svg-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
  background-color: #F6F5F0;
}

.pilado-full-map-svg {
  width: 100%;
  min-width: 680px;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.village-map-legend-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-card);
}

.vmap-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.vmap-legend-item strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}

.vmap-legend-item p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.vmap-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  flex-shrink: 0;
}

.pin-amber { background-color: #B45309; }
.pin-blue  { background-color: #1D4ED8; }
.pin-green { background-color: #15803D; }
.pin-slate { background-color: #475569; }
.pin-dark  { background-color: #1E293B; }
.pin-gray  { background-color: #64748B; }

.osm-iframe {
  width: 100%;
  height: 460px;
  border: none;
  display: block;
}

.map-frame {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  box-shadow: var(--shadow-card);
}

.regional-map-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

.map-legend {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.65rem;
  text-align: center;
}

/* Livro de Registos (Mural) */
.count-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  background-color: var(--accent-primary);
  color: #FFFFFF;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
}

.editorial-form {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.65rem;
  box-shadow: var(--shadow-card);
}

.editorial-form h3 {
  font-family: var(--font-display);
  font-size: 1.22rem;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.field-row {
  margin-bottom: 0.95rem;
}

.field-row label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.field-row input,
.field-row select,
.field-row textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 16px;
  background-color: var(--bg-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-primary), #9E331C);
  color: #FFFFFF;
  border: none;
  padding: 0.85rem 1.1rem;
  min-height: 46px;
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(200, 75, 49, 0.3);
}

.mural-feed {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.mural-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-card);
}

.mural-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.mural-author {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
}

.mural-rel {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-primary);
}

.mural-text {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.mural-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ==========================================================================
   11. RODAPÉ ARQUITETÓNICO ESCURO
   ========================================================================== */
.site-footer {
  background-color: #0D1511;
  color: #B8C2BC;
  padding: 3.25rem 0 2rem;
  border-top: 4px solid var(--accent-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.25rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  color: #FFFFFF;
}

.footer-desc {
  font-size: 0.86rem;
  color: #95A39B;
  line-height: 1.65;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #FDBA74;
  margin-bottom: 0.85rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.86rem;
}

.footer-links a:hover {
  color: #FFFFFF;
  padding-left: 4px;
}

.footer-bottom {
  padding-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #6E7D75;
}

/* ==========================================================================
   12. RESPONSIVIDADE PARA TABLETS E TELEMÓVEIS ANDROID (<= 1120px & <= 768px)
   ========================================================================== */
@media (max-width: 1120px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .tabs-bar {
    order: 3;
    width: 100%;
    margin-top: 0.5rem;
  }

  .tabs-list {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-radius: var(--radius-md);
  }

  .tab-trigger {
    justify-content: center;
  }

  .metrics-strip,
  .glossary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3-cols,
  .two-col-asymmetric,
  .dossier-card,
  .stories-workspace,
  .village-map-legend-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .dossier-center {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }

  .stories-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-height: 320px;
  }

  .section-title-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

/* Telemóveis Android e iOS (360px a 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 0.95rem;
  }

  .topbar-coords {
    display: none;
  }

  .topbar-location {
    font-size: 0.65rem;
  }

  .site-header {
    position: relative;
  }

  /* Grelha 2x3 de Pílulas para os 6 Separadores em Android: 100% visível sem cortar texto */
  .tabs-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
    padding: 0.4rem;
  }

  .tab-trigger {
    padding: 0.6rem 0.65rem;
    min-height: 46px;
    font-size: 0.78rem;
    border-radius: 10px;
    justify-content: flex-start;
  }

  .tab-name {
    white-space: normal;
    text-align: left;
    line-height: 1.2;
  }

  .main-wrapper {
    padding-top: 1.25rem;
    padding-bottom: 2.75rem;
  }

  .editorial-hero {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.75rem;
  }

  .hero-deck {
    font-size: 0.98rem;
  }

  .metrics-strip,
  .glossary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1.35rem;
    padding-top: 1.25rem;
  }

  .metric-value {
    font-size: 1.3rem;
  }

  .editorial-box,
  .main-narrative-col,
  .technical-sheet,
  .scoreboard-panel,
  .editorial-form,
  .dossier-left,
  .dossier-center,
  .dossier-right {
    padding: 1.25rem;
  }

  .stories-sidebar {
    grid-template-columns: 1fr;
    max-height: 270px;
  }

  .story-Viewport {
    padding: 1.35rem 1.15rem;
  }

  .story-reader-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .story-pager-btn,
  .story-index-btn {
    width: 100%;
    text-align: center;
  }

  .osm-iframe {
    height: 340px;
  }
}

@media (max-width: 390px) {
  .metrics-strip,
  .glossary-grid,
  .sb-grid {
    grid-template-columns: 1fr;
  }
}
