/* Vaga Viva — shared styles for the product screens. See DESIGN.md at the repository root.
   Direction B, "ferramenta de dev": small corners, Bricolage 600, one purple button per screen, dark panels for
   code, GitHub and the system at work. The motion components live in vv-motion.css, loaded after this file.
   Copied from docs/design/prototipos/vv.css, without the prototype switcher. */

:root {
  --paper: #f4f1ea; --paper-2: #ebe7dc; --card: #ffffff;
  --ink: #141414; --ink-2: #4a4740; --line: #dcd7ca;
  --purple: #5b3df5; --purple-hover: #5639e6; --purple-soft: #e6e0ff;
  --focus: #5b3df5; /* focus rings and focused fields: --purple in light, lighter in dark for 3:1 on the card */
  --yellow: #ffd23f; --green: #33c47a; --coral: #ff6b4a;
  --green-ink: #0e6b3c; --coral-ink: #b3341a; --idle: #8b8678;
  --dot-empty: #8f8a7c;
  --night: #121212; --night-2: #1e1e1e; --night-3: #2a2a2a; --night-text: #f4f1ea; --night-muted: #a9a59b;
  --on-color: #141414;
  --logo-check: #33c47a;

  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  /* 4: chips, seals, square dots. 6: buttons, fields, icon tiles, list items. 8: cards, panels. 12: the screen's
     main block. The pill exists only on the invite's copy field. */
  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-pill: 999px;
  --rest: 0 30px 60px -30px rgba(20, 20, 20, .25);

  --t-fast: 150ms; --t-base: 280ms; --t-slow: 520ms;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161513; --paper-2: #201e1b; --card: #1f1d1a;
    --ink: #f4f1ea; --ink-2: #b4afa3; --line: #34312c;
    --purple-soft: #2c2266; --focus: #8a75ff; --green-ink: #5ee39c; --coral-ink: #ff9a82;
    --dot-empty: #767166; --logo-check: #0e6b3c;
    --night: #0b0b0a; --night-2: #1a1917; --night-3: #26241f;
    --rest: 0 30px 60px -30px rgba(0, 0, 0, .7);
  }
}

/* Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--body); overflow-x: clip; }
svg { display: block; flex: none; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 2px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.025em; margin: 0; }
h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.04; }
h2 { font-size: 28px; line-height: 1.1; }
h3 { font-size: 19px; line-height: 1.25; }
p { margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 808px; }
.wrap.wide { max-width: 1440px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.mono { font-family: var(--mono); font-size: .86em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack { display: grid; gap: 16px; }
.stack > * { min-width: 0; }
.stack.lg { gap: 32px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
/* A mono label, used only when it carries something the title does not (DESIGN.md 9): no dot in front. */
.eyebrow { font: 600 12.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
/* The mono seal: a dark 4 px rectangle for a mission number, an invite code, a repository name or "Convite". */
.seal { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: var(--r-xs); background: var(--ink); color: var(--paper); font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 34em; }
mark { background: linear-gradient(transparent 14%, var(--yellow) 14%, var(--yellow) 90%, transparent 90%) no-repeat 0 0 / 0% 100%; color: var(--on-color); padding: 0 .1em; border-radius: var(--r-xs); animation: marker var(--t-slow) var(--ease-out) .2s forwards; }
/* The text only turns dark together with the yellow: until then it keeps the page's colour, so it is never dark on dark. */
h1 mark, h2 mark { color: inherit; }

/* Top bar */
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; font: 600 21px/1 var(--display); letter-spacing: -.025em; text-decoration: none; }
/* The logo: an ink square with a green check; in dark mode the square turns light and the check dark green. */
.logo rect { fill: var(--ink); }
.logo path { stroke: var(--logo-check); }
/* Links by what the person has (DESIGN.md 5.0); the current one is underlined in purple, like .link. */
.top .nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); font: 600 15px/1 var(--body); color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.nav-link:hover { color: var(--ink); }
.nav-link[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--purple); }
.account { position: relative; display: flex; align-items: center; gap: 8px; }
.user { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 10px 4px 4px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line); color: var(--ink); font: 600 13px/1 var(--mono); cursor: pointer; }
.user:hover, .user[aria-expanded="true"] { border-color: var(--ink); }
.user-login { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user .glyph { width: 16px; height: 16px; transition: transform var(--t-fast) var(--ease-out); }
.user[aria-expanded="true"] .glyph { transform: rotate(180deg); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 220px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--rest); }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu-item { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font: 600 15px/1.2 var(--body); text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover { background: var(--paper-2); }
.menu-item[aria-current] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--purple); }
.menu-nav { display: none; }
main { padding: 16px 0 96px; }

/* Buttons: the primary is purple, one per screen; everything else is .ghost or a .link (DESIGN.md 4.1). */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: var(--r-sm); border: 1px solid var(--purple); background: var(--purple); color: #fff; font: 700 16px/1.1 var(--body); text-decoration: none; cursor: pointer; transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), opacity var(--t-fast) var(--ease-out); }
.btn:hover { transform: translateY(-1px); background: var(--purple-hover); border-color: var(--purple-hover); }
.btn:active { transform: none; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: transparent; border-color: var(--ink); }
.night-panel .btn.ghost { color: var(--night-text); border-color: var(--night-muted); }
.night-panel .btn.ghost:hover { border-color: var(--night-text); }
.btn.sm { min-height: 44px; padding: 8px 14px; font-size: 14px; }
.btn .arrow { display: grid; place-items: center; transition: transform var(--t-fast) var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; transform: none; }
.btn:disabled:hover, .btn[aria-disabled="true"]:hover { background: var(--purple); border-color: var(--purple); }
.btn.ghost:disabled:hover, .btn.ghost[aria-disabled="true"]:hover { background: transparent; border-color: var(--line); }
/* Loading: the content becomes the status line (DESIGN.md 4.14); inside the primary, text and dots are white. */
.btn[aria-busy="true"] { opacity: 1; cursor: progress; }
.btn .status-line { color: #fff; font-size: 14px; }
.btn .status-timer { color: #fff; opacity: .8; }
.btn [data-dot-matrix] { --dm-color: #fff; }
.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; text-decoration-color: var(--purple); cursor: pointer; }
/* A small link on its own line is still a 44 px target (DESIGN.md 7); links inside a sentence keep the line height. */
.link.small { display: inline-flex; align-items: center; min-height: 44px; }
.ico, .glyph { width: 1.15em; height: 1.15em; }
.btn .arrow .glyph { width: 16px; height: 16px; }
.big-check .glyph { width: 30px; height: 30px; color: #141414; }
.steps .n .glyph { width: 13px; height: 13px; }

/* Icon tiles: a 28 px square, 1 px border, no fill. The glyph is ink unless it stands for a situation. */
.ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent; color: var(--ink); flex: none; }
.ic .glyph { width: 16px; height: 16px; }
.ic.lg { width: 44px; height: 44px; } .ic.lg .glyph { width: 22px; height: 22px; }
.ic[data-status="STUCK"] { color: var(--coral-ink); }
.ic[data-status="IDLE"] { color: var(--idle); }
.ic[data-status="ADVANCING"] { color: var(--green-ink); }
.ic[data-status="COMPLETED"] { color: var(--purple); }

/* Surfaces */
.board { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 5vw, 48px); box-shadow: var(--rest); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px; }
.night-panel { background: var(--night-2); color: var(--night-text); border: 1px solid var(--night-3); border-radius: var(--r-md); padding: 22px; }
.night-panel .muted { color: var(--night-muted); }
.panel-tag { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--night-muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.panel-tag b { color: var(--night-text); font-weight: 600; }

/* Chips, tags, seals, avatars */
.chip .glyph { width: 13px; height: 13px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--mono); padding: 7px 10px; border-radius: var(--r-xs); background: var(--paper-2); color: var(--ink); }
.chip.dark { background: var(--ink); color: var(--paper); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font: 600 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 5px 7px; border-radius: var(--r-xs); background: transparent; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.tag.core { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tag.match { background: var(--purple-soft); border-color: var(--purple-soft); color: var(--ink); }
.num { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 7px; border-radius: var(--r-xs); background: var(--ink); color: var(--paper); font: 600 12px/1 var(--mono); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font: 600 12px/1 var(--mono); color: var(--ink); background: var(--paper-2); flex: none; }
.avatar.lg { width: 52px; height: 52px; font-size: 16px; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.avatar.bot { background: var(--purple); color: #fff; }

/* Status */
.status { display: inline-flex; align-items: center; gap: 5px; font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 5px 8px 5px 6px; border-radius: var(--r-xs); color: #141414; white-space: nowrap; }
.status .glyph { width: 13px; height: 13px; }
[data-status="STUCK"] { --st: var(--coral); }
[data-status="IDLE"] { --st: var(--idle); }
[data-status="ADVANCING"] { --st: var(--green); }
[data-status="COMPLETED"] { --st: var(--purple); }
.status { background: var(--st); }
.status[data-status="COMPLETED"] { color: #fff; }
.status[data-status="IDLE"] { color: #141414; } /* white on --idle is 3.6:1; ink is 5.1:1 */

/* Fields */
.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 600; }
.field .help { font-size: 14px; color: var(--ink-2); }
.field .foot { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-2); }
.field .count { font-family: var(--mono); font-size: 12px; }
.input, .textarea { width: 100%; min-height: 48px; padding: 12px 14px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm); font: inherit; transition: border-color var(--t-fast) var(--ease-out); }
.textarea { min-height: 200px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus { border-color: var(--focus); outline: 3px solid var(--focus); outline-offset: 3px; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--coral); }
.error-text { color: var(--coral-ink); font-size: 14px; font-weight: 500; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; cursor: pointer; }
.check input { appearance: none; width: 22px; height: 22px; margin: 2px 0 0; border: 2px solid var(--ink-2); border-radius: var(--r-sm); background: var(--card) center / 0 no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5 9.5-10' stroke='white' stroke-width='3.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); cursor: pointer; transition: background-color var(--t-fast) var(--ease-out), background-size var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out); }
.check input:checked { background-color: var(--purple); border-color: var(--purple); background-size: 18px; }

/* Tabs */
.tabs { display: inline-flex; padding: 3px; gap: 3px; background: var(--paper-2); border-radius: var(--r-sm); }
.tabs button { min-height: 44px; border: 0; background: transparent; color: var(--ink-2); font: 600 14px/1 var(--body); padding: 0 16px; border-radius: var(--r-xs); cursor: pointer; transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }

/* Steps: three numbered mono seals. Current is solid ink, done carries the check, future is outlined (DESIGN.md 4.3). */
.steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 8px; font: 600 13px/1 var(--mono); color: var(--ink-2); }
.steps li { display: flex; align-items: center; gap: 8px; }
.steps li + li::before { content: ""; width: clamp(12px, 4vw, 40px); border-top: 1px solid var(--line); }
.steps .n { display: grid; place-items: center; min-width: 26px; height: 24px; padding: 0 6px; border-radius: var(--r-xs); border: 1px solid var(--dot-empty); transition: background-color var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out); }
.steps li[aria-current="step"] { color: var(--ink); }
.steps li[aria-current="step"] .n { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.steps li.done { color: var(--ink); }
.steps li.done .n { border-color: var(--ink); color: var(--ink); }

/* Banner: info on soft purple; warn and error on the card with a 4 px stripe (DESIGN.md 4.5). */
.banner { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--purple-soft); }
.banner b { display: block; }
.banner.warn, .banner.error { background: var(--card); border: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--ink); }
.banner.error { box-shadow: inset 4px 0 0 var(--coral); }
.privacy { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }

/* Missions */
.missions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mission { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: start; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); }
.mission p { font-size: 14.5px; color: var(--ink-2); margin-top: 2px; }
.mission .chips { margin-top: 10px; }
.mission .chip { padding: 5px 8px; font-size: 11px; }
.mission .side { display: grid; gap: 8px; justify-items: end; }
.diff { display: flex; gap: 3px; }
.diff i { width: 6px; height: 14px; border-radius: 2px; background: var(--line); }
.diff i.on { background: var(--ink); }
.trail { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.trail li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; padding: 7px 0; position: relative; font-weight: 500; }
.trail li + li::before { content: ""; position: absolute; left: 16px; top: -7px; height: 14px; border-left: 1px solid var(--line); }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.benefits li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: center; font-weight: 500; }

/* GitHub panel */
.repo-name { font: 600 14px/1.3 var(--mono); overflow-wrap: anywhere; display: flex; gap: 10px; align-items: center; }
.issues { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
.issues li { display: flex; align-items: center; gap: 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--coral); flex: none; }
.dot.ok { background: var(--green); }
.dot.off { background: transparent; box-shadow: inset 0 0 0 2px var(--dot-empty); }
.big-check { width: 56px; height: 56px; border-radius: 50%; background: var(--green); display: grid; place-items: center; animation: pop var(--t-base) var(--ease-out) both; }

/* Stage list: the repository's creation, one step mark per stage (DESIGN.md 4.15), on a dark panel. */
.stage-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.stage-list li { display: flex; align-items: center; gap: 12px; color: var(--night-muted); transition: color var(--t-base) var(--ease-out); }
.stage-list li.is-current, .stage-list li.is-done { color: var(--night-text); }
.stage-list li.is-current { font-weight: 600; }
.creating { display: grid; gap: 18px; }

/* Copy field: the only pill of the system (DESIGN.md 4.7). */
.copy { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-pill); max-width: 100%; }
.copy code { font: 600 13px/1.2 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.copy .btn { border-radius: var(--r-pill); }

/* Dashboard */
.summary { display: grid; gap: 18px; padding: 20px; }
.summary .meter { height: 14px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { display: grid; gap: 6px; text-align: left; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); font: inherit; color: inherit; cursor: pointer; transition: border-color var(--t-fast) var(--ease-out); }
.stat:hover { border-color: var(--ink); }
.stat:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.stat[aria-pressed="true"] { border: 2px solid var(--ink); padding: 13px 15px; }
.stat .value { font: 600 34px/1 var(--display); letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
/* The counter's label carries the situation's dot; no icon tile (DESIGN.md 4.8). */
.stat .name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.stat .name i { width: 10px; height: 10px; border-radius: 50%; background: var(--st); flex: none; }

.kanban { display: flex; align-items: stretch; gap: 16px; overflow-x: auto; padding: 4px 4px 18px; margin: 0 -4px; scroll-snap-type: x proximity; }
.column { flex: 1 0 280px; background: var(--paper-2); border-radius: var(--r-md); padding: 20px; display: flex; flex-direction: column; gap: 16px; min-height: 340px; scroll-snap-align: start; }
/* A mission nobody is on shrinks to a rail, so the occupied ones get the room. */
.column.is-empty { flex: 0 0 76px; padding: 20px 12px; align-items: center; }
.column.is-empty .column-head { grid-template-columns: 1fr; justify-items: center; gap: 14px; padding: 0; }
.column.is-empty .column-head h3 { writing-mode: vertical-rl; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.column.is-empty .count, .column.is-empty .none { display: none; }
.column.done { background: var(--purple-soft); }
.column-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 0 2px; }
.column-head h3 { font-size: 18px; line-height: 1.2; }
.column-head .count { font: 600 13px/1 var(--mono); color: var(--ink-2); padding: 6px 8px; border-radius: var(--r-xs); background: var(--card); }
.column .cards { display: grid; gap: 12px; }
/* Finished students sit in a band under the board: they need the least attention. */
.column.band { flex: none; min-height: 0; }
.column.band .cards { grid-template-columns: repeat(auto-fill, minmax(260px, 320px)); }
.column .none { margin: auto; width: 28px; border-top: 1px solid var(--line); }
.student { display: grid; grid-template-columns: 44px 1fr; gap: 12px 14px; align-items: center; width: 100%; text-align: left; padding: 18px 18px 18px 24px; background: var(--card); color: inherit; font: inherit; border: 1px solid var(--line); border-radius: var(--r-md); position: relative; overflow: hidden; cursor: pointer; transition: border-color var(--t-fast) var(--ease-out), opacity var(--t-base) var(--ease-out); }
.student::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--st); }
.student:hover { border-color: var(--ink); }
.student .avatar { width: 44px; height: 44px; font-size: 14px; }
.student .name { font: 600 18px/1.2 var(--display); letter-spacing: -.02em; display: grid; gap: 8px; justify-items: start; }
.student .test-grid { grid-column: 1 / -1; }
.student .reason { grid-column: 1 / -1; font-size: 14.5px; color: var(--ink-2); line-height: 1.4; padding-top: 12px; border-top: 1px solid var(--line); }
.student.dim { opacity: .28; }

/* Drawer */
.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(480px, 100vw); height: 100dvh; max-height: none; padding: 0; border: 0; background: var(--card); color: var(--ink); box-shadow: var(--rest); transform: translateX(100%); transition: transform var(--t-slow) var(--ease-out); display: flex; flex-direction: column; }
.drawer:not([open]) { display: none; }
.drawer.in { transform: none; }
.drawer::backdrop { background: rgba(10, 10, 10, 0); transition: background var(--t-slow) var(--ease-out); }
.drawer.in::backdrop { background: rgba(10, 10, 10, .45); }
.drawer-head { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 24px; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 24px; display: grid; gap: 24px; overflow-y: auto; flex: 1; align-content: start; }
.drawer-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; }
.close { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; transition: border-color var(--t-fast) var(--ease-out); }
.close:hover { border-color: var(--ink); }
.block { display: grid; gap: 10px; }
.block h3 { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.tests { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tests li { display: grid; grid-template-columns: 12px 1fr; gap: 10px; padding: 12px 14px; background: var(--paper); border-radius: var(--r-sm); }
.tests .dot { margin-top: 4px; }
.tests code { font: 600 13px/1.35 var(--mono); overflow-wrap: anywhere; }
.tests span { display: block; font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.question { display: grid; grid-template-columns: 36px 1fr; gap: 12px; }
.bubble { background: var(--purple-soft); border-radius: var(--r-xs) var(--r-md) var(--r-md) var(--r-md); padding: 12px 16px; }
.hints { display: flex; align-items: center; gap: 10px; }
.hints .dot { width: 14px; height: 14px; background: var(--ink); }
.hints .dot.off { background: transparent; }

/* Test grid: one row per plan mission, one square dot per test (DESIGN.md 4.16). The count column fits "10/10". Future missions are outlined in
   --dot-empty (3:1 on card and paper); a mission without a tally has no dots. Dots are hidden from screen readers. */
.test-grid { display: grid; gap: 6px; }
.test-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 40px; gap: 10px; align-items: center; min-height: 12px; }
.test-mission { font: 600 11px/1 var(--mono); color: var(--ink-2); }
.test-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.test-count { font: 600 12px/1 var(--mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.test-row[data-state="future"] .test-count, .test-row[data-state="none"] .test-count { color: var(--ink-2); }
.td { display: block; width: 12px; height: 12px; border-radius: var(--r-xs); animation: pop var(--t-base) var(--ease-out) both; }
.td.is-pass { background: var(--green); }
.td.is-fail { background: var(--coral); }
.td.is-empty { background: transparent; box-shadow: inset 0 0 0 2px var(--dot-empty); }
.block .test-grid { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); }

/* Classroom cards (teacher) */
.classroom { display: grid; gap: 14px; text-decoration: none; transition: border-color var(--t-fast) var(--ease-out); }
a.classroom:hover { border-color: var(--ink); }
.meter { display: flex; height: 10px; border-radius: var(--r-xs); overflow: hidden; background: var(--paper-2); gap: 2px; }
.meter i { background: var(--st); transform-origin: left; animation: grow var(--t-slow) var(--ease-out) both; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--st); }
.two { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: start; }
.sees { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sees > div { padding: 16px; border-radius: var(--r-md); border: 1px solid var(--line); }
.sees h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 8px; }
.sees ul { margin: 0; padding-left: 18px; font-size: 14.5px; color: var(--ink-2); display: grid; gap: 4px; }
.empty { text-align: center; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; justify-items: center; padding: 48px 16px; } /* one column no wider than the board: the invite link shortens instead of pushing the page */

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 80px); background: #141414; color: #f4f1ea; padding: 12px 18px; border-radius: var(--r-sm); font-weight: 600; font-size: 14px; display: flex; gap: 8px; align-items: center; opacity: 0; transition: transform var(--t-base) var(--ease-out), opacity var(--t-base) var(--ease-out); z-index: 40; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }


/* Motion: everything on --ease-out; seals and dots appear from scale .92 in --t-base (DESIGN.md 2, 3). */
.rise { animation: rise var(--t-base) var(--ease-out) both; }
.stagger > * { animation: rise var(--t-base) var(--ease-out) both; }
.stagger > :nth-child(2) { animation-delay: 60ms; } .stagger > :nth-child(3) { animation-delay: 120ms; }
.stagger > :nth-child(4) { animation-delay: 180ms; } .stagger > :nth-child(5) { animation-delay: 240ms; }
.stagger > :nth-child(6) { animation-delay: 300ms; } .stagger > :nth-child(7) { animation-delay: 360ms; }
.stagger > :nth-child(n+8) { animation-delay: 420ms; }
.pop { animation: pop var(--t-base) var(--ease-out) both; }
.pops > * { animation: pop var(--t-base) var(--ease-out) both; }
.pops > :nth-child(2) { animation-delay: 60ms; } .pops > :nth-child(3) { animation-delay: 120ms; } .pops > :nth-child(4) { animation-delay: 180ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } }
@keyframes marker { to { background-size: 100% 100%; color: #141414; } }
@keyframes grow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Responsive */
@media (max-width: 900px) {
  .two { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .kanban { flex-direction: column; overflow: visible; }
  .column, .column.is-empty { flex: none; min-height: 0; }
  .column.is-empty { padding: 14px 20px; align-items: stretch; }
  .column.is-empty .column-head { grid-template-columns: auto 1fr; justify-items: start; gap: 12px; }
  .column.is-empty .column-head h3 { writing-mode: horizontal-tb; font-size: 16px; white-space: normal; }
  .drawer { inset: auto 0 0 0; width: 100vw; height: 92dvh; border-radius: var(--r-lg) var(--r-lg) 0 0; transform: translateY(100%); }
  .steps li:not([aria-current="step"]) span.t { display: none; }
  .mission { grid-template-columns: 34px 1fr; }
  .mission .side { grid-column: 2; display: flex; align-items: center; justify-items: start; }
  .sees { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .stat { padding: 12px; }
  .stat[aria-pressed="true"] { padding: 11px; }
  .stat .value { font-size: 28px; }
}

/* Empty states */
.empty .art { display: flex; align-items: center; gap: 8px; }
.block h3 { display: flex; align-items: center; gap: 8px; }
.block h3 .glyph { width: 15px; height: 15px; }

/* Posting clipping: the job ad as a cut-out, always paper-coloured, never tilted (DESIGN.md 4.12). */
.clip { position: relative; background: #f4f1ea; color: #141414; border: 1px solid #dcd7ca; border-radius: var(--r-md); padding: 44px 22px 22px; box-shadow: var(--rest); }
.clip::before { content: ""; position: absolute; inset: 8px; border: 1px dashed #a9a393; border-radius: var(--r-xs); pointer-events: none; }
.clip-tag { position: absolute; left: 22px; top: 16px; display: flex; align-items: center; gap: 6px; font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #4a4740; background: #f4f1ea; padding: 0 6px; margin-left: -6px; }
.clip-tag .glyph { width: 14px; height: 14px; }
.clip-text { position: relative; margin: 0; font: 15.5px/1.7 var(--body); white-space: pre-wrap; overflow-wrap: anywhere; max-height: min(62vh, 560px); overflow-y: auto; }
.clip textarea { position: relative; display: block; width: 100%; min-height: 280px; border: 0; background: transparent; color: #141414; font: 15.5px/1.7 var(--body); resize: vertical; padding: 0; }
.clip textarea::placeholder { color: #6f6a5e; }
.clip textarea:focus { outline: none; }
.clip:focus-within { border-color: var(--focus); outline: 3px solid var(--focus); outline-offset: 3px; }
.clip mark { animation: none; color: inherit; padding: 0 .12em; border-radius: var(--r-xs); background: linear-gradient(transparent 10%, var(--hl, var(--yellow)) 10%, var(--hl, var(--yellow)) 92%, transparent 92%) no-repeat 0 0 / 0% 100%; transition: background-size var(--t-base) var(--ease-out); }
.clip mark.on { background-size: 100% 100%; }
.clip mark[data-kind="level"] { --hl: #c9bdff; }
.clip mark[data-kind="out"] { --hl: #ffc2b5; }
.scanline { position: absolute; left: 8px; right: 8px; top: 8px; height: 46px; border-radius: var(--r-xs); background: linear-gradient(rgba(255, 210, 63, 0), rgba(255, 210, 63, .55)); border-bottom: 2px solid var(--yellow); pointer-events: none; opacity: 0; }
.scanline.run { animation: sweep .9s var(--ease-out); }
@keyframes sweep { 0% { opacity: 1; transform: translateY(0); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(var(--sweep, 300px)); } }

/* Student flow layout and findings tray */
.duo { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.duo > .sticky { position: sticky; top: 24px; }
.findings { display: grid; gap: 4px; }
.finding { display: grid; grid-template-columns: 28px 1fr; gap: 6px 14px; padding: 14px 0; border-top: 1px solid var(--line); align-items: start; }
.finding:first-child { border-top: 0; }
.finding .what { font: 600 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding-top: 8px; }
.finding .chips { grid-column: 2; min-height: 30px; align-items: center; }
.finding .note { grid-column: 2; font-size: 14px; color: var(--ink-2); }
.finding .chip { font-size: 12.5px; padding: 7px 10px; }
.finding .chip small { font: 500 11px/1 var(--body); color: var(--ink-2); }
.finding .chip.out { background: transparent; box-shadow: inset 0 0 0 1px var(--coral); }
.finding .chip.waiting { opacity: 0; }
.finding .chip.pulse { animation: pulse var(--t-slow) var(--ease-out); }
.flyer { position: fixed; z-index: 50; margin: 0; pointer-events: none; font: 600 12.5px/1 var(--mono); padding: 7px 10px; border-radius: var(--r-xs); background: var(--hl, var(--yellow)); color: #141414; white-space: nowrap; }
.counter { font-variant-numeric: tabular-nums; }
.plan-wait { padding: 16px 20px; }
@keyframes pulse { 40% { transform: scale(1.06); } }
@media (max-width: 900px) {
  .duo { grid-template-columns: 1fr; }
  .duo > .sticky { position: static; }
  .clip-text { max-height: 220px; }
}

/* Narrow screens: the links move into the account menu; signed out, the logo stands alone so "Entrar" fits. */
@media (max-width: 640px) {
  .top .nav { display: none; }
  .top .wrap { gap: 8px; }
  .menu-nav { display: list-item; }
  .account .nav-link { padding: 0 8px; font-size: 14px; }
  .top .wrap:has(#bar-sign-in) .brand-name { display: none; }
  .user-login { max-width: 10ch; }
}
