:root {
  color-scheme: dark;
  --bg: #07101f;
  --bg-2: #0a1529;
  --side: #0a1730;
  --surface: #0e1d38;
  --surface-2: #122545;
  --surface-3: #183058;
  --line: #1d3560;
  --line-2: #27467a;
  --text: #e8eef8;
  --text-2: #b4c3dc;
  --muted: #8a9cbb;
  --blue: #1f7cf2;
  --blue-2: #4d9bff;
  --blue-deep: #0b3d91;
  --blue-glow: rgba(31, 124, 242, .35);
  --green: #2fc172;
  --green-bg: rgba(47, 193, 114, .14);
  --amber: #f4b13e;
  --amber-bg: rgba(244, 177, 62, .12);
  --red: #ff6b5e;
  --red-bg: rgba(255, 107, 94, .1);
  --violet: #8f6bff;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scrollbar-color: var(--line-2) var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--blue); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid var(--bg); }
a { color: var(--blue-2); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; border-radius: 6px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
code { font-family: var(--mono); font-size: .86em; background: var(--surface-3); color: #cfe0ff; padding: .1em .38em; border-radius: 5px; overflow-wrap: anywhere; }
h1, h2, h3 { text-wrap: balance; margin: 0; letter-spacing: -.015em; }
p { margin: 0; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px;
  padding: 22px 16px; background: linear-gradient(180deg, var(--side), #081326);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); padding: 2px 6px; }
.brand-mark {
  display: grid; place-items: center; width: 44px; height: 30px; font-weight: 800; font-size: 15px; letter-spacing: -.02em;
  color: #fff; background: linear-gradient(135deg, #1663d6, #0a49a8); clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%); padding-right: 8px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15px; }
.brand-text small { color: var(--muted); font-size: 12px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 14px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.side-nav a:hover { background: var(--surface); color: var(--text); }
.side-nav a.on { background: linear-gradient(90deg, rgba(31,124,242,.28), rgba(31,124,242,.1)); color: #fff; box-shadow: inset 0 0 0 1px rgba(77,155,255,.35); }
.side-nav a.on svg { color: var(--blue-2); }
.side-card {
  margin-top: auto; padding: 18px 16px; border-radius: var(--radius); text-align: center;
  background: radial-gradient(120% 90% at 50% 120%, rgba(31,124,242,.45), transparent 60%), var(--surface);
  border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2);
}
.side-card svg { width: 30px; height: 30px; color: var(--blue-2); margin-bottom: 6px; }
.side-card b { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }
.side-card .btn { margin-top: 12px; width: 100%; justify-content: center; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 14px 28px; background: rgba(7, 16, 31, .86); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(29,53,96,.6);
}
.top .menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 480px; display: flex; align-items: center; }
.search > svg { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 42px; padding: 0 44px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { position: absolute; right: 12px; font: 12px var(--mono); color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 0 6px; }
.search-results {
  position: absolute; top: 48px; left: 0; right: 0; max-height: 60vh; overflow: auto; padding: 6px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
}
.search-results a { display: grid; grid-template-columns: 44px 1fr; gap: 2px 10px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--text); }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--surface-3); }
.search-results .sid { grid-row: span 2; font: 600 13px var(--mono); color: var(--blue-2); align-self: center; }
.search-results small { color: var(--muted); font-size: 12.5px; }
.search-results .empty { padding: 14px; color: var(--muted); font-size: 14px; }
.top-progress { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.top-progress .bar { width: 120px; }

#view { padding: 26px 28px 60px; outline: none; display: flex; flex-direction: column; gap: 22px; max-width: 1480px; width: 100%; }
#view.enter > * { animation: rise .5s var(--ease) both; }
#view.enter > *:nth-child(2) { animation-delay: .04s; }
#view.enter > *:nth-child(3) { animation-delay: .08s; }
#view.enter > *:nth-child(4) { animation-delay: .12s; }
@keyframes rise { from { opacity: .001; transform: translateY(10px); } }

/* ---------- primitives ---------- */
.panel { background: linear-gradient(180deg, var(--surface), #0c1a33); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-h h2 { font-size: 19px; font-weight: 600; }
.panel-h > svg { width: 24px; height: 24px; color: var(--blue-2); }
.panel-h .sub { color: var(--muted); font-size: 13px; }
.panel-h .end { margin-left: auto; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 10px;
  font: 600 14px var(--font); text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: transform .15s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: linear-gradient(180deg, #2d8bff, #1468dc); color: #fff; box-shadow: 0 8px 20px -8px var(--blue-glow); }
.btn-primary:hover { box-shadow: 0 10px 26px -6px rgba(31,124,242,.6); transform: translateY(-1px); }
.btn-ghost { background: rgba(14,29,56,.6); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--blue-2); background: var(--surface-2); }
.btn-done { background: var(--green-bg); color: var(--green); border-color: rgba(47,193,114,.4); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn:active { transform: translateY(1px); }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgba(31,124,242,.2); color: #9cc7ff; border: 1px solid rgba(77,155,255,.45); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 6px; font-size: 12px; color: var(--text-2); background: var(--surface-3); border: 1px solid var(--line-2); }
.chip svg { width: 13px; height: 13px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.status svg { width: 18px; height: 18px; }
.status.done { color: var(--green); }
.status.doing { color: var(--amber); }
.status.todo { color: var(--muted); }
.bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, #1f7cf2, #4d9bff); transition: width .6s var(--ease); }
.bar.green i { background: linear-gradient(90deg, #22a862, #3fd68a); }
.meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--text-2); font-size: 14px; }
.meta span { display: inline-flex; align-items: center; gap: 7px; }
.meta svg { width: 18px; height: 18px; color: var(--muted); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); flex-wrap: wrap; }
.crumbs a { color: var(--blue-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.crumbs a:hover { text-decoration: underline; }
.crumbs svg { width: 15px; height: 15px; color: var(--muted); }
.check {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; flex: none;
  border: 2px solid var(--line-2); color: transparent; background: transparent; cursor: pointer; padding: 0;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.check svg { width: 14px; height: 14px; stroke-width: 3; }
.check.on { background: var(--green); border-color: var(--green); color: #05210f; }
.check.half { border-color: var(--blue-2); box-shadow: inset 0 0 0 4px var(--bg-2), inset 0 0 0 10px var(--blue-2); }
.check:hover { border-color: var(--green); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 18px; border: 1px solid var(--line-2);
  background:
    radial-gradient(70% 120% at 85% 30%, rgba(31,124,242,.42), transparent 60%),
    radial-gradient(50% 80% at 100% 100%, rgba(11,61,145,.6), transparent 70%),
    linear-gradient(120deg, #0b1a36 0%, #0d2550 55%, #0f3270 100%);
  min-height: 250px; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center;
}
.hero > .hero-copy { max-width: 64%; }
.hero-copy { position: relative; z-index: 2; padding: 30px 34px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.hero h1 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.08; font-weight: 700; }
.hero p.lead { font-size: 17px; color: var(--text-2); max-width: 56ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero .bar { width: min(520px, 100%); }
.hero-progress { display: flex; align-items: center; gap: 14px; width: 100%; font-size: 14px; color: var(--text-2); }
.hero-progress .bar { flex: 1; height: 7px; }

/* ---------- grids ---------- */
.grid-hero { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: stretch; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* progress card */
.ring-wrap { display: flex; align-items: center; gap: 22px; }
.ring { position: relative; width: 112px; height: 112px; flex: none; }
.ring svg { width: 112px; height: 112px; transform: rotate(-90deg); stroke-linecap: round; }
.ring .track { stroke: var(--surface-3); stroke-width: 9; }
.ring .val { stroke: url(#ringgrad); stroke-width: 9; transition: stroke-dashoffset .8s var(--ease); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 700; }
.stats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 13.5px; color: var(--text-2); }
.stats li { display: flex; align-items: center; gap: 9px; }
.stats svg { width: 18px; height: 18px; }
.stats b { color: var(--text); font-weight: 600; }
.next-obj { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); }
.next-obj > svg:first-child { width: 26px; height: 26px; color: var(--amber); }
.next-obj small { display: block; color: var(--muted); font-size: 12.5px; }
.next-obj span { font-size: 14px; font-weight: 600; }
.next-obj > svg:last-child { margin-left: auto; color: var(--muted); }
.next-obj:hover > svg:last-child { color: var(--blue-2); }

/* trail strip */
.trail { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; padding-top: 14px; }
.station {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 24px 8px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line);
  text-decoration: none; color: var(--text); min-height: 150px;
  transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s;
}
.station:hover { border-color: var(--blue-2); transform: translateY(-2px); background: var(--surface); }
.station .dot {
  position: absolute; top: -13px; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%;
  background: var(--surface-3); border: 1px solid var(--line-2); font-size: 13px; font-weight: 700; color: var(--text-2);
}
.station .dot svg { width: 15px; height: 15px; stroke-width: 3; }
.station.done .dot { background: var(--green); border-color: var(--green); color: #05210f; }
.station.current { border-color: var(--blue); background: linear-gradient(180deg, rgba(31,124,242,.18), var(--bg-2)); box-shadow: 0 0 0 1px var(--blue), 0 10px 30px -12px var(--blue-glow); }
.station.current .dot { background: var(--blue); border-color: var(--blue-2); color: #fff; }
.station b { font-size: 13.5px; }
.station .nm { font-size: 12.5px; color: var(--text-2); line-height: 1.3; }
.station .tm { margin-top: auto; font-size: 11.5px; color: var(--muted); }
.station .bar { width: 100%; height: 4px; margin-top: 8px; }

/* request path */
.path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.hop { position: relative; padding: 16px 18px; border: 1px solid var(--line); background: var(--bg-2); }
.hop:first-child { border-radius: 12px 0 0 12px; }
.hop:last-child { border-radius: 0 12px 12px 0; }
.hop + .hop { border-left: none; }
.hop:not(:last-child)::after {
  content: ""; position: absolute; right: -9px; top: 50%; width: 16px; height: 16px; z-index: 2;
  background: var(--surface-2); border: 1px solid var(--line-2); border-left: none; border-bottom: none; transform: translateY(-50%) rotate(45deg);
}
.hop h3 { font-size: 15px; font-weight: 600; }
.hop .c { color: var(--blue-2); font: 500 12.5px var(--mono); margin: 3px 0 6px; }
.hop p { color: var(--muted); font-size: 13px; }
.hop .ph { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.hop .ph a { font-size: 12px; text-decoration: none; }
.hop:hover { background: var(--surface); }
.path-note { margin-top: 12px; color: var(--muted); font-size: 13px; }

/* resource list */
.res { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.res a { display: grid; grid-template-columns: 34px 1fr 18px; gap: 12px; align-items: center; padding: 10px 4px; text-decoration: none; color: var(--text); border-radius: 8px; }
.res li + li a { border-top: 1px solid var(--line); }
.res a:hover { background: var(--surface-2); }
.res .ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: rgba(31,124,242,.18); color: var(--blue-2); }
.res .ic svg { width: 18px; height: 18px; }
.res .ic.v { background: rgba(143,107,255,.18); color: #b49cff; }
.res .ic.g { background: var(--green-bg); color: var(--green); }
.res span { font-size: 14px; line-height: 1.3; }
.res small { display: block; color: var(--muted); font-size: 12px; }
.res a > svg { width: 16px; height: 16px; color: var(--muted); }

/* schedule */
.sched { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.sched li { padding: 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.sched b { display: block; font-size: 12px; color: var(--blue-2); letter-spacing: .02em; margin-bottom: 4px; }

/* ---------- phase page ---------- */
.phase-hero { grid-template-columns: auto minmax(0, 1fr) auto; gap: 26px; padding: 28px 30px; }
.phase-tile {
  display: grid; place-items: center; width: 150px; height: 150px; border-radius: 22px; position: relative; z-index: 2;
  background: linear-gradient(145deg, #12366e, #0b2350); border: 1px solid #2f63b3;
  box-shadow: inset 0 0 40px rgba(77,155,255,.25), 0 20px 40px -18px #000;
}
.phase-tile svg { width: 70px; height: 70px; color: var(--blue-2); stroke-width: 1.6; filter: drop-shadow(0 0 14px rgba(77,155,255,.55)); }
.phase-hero .hero-copy { padding: 0; }
.phase-hero h1 { font-size: clamp(26px, 2.8vw, 38px); }
.phase-side { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 0; min-width: 220px; padding: 6px 20px; border-radius: 14px; background: rgba(7,16,31,.55); border: 1px solid var(--line-2); backdrop-filter: blur(6px); }
.phase-side div { display: flex; align-items: center; gap: 14px; padding: 14px 0; }
.phase-side div + div { border-top: 1px solid var(--line); }
.phase-side svg { width: 28px; height: 28px; color: var(--blue-2); }
.phase-side small { display: block; color: var(--text-2); font-size: 12.5px; }
.phase-side b { font-size: 17px; }
.hero-glyph { position: absolute; right: 230px; top: 50%; transform: translateY(-50%) skewX(-10deg); font-size: 120px; font-weight: 800; letter-spacing: -.04em; color: rgba(120,170,255,.09); pointer-events: none; z-index: 1; white-space: nowrap; }

.mods { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; position: relative; }
.mod {
  position: relative; display: grid; grid-template-columns: 34px 58px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 14px 16px 14px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.mod:hover { border-color: var(--line-2); background: #0c1932; }
.mod.current { border-color: var(--blue); background: linear-gradient(90deg, rgba(31,124,242,.14), var(--bg-2) 60%); box-shadow: 0 0 0 1px rgba(31,124,242,.6); }
.mod .num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 700; color: var(--text-2); position: relative; z-index: 1; }
.mod.done .num { background: var(--green); border-color: var(--green); color: #05210f; }
.mod.current .num { background: var(--blue); border-color: var(--blue-2); color: #fff; }
.mod + .mod::before { content: ""; position: absolute; left: 26px; top: -11px; height: 12px; width: 2px; background: var(--line-2); }
.mod .mic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--blue-2); }
.mod .mic svg { width: 26px; height: 26px; }
.mod.warn .mic { color: var(--amber); }
.mod h3 { font-size: 15.5px; font-weight: 600; }
.mod h3 a { color: inherit; text-decoration: none; }
.mod h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.mod p { color: var(--text-2); font-size: 13.5px; margin: 2px 0 7px; }
.mod .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.mod .act { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }

.goals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--text-2); }
.goals li { display: flex; gap: 11px; align-items: flex-start; }
.goals li svg { width: 20px; height: 20px; color: var(--green); margin-top: 1px; }
.exercise { background: radial-gradient(90% 100% at 100% 0%, rgba(143,107,255,.22), transparent 60%), linear-gradient(180deg, var(--surface), #0c1a33); border-color: #33307a; }
.exercise .panel-h > svg { color: #b49cff; }
.exercise p { color: var(--text-2); font-size: 14px; }
.exercise .btn { margin-top: 16px; }
.next-card { text-align: center; background: radial-gradient(100% 80% at 50% 0%, rgba(31,124,242,.3), transparent 70%), linear-gradient(180deg, var(--surface), #0c1a33); border-color: var(--line-2); }
.next-card > svg { width: 34px; height: 34px; color: var(--blue-2); }
.next-card h2 { font-size: 18px; margin: 8px 0 6px; }
.next-card p { color: var(--text-2); font-size: 14px; }
.next-card .btn { margin-top: 16px; width: 100%; justify-content: center; }
details.tips { padding: 0; }
details.tips summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 16px 22px; font-weight: 600; font-size: 14px; }
details.tips summary::-webkit-details-marker { display: none; }
details.tips summary svg { transition: transform .2s var(--ease); width: 18px; height: 18px; }
details.tips[open] summary svg { transform: rotate(180deg); }
details.tips .tip { display: flex; gap: 10px; padding: 0 22px 18px; color: var(--text-2); font-size: 14px; }
details.tips .tip svg { color: var(--amber); }

/* ---------- module page ---------- */
.mod-head { display: flex; flex-direction: column; gap: 12px; }
.mod-head h1 { font-size: clamp(26px, 2.6vw, 34px); display: flex; align-items: center; gap: 14px; }
.mod-head h1 .mic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--blue-2); flex: none; }
.mod-head h1 .mic svg { width: 26px; height: 26px; }
.mod-head .lead { color: var(--text-2); font-size: 16.5px; max-width: 70ch; }
.read { max-width: 74ch; display: flex; flex-direction: column; gap: 16px; }
.read p { font-size: 16px; line-height: 1.7; color: #d6e0f0; }
.read b { color: #fff; }
.read h2 { font-size: 17px; font-weight: 600; margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.read h2 svg { color: var(--blue-2); }
.code { position: relative; border-radius: 12px; border: 1px solid var(--line-2); background: #060d1a; overflow: hidden; }
.code header { display: flex; align-items: center; justify-content: space-between; padding: 7px 8px 7px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); font: 500 12px var(--mono); color: var(--muted); }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13.5px/1.6 var(--mono); color: #d8e6ff; }
.code pre code { background: none; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
.code .copy { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font: 500 12px var(--font); cursor: pointer; }
.code .copy:hover { color: #fff; border-color: var(--blue-2); }
.code .copy svg { width: 14px; height: 14px; }
.tok-c { color: #6f84a8; font-style: italic; }
.tok-s { color: #8fd6a8; }
.tok-k { color: #7fb4ff; }
.tok-n { color: #f4b97a; }
.ttable { width: 100%; border-collapse: collapse; font-size: 14px; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.ttable th, .ttable td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ttable th { background: var(--surface-2); font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.ttable td:nth-child(2) { font-family: var(--mono); font-size: 13px; color: #cfe0ff; }
.ttable tr:last-child td { border-bottom: none; }
.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.files li { display: flex; gap: 10px; align-items: flex-start; font: 13px/1.5 var(--mono); color: #cfe0ff; overflow-wrap: anywhere; }
.files svg { width: 16px; height: 16px; color: var(--amber); margin-top: 2px; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--red-bg); border: 1px solid rgba(255,107,94,.4); color: #ffd2cc; font-size: 14px; }
.callout svg { color: var(--red); margin-top: 1px; }
.done-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.done-bar .sp { flex: 1; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pager a { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); text-decoration: none; color: var(--text); }
.pager a:hover { border-color: var(--blue-2); }
.pager a small { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 4px; }
.pager a small svg { width: 14px; height: 14px; }
.pager a.nx { text-align: right; align-items: flex-end; }
.pager span { font-weight: 600; font-size: 14.5px; }

/* ---------- trail list page ---------- */
.phase-rows { display: flex; flex-direction: column; gap: 12px; }
.prow { display: grid; grid-template-columns: 64px minmax(0, 1fr) 220px 30px; gap: 18px; align-items: center; padding: 16px 18px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: border-color .2s var(--ease); }
.prow:hover { border-color: var(--blue-2); }
.prow .pt { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 14px; background: linear-gradient(145deg, #12366e, #0b2350); border: 1px solid #2f63b3; color: var(--blue-2); }
.prow .pt svg { width: 28px; height: 28px; }
.prow h3 { font-size: 16px; }
.prow p { color: var(--text-2); font-size: 13.5px; margin-top: 3px; }
.prow .pr { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.prow > svg { color: var(--muted); }

.ref-group h3 { font-size: 14px; color: var(--text-2); font-weight: 600; margin-bottom: 6px; font-family: var(--mono); }
.ref-cols { columns: 2 380px; column-gap: 22px; }
.ref-cols .panel { break-inside: avoid; margin-bottom: 22px; }
.about p { font-size: 15.5px; line-height: 1.7; color: var(--text-2); max-width: 72ch; }
.about p + p { margin-top: 12px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); opacity: 0; padding: 10px 16px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line-2); font-size: 14px; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease); z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .trail { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 22px; }
  .sched { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .phase-hero { grid-template-columns: auto minmax(0, 1fr); }
  .phase-side { grid-column: 1 / -1; flex-direction: row; gap: 24px; }
  .phase-side div + div { border-top: none; }
  .hero-glyph { right: 40px; }
}
@media (max-width: 1080px) {
  .grid-hero, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .path { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hop, .hop:first-child, .hop:last-child { border-radius: 12px; border: 1px solid var(--line); }
  .hop::after { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 40; left: 0; width: 264px; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .side.open { transform: none; box-shadow: 20px 0 50px rgba(0,0,0,.6); }
  .scrim { position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.5); }
  .top .menu-btn { display: grid; }
  .top { padding: 12px 16px; gap: 10px; }
  .top-progress .bar, .search kbd { display: none; }
  #view { padding: 18px 16px 48px; gap: 16px; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-art { position: absolute; inset: 0; opacity: .35; }
  .hero-copy { padding: 24px 20px; }
  .trail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sched { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phase-hero { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; gap: 18px; }
  .phase-tile { width: 84px; height: 84px; border-radius: 16px; }
  .phase-tile svg { width: 40px; height: 40px; }
  .phase-side { flex-direction: column; gap: 0; }
  .phase-side div + div { border-top: 1px solid var(--line); }
  .hero-glyph { display: none; }
  .mod { grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
  .mod .mic { display: none; }
  .mod .act { grid-column: 2; }
  .mod + .mod::before { left: 26px; }
  .prow { grid-template-columns: 48px minmax(0, 1fr); }
  .prow .pt { width: 48px; height: 48px; }
  .prow .pr { grid-column: 2; }
  .prow > svg { display: none; }
  .panel { padding: 18px; }
  .pager { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .trail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .path { grid-template-columns: minmax(0, 1fr); }
  .ring-wrap { flex-direction: column; align-items: flex-start; }
  .top-progress span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- imagens de fundo dos cards ---------- */
.hero-photo {
  position: absolute; top: 0; right: 0; bottom: 0; width: 56%; z-index: 0; pointer-events: none;
  background: var(--img) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 22%, #000 48%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 22%, #000 48%);
}
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,16,31,0) 60%, rgba(7,16,31,.55)); }
.phase-hero .hero-photo { width: 50%; opacity: .9; }
.phase-hero .phase-tile, .phase-hero .hero-copy, .phase-hero .phase-side { position: relative; z-index: 2; }
.banner { min-height: 0; }
.banner .hero-copy { padding: 22px 26px; gap: 10px; }
.banner h2 { font-size: clamp(20px, 2vw, 26px); font-weight: 700; }
.banner .lead { font-size: 15px; }
.banner .back { display: inline-flex; align-items: center; gap: 6px; color: var(--blue-2); text-decoration: none; font-size: 13.5px; }
.banner .back svg { width: 16px; height: 16px; }
.banner .hero-photo { width: 50%; }
.banner > .hero-copy { max-width: 56%; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 9px; font-size: 14px; }
.checklist li.cur { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.checklist li a { color: var(--text-2); text-decoration: none; }
.checklist li.cur a { color: #fff; font-weight: 600; }
.checklist li a:hover { color: #fff; }
.lab-cta {
  display: grid; grid-template-columns: 46px 1fr 20px; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 14px; text-decoration: none; color: var(--text);
  background: radial-gradient(90% 140% at 100% 50%, rgba(143,107,255,.25), transparent 60%), var(--surface); border: 1px solid #3a3a8c;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.lab-cta:hover { border-color: #8f6bff; transform: translateY(-1px); }
.lab-cta > svg:first-child { width: 46px; height: 46px; padding: 11px; border-radius: 12px; background: rgba(143,107,255,.2); color: #b49cff; }
.lab-cta b { display: block; font-size: 15px; }
.lab-cta small { color: var(--text-2); font-size: 13px; }
.lab-cta > svg:last-child { color: #b49cff; }

/* ---------- laboratório OData ---------- */
.lab-hero { min-height: 200px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--text-2); font: 600 13px var(--font); padding: 6px 12px; border-radius: 7px; cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--blue); color: #fff; }
.reqbar { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 10px; }
.reqbar select, .reqbar input, .lab textarea, .real-cfg input {
  height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: #060d1a; color: var(--text); font: 13.5px var(--mono); padding: 0 12px; min-width: 0;
}
.reqbar select { font-family: var(--font); font-weight: 700; color: var(--blue-2); }
.reqbar input:focus, .lab textarea:focus, .real-cfg input:focus, .reqbar select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
.lab textarea { width: 100%; height: 150px; margin-top: 10px; padding: 12px; resize: vertical; line-height: 1.55; }
.lab-ex { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.lab-ex > span { font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.lab-ex .chip { cursor: pointer; font: 500 12.5px var(--font); padding: 5px 10px; }
.lab-ex .chip:hover { border-color: var(--blue-2); color: #fff; }
.lab-tools { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.real-cfg { margin-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }
.real-cfg[hidden] { display: none; }
.row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.row3 label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-2); }
.note { display: flex; gap: 10px; font-size: 13.5px; color: var(--text-2); padding: 12px 14px; border-radius: 10px; background: var(--amber-bg); border: 1px solid rgba(244,177,62,.35); }
.note svg { color: var(--amber); }
.note.err { background: var(--red-bg); border-color: rgba(255,107,94,.4); color: #ffd2cc; }
.note.err svg { color: var(--red); }
.lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.resmeta { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--text-2); }
.st { font: 700 12.5px var(--mono); padding: 2px 8px; border-radius: 6px; }
.st.ok { background: var(--green-bg); color: var(--green); }
.st.err { background: var(--red-bg); color: var(--red); }
.lab-res { border-radius: 12px; border: 1px solid var(--line-2); background: #060d1a; min-height: 220px; max-height: 620px; overflow: auto; }
.lab-res .empty { padding: 22px; color: var(--muted); font-size: 14px; }
.lab-pre { margin: 0; padding: 16px; font: 13px/1.6 var(--mono); color: #d8e6ff; white-space: pre; }
.lab-table { overflow: auto; }
.lab-table .ttable { border: 0; border-radius: 0; white-space: nowrap; }
.lab-table .ttable td { font-family: var(--mono); font-size: 12.5px; color: #cfe0ff; }
.lab-parse dl { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.lab-parse dt { font: 600 12.5px var(--mono); color: var(--blue-2); margin-top: 10px; }
.lab-parse dt:first-child { margin-top: 0; }
.lab-parse dd { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.lab-parse dd small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.lab-h3 { font-size: 14px; font-weight: 600; margin: 22px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.ents { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ents li { display: flex; flex-direction: column; gap: 2px; }
.ents small { color: var(--muted); font-size: 12px; }
@media (max-width: 1080px) { .lab-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .hero > .hero-copy { max-width: none; }
  .hero-photo, .banner .hero-photo, .phase-hero .hero-photo { width: 100%; opacity: .32; -webkit-mask-image: none; mask-image: none; }
  .reqbar { grid-template-columns: 84px minmax(0, 1fr); }
  .reqbar .btn { grid-column: 1 / -1; justify-content: center; }
  .row3 { grid-template-columns: minmax(0, 1fr); }
  .seg.end { margin-left: 0; }
  .panel-h { flex-wrap: wrap; }
}

/* ---------- laboratório: editor de parâmetros (estilo Insomnia) ---------- */
.ptabs { display: flex; gap: 4px; margin-top: 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptabs .cnt[hidden] { display: none; }
.ptabs button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--text-2); font: 600 14px var(--font); padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ptabs button:hover { color: var(--text); }
.ptabs button[aria-selected="true"] { color: #fff; border-bottom-color: var(--blue-2); }
.ptabs .cnt { min-width: 22px; padding: 0 6px; height: 20px; display: inline-grid; place-items: center; border-radius: 6px; border: 1px solid var(--line-2); font: 600 11.5px var(--mono); color: var(--text-2); }
.ptabs button[aria-selected="true"] .cnt { border-color: var(--blue-2); color: #cfe0ff; }
.tabpane { padding-top: 16px; }
.tabpane[hidden] { display: none; }
.preview { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: #060d1a; }
.preview > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.preview small { font: 600 11px var(--font); letter-spacing: .06em; color: var(--muted); }
.preview code { background: none; padding: 0; font-size: 12.5px; color: #cfe0ff; overflow-wrap: anywhere; line-height: 1.5; }
.preview .icon-btn { width: 36px; height: 36px; flex: none; }
.preview .icon-btn svg { width: 17px; height: 17px; }
.qp-head, .qp-tools { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.qp-head { margin-top: 18px; }
.qp-head b { font: 600 11.5px var(--font); letter-spacing: .06em; color: var(--muted); margin-right: auto; }
.qp-tools { margin: 12px 0 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.lnk { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--text-2); font: 500 13px var(--font); cursor: pointer; padding: 4px 2px; }
.lnk:hover { color: #fff; }
.lnk svg { width: 15px; height: 15px; }
.tgl { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.tgl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tgl span { width: 30px; height: 17px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line-2); position: relative; transition: background .2s var(--ease); }
.tgl span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--muted); transition: transform .2s var(--ease), background .2s; }
.tgl input:checked + span { background: var(--blue); border-color: var(--blue-2); }
.tgl input:checked + span::after { transform: translateX(13px); background: #fff; }
.tgl input:focus-visible + span { outline: 2px solid var(--blue-2); outline-offset: 2px; }
.qp-rows { display: flex; flex-direction: column; }
.qp-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) 34px 34px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(29,53,96,.6); }
.qp-row input:not([type=checkbox]) { height: 38px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text); font: 13.5px var(--mono); padding: 0 10px; min-width: 0; }
.qp-row input:not([type=checkbox]):hover { border-color: var(--line); }
.qp-row input:not([type=checkbox]):focus { outline: none; border-color: var(--blue); background: #060d1a; box-shadow: 0 0 0 3px var(--blue-glow); }
.qp-row .qp-k { color: #9cc7ff; font-weight: 500; }
.qp-row input::placeholder { color: #51658a; }
.qp-on { display: grid; place-items: center; cursor: pointer; }
.qp-on input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qp-on span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--line-2); color: transparent; transition: background .15s, border-color .15s; }
.qp-on span svg { width: 13px; height: 13px; stroke-width: 3; }
.qp-on input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.qp-on input:focus-visible + span { outline: 2px solid var(--blue-2); outline-offset: 2px; }
.qp-del { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; }
.qp-del:hover { background: var(--red-bg); color: var(--red); }
.qp-del svg { width: 16px; height: 16px; }
.qp-row.off input:not([type=checkbox]) { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(138,156,187,.5); }
.qp-row.ghost .qp-on, .qp-row.ghost .qp-del { visibility: hidden; }
.qp-row.ghost input { opacity: .75; }
.qp-doc { grid-column: 1 / -1; padding: 0 10px 4px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.qp-row.off .qp-doc { opacity: .6; }
.qp-rows.ro .qp-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.bulk { width: 100%; min-height: 160px; border-radius: 10px; border: 1px solid var(--line-2); background: #060d1a; color: var(--text); font: 13.5px/1.6 var(--mono); padding: 12px; resize: vertical; }
.bulk.tall { min-height: 220px; }
.bulk:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0; }
.off-note { margin-top: 14px; }
.lab .real-cfg { display: none; }
.lab-root-real .real-cfg, .is-real .real-cfg { display: flex; }
.is-real .real-off { display: none; }
.ent { border: 0; background: none; padding: 0; cursor: pointer; text-align: left; }
.ent:hover code { background: var(--blue); color: #fff; }
@media (max-width: 860px) {
  .qp-row { grid-template-columns: minmax(0, 1fr) 30px 30px; }
  .qp-row .qp-v { grid-column: 1; grid-row: 2; }
  .qp-row .qp-on { grid-row: 1; grid-column: 2; }
  .qp-row .qp-del { grid-row: 1; grid-column: 3; }
  .qp-head b { width: 100%; }
}

/* ---------- login ---------- */
.auth[hidden], .shell[hidden] { display: none; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr); }
.auth-art {
  position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 48px;
  background: radial-gradient(70% 90% at 80% 20%, rgba(31,124,242,.45), transparent 60%), linear-gradient(140deg, #0b1a36, #0d2550 55%, #0f3270);
  border-right: 1px solid var(--line-2);
}
.auth-art .hero-photo { width: 100%; opacity: .6; background-position: 70% 30%; -webkit-mask-image: linear-gradient(180deg, #000 15%, rgba(0,0,0,.35) 60%, transparent 92%); mask-image: linear-gradient(180deg, #000 15%, rgba(0,0,0,.35) 60%, transparent 92%); }
.auth-art-copy { position: relative; z-index: 2; max-width: 560px; display: flex; flex-direction: column; gap: 18px; }
.auth-art .brand { padding: 0; margin-bottom: 26px; }
.auth-art h1 { font-size: clamp(32px, 3.6vw, 50px); line-height: 1.05; font-weight: 700; letter-spacing: -.025em; }
.auth-art p { font-size: 17px; color: var(--text-2); max-width: 48ch; }
.auth-facts { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, auto); gap: 10px 28px; justify-content: start; }
.auth-facts li { display: flex; flex-direction: column; }
.auth-facts b { font-size: 28px; font-weight: 700; color: #fff; }
.auth-facts span { font-size: 13px; color: var(--text-2); }
.auth-form-side { display: grid; place-items: center; padding: 40px 24px; background: radial-gradient(60% 50% at 50% 0%, rgba(31,124,242,.12), transparent 70%), var(--bg); }
.auth-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 16px; padding: 32px; border-radius: 18px; background: linear-gradient(180deg, var(--surface), #0c1a33); border: 1px solid var(--line-2); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.auth-card h2 { font-size: 26px; font-weight: 700; }
.auth-card .sub { color: var(--text-2); font-size: 14px; margin-top: -8px; }
.fld { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.fld input, .fld select { height: 46px; border-radius: 11px; border: 1px solid var(--line-2); background: #060d1a; color: var(--text); font: 15px var(--font); padding: 0 14px; }
.fld input::placeholder { color: #51658a; }
.fld input:focus, .fld select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
.fld input[aria-invalid="true"] { border-color: var(--red); }
.auth-card .err { color: var(--red); font-size: 13.5px; margin-top: -6px; }
.auth-card .err[hidden] { display: none; }
.auth-submit { height: 48px; justify-content: center; font-size: 15px; }
.auth-note { display: flex; gap: 9px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.auth-note svg { width: 16px; height: 16px; margin-top: 1px; }
.auth-users { display: flex; flex-direction: column; gap: 8px; }
.auth-users .lbl { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.auth-user { display: grid; grid-template-columns: 40px 1fr 18px; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); text-align: left; cursor: pointer; font: inherit; transition: border-color .2s var(--ease), background .2s; }
.auth-user:hover { border-color: var(--blue-2); background: var(--surface-2); }
.auth-user b { display: block; font-size: 14.5px; }
.auth-user small { color: var(--muted); font-size: 12.5px; }
.auth-user > svg { color: var(--muted); }
.av { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #2d8bff, #1258c4); color: #fff; font-weight: 700; font-size: 14px; flex: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 8px 0 2px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* usuário no menu e no topo */
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.side-user:empty { display: none; }
.side-user .who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.side-user .who b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who small { font-size: 12px; color: var(--muted); }
.side-user .icon-btn { width: 34px; height: 34px; }
.side-user .icon-btn svg { width: 17px; height: 17px; }
.side-user .icon-btn:hover { color: var(--red); border-color: rgba(255,107,94,.5); }
.side-card { margin-top: auto; }
.side-card + .side-user { margin-top: -14px; }
.top-user { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); font-size: 14px; font-weight: 600; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--line); }
.top-user:empty { display: none; }
.top-user .av { width: 32px; height: 32px; font-size: 12.5px; }
.top-user:hover { border-color: var(--line-2); background: var(--surface); }

/* ---------- trilha de estudos ---------- */
.trail-hero { min-height: 230px; }
.trail-kpis { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.trail-kpis div { display: flex; flex-direction: column; padding: 10px 16px; border-radius: 12px; background: rgba(7,16,31,.55); border: 1px solid var(--line-2); backdrop-filter: blur(6px); min-width: 110px; }
.trail-kpis b { font-size: 22px; font-weight: 700; }
.trail-kpis b i { font-style: normal; font-size: 14px; color: var(--muted); font-weight: 500; }
.trail-kpis small { font-size: 12.5px; color: var(--text-2); }
.trail-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.trail-bar .seg { flex-wrap: wrap; }
.trail-bar .seg .cnt { font: 600 11.5px var(--mono); opacity: .75; margin-left: 4px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 21px; top: 24px; bottom: 24px; width: 2px; background: linear-gradient(180deg, var(--blue), var(--line-2) 40%); }
.tl { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; }
.tl-node { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; margin-top: 18px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--line-2); font-weight: 700; color: var(--text-2); }
.tl-node svg { width: 20px; height: 20px; stroke-width: 3; }
.tl.done .tl-node { background: var(--green); border-color: var(--green); color: #05210f; }
.tl.cur .tl-node { background: var(--blue); border-color: var(--blue-2); color: #fff; box-shadow: 0 0 0 6px rgba(31,124,242,.18); }
.tl-card { border-radius: 16px; padding: 20px 22px; background: linear-gradient(180deg, var(--surface), #0c1a33); border: 1px solid var(--line); transition: border-color .2s var(--ease); }
.tl-card:hover { border-color: var(--line-2); }
.tl.cur .tl-card { border-color: var(--blue); background: linear-gradient(180deg, rgba(31,124,242,.13), #0c1a33 70%); box-shadow: 0 0 0 1px rgba(31,124,242,.5); }
.tl-top { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 18px; align-items: start; }
.tl-ic { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 15px; background: linear-gradient(145deg, #12366e, #0b2350); border: 1px solid #2f63b3; color: var(--blue-2); }
.tl-ic svg { width: 28px; height: 28px; }
.tl.done .tl-ic { color: var(--green); border-color: rgba(47,193,114,.5); background: linear-gradient(145deg, #0f3a2c, #0b2350); }
.tl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line-2); }
.tag svg { width: 12px; height: 12px; }
.tag.st-done { background: var(--green-bg); color: var(--green); border-color: rgba(47,193,114,.35); }
.tag.st-doing { background: var(--amber-bg); color: var(--amber); border-color: rgba(244,177,62,.35); }
.tag.now { background: rgba(31,124,242,.22); color: #9cc7ff; border-color: rgba(77,155,255,.5); }
.tl-title h2 { font-size: 18px; font-weight: 600; }
.tl-title h2 a { color: inherit; text-decoration: none; }
.tl-title h2 a:hover { color: var(--blue-2); }
.tl-title p { color: var(--text-2); font-size: 14px; margin-top: 4px; max-width: 75ch; }
.tl-cta { margin-top: 4px; }
.tl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.tl-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.tl-meta svg { width: 16px; height: 16px; color: var(--muted); }
.tl-meta .ok, .tl-meta .ok svg { color: var(--green); }
.tl-prog { margin-left: auto; gap: 10px !important; }
.tl-prog .bar { width: 140px; }
.tl-prog b { font: 600 12.5px var(--mono); color: var(--text); }
.tl-mods { margin-top: 12px; }
.tl-mods summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--blue-2); padding: 4px 0; }
.tl-mods summary::-webkit-details-marker { display: none; }
.tl-mods summary svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.tl-mods[open] summary svg { transform: rotate(180deg); }
.tl-mods ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.tl-mods li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; font-size: 13.5px; }
.tl-mods li:hover { background: var(--bg-2); }
.tl-mods li a { color: var(--text); text-decoration: none; flex: 1; min-width: 0; }
.tl-mods li a b { color: var(--blue-2); font-family: var(--mono); font-weight: 500; font-size: 12.5px; margin-right: 4px; }
.tl-mods li.done a { color: var(--muted); }
.tl-mods .chip { font-size: 11px; padding: 1px 7px; }
.tl-mods .status { font-size: 12px; }
.tl-mods .check { width: 22px; height: 22px; }
.tl-empty { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 14px; }

@media (max-width: 1080px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-art { min-height: 360px; padding: 32px 24px; border-right: 0; border-bottom: 1px solid var(--line-2); }
  .tl-mods ul { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .auth-art { min-height: 0; padding: 28px 20px; }
  .auth-art .brand { margin-bottom: 8px; }
  .auth-art .hero-photo { width: 100%; opacity: .3; }
  .auth-facts { grid-template-columns: repeat(2, auto); }
  .auth-form-side { padding: 24px 16px 40px; }
  .auth-card { padding: 22px; }
  .top-user .nm { display: none; }
  .top-user { padding: 2px; }
  .timeline::before { left: 15px; }
  .tl { grid-template-columns: 32px minmax(0, 1fr); gap: 10px; }
  .tl-node { width: 32px; height: 32px; margin-top: 16px; font-size: 13px; }
  .tl-card { padding: 16px; }
  .tl-top { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tl-ic { display: none; }
  .tl-cta { justify-self: start; }
  .tl-prog { margin-left: 0; width: 100%; }
  .tl-prog .bar { flex: 1; }
  .trail-kpis div { min-width: 0; flex: 1 1 40%; }
}

/* ---------- imagens do zip nos cards ---------- */
.side-nav a[hidden] { display: none; }
.station { overflow: hidden; isolation: isolate; }
.station::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--img) 70% center / cover no-repeat; opacity: .22; transition: opacity .25s var(--ease); -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
.station:hover::before, .station.current::before { opacity: .4; }
.station .dot { z-index: 1; }
.tl-card { position: relative; overflow: hidden; isolation: isolate; }
.tl-card::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 46%; z-index: -1; background: var(--img) right center / cover no-repeat; opacity: .5; -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); mask-image: linear-gradient(90deg, transparent, #000 70%); transition: opacity .25s var(--ease); }
.tl-card:hover::before, .tl.cur .tl-card::before { opacity: .75; }
.tl-mods ul { position: relative; }
.tl-mods[open] ul { background: rgba(10,21,41,.82); border-radius: 10px; padding: 6px; backdrop-filter: blur(4px); }
.exercise { position: relative; overflow: hidden; isolation: isolate; }
.exercise::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--img) center / cover no-repeat; opacity: .28; -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%); mask-image: linear-gradient(180deg, #000 0%, transparent 75%); }
.mod-hero { position: relative; overflow: hidden; padding: 26px 28px; border-radius: 18px; border: 1px solid var(--line-2); background: linear-gradient(120deg, #0b1a36, #0d2550 60%, #0f3270); }
.mod-hero > :not(.hero-photo) { position: relative; z-index: 2; max-width: 62%; }
.mod-hero .hero-photo { width: 55%; }

/* ---------- login real ---------- */
.auth-seg { align-self: flex-start; }
.fld-hint { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.btn.loading { opacity: .7; pointer-events: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-danger { background: var(--red-bg); color: #ffb3aa; border-color: rgba(255,107,94,.45); }
.btn-danger:hover { background: rgba(255,107,94,.2); border-color: var(--red); color: #fff; }
.notice { align-items: flex-start; }
.notice-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; }
.notice-ic svg { width: 26px; height: 26px; }
.notice-ic.wait { background: var(--amber-bg); color: var(--amber); }
.notice-ic.err { background: var(--red-bg); color: var(--red); }

/* ---------- administração ---------- */
.admin-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.admin-bar .seg { flex-wrap: wrap; }
.admin-bar .cnt { font: 600 11.5px var(--mono); opacity: .75; margin-left: 4px; }
.admin-search { position: relative; display: flex; align-items: center; flex: 1; max-width: 340px; min-width: 200px; }
.admin-search svg { position: absolute; left: 12px; color: var(--muted); width: 18px; height: 18px; }
.admin-search input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: #060d1a; color: var(--text); font: 14px var(--font); padding: 0 12px 0 38px; }
.admin-search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
.admin-list .empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 12px; }
.users { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.urow { display: grid; grid-template-columns: 40px minmax(0, 1.4fr) minmax(0, 1fr) 170px 96px auto; gap: 16px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.urow:hover { border-color: var(--line-2); }
.urow .who { min-width: 0; display: flex; flex-direction: column; }
.urow .who b { font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.urow .who small, .urow small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.urow .when { display: flex; flex-direction: column; font-size: 13px; }
.uprog { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; font-size: 12.5px; }
.uprog small { grid-column: 1 / -1; }
.uprog b { font: 600 12px var(--mono); }
.urow > .tag { justify-self: start; }
.uact { display: flex; gap: 8px; justify-content: flex-end; }
.tag.st-rej { background: var(--red-bg); color: var(--red); border-color: rgba(255,107,94,.35); }
@media (max-width: 1180px) {
  .urow { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .urow .when, .urow .uprog { grid-column: 2; }
  .urow > .tag { grid-column: 3; grid-row: 1; }
  .uact { grid-column: 2 / -1; justify-content: flex-start; }
}
@media (max-width: 860px) {
  .mod-hero { padding: 20px; }
  .mod-hero > :not(.hero-photo) { max-width: none; }
  .tl-card::before { width: 100%; opacity: .25; }
  .admin-search { max-width: none; }
}
