/* PAS Estudo — estrutural suave: fundo prata claro, Geist, molduras duplas, acento limão. Tema claro fixo. */
:root {
  color-scheme: light;
  --bg: #EEF0F3;
  --bg-2: #E4E7EC;
  --card: #FFFFFF;
  --shell: rgba(14, 17, 22, 0.035);
  --ring: rgba(14, 17, 22, 0.07);
  --ink: #0E1116;
  --ink-2: #485060;
  --ink-3: #5F6778;
  --line: rgba(14, 17, 22, 0.08);
  --black: #0E1116;
  --black-2: #1C2129;
  --lime: #C9F23E;
  --lime-2: #B6E021;
  --lime-soft: #F1FCCF;
  --ok: #12804A;
  --ok-soft: #E3F6EA;
  --bad: #C8352A;
  --bad-soft: #FCE8E6;
  --gold: #8A5A00;
  --gold-soft: #FFF3CC;
  --s-fis: #2a78d6; --s-mat: #eb6834; --s-qui: #1baf7a; --s-ing: #eda100;
  --s-art: #e87ba4; --s-bio: #008300; --s-lin: #6250d6; --s-hum: #e34948;
  --f: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, monospace;
  --r-shell: 30px;
  --pad-shell: 6px;
  --r-core: calc(var(--r-shell) - var(--pad-shell));
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  --out: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 1px 1px rgba(14,17,22,.03), 0 14px 34px -12px rgba(14,17,22,.12), 0 36px 70px -36px rgba(14,17,22,.16);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 85% -10%, #FFFFFF 0, transparent 60%),
    radial-gradient(900px 500px at -10% 30%, #F6F8FB 0, transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 var(--f);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-feature-settings: "ss01";
}
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 10px; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 700; line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2rem); letter-spacing: -0.03em; }
h3 { font-size: 1.15rem; letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }
button { font: inherit; color: inherit; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 100; border-radius: 10px; }
.skip:focus { left: 8px; }
.lcd-num { font-variant-numeric: tabular-nums; }
.lcd-num::before { content: none !important; }

/* ---------- ilhas flutuantes ---------- */
.app { min-height: 100dvh; }
.top { position: sticky; top: 0; z-index: 30; padding: max(10px, env(safe-area-inset-top)) 12px 0; }
.island {
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: 0 0 0 1px var(--ring), 0 10px 30px -12px rgba(14,17,22,.18);
  border-radius: 999px;
}
.top-island { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 6px; padding: 6px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding-right: 4px; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--black); color: var(--lime); display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.04em; }
.brand-txt { display: none; font-weight: 700; letter-spacing: -0.02em; }
@media (min-width: 720px) { .brand-txt { display: inline; } }
.etapa-btn {
  display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 10px 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--shell); box-shadow: inset 0 0 0 1px var(--ring); font-weight: 600; letter-spacing: -0.01em;
  transition: transform 300ms var(--spring), background-color 300ms var(--spring);
}
.etapa-btn:hover { background: rgba(14,17,22,.06); }
.etapa-btn:active { transform: scale(.97); }
.etapa-btn .ic { width: 16px; height: 16px; }
.stats { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.stat { display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 12px; border-radius: 999px; font-weight: 700; font-size: .98rem; letter-spacing: -0.01em; }
.stat .lcd-lbl { font-size: .72rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.stat-xp { background: var(--black); color: #fff; }
.stat-xp .lcd-lbl { color: var(--lime); }
.stat .flame { width: 17px; height: 17px; color: #E8590C; stroke-width: 1.8; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; background: transparent; transition: background-color 250ms var(--spring); }
.icon-btn:hover { background: var(--shell); }
@media (max-width: 420px) { .stat:not(.stat-xp) .lcd-lbl { display: none; } .stat { padding: 0 9px; } }

#main { padding: 28px 16px calc(120px + var(--safe-b)); outline: none; max-width: 1180px; width: 100%; margin: 0 auto; }
@media (min-width: 900px) { #main { padding: 44px 24px 140px; } }

.nav {
  position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); z-index: 30;
  display: flex; gap: 2px; padding: 6px; border-radius: 999px; width: max-content; max-width: calc(100vw - 20px);
  background: rgba(14,17,22,.86); -webkit-backdrop-filter: saturate(1.4) blur(20px); backdrop-filter: saturate(1.4) blur(20px);
  box-shadow: 0 18px 40px -14px rgba(14,17,22,.45), inset 0 1px 0 rgba(255,255,255,.08);
}
.nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 64px; min-height: 54px; padding: 0 10px; border-radius: 999px; text-decoration: none;
  color: rgba(255,255,255,.66); font-size: .7rem; font-weight: 600; letter-spacing: -0.005em;
  transition: background-color 400ms var(--spring), color 300ms var(--spring), transform 300ms var(--spring);
}
.nav a:hover { color: #fff; }
.nav a:active { transform: scale(.96); }
.nav a[aria-current="page"] { background: var(--lime); color: var(--ink); }
.nav a .ic { width: 22px; height: 22px; }
@media (min-width: 720px) { .nav a { flex-direction: row; gap: 8px; font-size: .92rem; padding: 0 18px; min-height: 48px; } }
@media (max-width: 380px) { .nav a { min-width: 58px; padding: 0 6px; font-size: .64rem; } }

/* ---------- entrada ao rolar ---------- */
.reveal { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity 900ms var(--spring), transform 900ms var(--spring), filter 900ms var(--spring); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- moldura dupla ---------- */
.shell { background: var(--shell); box-shadow: inset 0 0 0 1px var(--ring); border-radius: var(--r-shell); padding: var(--pad-shell); }
.core { background: var(--card); border-radius: var(--r-core); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.9); padding: 22px; }
.panel, .paper, .ce-text, .ce-card, .obra-list {
  background: var(--card); border-radius: var(--r-core); box-shadow: 0 0 0 var(--pad-shell) var(--shell), 0 0 0 calc(var(--pad-shell) + 1px) var(--ring), var(--shadow);
  margin: var(--pad-shell); padding: 22px;
}
.core-dark { background: var(--black); color: #F3F5F7; box-shadow: 0 0 0 var(--pad-shell) var(--shell), 0 0 0 calc(var(--pad-shell) + 1px) var(--ring), 0 30px 60px -24px rgba(14,17,22,.45), inset 0 1px 0 rgba(255,255,255,.08); }

/* ---------- botões-pílula ---------- */
.key {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: var(--card); color: var(--ink); font-weight: 600; font-size: .98rem; letter-spacing: -0.01em;
  box-shadow: inset 0 0 0 1px var(--ring), 0 1px 2px rgba(14,17,22,.06);
  transition: transform 450ms var(--spring), background-color 300ms var(--spring), box-shadow 300ms var(--spring);
  touch-action: manipulation; user-select: none;
}
.key:hover { box-shadow: inset 0 0 0 1px rgba(14,17,22,.14), 0 6px 16px -8px rgba(14,17,22,.25); }
.key:active { transform: scale(.97); }
.key[disabled], .key[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.key-dark, .key-act { background: var(--black); color: #fff; box-shadow: 0 10px 24px -12px rgba(14,17,22,.55); }
.key-dark:hover, .key-act:hover { background: var(--black-2); box-shadow: 0 14px 28px -12px rgba(14,17,22,.6); }
.key-act { padding-right: 6px; }
.key-act::after {
  content: ""; width: 36px; height: 36px; border-radius: 50%; flex: none; margin-left: 4px;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E1116' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / 18px no-repeat;
  transition: transform 450ms var(--spring);
}
.key-act:hover::after { transform: translate(2px, -1px) scale(1.06); }
.key-ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--ring); }
.key-sm { min-height: 42px; padding: 0 16px; font-size: .92rem; }
.key-act.key-sm { padding-right: 4px; }
.key-act.key-sm::after { width: 32px; height: 32px; background-size: 16px; }
.key-wide { width: 100%; }
.key .ic { width: 19px; height: 19px; }

/* ---------- cabeçalhos ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 0 0 28px; flex-wrap: wrap; }
.page-head > div { min-width: 0; }
.page-head p { color: var(--ink-2); margin-top: 12px; max-width: 58ch; font-size: 1.05rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 11px; margin-bottom: 14px; font-size: .68rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; background: var(--card); box-shadow: inset 0 0 0 1px var(--ring); color: var(--ink-2); }
.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime-2); box-shadow: 0 0 0 3px var(--lime-soft); }
.stack { display: grid; gap: 22px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }
.sec-title { font-weight: 700; font-size: 1.12rem; letter-spacing: -0.02em; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sec-title .muted { font-weight: 500; font-size: .88rem; letter-spacing: 0; }

/* ---------- Hoje: bento ---------- */
.bento { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(12, 1fr); align-items: stretch; }
  .b-count { grid-column: span 7; }
  .b-pomo { grid-column: span 5; }
  .b-miss { grid-column: span 7; grid-row: span 2; }
  .b-err { grid-column: span 5; }
  .b-dom { grid-column: span 5; }
}
.count { padding: 26px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-height: 260px; position: relative; overflow: hidden; }
.count::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(201,242,62,.28), transparent 65%); pointer-events: none; }
.count-num { font-size: clamp(5.5rem, 18vw, 9rem); font-weight: 800; line-height: .82; letter-spacing: -0.07em; color: var(--lime); }
.count-num small { font-size: 1.1rem; letter-spacing: -0.01em; color: #fff; font-weight: 600; margin-left: 10px; }
.count-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; color: rgba(255,255,255,.72); font-size: .95rem; }
.lvl { flex: 1; min-width: 180px; }
.lvl-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 8px; }
.lvl-bar i { display: block; height: 100%; background: var(--lime); border-radius: 99px; transform-origin: left; transition: transform 900ms var(--spring); }
.pill-dark { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.08); color: #fff; font-size: .8rem; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.pomo { padding: 22px; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.ring { width: 150px; height: 150px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .bgc { stroke: var(--bg-2); }
.ring .fgc { stroke: var(--black); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring.pausa .fgc { stroke: var(--lime-2); }
.ring-in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-in b { font-size: 2rem; font-weight: 700; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.ring-in span { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.pomo-side { display: grid; gap: 12px; }
.pomo-count { display: flex; gap: 5px; flex-wrap: wrap; }
.pomo-dot { width: 18px; height: 6px; border-radius: 99px; background: var(--bg-2); }
.pomo-dot.on { background: var(--black); }
.pomo-keys { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 420px) { .pomo { grid-template-columns: 1fr; justify-items: center; text-align: center; } .pomo-keys, .pomo-count { justify-content: center; } }

/* missões */
.mission { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mission:last-child { border-bottom: 0; padding-bottom: 0; }
.mission .tick { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer; background: var(--bg); box-shadow: inset 0 0 0 1.5px rgba(14,17,22,.14); transition: background-color 400ms var(--spring), transform 400ms var(--spring); }
.mission .tick:active { transform: scale(.92); }
.mission.done .tick { background: var(--lime); box-shadow: none; }
.mission .tick .ic { width: 18px; height: 18px; stroke-width: 2.2; }
.mission b { font-weight: 650; font-size: 1.02rem; letter-spacing: -0.015em; display: block; line-height: 1.25; }
.mission span.muted { font-size: .88rem; }
.mission.done b { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(14,17,22,.35); }

/* barras */
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: minmax(96px, 32%) 1fr 46px; gap: 12px; align-items: center; font-size: .93rem; }
.bar .lbl { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bar .lbl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--c, var(--ink-3)); }
.track { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.fill { display: block; height: 100%; background: var(--c, var(--ink-2)); border-radius: 99px; transform-origin: left; animation: grow 1100ms var(--spring) both; }
@keyframes grow { from { transform: scaleX(0); } }
.bar .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }

/* chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  min-height: 42px; padding: 0 16px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; color: var(--ink);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--ring), 0 1px 2px rgba(14,17,22,.05); font-weight: 550; font-size: .93rem;
  display: inline-flex; align-items: center; gap: 8px; transition: transform 400ms var(--spring), background-color 300ms var(--spring);
}
.chip:hover { background: #FAFBFC; }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: var(--black); color: #fff; box-shadow: none; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--bg); color: var(--ink-2); letter-spacing: -0.005em; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.gold { background: var(--gold-soft); color: var(--gold); }
.tag.act { background: var(--lime-soft); color: #3D4A00; box-shadow: inset 0 0 0 1px rgba(120,150,0,.25); }

/* ---------- treino ---------- */
.ce-shell { display: grid; gap: 10px; }
@media (min-width: 1024px) { .ce-shell.has-text { grid-template-columns: 1fr 1fr; align-items: start; } .ce-text { position: sticky; top: 96px; max-height: calc(100dvh - 130px); overflow: auto; } }
.ce-text details > summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; gap: 10px; justify-content: space-between; align-items: center; min-height: 32px; }
.ce-text details > summary::-webkit-details-marker { display: none; }
.ce-text .txt { white-space: pre-line; font-size: 1rem; line-height: 1.7; margin-top: 12px; max-width: 68ch; color: #252A33; }
@media (max-width: 1023px) { .ce-text .txt { max-height: 44dvh; overflow: auto; overscroll-behavior: contain; padding-right: 6px; } }
.ce-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.ce-item { font-size: clamp(1.15rem, 2.4vw, 1.35rem); line-height: 1.5; letter-spacing: -0.015em; max-width: 60ch; font-weight: 450; }
.ce-num { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 99px; background: var(--black); color: var(--lime); font-size: .85rem; font-weight: 700; margin-right: 10px; vertical-align: 3px; }
.ce-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.ce-keys .key { min-height: 68px; font-size: 1.1rem; justify-content: flex-start; padding: 0 10px; }
.ce-keys .key b { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.35rem; font-weight: 750; background: rgba(255,255,255,.1); }
.ce-keys .key[data-v="C"] b { background: var(--lime); color: var(--ink); }
.ce-keys .key[data-v="E"] b { background: #FF8A7A; color: var(--ink); }
.ce-keys .key-blank { grid-column: 1 / -1; min-height: 50px; justify-content: center; font-size: .98rem; }
.ce-hud { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 6px; border-radius: 26px; background: var(--shell); box-shadow: inset 0 0 0 1px var(--ring); }
.ce-hud > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 20px; background: var(--card); box-shadow: 0 1px 2px rgba(14,17,22,.05); }
.ce-hud > div:first-child { background: var(--black); color: #fff; }
.ce-hud > div:first-child .lcd-lbl { color: var(--lime); }
.ce-hud .lcd-num { font-size: 1.45rem; font-weight: 750; letter-spacing: -0.04em; }
.ce-hud .lcd-lbl, .lcd-lbl { font-size: .66rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.verdict { margin-top: 20px; border-radius: 20px; padding: 16px 18px; display: grid; gap: 10px; animation: rise 600ms var(--spring) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.verdict.ok { background: var(--ok-soft); }
.verdict.bad { background: var(--bad-soft); }
.verdict.blank { background: var(--bg); }
.verdict-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.08rem; letter-spacing: -0.02em; }
.verdict.ok .verdict-head { color: var(--ok); }
.verdict.bad .verdict-head { color: var(--bad); }
.verdict .ic { stroke-width: 2.2; }
.progress { height: 6px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--black); border-radius: 99px; transition: width 600ms var(--spring); }

/* ---------- cálculo ---------- */
.topics { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .topics { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .topics { grid-template-columns: 1fr 1fr 1fr; } }
.topic {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; text-decoration: none; color: inherit;
  padding: 18px 20px; border-radius: 24px; background: var(--card); min-height: 84px;
  box-shadow: 0 0 0 5px var(--shell), 0 0 0 6px var(--ring), 0 10px 24px -14px rgba(14,17,22,.2);
  margin: 6px; transition: transform 500ms var(--spring), box-shadow 500ms var(--spring);
}
.topic:hover { transform: translateY(-2px); box-shadow: 0 0 0 5px var(--shell), 0 0 0 6px var(--ring), 0 18px 34px -16px rgba(14,17,22,.28); }
.topic:active { transform: scale(.98); }
.topic b { font-weight: 650; font-size: 1.02rem; letter-spacing: -0.015em; }
.topic .muted { font-size: .85rem; grid-column: 1; }
.topic .meter { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 4px; }
.topic .meter i { width: 8px; height: 26px; border-radius: 99px; background: var(--bg); }
.topic .meter i.on { background: var(--lime-2); }
.stamp { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 700; letter-spacing: .14em; color: #3D4A00; background: var(--lime); border-radius: 999px; padding: 4px 10px; }
.calc-wrap { display: grid; gap: 10px; }
@media (min-width: 900px) { .calc-wrap { grid-template-columns: 1.1fr .9fr; align-items: start; } }
.formula { font-family: var(--f-mono); font-weight: 600; font-size: 1.12rem; padding: 14px 16px; background: var(--bg); border-radius: 16px; letter-spacing: -0.01em; }
.calc-q { font-size: clamp(1.15rem, 2.4vw, 1.3rem); line-height: 1.5; margin-top: 16px; letter-spacing: -0.015em; }
.pad { background: var(--black); color: #fff; border-radius: var(--r-core); margin: var(--pad-shell); padding: 16px; box-shadow: 0 0 0 var(--pad-shell) var(--shell), 0 0 0 calc(var(--pad-shell) + 1px) var(--ring), 0 30px 60px -24px rgba(14,17,22,.5); }
.pad-lcd { padding: 14px 16px; min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; background: rgba(255,255,255,.05); border-radius: 18px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.pad-lcd .lcd-num { font-size: clamp(2.4rem, 7vw, 3.2rem); line-height: 1; font-weight: 700; letter-spacing: -0.05em; word-break: break-all; text-align: right; color: var(--lime); }
.pad-lcd .lcd-sub { font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); align-self: stretch; display: flex; justify-content: space-between; }
.pad-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.pad-grid .key { min-height: 58px; font-size: 1.35rem; padding: 0; background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); border-radius: 18px; font-weight: 550; }
.pad-grid .key:hover { background: rgba(255,255,255,.14); }
.pad-grid .key-dark { background: rgba(255,255,255,.16); }
.pad-grid .k-eq { grid-row: span 2; min-height: 124px; background: var(--lime); color: var(--ink); font-weight: 700; padding: 0; }
.pad-grid .k-eq::after { content: none; }
.pad-grid .k-eq:hover { background: var(--lime-2); }
.steps { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; font-family: var(--f-mono); font-size: .95rem; }
.is-shaking { animation: shake 280ms linear; }
@keyframes shake { 0% { transform: translateX(0); } 28.57% { transform: translateX(6px); } 57.14% { transform: translateX(-6px); } 78.57% { transform: translateX(4px); } 100% { transform: translateX(0); } }
.check { display: inline-flex; color: var(--ok); }
.check svg { width: 28px; height: 28px; overflow: visible; }
.check svg path { stroke-dasharray: 24; stroke-dashoffset: 24; }
.check[data-state="in"] svg path { animation: draw 500ms var(--out) 60ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- obras ---------- */
.obra-list { padding: 6px 0; overflow: hidden; }
.obra-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; align-items: center; min-height: 68px; transition: background-color 300ms var(--spring); }
.obra-row:last-child { border-bottom: 0; }
.obra-row:hover { background: #FAFBFC; }
.obra-row b { font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; }
.obra-row .muted { font-size: .86rem; }
.obra-row .tags { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 180px; }
.panel .obra-row { padding-left: 0; padding-right: 0; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #0E1116; outline: 1px solid oklch(0 0 0 / .1); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-load { position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; display: grid; place-items: center; background-size: cover; background-position: center; }
.video-load span { background: var(--lime); border-radius: 999px; width: 72px; height: 72px; display: grid; place-items: center; box-shadow: 0 12px 30px rgba(0,0,0,.35); transition: transform 500ms var(--spring); }
.video-load:hover span { transform: scale(1.06); }
.video-load .ic { width: 28px; height: 28px; fill: var(--ink); stroke: none; margin-left: 4px; }
.reading { max-width: 68ch; font-size: 1.05rem; }

/* ---------- plano ---------- */
.plan-day { display: grid; grid-template-columns: 70px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.plan-day.today { background: var(--lime-soft); margin: 4px -12px; padding: 16px 12px; border-radius: 18px; border-bottom: 0; }
.plan-date { font-weight: 700; letter-spacing: -0.02em; font-size: 1.05rem; }
.plan-date small { display: block; font-weight: 500; color: var(--ink-3); font-size: .82rem; }
.plan-tasks { display: grid; gap: 8px; }
.plan-task { display: flex; gap: 10px; align-items: flex-start; min-height: 32px; cursor: pointer; }
.plan-task input { width: 20px; height: 20px; accent-color: var(--black); flex: none; margin-top: 2px; }
.plan-task a { font-weight: 600; text-decoration: none; }
.plan-task a:hover { text-decoration: underline; }

/* ---------- folha ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; }
.sheet[hidden] { display: none; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(14,17,22,.42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade 300ms var(--spring); }
.sheet-body { position: relative; background: var(--card); border-radius: 30px 30px 0 0; padding: 26px 20px calc(24px + var(--safe-b)); max-height: 88dvh; overflow: auto; display: grid; gap: 16px; animation: up 600ms var(--spring); box-shadow: 0 -20px 60px -20px rgba(14,17,22,.35); }
@media (min-width: 720px) { .sheet { align-items: center; justify-items: center; } .sheet-body { border-radius: 30px; width: min(580px, 92vw); } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .93rem; }
.field input, .field select { min-height: 50px; border-radius: 16px; border: 0; box-shadow: inset 0 0 0 1px rgba(14,17,22,.14); padding: 0 14px; font: 500 1rem var(--f); background: var(--card); color: var(--ink); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg .key { min-height: 72px; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em; }
.seg .key-act { padding-right: 22px; background: var(--lime); color: var(--ink); }
.seg .key-act::after { content: none; }
.seg .key-dark { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ring); }

.toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); z-index: 70;
  transform: translate(-50%, 16px) scale(.97); opacity: 0; filter: blur(2px);
  background: var(--black); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; letter-spacing: -0.01em;
  box-shadow: 0 16px 34px -12px rgba(0,0,0,.4); pointer-events: none; max-width: 92vw;
  transition: opacity 250ms var(--out), transform 250ms var(--out), filter 250ms var(--out);
}
.toast.is-open { opacity: 1; transform: translate(-50%, 0) scale(1); filter: blur(0); transition-duration: 450ms; transition-timing-function: var(--spring); }
.toast.gold { background: var(--lime); color: var(--ink); }

.big-stamp { animation: stamp 600ms var(--spring) both; }
@keyframes stamp { from { transform: scale(1.3) rotate(-8deg); opacity: 0; } }
.empty { text-align: center; padding: 36px 18px; color: var(--ink-2); }
.empty b { display: block; font-weight: 700; font-size: 1.2rem; color: var(--ink); margin-bottom: 6px; letter-spacing: -0.02em; }
.fade-in { animation: fade 240ms var(--out); }
.kbd { font: 600 .74rem var(--f-mono); padding: 2px 7px; border-radius: 6px; background: var(--bg); box-shadow: inset 0 -1.5px 0 rgba(14,17,22,.12); }
.hide-touch { display: none; }
@media (hover: hover) and (pointer: fine) { .hide-touch { display: inline; } }
details summary { cursor: pointer; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(14,17,22,.18); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  .check svg path { stroke-dashoffset: 0; }
}
@media (min-width: 900px) { .bento.rx > section { grid-column: span 6; } }

/* ---------- conta ---------- */
.sem-conta .nav, .sem-conta .stats, .sem-conta .etapa-btn, .sem-conta [data-act="config"] { display: none; }
.entrada { display: grid; gap: 28px; align-items: center; min-height: calc(100dvh - 160px); }
@media (min-width: 960px) { .entrada { grid-template-columns: 1.1fr .9fr; gap: 56px; } }
.entrada-txt h1 { font-size: clamp(2.4rem, 6.4vw, 4.2rem); }
.entrada-txt p { color: var(--ink-2); font-size: 1.1rem; margin-top: 16px; max-width: 52ch; }
.entrada-lista { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.entrada-lista li { display: flex; gap: 10px; align-items: center; font-weight: 550; }
.entrada-lista li::before { content: ""; width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E1116' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat; }
.entrada-form { display: grid; gap: 16px; padding: 26px; max-width: 480px; width: calc(100% - 12px); justify-self: center; }
.seg-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg); }
.seg-2 button { min-height: 44px; border: 0; border-radius: 999px; background: transparent; font-weight: 600; cursor: pointer; transition: background-color 400ms var(--spring), box-shadow 400ms var(--spring); }
.seg-2 button[aria-selected="true"] { background: var(--card); box-shadow: 0 1px 2px rgba(14,17,22,.08), 0 6px 14px -8px rgba(14,17,22,.25); }
.form-erro { color: var(--bad); font-weight: 600; font-size: .92rem; min-height: 1.2em; }
.form-erro:empty { display: none; }
.link { border: 0; background: none; padding: 0; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink); }
.field input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.conta-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; background: var(--bg); }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank li { display: grid; grid-template-columns: 28px minmax(90px, 34%) 1fr 54px; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; }
.rank li.eu { background: var(--lime-soft); }
.rk-pos { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--bg); }
.rank li:nth-child(1) .rk-pos { background: var(--black); color: var(--lime); }
.rk-nome { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-nome small { display: block; font-weight: 500; color: var(--ink-3); font-size: .74rem; }
.rank .val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .b-rank { grid-column: span 7; } }
.sem-conta .brand-txt { display: inline; }
