/* Hutgate LLC — site styles. Values match design/tokens.json. */
:root {
  --bg: #F6F7F8; --surface: #FFFFFF; --surface-muted: #F1F2F4; --fill-muted: #ECEEF0;
  --ink: #121316; --ink-hover: #2A2C32; --text-body: #3A3E46; --text-muted: #4A4E57; --text-subtle: #5B5F68;
  --placeholder: #8A8F98; --border: #E3E5E8; --border-strong: #D9DCE0; --border-hover: #C4C8CE;
  --accent: #2F6FEB; --accent-ring: rgba(47,111,235,.14); --accent-on-dark: #6E9BFF; --success: #0F8A5F; --error: #B42318;
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
  --gutter: 20px; --section-y: 72px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: #3A3E46; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.mono { font-family: var(--font-mono); }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-subtle); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 999px; font-weight: 500; font-size: 15px; border: 0; cursor: pointer; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--ink-hover); color: var(--bg); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-md { min-height: 48px; padding: 0 22px; font-size: 14px; }
.btn svg { width: 16px; height: 16px; }
.link-btn { min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(246,247,248,.82); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--border); }
.site-nav { min-height: 72px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
/* The smallest phones (320) have room for the mark, the language switch and the button on
   one line, not the wordmark too: "Hutgate" joins at 375 and "LLC" at 641. The link keeps
   its accessible name (aria-label) throughout. */
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 26px; height: 26px; display: block; }
.brand-word { display: none; align-items: baseline; gap: 6px; font-family: var(--font-display); }
.brand-word b { font-weight: 600; font-size: 21px; letter-spacing: -.02em; }
.brand-word small { display: none; font-weight: 500; font-size: 10px; letter-spacing: .18em; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 14px; }
.nav-links .btn-sm { padding: 0 14px; }
.nav-links a.nav-text { color: var(--text-muted); display: none; align-items: center; gap: 8px; }
.nav-text.back { display: none; }
.nav-links a.nav-text:hover { color: var(--ink); }

/* Language switcher (EN / VI) */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; }
.lang-switch a { display: inline-flex; align-items: center; min-height: 30px; padding: 0 8px; border-radius: 999px; color: var(--text-subtle); }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { background: var(--ink); color: var(--bg); }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-grid-bg { position: absolute; inset: 0; background-image: radial-gradient(rgba(18,19,22,.10) 1px, transparent 1px); background-size: 24px 24px; -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 95%); mask-image: linear-gradient(to bottom, #000 30%, transparent 95%); }
.hero-inner { position: relative; padding-top: 56px; padding-bottom: 72px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); gap: 40px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.badge { display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em; color: var(--text-muted); }
.pulse { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); animation: hgPulse 2.4s ease-in-out infinite; }
@keyframes hgPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(47,111,235,.45); } 60% { box-shadow: 0 0 0 7px rgba(47,111,235,0); } }
.hero h1 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(44px, 5.6vw, 78px); line-height: 1.02; letter-spacing: -.04em; text-wrap: balance; }
.hero-intro { margin: 0; max-width: 520px; font-size: 18px; line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.hero-actions .btn { flex: 1 1 100%; }
.hero-console { order: -1; }

/* Terminal widget */
.console { background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 1px 2px rgba(18,19,22,.04), 0 30px 60px -40px rgba(18,19,22,.22); overflow: hidden; font-family: var(--font-mono); font-size: 12px; color: var(--ink); }
.console-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--fill-muted); }
.console-dots { display: flex; gap: 7px; }
.console-dots span { width: 10px; height: 10px; border-radius: 99px; background: #DDE0E4; }
.console-title { color: var(--text-subtle); font-size: 12px; }
.console-body { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 14px; }
.console-cmd { color: var(--text-subtle); }
.console-cmd span { color: var(--ink); }
.console-row { display: grid; grid-template-columns: 16px 64px 1fr; gap: 8px; align-items: center; }
.console-row .detail { color: var(--text-subtle); }
.console-row .ok { color: var(--success); }
.console-row .run { color: var(--accent); }
.console-progress { height: 4px; border-radius: 99px; background: var(--fill-muted); overflow: hidden; margin-left: 30px; }
.console-progress div { height: 100%; border-radius: 99px; background: var(--accent); animation: hgBar 5s cubic-bezier(.4,0,.2,1) infinite; }
@keyframes hgBar { 0% { width: 6%; } 70%,100% { width: 100%; } }
.caret { display: inline-block; width: 8px; height: 15px; background: var(--ink); vertical-align: -2px; animation: hgCaret 1.1s steps(1) infinite; }
@keyframes hgCaret { 50% { opacity: 0; } }

/* Sections */
.section { border-top: 1px solid var(--border); }
.section-inner { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section-white { background: var(--surface); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.section-head > div { display: flex; flex-direction: column; gap: 16px; }
.h2 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(34px, 3.6vw, 52px); line-height: 1.06; letter-spacing: -.035em; max-width: 640px; text-wrap: balance; }
.section-intro { margin: 0; max-width: 380px; font-size: 16px; line-height: 1.6; color: var(--text-muted); }

/* Services grid */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.service { background: var(--bg); padding: 28px 22px; display: flex; flex-direction: column; gap: 14px; transition: background .2s; }
.service:hover { background: var(--surface); }
.service .num { font-family: var(--font-mono); font-size: 12px; color: var(--text-subtle); }
.service h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 24px; letter-spacing: -.02em; }
.service p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-muted); flex-grow: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); list-style: none; margin: 0; padding: 0; }
.tags li { padding: 4px 8px; border: 1px solid var(--border-strong); border-radius: 6px; }
.service-featured { grid-column: 1 / -1; background: var(--ink); color: var(--bg); padding: 40px 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 32px; align-items: center; }
.service-featured > div { display: flex; flex-direction: column; gap: 14px; }
.service-featured .meta { display: flex; align-items: center; gap: 12px; }
.service-featured .num { font-family: var(--font-mono); font-size: 12px; color: #A4A9B2; }
.service-featured .flag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; border: 1px solid #3A3E46; color: var(--accent-on-dark); }
.service-featured h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -.03em; line-height: 1.1; }
.service-featured p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--border-hover); }
.service-featured .tags { color: var(--border-hover); }
.service-featured .tags li { border-color: #3A3E46; }

/* Start a project */
.start-grid { display: grid; grid-template-columns: 1fr; gap: 72px; align-items: start; }
.start-copy { display: flex; flex-direction: column; gap: 28px; }
.start-copy > p { margin: 0; max-width: 440px; font-size: 16px; line-height: 1.6; color: var(--text-muted); }
.steps { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--border); }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.steps .n { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.steps strong { display: block; font-weight: 500; font-size: 16px; margin-bottom: 4px; }
.steps span.b { font-size: 14px; color: var(--text-subtle); line-height: 1.5; }
.email-line { margin: 0; font-size: 14px; color: var(--text-subtle); }
.email-line a { border-bottom: 1px solid var(--border-hover); }

/* Phones: the card runs edge to edge — no rounded corners, no side borders, the page gutter as its padding. */
.form-card { position: relative; background: var(--bg); border: 1px solid var(--border); border-left: 0; border-right: 0; border-radius: 0; margin-inline: calc(var(--gutter) * -1); padding: 36px var(--gutter); }
.req-form { display: flex; flex-direction: column; gap: 28px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label, .legend { font-size: 13px; font-weight: 500; padding: 0; }
.legend { margin-bottom: 12px; }
.legend span { color: var(--text-subtle); font-weight: 400; }
.input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font-size: 16px; line-height: 1.4; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.input::placeholder { color: var(--placeholder); }
textarea.input { resize: vertical; min-height: 140px; }
/* 16px fields on phones also stop iOS Safari zooming in on focus. The brief gets room to write. */
#hg-brief { min-height: 240px; padding: 16px; line-height: 1.6; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 14px; font-weight: 500; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.segmented { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--fill-muted); }
.seg { font-size: 14px; font-weight: 500; min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; border-radius: 8px; flex: 1 1 40%; white-space: nowrap; }
.seg[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(18,19,22,.08), 0 0 0 1px rgba(18,19,22,.06); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.form-foot .note { display: flex; flex-direction: column; gap: 6px; max-width: 320px; font-size: 13px; color: var(--text-subtle); line-height: 1.5; }
.error { color: var(--error); font-size: 13px; line-height: 1.5; }
.error:empty { display: none; }
/* The brief's label row: the label, and the Dictate button where speech recognition exists. */
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dictate { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); font-size: 12px; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.dictate svg { width: 15px; height: 15px; }
.dictate:hover { border-color: var(--ink); color: var(--ink); }
.dictate.is-on { border-color: var(--error); color: var(--error); }
.dictate.is-on svg { animation: hgPulse 1.2s ease-in-out infinite; }
.dictate[hidden] { display: none; }
.dictate-status { font-size: 12px; color: var(--text-subtle); }
.dictate-status:empty { display: none; }
@keyframes hgPulse { 50% { opacity: .35; } }
/* The agreement checkboxes: the native box stays for keyboard and screen readers, drawn over. */
.consent { position: relative; display: flex; align-items: flex-start; gap: 12px; font-size: 13px; line-height: 1.55; color: var(--text-muted); cursor: pointer; }
.consent[hidden] { display: none; }
.consent input { position: absolute; top: 0; left: 0; width: 22px; height: 22px; margin: 0; opacity: 0; cursor: pointer; }
.consent-box { flex: none; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 1.5px solid var(--border-hover); border-radius: 6px; background: var(--surface); color: var(--bg); transition: background .15s, border-color .15s, box-shadow .15s; }
.consent-box svg { width: 14px; height: 14px; stroke-width: 2.6; opacity: 0; }
.consent input:checked + .consent-box { background: var(--ink); border-color: var(--ink); }
.consent input:checked + .consent-box svg { opacity: 1; }
.consent input:focus-visible + .consent-box { box-shadow: 0 0 0 4px var(--accent-ring); }
.consent.is-invalid .consent-box { border-color: var(--error); box-shadow: 0 0 0 3px color-mix(in srgb, var(--error) 18%, transparent); }
.consent-text a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.consent-text strong { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }

/* Verify overlay + thank-you. Every screen of the verification flow replaces the form inside
   the same card; values from design-assets/implementation/verification-flow. */
.verify { position: absolute; inset: 0; z-index: 2; background: var(--bg); border-radius: inherit; padding: clamp(24px, 3vw, 32px); display: flex; flex-direction: column; justify-content: center; gap: 20px; overflow-y: auto; animation: hgUp .35s cubic-bezier(.2,.8,.2,1) both; }
.verify[hidden], .req-form[hidden], .verify .btn[hidden] { display: none; }
/* Only the first screen slides in; the rest follow it in place, so the form never shows through. */
.verify:not([data-step="method"]) { animation: none; }
.verify .eyebrow { font-size: 11px; }
.eyebrow-error { color: var(--error); }
.verify-copy, .verify > div:not([class]) { display: flex; flex-direction: column; gap: 8px; }
.verify h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 26px; letter-spacing: -.03em; }
.verify p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-muted); max-width: 440px; }
.verify p strong, .verify p [data-contact] { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.verify .btn-md { min-height: 44px; padding: 0 20px; font-size: 13px; }
.verify .btn-ghost.btn-md { padding: 0 18px; }
.options { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: center; gap: 14px; text-align: left; min-height: 66px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-strong); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.opt:hover { border-color: var(--ink); }
.opt[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.opt-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-muted); display: flex; align-items: center; justify-content: center; }
.opt-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.opt-text strong { font-weight: 500; font-size: 14px; }
.opt-text span { font-family: var(--font-mono); font-size: 11px; color: var(--text-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio { flex: none; width: 18px; height: 18px; border-radius: 999px; border: 1.5px solid var(--border-hover); background: var(--surface); }
.opt[aria-checked="true"] .radio { border: 5px solid var(--ink); }
.row-between { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.otp { font-family: var(--font-mono); font-size: 24px; letter-spacing: .5em; text-align: center; min-height: 56px; }
.otp[aria-invalid="true"] { border-color: var(--error); }
.verify .field .error { font-size: 12px; }
.verify .chips { gap: 14px; }
.verify .link-btn { min-height: 32px; font-size: 12px; }
/* Progress screens 2, 4, 5 */
.spin { flex: none; width: 40px; height: 40px; border-radius: 999px; border: 3px solid var(--border); border-top-color: var(--ink); animation: hgSpin .9s linear infinite; }
@keyframes hgSpin { to { transform: rotate(360deg); } }
.vlog { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-family: var(--font-mono); font-size: 12px; }
.vlog div { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
.vlog-now { color: var(--accent); }
.vlog-done { color: var(--success); }
.vlog-past { color: var(--text-subtle); }
.verify-note { font-size: 12px; color: var(--text-subtle); }
.verify-note a { color: var(--ink); border-bottom: 1px solid var(--border-hover); }
.verify .contact-list { max-width: 440px; }
/* The end states (design: handoff/v002-end-state): thank you and online form paused. They
   replace the whole form, so the card shrinks to fit. */
.end { display: flex; flex-direction: column; gap: 28px; animation: hgUp .35s cubic-bezier(.2,.8,.2,1) both; }
.end[hidden] { display: none; }
.end h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 34px; line-height: 1.1; letter-spacing: -.03em; }
.end h3:focus { outline: none; }
.end p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-muted); max-width: 480px; }
.end p strong { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.end-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.end-head .eyebrow { margin-top: 6px; }
.end-icon { width: 52px; height: 52px; border-radius: 999px; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; }
.end-icon-muted { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.eyebrow-success { color: var(--success); }
.summary { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 4px 18px; }
.summary div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 11px 0; }
.summary div + div { border-top: 1px solid var(--fill-muted); }
.summary div > span:first-child { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-subtle); padding-top: 2px; }
.summary div > span:last-child { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.end-section h4 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 500; font-size: 18px; letter-spacing: -.02em; }
.next-steps { list-style: none; margin: 0; padding: 0; }
.next-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 14px 0; }
.next-steps li + li { border-top: 1px solid var(--fill-muted); }
.next-steps .n { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.next-steps strong { display: block; font-weight: 500; font-size: 14px; margin-bottom: 2px; }
.next-steps strong + span { font-size: 13px; line-height: 1.5; color: var(--text-subtle); }
.howto { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.55; color: var(--text-body); }
.howto strong { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.howto .link-btn { min-height: 0; font: inherit; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.end .contact-list a:has(.contact-cta) { grid-template-columns: 34px 1fr auto; }
.contact-cta { font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--border-hover); }
.end-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; line-height: 1.5; color: var(--text-subtle); }
.mono-note { font-family: var(--font-mono); font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .end { animation: none; } }
@keyframes hgUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes hgFade { from { opacity: 0; } to { opacity: 1; } }

/* Footer */
.site-footer { border-top: 1px solid var(--border); }
.footer-inner { padding-top: 40px; padding-bottom: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; font-size: 13px; color: var(--text-subtle); }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 18px; height: 18px; }
.footer-brand span { display: flex; flex-direction: column; gap: 2px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-family: var(--font-mono); font-size: 12px; }
.footer-links a, .footer-links button { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); }

/* Cookie notice */
/* Above the chat box (60): until the visitor has chosen, the notice is the only thing on the page. */
.cookie-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(14,15,18,.45); animation: hgFade .3s ease both; }
.cookie-backdrop[hidden] { display: none; }
.cookie { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 80; width: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(14,15,18,.28), 0 2px 6px rgba(14,15,18,.06); padding: 22px; display: flex; flex-direction: column; gap: 16px; animation: hgUp .5s cubic-bezier(.2,.8,.2,1) both; }
.cookie[hidden] { display: none; }
.cookie-head { display: flex; align-items: flex-start; gap: 12px; }
.cookie-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-muted); display: flex; align-items: center; justify-content: center; }
.cookie h2 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 500; font-size: 18px; letter-spacing: -.01em; }
.cookie p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-muted); }
.cookie p a { border-bottom: 1px solid var(--border-hover); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions .btn { flex: 1 1 140px; min-height: 44px; font-size: 14px; padding: 0 16px; }

/* Project assistant (chat box). Values from design-assets/implementation/chat-verification-and-lock. */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.chat-launcher { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500; cursor: pointer; box-shadow: 0 12px 30px -14px rgba(14,15,18,.4); transition: background .15s; }
.chat-launcher:hover { background: var(--ink-hover); }
.chat-launcher-icon, .chat-launcher-lock { display: inline-flex; }
.chat-launcher-dot, .chat-launcher-lock { display: none; }
/* C8: verified — a live dot in place of the icon. Paused — white, a lock, "Chat paused". */
.chat-launcher.is-verified .chat-launcher-icon, .chat-launcher.is-paused .chat-launcher-icon { display: none; }
.chat-launcher.is-verified .chat-launcher-dot { display: inline-block; width: 8px; height: 8px; border-radius: 99px; background: var(--accent-on-dark); animation: hgPulse 2.4s ease-in-out infinite; }
.chat-launcher.is-paused { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.chat-launcher.is-paused:hover { border-color: var(--ink); background: var(--surface); }
.chat-launcher.is-paused .chat-launcher-lock { display: inline-flex; }
.chat-panel { width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 120px)); display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px -34px rgba(14,15,18,.3), 0 2px 6px rgba(14,15,18,.06); animation: hgUp .3s cubic-bezier(.2,.8,.2,1) both; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 16px 14px 18px; border-bottom: 1px solid var(--fill-muted); }
.chat-head > div { display: flex; flex-direction: column; gap: 3px; }
.chat-head strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 16px; letter-spacing: -.01em; }
.chat-head span { font-size: 12px; color: var(--text-subtle); }
.chat-close { flex: none; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
.chat-close:hover { border-color: var(--ink); }
.chat-head > .chat-head-actions { flex: none; flex-direction: row; gap: 6px; }
.chat-download[hidden] { display: none; }
.chat-head .chat-tag { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 4px; padding: 3px 8px; border-radius: 999px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .02em; }
.chat-head .chat-tag[hidden] { display: none; }
.chat-head .chat-tag.is-wait { background: var(--surface-muted); color: var(--text-muted); }
.chat-head .chat-tag.is-ok { background: rgba(15,138,95,.10); color: #0B6B4A; }
.chat-head .chat-tag.is-err { background: rgba(180,35,24,.08); color: var(--error); }
.chat-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 9px; }
.chat-log[hidden] { display: none; }
.chat-msg { display: flex; flex-direction: column; }
.chat-msg p { margin: 0; max-width: 86%; font-size: 13px; line-height: 1.5; padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg-assistant p { background: var(--surface-muted); color: var(--ink); align-self: flex-start; }
.chat-msg p strong { font-weight: 500; }
.chat-msg-user { align-items: flex-end; }
.chat-msg-user p { background: var(--ink); color: var(--bg); }
.chat-msg.is-code p { font-family: var(--font-mono); letter-spacing: .2em; }
.chat-msg.is-pending p { color: var(--text-subtle); font-style: italic; }
.chat-msg.is-error p { background: rgba(180,35,24,.07); color: #7A1A12; }
.chat-sys { align-self: center; padding: 4px 0; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-subtle); }
.chat-summary { align-self: stretch; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; font-size: 12.5px; }
.chat-summary div { display: grid; grid-template-columns: 52px 1fr; gap: 8px; }
.chat-summary span:first-child { color: var(--text-subtle); }
.chat-summary span { overflow-wrap: anywhere; }
.chat-choices { align-self: stretch; display: flex; flex-direction: column; gap: 6px; }
.chat-choice { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 13px; text-align: left; cursor: pointer; }
.chat-choice:hover:not([disabled]) { border-color: var(--ink); }
.chat-choice[disabled] { opacity: .55; cursor: default; }
.chat-choice small { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.chat-links { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding-left: 4px; font-size: 12px; }
.chat-link { min-height: 28px; padding: 0; border: 0; background: none; color: var(--ink); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.chat-link-muted { color: var(--text-muted); text-decoration: none; }
.chat-link[disabled] { opacity: .5; cursor: default; }
.chat-form-button { align-self: flex-start; margin-top: 4px; gap: 8px; }
.chat-filed { align-self: flex-start; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--success); padding: 4px 10px; border: 1px solid var(--success); border-radius: 999px; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 0; padding: 0 2px; font-size: 13px; }
.chat-actions a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.chat-restart { margin-top: 10px; }
/* The closed notice's ways to add to a filed request: a contact list under the bubble. */
.chat-closed-contacts { align-self: stretch; margin-top: 8px; }
.chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px 8px; border-top: 1px solid var(--fill-muted); }
.chat-form[hidden] { display: none; }
.chat-input { flex: 1 1 auto; min-width: 0; min-height: 42px; max-height: 140px; padding: 11px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font-size: 13px; line-height: 1.4; resize: none; outline: none; }
.chat-input[hidden] { display: none; }
.chat-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.chat-input:disabled { background: var(--bg); border-color: var(--border); color: var(--text-subtle); }
.chat-line.is-code { font-family: var(--font-mono); font-size: 17px; letter-spacing: .4em; text-align: center; }
.chat-send { flex: none; min-height: 42px; padding: 0 16px; font-size: 13px; }
.chat-send[disabled] { background: var(--border-strong); color: var(--text-muted); cursor: default; }
.chat-send[aria-busy="true"] { cursor: progress; }
.chat-foot { margin: 0; padding: 0 14px 12px; font-size: 11px; line-height: 1.45; color: var(--text-subtle); }
.chat-foot a { color: var(--ink); border-bottom: 1px solid var(--border-hover); }
/* C6 / C7: the pause screen. */
.chat-lock { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 24px 26px; }
.chat-lock[hidden] { display: none; }
.chat-lock.is-both { gap: 14px; }
.chat-lock-icon { width: 48px; height: 48px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.chat-lock-title { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 24px; letter-spacing: -.03em; }
.chat-lock-text { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--text-muted); }
.chat-until { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-family: var(--font-mono); font-size: 11.5px; color: var(--text-body); }
.chat-until strong { font-weight: 500; color: var(--ink); }
.chat-lock-form { align-self: flex-start; min-height: 44px; padding: 0 18px; font-size: 13px; }
.chat-contacts, .contact-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.chat-contacts a, .contact-list a { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 11px 14px; color: var(--ink); }
.chat-contacts a + a, .contact-list a + a { border-top: 1px solid var(--fill-muted); }
.chat-contacts-icon, .contact-list-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-muted); display: flex; align-items: center; justify-content: center; }
.chat-contacts strong, .contact-list strong { display: block; font-weight: 500; font-size: 13px; }
.chat-contacts span span, .contact-list span span { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); }
/* Paused on the chat only: the form button, no contact list. Both paused: the contacts instead. */
.chat-lock:not(.is-both) .chat-contacts, .chat-lock.is-both .chat-lock-icon, .chat-lock.is-both .chat-lock-form { display: none; }

/* Document (legal) pages */
.doc-head { padding-top: 56px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 20px; }
.doc-head h1 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(40px, 5vw, 64px); line-height: 1.04; letter-spacing: -.04em; }
.doc-dates { display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: var(--font-mono); font-size: 12px; color: var(--text-subtle); }
.doc-body { padding-bottom: 72px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.toc { flex: 1 1 100%; max-width: none; display: flex; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 8px; font-size: 14px;
  margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
.toc::-webkit-scrollbar { display: none; }
.toc-label { display: none; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-subtle); padding-bottom: 10px; }
.toc a { display: flex; flex: none; gap: 8px; min-height: 40px; align-items: center; color: var(--text-muted);
  padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); white-space: nowrap; font-size: 13px; }
.toc a:hover { color: var(--ink); }
.toc a span { font-family: var(--font-mono); font-size: 12px; width: 22px; }
.prose { flex: 999 1 560px; min-width: 0; max-width: 760px; }
.prose .lead { margin: 0; padding-bottom: 28px; font-size: 16px; line-height: 1.7; color: var(--text-muted); }
.prose .lead a, .prose section a { border-bottom: 1px solid var(--border-hover); }
.prose section { display: flex; flex-direction: column; gap: 14px; padding: 28px 0; border-top: 1px solid var(--border); scroll-margin-top: 96px; }
.prose h2 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 21px; letter-spacing: -.02em; display: flex; gap: 14px; align-items: baseline; }
.prose h2 .n { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--text-subtle); letter-spacing: 0; }
.prose p, .prose li { margin: 0; font-size: 15px; line-height: 1.7; color: var(--text-body); text-wrap: pretty; }
.prose ul, .prose ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.prose strong { font-weight: 500; color: var(--ink); }
.table-box { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.prose th { text-align: left; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-subtle); padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-muted); }
.prose td { padding: 14px 16px; border-bottom: 1px solid var(--fill-muted); color: var(--text-body); vertical-align: top; line-height: 1.55; }
.prose tr:last-child td { border-bottom: 0; }
.prefs { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); padding: 8px 20px 20px; display: flex; flex-direction: column; }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; }
.pref-row + .pref-row { border-top: 1px solid var(--fill-muted); }
.pref-row strong { display: block; font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.pref-row span { font-size: 14px; color: var(--text-subtle); }
.switch { flex: none; position: relative; width: 48px; height: 28px; border-radius: 999px; border: 0; background: var(--border-hover); cursor: pointer; padding: 0; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(18,19,22,.2); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch:disabled { cursor: not-allowed; opacity: .55; }
.prefs .row-between { padding-top: 8px; }
.prefs .status { font-family: var(--font-mono); font-size: 12px; color: var(--text-subtle); }

/* 404 */
.notfound { padding-top: 140px; padding-bottom: 160px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.notfound h1 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(40px, 5vw, 64px); letter-spacing: -.04em; }
.notfound p { margin: 0; color: var(--text-muted); font-size: 17px; }

/* Responsive */

/* Mobile first: the rules above are the small-screen layout, and each step up adds
   to it. Breakpoints are 641 / 901 / 1041 so that the boundaries sit exactly where
   the old max-width rules put them; 375 only brings in the header wordmark. */

/* Phones from 375: room for the wordmark beside the mark */
@media (min-width: 375px) {
  .brand-word { display: flex; }
}

/* Larger phones and up */
@media (min-width: 641px) {
  .site-nav { gap: 16px; }
  .brand-word small { display: inline; }
  .nav-links { gap: 28px; }
  .nav-links .btn-sm { padding: 0 16px; }
  .lang-switch a { padding: 0 10px; }
  .nav-links a.nav-text { display: inline-flex; }
  .chat { right: 24px; bottom: 24px; }
  .hero-actions .btn { flex: 0 1 auto; }
  .console { font-size: 13px; }
  .console-row { grid-template-columns: 20px 92px 1fr; gap: 10px; }
  .service { padding: 36px 32px 32px; min-height: 260px; }
  .seg { flex: 1 1 0; }
  .form-card { border: 1px solid var(--border); border-radius: 24px; margin-inline: 0; padding: clamp(24px, 3vw, 40px); }
  .input:not(.otp) { font-size: 15px; }
  #hg-brief { min-height: 180px; padding: 12px 14px; line-height: 1.4; }
  .cookie { left: 24px; right: auto; bottom: 24px; width: min(420px, calc(100% - 48px)); }
}

/* Tablet landscape and up: roomier rhythm, and the document pages get their sidebar */
@media (min-width: 901px) {
  :root { --gutter: 32px; --section-y: 112px; }
  .nav-text.back { display: inline-flex; }
  .hero-inner { padding-top: 112px; padding-bottom: 120px; gap: 64px; }
  .section-head { margin-bottom: 56px; }
  .doc-head { padding-top: 96px; padding-bottom: 56px; }
  .doc-body { gap: 48px 80px; padding-bottom: 120px; }
  .toc { flex: 1 1 240px; max-width: 300px; flex-direction: column; flex-wrap: wrap; overflow-x: visible;
         gap: 2px; margin-inline: 0; padding: 36px 0 0; }
  .toc-label { display: block; }
  .toc a { flex: initial; gap: 12px; min-height: 36px; padding: 0; border: 0; border-radius: 0;
           background: none; white-space: normal; font-size: 14px; }
  .prose section { padding: 36px 0; }
  .prose h2 { font-size: 24px; }
  .prose p, .prose li { font-size: 16px; }
  .prose .lead { font-size: 18px; padding-bottom: 36px; }
}

/* Desktop: the hero splits copy / terminal, and the intake form takes 65% of the
   "Start a project" row. Below this the form is stacked and full width. */
@media (min-width: 1041px) {
  .hero-console { order: 0; }
  .start-grid { grid-template-columns: 35fr 65fr; }
}

/* Large screens — from xscreen-version/ (2K 2560x1440 and 4K 3840x2160). Both artboards
   are the same design: it scales the whole page in one step rather than re-laying it out,
   so every proportion, radius and border stays exactly as drawn. .site-root is the element
   that gets zoomed (see header.php); .wrap also gains a wider measure so the extra room
   becomes content rather than margin, and the hero is tall enough to fill the first screen.
   html is outside .site-root, so its scroll-padding is scaled by hand to keep anchor
   targets clear of the taller sticky header. */
@media (min-width: 2200px) {
  .site-root { zoom: 1.25; }
  .wrap { max-width: 1400px; }
  .hero-inner { min-height: 1000px; align-content: center; }
  html { scroll-padding-top: 110px; } /* 88px x 1.25 */
}
@media (min-width: 3200px) {
  .site-root { zoom: 1.75; }
  .hero-inner { min-height: 1100px; }
  html { scroll-padding-top: 154px; } /* 88px x 1.75 */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse, .console-progress div, .caret, .cookie, .cookie-backdrop, .verify, .chat-launcher-dot { animation: none; }
  .spin { animation-duration: 2.4s; }
}

/* Text-style buttons in the code step */
.link-underline { text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.link-muted { color: var(--text-muted); font-size: 13px; }
