/* ============================================================
   CRONOLOGIA — CSS (TOC flutuante + conteúdo)
============================================================ */
#cronologia-app, #cronologia-app * { box-sizing: border-box; }

#cronologia-app{
  --brand:#12B3B6;
  --accent:#F5C84C;

  --ink:#0e1720;
  --muted:#5b6570;

  --bg:#ffffff;
  --panel:#f7f8fa;
  --line:#e6ebf0;

  --radius:16px;
  --radius-sm:10px;

  --shadow:0 10px 30px rgba(0,0,0,.06);
  --shadow-lg:0 18px 50px rgba(0,0,0,.12);

  color:var(--ink);
  background:transparent;

  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:20px;
  line-height:1.65;
}

/* ============================================================
   LAYOUT
============================================================ */
#cronologia-app .layout{
  display:block;
  max-width:1200px;
  margin:0 auto;
  padding:12px 16px 24px;
}

/* ============================================================
   TOC BUTTON
============================================================ */
#toc-btn{
  position:fixed;
  top:24px;
  left:24px;
  z-index:10000;

  width:40px;
  height:40px;

  display:flex;
  align-items:center;
  justify-content:center;

  background:var(--panel);
  color:var(--ink);
  font-size:22px;

  border:1.5px solid var(--brand);
  border-radius:var(--radius-sm);
  cursor:pointer;

  box-shadow:var(--shadow);
  transition:all .2s ease;
}

#toc-btn:hover{
  background:#fff;
  border-color:var(--brand);
  transform:translateY(-1px);
}

/* ============================================================
   TOC PANEL
============================================================ */
#toc-panel{
  position:fixed;
  top:0;
  left:0;

  height:100vh;
  width:280px;

  display:flex;
  flex-direction:column;

  background:var(--panel);
  border-right:1px solid var(--line);
  box-shadow:var(--shadow);

  transform:translateX(-100%);
  transition:transform .25s ease;

  z-index:9999;

  padding:16px 14px 18px;

  overflow:hidden;
}

#toc-panel::before{
  content:"";
  display:block;
  height:64px;
  flex-shrink:0;
}

#toc-panel.open{
  transform:translateX(0);
}

/* Scroll interno */
#toc-panel .quick-nav{
  overflow-y:auto;
  padding-right:4px;
  margin-top:6px;
}

/* ============================================================
   LANG SWITCH
============================================================ */
.lang-switch{
  display:flex;
  gap:8px;
  justify-content:center;
  margin-bottom:14px;
}

.lang-switch button{
  appearance:none;
  border:1px solid var(--line);
  background:#fff;
  color:var(--ink);

  border-radius:999px;
  padding:6px 14px;

  font-weight:700;
  font-size:13.5px;

  cursor:pointer;

  transition:
    background .2s ease,
    color .2s ease,
    border-color .2s ease,
    transform .06s ease;
}

.lang-switch button:hover{
  border-color:var(--brand);
}

.lang-switch button[aria-pressed="true"]{
  background:var(--brand);
  color:#061516;
  border-color:var(--brand);
  transform:translateY(-1px);
}

.lang-switch button:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}

/* ============================================================
   NAV LINKS
============================================================ */
.quick-nav{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.quick-nav a{
  display:block;

  font-size:14px;
  line-height:1.35;

  text-decoration:none;
  color:var(--ink);

  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);

  padding:8px 10px;

  transition:
    background .2s ease,
    border-color .2s ease,
    transform .06s ease;
}

.quick-nav a:hover{
  border-color:var(--brand);
  background:rgba(18,179,182,.06);
}

.quick-nav a.active{
  background:var(--brand);
  color:#061516;
  border-color:var(--brand);
}

.quick-nav a:active{
  transform:translateY(1px);
}

/* Scrollbar */
#toc-panel .quick-nav::-webkit-scrollbar{
  width:6px;
}
#toc-panel .quick-nav::-webkit-scrollbar-thumb{
  background:rgba(0,0,0,.15);
  border-radius:999px;
}

/* ============================================================
   CONTEÚDO
============================================================ */
.hero{ padding:8px 0 0; }

.hero h1{
  font-size:40px;
  line-height:1.1;
  margin:0 0 6px;
}

.wrap{ max-width:900px; }
.content{ min-width:0; }

.timeline{ scroll-padding-top:88px; }

.period{
  border-top:1px solid var(--line);
  padding:24px 0;
}

.period h2{
  font-size:22px;
  margin:0 0 10px;
}

/* ============================================================
   PEOPLE GRID
============================================================ */
.people{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:10px 16px;

  margin:0;
  padding:0;
  list-style:none;
}

.people li{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 12px;

  box-shadow:var(--shadow);
}

/* Giants */
.people .giant{
  border-bottom:2px solid var(--brand);
  padding-bottom:1px;
  cursor:pointer;
}

.people .giant:hover,
.people .giant:focus-visible{
  background:linear-gradient(90deg, rgba(18,179,182,.12), transparent);
  outline:none;
}

/* ============================================================
   TOOLTIP
============================================================ */
#giant-tip{
  position:fixed;
  top:20px;
  left:20px;

  max-width:min(680px, 90vw);
  max-height:80vh;

  display:none;
  flex-direction:column;
  gap:8px;

  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;

  box-shadow:var(--shadow-lg);
  padding:12px 14px 14px;

  z-index:10001;
}

#giant-tip[data-open="true"]{
  display:flex !important;
}

#giant-tip .tip-close{
  appearance:none;
  border:0;
  background:transparent;
  cursor:pointer;

  font-size:22px;
  padding:4px 6px;

  border-radius:10px;
  align-self:flex-end;
}

#giant-tip .tip-close:hover{
  background:rgba(0,0,0,.06);
}

#giant-tip .tip-content{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
}

#giant-tip .tip-content h4{
  margin:0 0 8px;
  font-size:18px;
}

#giant-tip .tip-content p{
  margin:0 0 10px;
}

/* ============================================================
   MOBILE
============================================================ */
@media (max-width: 900px){

  #cronologia-app{
    font-size:18px;
  }

  #cronologia-app .hero h1{
    font-size:30px;
  }

  #cronologia-app .period h2{
    font-size:20px;
  }

  #cronologia-app .people{
    grid-template-columns:1fr;
  }

  #toc-panel{
    width:240px;
  }

  #giant-tip{
    left:50% !important;
    transform:translateX(-50%);
    width:min(96vw, 640px);
    max-height:88vh;

    overflow-y:auto;
    padding:16px 18px 18px;
    border-radius:18px;
  }
}