/* hagents design tokens. Source of truth: DESIGN.md. Dark is the default theme. Light is opt-in:
   set data-theme="light" on the root or on any element. Contrast ratios are WCAG 2.x, measured. */

:root {
	/* Core palette */
	--hg-ultramarine: #2B3CC2;        /* accent. Paper text on it: 7.7:1 */
	--hg-ultramarine-deep: #1F2C99;   /* accent hover */
	--hg-ultramarine-soft: #E7E9FA;   /* selected rows, accent tags. Ultramarine text on it: 6.9:1 */
	--hg-ultramarine-light: #8E9BFF;  /* accent in dark mode. On Night: 7.4:1 */
	--hg-paper: #F8F7F0;              /* shared with Heinrichs.ai */
	--hg-white: #FFFFFF;
	--hg-mist: #DCE5E3;               /* shared with Heinrichs.ai */
	--hg-steel: #C1C1C1;              /* shared with Heinrichs.ai */
	--hg-slate: #5B6168;              /* shared. On Paper: 5.8:1 */
	--hg-ink: #051A1E;                /* shared. On Paper: 17:1 */
	--hg-night: #0B1416;              /* dark ground */
	--hg-night-2: #121D20;            /* dark surface */
	--hg-night-3: #1A272B;            /* dark raised surface, hover */
	--hg-fog: #9AA6A4;                /* secondary text in dark mode. On Night: 7.4:1 */
	--hg-petrol: #004852;             /* Heinrichs.ai brand colour; in hagents only for "running" */

	/* Agent palette: square avatar tiles with the white hagents mark (all at least 5.2:1).
	   An agent colour always comes with the agent's mark and name. Never use it for status. */
	--hg-agent-teal: #0F7A6E;
	--hg-agent-ocean: #1F6A8A;
	--hg-agent-violet: #6B4FA0;
	--hg-agent-plum: #8C2F6B;
	--hg-agent-rose: #A3365C;
	--hg-agent-rust: #8A4B14;
	--hg-agent-olive: #7A6A12;
	--hg-agent-moss: #4F6B1F;
	--hg-agent-graphite: #4D5560;

	/* Type */
	--hg-font: "Schibsted Grotesk", Arial, sans-serif;
	--hg-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	/* Shape and space */
	--hg-radius-sm: 2px;
	--hg-radius: 3px;
	--hg-radius-lg: 4px;
	--hg-space-1: 4px;
	--hg-space-2: 8px;
	--hg-space-3: 12px;
	--hg-space-4: 16px;
	--hg-space-5: 24px;
	--hg-space-6: 32px;
	--hg-space-7: 48px;
	--hg-space-8: 64px;
	--hg-ease: cubic-bezier(0.16, 1, 0.3, 1);   /* expo-out, shared with Heinrichs.ai */
}

/* Semantic tokens: dark, the default. Any element can force a theme with data-theme. */
:root,
[data-theme="dark"] {
	--hg-bg: var(--hg-night);
	--hg-surface: var(--hg-night-2);
	--hg-surface-quiet: var(--hg-night-3);
	--hg-text: var(--hg-paper);
	--hg-text-2: var(--hg-fog);
	--hg-rule: rgba(248, 247, 240, 0.14);
	--hg-border-strong: #3A474A;
	--hg-accent: var(--hg-ultramarine-light);
	--hg-accent-hover: #A9B3FF;
	--hg-accent-soft: #1D2552;
	--hg-accent-text: var(--hg-night);
	--hg-focus: var(--hg-ultramarine-light);
	--hg-rungs-ink: rgba(248, 247, 240, 0.14);
	--hg-running: #7FB3BA;  --hg-running-soft: #12333A;
	--hg-waiting: #F0B54A;  --hg-waiting-soft: #3A2A0E;
	--hg-done: #6FCB8D;     --hg-done-soft: #12301E;
	--hg-failed: #FF7A66;   --hg-failed-soft: #3A1714;
	--hg-blocked: var(--hg-paper); --hg-blocked-soft: #1E2B2E;
	/* Rungs pattern: the shared Heinrichs.ai texture. In hagents it also marks "blocked by budget". */
	--hg-rungs: repeating-linear-gradient(180deg, var(--hg-rungs-ink) 0 2px, transparent 2px 4px);
	color-scheme: dark;
}

/* Semantic tokens: light, opt-in. */
[data-theme="light"] {
	--hg-bg: var(--hg-paper);
	--hg-surface: var(--hg-white);
	--hg-surface-quiet: var(--hg-mist);
	--hg-text: var(--hg-ink);
	--hg-text-2: var(--hg-slate);
	--hg-rule: rgba(5, 26, 30, 0.14);
	--hg-border-strong: var(--hg-steel);
	--hg-accent: var(--hg-ultramarine);
	--hg-accent-hover: var(--hg-ultramarine-deep);
	--hg-accent-soft: var(--hg-ultramarine-soft);
	--hg-accent-text: var(--hg-paper);
	--hg-focus: var(--hg-ultramarine);
	--hg-rungs-ink: rgba(5, 26, 30, 0.16);

	/* Status. Each pair: text/dot colour, chip fill. Never rely on colour alone: always add the word. */
	--hg-running: var(--hg-petrol);   --hg-running-soft: var(--hg-mist);   /* 8.0:1 */
	--hg-waiting: #9A5B00;            --hg-waiting-soft: #FBEFD9;          /* 4.8:1 */
	--hg-done: #2E7045;               --hg-done-soft: #E2F0E6;             /* 5.1:1 */
	--hg-failed: #C42A18;             --hg-failed-soft: #FBE5E1;           /* 4.7:1 */
	--hg-blocked: var(--hg-ink);      --hg-blocked-soft: #E7E6DF;          /* 14.3:1, plus the rungs pattern */

	/* Rungs pattern: the shared Heinrichs.ai texture. In hagents it also marks "blocked by budget". */
	--hg-rungs: repeating-linear-gradient(180deg, var(--hg-rungs-ink) 0 2px, transparent 2px 4px);
	color-scheme: light;
}

/* hagents.app. Tokens come from tokens.css (copied from hagents/brand/tokens.css). Dark first. */

@font-face {
	font-family: "Schibsted Grotesk";
	src: url("/fonts/schibsted-grotesk-latin.woff2") format("woff2");
	font-weight: 400 900;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Schibsted Grotesk";
	src: url("/fonts/schibsted-grotesk-latin-ext.woff2") format("woff2");
	font-weight: 400 900;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "JetBrains Mono";
	src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
	font-weight: 100 800;
	font-display: swap;
}

:root { --pad: clamp(16px, 5vw, 80px); --when: 148px; --gut: 36px; }
/* Display headings, per language. Portuguese words are longer, so its headings are a little smaller
   and wider: each headline keeps the same number of lines and the same weight in both languages. */
:root {
	--h1-size: clamp(46px, 6.4vw, 96px); --h1-measure: 11.5ch;
	--h2-size: clamp(36px, 4.8vw, 66px); --h2-measure: 17ch;
	--close-size: clamp(40px, 5.4vw, 76px); --close-measure: 12ch;
	--fact-label: 15em;
}
:root:lang(pt) {
	--h1-size: clamp(38px, 5.7vw, 84px); --h1-measure: 14.5ch;
	--h2-size: clamp(32px, 4.3vw, 60px); --h2-measure: 20ch;
	--close-size: clamp(34px, 3.6vw, 54px); --close-measure: 16ch;
	--fact-label: 17em;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }

body { margin: 0; background: var(--hg-bg); color: var(--hg-text); font: 17px/1.55 var(--hg-font); font-kerning: normal; }
::selection { background: var(--hg-accent-soft); color: var(--hg-text); }
:focus-visible { outline: 2px solid var(--hg-focus); outline-offset: 3px; }
a { color: inherit; text-decoration-color: var(--hg-accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--hg-accent); }
img { display: block; max-width: 100%; height: auto; }
code, .mono { font-family: var(--hg-mono); font-size: .82em; font-variant-ligatures: none; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--hg-text-2); }
p { margin: 0 0 14px; }
* { scrollbar-color: var(--hg-border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--hg-border-strong); border-radius: 10px; border: 2px solid var(--hg-bg); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* language: the page holds both, the root shows one */
:root[data-lang="en"] .pt, :root[data-lang="pt"] .en { display: none !important; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--hg-paper); color: var(--hg-night); padding: 10px 14px; border-radius: 3px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- controls ---------- */
.btn { font: 600 14px/1 var(--hg-font); border: 0; border-radius: 3px; padding: 10px 13px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; justify-content: center; text-decoration: none; white-space: nowrap;
	transition: background .3s var(--hg-ease), color .3s var(--hg-ease), box-shadow .3s var(--hg-ease); }
.btn.lg { font-size: 15px; padding: 14px 18px; }
.btn.primary { background: var(--hg-accent); color: var(--hg-accent-text); }
.btn.primary:hover { background: var(--hg-accent-hover); color: var(--hg-accent-text); }
.btn.secondary { background: transparent; color: var(--hg-text); box-shadow: inset 0 0 0 1.5px var(--hg-text); }
.btn.secondary:hover { background: var(--hg-text); color: var(--hg-bg); }
.btn.paper { background: var(--hg-paper); color: var(--hg-night); }
.btn.paper:hover { background: var(--hg-white); }
.btn[disabled], .btn[aria-busy="true"] { cursor: progress; opacity: .7; }

.seg { display: inline-flex; border: 1px solid var(--hg-rule); border-radius: 4px; padding: 3px; }
.seg button { font: 600 13px/1 var(--hg-font); background: none; border: 0; padding: 8px 11px; border-radius: 2px; color: var(--hg-text); cursor: pointer;
	transition: background .25s var(--hg-ease), color .25s var(--hg-ease); }
.seg button[aria-pressed="true"] { background: var(--hg-text); color: var(--hg-bg); }
.seg button:hover:not([aria-pressed="true"]) { background: var(--hg-surface-quiet); }
.seg.on-ultra { border-color: rgba(248, 247, 240, .32); }
.seg.on-ultra button { color: var(--hg-paper); }
.seg.on-ultra button[aria-pressed="true"] { background: var(--hg-paper); color: var(--hg-ultramarine); }
.seg.on-ultra button:hover:not([aria-pressed="true"]) { background: rgba(248, 247, 240, .12); }

/* status chips: shape plus word, never colour alone */
.chip { font-size: 12px; font-weight: 600; line-height: 1; padding: 6px 8px; border-radius: 3px; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.chip i { width: 7px; height: 7px; background: currentColor; flex: none; }
.chip.running { color: var(--hg-running); background: var(--hg-running-soft); }
.chip.running i { animation: beat 1.6s var(--hg-ease) infinite; }
.chip.waiting { color: var(--hg-waiting); background: var(--hg-waiting-soft); }
.chip.waiting i { height: 3px; }
.chip.done { color: var(--hg-done); background: var(--hg-done-soft); }
.chip.blocked { color: var(--hg-blocked); background-color: var(--hg-blocked-soft); background-image: var(--hg-rungs); }
.chip.blocked i { height: 2px; width: 9px; }
@keyframes beat { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.kind { font-size: 12px; font-weight: 600; line-height: 1; padding: 5px 7px; border-radius: 2px; background: var(--hg-surface-quiet); color: var(--hg-text); display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.kind svg { width: 13px; height: 13px; }

/* avatars: agents are square tiles with the white hagents mark (inline SVG), people are round with initials */
.av { width: 32px; height: 32px; flex: none; }
svg.av { display: block; }
.av.sm { width: 22px; height: 22px; }
.av.lg { width: 48px; height: 48px; }
.av.xl { width: 64px; height: 64px; }
.av.person { display: inline-grid; place-items: center; border-radius: 50%; font: 700 13px/1 var(--hg-font); background: var(--hg-surface-quiet); color: var(--hg-text); }
.av.sm.person { font-size: 11px; }
.av.lg.person { font-size: 18px; }
.av.xl.person { font-size: 22px; }

/* ---------- forms ---------- */
.join .lbl { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.join .opt { font-weight: 400; opacity: .8; }
.join input:not(.hp) { width: 100%; font: 400 16px/1.2 var(--hg-font); color: var(--hg-paper); background: var(--hg-night-2); border: 1.5px solid rgba(248, 247, 240, .3); border-radius: 3px; padding: 13px 12px; min-height: 48px;
	transition: border-color .2s var(--hg-ease), box-shadow .2s var(--hg-ease); }
.join input::placeholder { color: var(--hg-fog); }
.join input:focus { outline: none; border-color: var(--hg-paper); box-shadow: 0 0 0 3px rgba(248, 247, 240, .22); }
.join input[aria-invalid="true"] { border-color: var(--hg-failed); }
.join .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.join .err { display: none; margin: 10px 0 0; font-size: 14px; font-weight: 500; color: var(--hg-failed); background: var(--hg-night-2); padding: 8px 10px; border-radius: 3px; max-width: 46ch; }
.join .err.show { display: block; }
.join .done-msg { background: var(--hg-night-2); color: var(--hg-paper); border-radius: 4px; padding: 16px 18px; max-width: 46ch; }
.join .done-msg b { display: block; font-size: 17px; margin-bottom: 4px; }
.join .done-msg span { color: var(--hg-fog); font-size: 15px; }
.ts { display: none; }

/* ---------- cover ---------- */
/* The cover is Night, like the console. Ultramarine stays small: the card arriving and the one primary button. */
.cover { background: var(--hg-bg); color: var(--hg-text); border-bottom: 1px solid var(--hg-rule); }
.cover .in { min-height: min(100vh, 940px); display: grid; grid-template-rows: auto 1fr; padding: 28px var(--pad) 56px; max-width: 1600px; margin: 0 auto; }
.cover .top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.cover .lockup img { width: clamp(220px, 22vw, 300px); }
.cover .top-ctl { display: flex; align-items: center; gap: 16px; }
.cover .status { font-size: 14px; font-weight: 600; color: var(--hg-text-2); }
.cover .stage { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); gap: clamp(32px, 6vw, 112px); align-items: center; padding: clamp(40px, 6vh, 88px) 0 0; }
.cover h1 { margin: 0 0 28px; font-size: var(--h1-size); line-height: .94; letter-spacing: -.038em; font-weight: 800; max-width: var(--h1-measure); text-wrap: balance; }
.cover .lead { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.5; color: var(--hg-text-2); max-width: 44ch; margin: 0 0 36px; text-wrap: pretty; }
.join-cover { max-width: 520px; }
.join-cover .row-field { display: flex; gap: 8px; }
.join-cover .row-field input { flex: 1; min-width: 0; }
.join-cover .note { margin: 12px 0 0; font-size: 14px; color: var(--hg-text-2); }
/* Fields on Night follow the console: strong border, accent focus with an 18% halo. */
.join-cover input:not(.hp) { border-color: var(--hg-border-strong); }
.join-cover input:focus { border-color: var(--hg-accent); box-shadow: 0 0 0 3px rgba(142, 155, 255, .18); }

/* the desk: the session so far, the card waiting above the tray */
.desk { display: flex; flex-direction: column; align-items: center; }
.log { list-style: none; margin: 0 0 22px; padding: 0; width: 100%; max-width: 380px; font-size: 14px; color: rgba(248, 247, 240, .86); }
.log li { display: grid; grid-template-columns: 76px 14px minmax(0, 1fr); align-items: baseline; gap: 0 8px; padding: 5px 0; }
.log li::before { content: ""; grid-column: 2; grid-row: 1; width: 7px; height: 7px; background: rgba(248, 247, 240, .55); align-self: center; justify-self: center; }
.log li time { grid-column: 1; grid-row: 1; font-size: 12.5px; color: rgba(248, 247, 240, .78); }
.log li > span { grid-column: 3; grid-row: 1; }
.log li.now { color: var(--hg-paper); font-weight: 600; }
.log li.now::before { height: 3px; background: var(--hg-paper); }
.desk .slot { width: 100%; max-width: 380px; display: flex; justify-content: center; }
.desk .tray { width: 62%; max-width: 236px; display: block; margin-top: 28px; overflow: visible; }
.desk .status-line { margin-top: 18px; display: flex; gap: 10px; align-items: center; min-height: 30px; }
.desk .status-line .chip { box-shadow: 0 0 0 1px rgba(248, 247, 240, .2); }
.desk .again { font: 600 14px/1 var(--hg-font); color: var(--hg-paper); background: none; border: 0; padding: 6px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; text-decoration-color: rgba(248, 247, 240, .5); }
.desk .again[hidden] { display: none; }
.desk .illus { margin: 16px 0 0; font-size: 13px; color: rgba(248, 247, 240, .8); text-align: center; max-width: 38ch; }

/* the inbox card (the signature) */
.icard { --hg-focus: var(--hg-ultramarine-light); width: 100%; max-width: 380px; background: var(--hg-surface); color: var(--hg-text); border: 1px solid var(--hg-rule); border-radius: 4px; padding: 16px 16px 14px; font-size: 14px; line-height: 1.45; }
.cover .icard { border-color: var(--hg-rule); }
.icard .from { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.icard .who b { display: block; font-size: 14px; }
.icard .addr { display: block; font: 400 12px/1.3 var(--hg-mono); color: var(--hg-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icard .ask { font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; margin: 12px 0 6px; }
.icard .ctx { color: var(--hg-text-2); margin: 0 0 12px; }
.icard .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.icard .meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--hg-text-2); margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hg-rule); }

/* ---------- compact bar ---------- */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px var(--pad);
	background: color-mix(in srgb, var(--hg-bg) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--hg-rule);
	transform: translateY(-100%); visibility: hidden; transition: transform .3s var(--hg-ease), visibility 0s linear .3s; }
.bar.show { transform: none; visibility: visible; transition: transform .3s var(--hg-ease), visibility 0s; }
.bar-mark img { width: 120px; }
.bar-ctl { display: flex; gap: 10px; align-items: center; }

/* ---------- the time rail ---------- */
.rail-wrap { position: relative; max-width: 1360px; margin: 0 auto; padding: 0 var(--pad) 40px; }
.rail { position: absolute; top: 0; bottom: 0; left: calc(var(--pad) + var(--when) + var(--gut) / 2 - 1px); width: 2px; background: var(--hg-rule); }
.now-marker { position: absolute; left: -11px; top: 0; width: 24px; height: 12px; background: var(--hg-accent); border-radius: 2px; transition: top .6s var(--hg-ease); }
.step { position: relative; display: grid; grid-template-columns: var(--when) var(--gut) minmax(0, 1fr); padding-top: 120px; }
.rail-note + .step { padding-top: 72px; }
/* Step marks: a neutral bar for steps ahead, a solid square once passed (the brand's "done" shape). */
.step::before { content: ""; grid-column: 2; grid-row: 1; justify-self: center; margin-top: 18px; width: 10px; height: 2px; background: var(--hg-border-strong); z-index: 1; transition: background .3s var(--hg-ease), height .3s var(--hg-ease), margin .3s var(--hg-ease); }
.step.is-past::before { background: var(--hg-text); height: 10px; margin-top: 14px; }
.rail-note { position: relative; margin: 0; padding: 56px 0 0 calc(var(--when) + var(--gut)); font-size: 14px; color: var(--hg-text-2); max-width: calc(var(--when) + var(--gut) + 64ch); }
.step .when { grid-column: 1; grid-row: 1; position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 6px; }
.step .when time { font-size: 15px; color: var(--hg-text); }
.step .body { grid-column: 3; grid-row: 1; min-width: 0; }
.step h2 { margin: 0 0 22px; font-size: var(--h2-size); line-height: .98; letter-spacing: -.034em; font-weight: 800; max-width: var(--h2-measure); text-wrap: balance; }
.step .intro { font-size: clamp(17px, 1.4vw, 19px); color: var(--hg-text-2); max-width: 60ch; margin: 0 0 48px; text-wrap: pretty; }
.step .intro .mono { color: var(--hg-text); }
.step h3 { margin: 0 0 10px; font-size: 22px; line-height: 1.2; letter-spacing: -.015em; font-weight: 700; }

/* rules lists */
.facts { list-style: none; margin: 56px 0 0; padding: 0; border-top: 2px solid var(--hg-text); }
.facts li { display: grid; grid-template-columns: minmax(0, var(--fact-label)) minmax(0, 1fr); gap: 6px 32px; padding: 16px 0; border-bottom: 1px solid var(--hg-rule); }
.facts li b { font-weight: 700; }
.facts li > span { color: var(--hg-text-2); max-width: 62ch; }
.facts.four { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 2px solid var(--hg-text); }
.facts.four li { grid-template-columns: minmax(0, 1fr); padding: 16px 24px 18px 0; }
.facts.four li:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--hg-rule); }

/* identity */
.roster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: end; }
.roster-tray { position: relative; padding: 0 28px 28px; }
.roster-tray .people { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; padding: 0 0 16px; }
.roster-tray::after { content: ""; position: absolute; inset: 32px 0 0; border: 14px solid var(--hg-text); border-top: 0; z-index: 0; }
.names { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--hg-text); }
.names li { display: grid; grid-template-columns: 22px auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--hg-rule); font-size: 15px; }
.names li .mono { color: var(--hg-text-2); justify-self: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.names li.cap { display: block; color: var(--hg-text-2); font-size: 14px; border-bottom: 0; }

/* the desk transcript: machine text in mono */
.transcript { margin: 0; background: var(--hg-surface); border: 1px solid var(--hg-rule); border-radius: 4px; overflow: hidden; }
.transcript figcaption { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--hg-rule); font-size: 14px; }
.transcript figcaption .muted { margin-left: auto; font-size: 13px; }
.transcript ol { list-style: none; margin: 0; padding: 6px 0; }
.transcript li { display: grid; grid-template-columns: 52px 128px minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 9px 16px; font-size: 15px; }
.transcript li time { font-size: 12.5px; color: var(--hg-text-2); }
.transcript code { font-size: 13px; color: var(--hg-accent); }
.transcript code.arg { color: var(--hg-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transcript .res { font-size: 13px; color: var(--hg-text-2); white-space: nowrap; }

/* inbox kinds and the email */
.kinds { list-style: none; margin: 0 0 56px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--hg-text); }
.kinds li { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px 20px 16px 0; font-size: 15px; color: var(--hg-text-2); }
.kinds li + li { padding-left: 20px; border-left: 1px solid var(--hg-rule); }
.bench { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.bench .facts { margin-top: 0; }
.bench .facts li { grid-template-columns: minmax(0, 1fr); }
.client { background: #FFFFFF; color: #051A1E; border-radius: 4px; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .55); overflow: hidden; }
.client .chrome { background: #ECEBE4; padding: 10px 14px; font-size: 12px; color: #5B6168; display: grid; gap: 2px; overflow-wrap: anywhere; }
.client .chrome b { color: #051A1E; font-weight: 600; }
.client .mail { padding: 26px clamp(16px, 3vw, 32px) 22px; }
.client .hdr { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 2px solid #051A1E; }
.client .hdr img { width: 130px; }
.client .hdr span { font-size: 12px; color: #5B6168; }
.client .whoblock { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; padding: 18px 0 2px; }
.client .whoblock b { display: block; font-size: 16px; }
.client .whoblock .mono { color: #5B6168; font-size: 12px; overflow-wrap: anywhere; }
.client .q { font-size: 22px; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; margin: 16px 0 8px; }
.client p { font-size: 15px; line-height: 1.55; }
.client .ebtns { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 10px; }
.client .ebtn { display: block; text-align: center; font-weight: 600; font-size: 15px; padding: 13px 16px; border-radius: 3px; }
.client .ebtn.p { background: #2B3CC2; color: #F8F7F0; }
.client .ebtn.s { box-shadow: inset 0 0 0 1.5px #051A1E; }
.client .ebtn.q { color: #2B3CC2; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; padding: 8px; }
.client .small { font-size: 13px; color: #5B6168; margin: 0; }

/* the wait */
.step.quiet .intro { margin-bottom: 56px; }
.gap { display: grid; grid-template-columns: auto minmax(120px, 1fr) auto auto; gap: 16px 28px; align-items: start; border-top: 2px solid var(--hg-text); padding-top: 24px; }
.gap-end { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.gap-end time { font-size: 15px; }
.gap-span { align-self: stretch; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 14px; color: var(--hg-text-2); position: relative; padding: 0 12px; min-height: 64px; }
.gap-span::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--hg-border-strong); }
.gap-span span { position: relative; background: var(--hg-bg); padding: 4px 10px; }
.reply { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; max-width: 28ch; }
.reply .av { margin-top: 1px; }

/* budgets */
.budgets { border-top: 2px solid var(--hg-text); padding-top: 8px; margin-bottom: 72px; }
/* Single amounts keep proportional figures: this face sets tabular commas and points very wide. */
.fig { white-space: nowrap; }
.meter { padding: 18px 0; border-bottom: 1px solid var(--hg-rule); }
.meter .mh { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 10px; font-size: 15px; }
.meter .mh > span:first-child { display: flex; gap: 10px; align-items: center; }
.track { height: 10px; background: var(--hg-surface-quiet); border-radius: 2px; overflow: hidden; }
.fill { height: 100%; background: var(--hg-text); }
.f-rb { width: 73.6%; } .f-fin { width: 70.7%; } .f-full { width: 100%; }
.meter.capped .track { box-shadow: inset 0 0 0 1.5px var(--hg-text); }
.meter.capped .fill { background-color: var(--hg-blocked-soft); background-image: var(--hg-rungs); }
.meter .mn { margin: 10px 0 0; font-size: 13px; color: var(--hg-text-2); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fine { margin: 16px 0 0; font-size: 13px; color: var(--hg-text-2); max-width: 70ch; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 56px; }
.split > div + div { padding-left: 56px; border-left: 1px solid var(--hg-rule); }
.split p { color: var(--hg-text-2); max-width: 52ch; }
.vault { margin-top: 20px; background: var(--hg-surface); border: 1px solid var(--hg-rule); border-radius: 4px; padding: 14px 16px; display: grid; gap: 6px; font-size: 14px; }
.vault code { font-size: 13px; color: var(--hg-text); }
.vault span { color: var(--hg-text-2); }
.audit { width: 100%; border-collapse: collapse; margin-top: 20px; border-top: 2px solid var(--hg-text); font-size: 14px; }
.audit td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--hg-rule); overflow-wrap: anywhere; }
.audit td.mono { font-size: 12.5px; color: var(--hg-text-2); }
.audit td:last-child { color: var(--hg-text); text-align: right; padding-right: 0; }

/* delivered */
.delivered { max-width: 100%; display: inline-flex; gap: 12px; align-items: center; background: var(--hg-surface); border: 1px solid var(--hg-rule); border-radius: 4px; padding: 12px 16px; margin: 0 0 40px; }
.delivered svg { width: 24px; height: 24px; color: var(--hg-text); flex: none; }
.delivered b { display: block; font-size: 14px; }
.delivered .muted { font-size: 13px; }

/* ---------- close ---------- */
.close { --hg-focus: var(--hg-paper); background: var(--hg-ultramarine); color: var(--hg-paper); margin-top: 120px; }
.close-in { max-width: 1360px; margin: 0 auto; padding: 120px var(--pad); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: clamp(40px, 7vw, 120px); align-items: start; }
.close h2 { margin: 0 0 24px; font-size: var(--close-size); line-height: .96; letter-spacing: -.036em; font-weight: 800; max-width: var(--close-measure); text-wrap: balance; }
.close p { font-size: 18px; color: rgba(248, 247, 240, .9); max-width: 48ch; }
.close-tray { width: 160px; margin-top: 48px; overflow: visible; }
.join-close { display: grid; gap: 18px; }
.join-close .btn { justify-self: start; }
.join-close .privacy { font-size: 13px; line-height: 1.5; color: rgba(248, 247, 240, .84); margin: 0; max-width: 52ch; }
.join-close .privacy a { text-decoration-color: rgba(248, 247, 240, .6); }
.join-close .privacy a:hover { color: var(--hg-paper); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--hg-rule); }
.foot-in { max-width: 1360px; margin: 0 auto; padding: 64px var(--pad) 48px; display: grid; gap: 16px; }
.foot-in img { width: 260px; margin-bottom: 8px; }
.foot-in p { color: var(--hg-text-2); max-width: 52ch; }
.foot .links { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; flex-wrap: wrap; font-size: 15px; }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hg-rule); font-size: 13px; color: var(--hg-text-2); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
	.cover .stage { grid-template-columns: minmax(0, 1fr); padding-top: 48px; }
	:root { --h1-measure: 13ch; }
	:root:lang(pt) { --h1-measure: 15ch; }
	.desk { align-items: flex-start; }
	.desk .illus { text-align: left; }
	.roster, .bench, .split { grid-template-columns: minmax(0, 1fr); gap: 48px; }
	.split > div + div { padding-left: 0; border-left: 0; padding-top: 48px; border-top: 1px solid var(--hg-rule); }
	.kinds { grid-template-columns: 1fr 1fr; }
	.kinds li:nth-child(3) { padding-left: 0; border-left: 0; }
	.kinds li:nth-child(n+3) { border-top: 1px solid var(--hg-rule); }
	.close-in { grid-template-columns: minmax(0, 1fr); }
	.gap { grid-template-columns: minmax(0, 1fr); }
	.gap-span { min-height: 40px; justify-content: flex-start; padding: 0; }
	.gap-span::before { left: 3px; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 2px dashed var(--hg-border-strong); }
	.gap-span span { margin-left: 18px; background: none; padding: 0; }
}
@media (max-width: 760px) {
	:root { --when: 0px; --gut: 0px; }
	html { scroll-padding-top: 72px; }
	.rail { display: none; }
	.rail-note { padding: 48px 0 0; }
	.rail-note + .step { padding-top: 56px; }
	.step { grid-template-columns: minmax(0, 1fr); padding-top: 88px; }
	.step::before { display: none; }
	.step .when { position: static; grid-column: 1; grid-row: 1; flex-direction: row; align-items: center; margin-bottom: 18px; padding-top: 0; }
	.step .body { grid-column: 1; grid-row: 2; }
	.cover .status { display: none; }
	.join-cover .row-field { flex-direction: column; }
	.join-cover .row-field .btn { width: 100%; }
	.facts li { grid-template-columns: minmax(0, 1fr); }
	.facts.four { grid-template-columns: minmax(0, 1fr); }
	.facts.four li:nth-child(even) { padding-left: 0; border-left: 0; }
	.transcript li { grid-template-columns: 44px minmax(0, 1fr); gap: 2px 12px; }
	.transcript li code.arg, .transcript li .res { grid-column: 2; }
	.kinds { grid-template-columns: minmax(0, 1fr); }
	.kinds li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--hg-rule); }
	.names li { grid-template-columns: 22px minmax(0, 1fr); }
	.names li .mono { grid-column: 2; justify-self: start; }
	.bar .bar-ctl .btn { padding: 9px 11px; }
	.close { margin-top: 88px; }
	.desk .tray { max-width: 168px; }
	.close-tray { width: 112px; margin-top: 32px; }
	.close-in { padding-top: 88px; padding-bottom: 88px; }
	.meter .mh { flex-wrap: wrap; }
}
@media (max-width: 420px) {
	.bar .seg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
