/*
 * Appen Careers: the candidate site's design system (web chat, sheets, front
 * door, hub, expired page).
 *
 * Shared candidate workspace foundation. Surfaces are opaque, borders are
 * quiet, and the configured brand identifies actions and current state.
 * Existing token names remain aliases while individual screens migrate.
 */

/* ── Type ──────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Tokens ────────────────────────────────────────────────────────────── */

:root {
  /* Brand (overridden per page from the portal) */
  --brand: #FD6262;
  --action: #C84D4D;
  --accent-text: #A63F3F;
  --action-hover: #B84646;
  --action-ring: rgba(200, 77, 77, .18);
  --action-glow: rgba(200, 77, 77, .35);
  --brand-ring: rgba(253, 98, 98, .2);

  /* Semantic colors: light appearance */
  --page: #F5F6F8;
  --surface: #FFFFFF;
  --surface-subtle: #FAFBFC;
  --surface-inset: #EDF0F4;
  --text: #19232F;
  --text-secondary: #4F5B6A;
  --text-muted: #626D7B;
  --border: #E3E7EC;
  --border-control: #8994A3;
  --overlay: rgba(14, 20, 29, .42);
  --on-action: #FFFFFF;
  --selected: color-mix(in srgb, var(--action) 8%, var(--surface));
  --done: #256C52;
  --done-soft: #EDF7F1;
  --warn: #875315;
  --warn-soft: #FBF3E6;
  --danger: #B42318;
  --danger-action: #B42318;
  --danger-soft: #FEF0ED;
  --strong: var(--text);
  --strong-ink: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(21, 23, 27, .04);
  --shadow: 0 4px 16px rgba(21, 23, 27, .05);
  --shadow-lift: 0 16px 48px rgba(21, 23, 27, .16);
  --logo-light: block;
  --logo-dark: none;

  /* Compatibility aliases for existing screens */
  --bg-1: var(--page);
  --bg-2: var(--page);
  --ink: var(--text);
  --ink-2: var(--text-secondary);
  --muted: var(--text-muted);
  --hair: var(--border);
  --hair-2: var(--border-control);
  --surface-2: var(--surface-subtle);
  --sunken: var(--surface-inset);
  --panel: var(--surface);
  --panel-edge: var(--border);
  --field: var(--surface);
  --me: var(--surface-inset);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --text-small: 12px;
  --text-label: 14px;
  --text-body: 16px;
  --control-height: 44px;
  --radius-control: 6px;
  --radius-panel: 10px;
  --radius-dialog: 12px;
  --script: "Snell Roundhand", "Segoe Script", "Brush Script MT", "Apple Chancery", cursive;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-sm: var(--radius-control);
  --r: var(--radius-panel);
  --r-lg: var(--radius-panel);
  --r-xl: var(--radius-dialog);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #14191F;
    --accent-text: #FF9B9B;
    --surface: #1C232C;
    --surface-subtle: #1A212A;
    --surface-inset: #28323E;
    --text: #EDF1F7;
    --text-secondary: #C2CBD7;
    --text-muted: #A6B1BF;
    --border: #35404D;
    --border-control: #657386;
    --overlay: rgba(4, 8, 14, .64);
    --done: #8BD3B2;
    --done-soft: #24372E;
    --warn: #F0B45A;
    --warn-soft: #382E20;
    --danger: #FF8A7A;
    --danger-soft: #39292B;
    --strong-ink: #15171B;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .12);
    --shadow: 0 4px 16px rgba(0, 0, 0, .12);
    --shadow-lift: 0 16px 48px rgba(0, 0, 0, .32);
    --logo-light: none;
    --logo-dark: block;
  }
}

/* ── Base ──────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg-1);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { text-wrap: balance; letter-spacing: -.02em; }
p { text-wrap: pretty; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--brand-ring); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes bob { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-3px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* Compatibility hook; page backgrounds no longer use decorative layers. */
.scene { display: none; }

/* ── Primitives ────────────────────────────────────────────────────────── */

.mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; min-height: 32px; }
.mark .logo { width: 26px; height: 26px; object-fit: contain; flex: none; }
.mark .logo.light { display: var(--logo-light); }
.mark .logo.dark { display: var(--logo-dark); }
.mark .monogram { width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--strong); color: var(--strong-ink); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.mark .sub { color: var(--muted); font-weight: 500; padding-left: 10px; border-left: 1px solid var(--hair-2); }

/* .glass is retained for existing renderers; it now means an opaque panel. */
.glass, .surface { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), var(--shadow-sm); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: var(--control-height); padding: var(--space-3) var(--space-4); border-radius: var(--radius-control); border: 0;
  font-weight: 600; font-size: var(--text-label); line-height: 1.35; letter-spacing: -.005em;
  text-decoration: none; cursor: pointer; white-space: normal; overflow-wrap: anywhere; text-align: center; user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s, box-shadow .15s, opacity .15s;
}
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover:not([disabled]) { background: var(--action-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair-2), var(--shadow-sm); }
.btn-secondary:hover:not([disabled]) { background: var(--surface-2); }
.btn-quiet { background: var(--sunken); color: var(--ink); }
.btn-danger { background: var(--danger-action); color: var(--on-action); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 8px 12px; font-size: var(--text-small); }
.link-btn { background: none; border: 0; padding: 10px 2px; min-height: 44px; color: var(--ink-2); font-weight: 500; cursor: pointer; text-decoration: none; }
.link-btn:hover { color: var(--ink); }
.text-link { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--hair-2); text-underline-offset: 3px; }
.text-link:hover { text-decoration-color: currentColor; }

.field { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.field:first-child { margin-top: 0; }
.field label { font-weight: 600; font-size: var(--text-label); color: var(--ink); }
.field input, .field select, .field textarea, .input {
  min-height: var(--control-height); height: var(--control-height); padding: 10px 12px; border-radius: var(--radius-control); border: 1px solid var(--border-control);
  background: var(--field); font-size: var(--text-body); color: var(--ink); width: 100%; min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 120px; resize: vertical; }
.field input::placeholder, .input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--action-ring); }
.field [aria-invalid="true"], .input[aria-invalid="true"] { border-color: var(--danger); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent-text); }
.field .hint { font-size: 13.5px; color: var(--muted); margin: 0; }

.error { display: none; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--danger-soft); color: var(--danger); font-size: 14px; font-weight: 500; }
.error.show { display: block; animation: fade .2s ease-out; }
.notice { margin: 0 0 18px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--done-soft); color: var(--done); font-size: 14px; font-weight: 500; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
.skeleton { position: relative; overflow: hidden; background: var(--sunken); border-radius: 10px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: shimmer 1.4s infinite; }
@media (prefers-color-scheme: dark) { .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); } }

.line { height: 4px; border-radius: 4px; background: var(--hair); overflow: hidden; }
.line > i { display: block; height: 100%; background: var(--action); border-radius: 4px; transform-origin: left; animation: grow-x .9s var(--ease) both; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: var(--radius-control); font-size: var(--text-small); font-weight: 600; background: var(--sunken); color: var(--ink-2); white-space: nowrap; }
.pill.good { background: var(--done-soft); color: var(--done); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.here::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.here-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }

kbd { font: 600 12px/1 var(--font); color: var(--muted); min-width: 26px; height: 26px; padding: 0 6px; border-radius: 7px; display: inline-grid; place-items: center; box-shadow: inset 0 0 0 1px var(--hair-2); background: var(--surface-2); }

/* ── Site frame (front door, hub, expired) ─────────────────────────────── */

.site { min-height: 100%; display: flex; flex-direction: column; }
.site-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 1200px; margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 18px max(20px, env(safe-area-inset-left)); }
.site-top .actions { display: flex; align-items: center; gap: 6px; }
.site-foot { width: 100%; max-width: 1200px; margin: 0 auto; padding: 22px 20px calc(24px + var(--safe-b)); display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; font-size: 13px; color: var(--muted); }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

/* ── Candidate workspace: sign-in and hub ─────────────────────────────── */

.candidate-workspace { font-size: 14px; }
.workspace-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.workspace-header .site-top { max-width: 1120px; padding: max(20px, env(safe-area-inset-top)) max(32px, env(safe-area-inset-right)) 20px max(32px, env(safe-area-inset-left)); }
.workspace-header .mark { font-size: 14px; min-width: 0; }
.workspace-header .mark > span:not(.monogram):not(.sub) { min-width: 0; overflow-wrap: anywhere; }
.workspace-header .mark .sub { font-size: 12px; font-weight: 400; }
.workspace-header nav[aria-label="Careers"] { flex: none; }
.workspace-header .link-btn { font-size: 12px; }
.candidate-workspace .site-foot { max-width: 1120px; padding: 20px 32px calc(24px + var(--safe-b)); font-size: 12px; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.workspace-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .065em; color: var(--muted); margin: 0; }
.workspace-door { flex: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 72px; align-items: center; width: 100%; max-width: 1120px; margin: 0 auto; padding: 56px 56px 64px; }
.workspace-door h1 { max-width: 380px; font-size: clamp(30px, 3.3vw, 42px); font-weight: 650; line-height: 1.13; letter-spacing: -.04em; margin: 13px 0 18px; }
.workspace-door .intro { max-width: 360px; font-size: 14px; color: var(--muted); line-height: 1.7; margin: 0; }
.door-journey { list-style: none; padding: 0; margin: 30px 0 0; }
.door-journey li { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; position: relative; }
.door-journey li:not(:last-child)::after { content: ""; position: absolute; width: 1px; background: var(--border); left: 16px; top: 48px; bottom: -8px; }
.door-icon { flex: none; display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 12px; }
.door-journey strong { font-size: 13px; font-weight: 600; }
.door-journey p { font-size: 12px; color: var(--muted); margin: 3px 0 0; }
.signin { padding: 30px; border-radius: var(--radius-panel); min-width: 0; }
.signin-symbol { width: 36px; height: 36px; border-radius: 8px; background: var(--selected); color: var(--accent-text); display: grid; place-items: center; margin-bottom: 18px; }
.signin-symbol svg { width: 19px; height: 19px; }
.signin h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.025em; }
.signin .lead { margin: 9px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.signin .btn { width: 100%; margin-top: 14px; }
.signin .assure { display: flex; gap: 7px; align-items: flex-start; margin: 14px 0 0; font-size: 12px; color: var(--muted); }
.signin .assure svg { width: 14px; height: 14px; margin-top: 2px; flex: none; }
.signin .alt { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-direction: column; font-size: 12px; color: var(--muted); }
.signin .alt a { color: var(--ink); font-weight: 550; text-decoration: none; display: inline-flex; gap: 7px; align-items: center; }
.signin .row-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.signin .row-links button { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--ink-2); font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.signin .row-links button[disabled] { color: var(--muted); cursor: default; text-decoration: none; }
.code-input { letter-spacing: .4em; text-align: center; font-size: 24px !important; font-weight: 550; font-variant-numeric: tabular-nums; padding-left: calc(12px + .4em) !important; height: 55px !important; }
.workspace-nav { display: flex; gap: 28px; max-width: 1120px; padding: 0 32px; margin: 0 auto; }
.workspace-nav [role="tab"] { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 10px 0 13px; background: none; border: 0; border-bottom: 2px solid transparent; font-size: 13px; color: var(--muted); cursor: pointer; }
.workspace-nav [aria-selected="true"] { border-bottom-color: var(--accent-text); font-weight: 600; color: var(--ink); }
.workspace-nav [disabled] { cursor: default; }
.nav-count { font-size: 12px; border-radius: 4px; background: var(--surface-inset); padding: 0 5px; }
.nav-count:empty { display: none; }
.account-menu { position: relative; flex: none; }
.account-menu summary { display: flex; align-items: center; gap: 10px; min-height: 44px; list-style: none; cursor: pointer; font-size: 12px; color: var(--muted); }
.account-menu summary::-webkit-details-marker { display: none; }
.account-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-inset); color: var(--ink); font-weight: 600; }
#account-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-options { position: absolute; right: 0; top: calc(100% + 8px); width: 190px; z-index: 10; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--surface); box-shadow: var(--shadow-lift); }
.account-options .link-btn { width: 100%; text-align: left; padding: 10px 12px; border-radius: 4px; }
.account-options .link-btn:hover { background: var(--surface-inset); }
.account-options form { margin: 0; }
#account-content { overflow-wrap: anywhere; }
.workspace-main { width: 100%; max-width: 1120px; flex: 1; margin: 0 auto; padding: 32px 32px 40px; min-width: 0; }
.workspace-view { min-width: 0; }
.workspace-intro { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 27px; }
.workspace-intro h1 { font-size: clamp(25px, 3vw, 30px); letter-spacing: -.035em; font-weight: 650; line-height: 1.25; margin: 5px 0 8px; overflow-wrap: anywhere; }
.workspace-sub { font-size: 13px; color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.workspace-phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0 0 26px; }
.workspace-phases li { display: flex; align-items: center; gap: 7px; border-top: 3px solid var(--border); padding-top: 10px; font-size: 12px; color: var(--muted); }
.workspace-phases li.done { border-color: var(--done); color: var(--done); }
.workspace-phases li.current { border-color: var(--accent-text); color: var(--ink); font-weight: 600; }
.phase-icon svg { display: block; width: 17px; height: 17px; }
.phase-number { flex: none; width: 19px; height: 19px; border-radius: 50%; background: var(--surface-inset); display: grid; place-items: center; font-size: 12px; }
.current .phase-number { color: var(--accent-text); background: var(--selected); }
.workspace-focus { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-panel); overflow: hidden; margin-bottom: 25px; }
.workspace-next { padding: 28px; }
.workspace-next > .workspace-eyebrow { color: var(--accent-text); }
.workspace-next.is-held > .workspace-eyebrow { color: var(--warn); }
.workspace-next h2 { font-size: 24px; font-weight: 650; letter-spacing: -.025em; line-height: 1.3; margin: 12px 0 11px; }
.workspace-next-copy { font-size: 13px; color: var(--muted); line-height: 1.7; max-width: 420px; margin: 0; }
.workspace-next-action { margin-top: 23px; }
.workspace-role { padding: 27px 24px; border-left: 1px solid var(--border); background: var(--surface-subtle); }
.workspace-role h2 { font-size: 18px; line-height: 1.4; letter-spacing: -.02em; font-weight: 600; margin: 10px 0 8px; overflow-wrap: anywhere; }
.workspace-role-meta { font-size: 12px; color: var(--muted); margin: 8px 0; }
.workspace-role-pay { font-size: 14px; font-weight: 600; margin: 14px 0 0; }
.workspace-role-signed { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--done); margin: 15px 0; }
.workspace-role-signed svg { display: block; width: 15px; height: 15px; }
.workspace-role .text-link { font-size: 12px; display: inline-flex; align-items: center; min-height: 32px; }
.workspace-roadmap { border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--surface); overflow: hidden; }
.roadmap-header { padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); }
.roadmap-header h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.roadmap-header > span { font-size: 12px; color: var(--muted); }
.roadmap-group h3 { font-size: 12px; color: var(--muted); font-weight: 550; letter-spacing: 0; padding: 16px 24px 5px; margin: 0; }
.roadmap-group + .roadmap-group { border-top: 1px solid var(--border); }
.roadmap-steps { list-style: none; margin: 0; padding: 0; }
.roadmap-steps li { padding: 15px 24px; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.roadmap-steps li + li { border-top: 1px solid var(--border); }
.roadmap-steps li.current { background: var(--selected); }
.roadmap-icon { display: grid; place-items: center; margin-top: 2px; color: var(--muted); }
.roadmap-icon svg { width: 20px; height: 20px; }
.current > .roadmap-icon { color: var(--accent-text); }
.done > .roadmap-icon { color: var(--done); }
.roadmap-text strong { font-size: 13px; font-weight: 600; }
.roadmap-text p { font-size: 12px; color: var(--muted); margin: 3px 0 0; }
.roadmap-meta { font-size: 12px; color: var(--muted); white-space: nowrap; padding-top: 2px; }
.current > .roadmap-meta { color: var(--accent-text); }
.roadmap-complete { border-top: 1px solid var(--border); }
.roadmap-complete summary { display: flex; gap: 10px; align-items: center; padding: 15px 24px; min-height: 44px; cursor: pointer; list-style: none; color: var(--muted); font-size: 12px; }
.roadmap-complete summary::-webkit-details-marker { display: none; }
.roadmap-complete summary > span:first-child { display: flex; align-items: center; gap: 7px; flex: 1; }
.roadmap-complete .ic svg { display: block; width: 15px; height: 15px; }
.workspace-help { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-top: 23px; }
.workspace-help h2 { margin: 0 0 3px; font-size: 13px; font-weight: 600; letter-spacing: 0; }
.workspace-help p { font-size: 12px; color: var(--muted); margin: 0; }
.workspace-help .text-link { font-size: 12px; display: inline-flex; align-items: center; min-height: 44px; }
.application-list { display: grid; gap: 16px; }
.application-card { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--surface); min-width: 0; }
.application-card h2 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.4; margin: 0 0 8px; overflow-wrap: anywhere; }
.application-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.application-heading h2 { flex: 1 1 250px; }
.application-card > .workspace-eyebrow { margin-bottom: 9px; }
.application-following { font-size: 12px; color: var(--accent-text); margin: 0 0 8px; font-weight: 550; }
.application-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.application-actions .text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
.application-hint { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.workspace-empty { padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-panel); }
.workspace-empty h1 { font-size: 26px; letter-spacing: -.03em; }
.workspace-empty h2 { font-size: 19px; margin: 0 0 10px; }
.workspace-empty p:not(.workspace-eyebrow) { color: var(--muted); font-size: 13px; max-width: 540px; }
.workspace-empty .btn { margin-top: 14px; }
.danger-link { border: 0; background: none; color: var(--danger); padding: 12px 0; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; font-size: 13px; cursor: pointer; }

@media (max-width: 760px) {
  .workspace-door { grid-template-columns: 1fr; gap: 28px; padding: 30px 20px 40px; align-content: start; }
  .workspace-door h1 { max-width: 340px; font-size: 32px; }
  .workspace-door .intro { font-size: 13px; }
  .door-journey { display: none; }
  .signin { padding: 25px; }
  .workspace-header .site-top { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
  .workspace-header .mark .sub { display: none; }
  .candidate-workspace .site-foot { padding-left: 20px; padding-right: 20px; }
  .workspace-nav { padding: 0 20px; gap: 24px; }
  .workspace-main { padding: 26px 20px 32px; }
  .workspace-intro { align-items: flex-start; flex-direction: column; gap: 13px; }
  .workspace-phases { gap: 7px; }
  .workspace-phases li { align-items: flex-start; flex-direction: column; gap: 7px; }
  .workspace-focus { grid-template-columns: 1fr; }
  .workspace-next { padding: 24px 21px; }
  .workspace-next h2 { font-size: 23px; }
  .workspace-next-action .btn { width: 100%; }
  .workspace-role { border-left: 0; border-top: 1px solid var(--border); padding: 20px 21px; }
  .workspace-role h2 { font-size: 17px; }
  .roadmap-header { padding: 18px; flex-wrap: wrap; gap: 6px; }
  .roadmap-group h3 { padding-left: 18px; padding-right: 18px; }
  .roadmap-steps li { padding: 15px 18px; grid-template-columns: 21px minmax(0, 1fr); gap: 8px 11px; }
  .roadmap-meta { grid-column: 2; padding: 0; }
  .roadmap-complete summary { padding: 15px 18px; }
  .workspace-help { flex-direction: column; align-items: flex-start; gap: 6px; }
  .application-card { padding: 21px; }
  .account-menu summary #account-name { display: none; }
}

dialog.confirm { border: 0; border-radius: var(--r-lg); padding: 26px 24px 22px; width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lift); }
dialog.confirm[open] { animation: rise .25s var(--ease); }
dialog.confirm::backdrop { background: var(--overlay); }
dialog.confirm h2 { margin: 0; font-size: 20px; font-weight: 650; }
dialog.confirm p { color: var(--ink-2); margin: 10px 0 0; }
dialog.confirm .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
@media (min-width: 560px) { dialog.confirm .actions { flex-direction: row-reverse; } dialog.confirm .actions .btn { flex: 1; } }

/* ── Interview (web chat) ──────────────────────────────────────────────── */

.candidate-chat { overflow: hidden; }
.chat-app { height: 100dvh; display: flex; flex-direction: column; background: var(--bg-1); }
.chat-bar { min-height: 76px; flex: none; padding: max(16px, env(safe-area-inset-top)) 32px 16px; display: flex; justify-content: space-between; align-items: center; gap: 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.chat-bar .mark { font-size: 14px; min-width: 0; }
.chat-bar .mark > span:not(.monogram):not(.sub) { min-width: 0; overflow-wrap: anywhere; }
.chat-back { color: var(--ink-2); font-size: 13px; min-height: 44px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.chat-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); flex: 1; min-height: 0; max-width: 1440px; width: 100%; margin: 0 auto; border-inline: 1px solid var(--border); }
.chat-context { min-height: 0; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); padding: 30px 24px; display: flex; flex-direction: column; gap: 28px; }
.context-label { font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 0 0 10px; }
.chat-context h2 { font-size: 19px; line-height: 1.45; letter-spacing: -.025em; margin: 0 0 12px; overflow-wrap: anywhere; }
.context-status { font-size: 13px; color: var(--ink-2); margin: 0; }
.chat-phases { list-style: none; padding: 0; margin: 12px 0; }
.chat-phases li { display: flex; align-items: center; gap: 12px; padding: 12px 0; font-size: 14px; color: var(--ink-2); position: relative; }
.chat-phases li:not(:last-child)::after { content: ""; width: 1px; background: var(--border); position: absolute; left: 13px; top: 40px; bottom: -8px; }
.chat-phases .phase-node { width: 27px; height: 27px; border-radius: 50%; flex: none; background: var(--sunken); display: grid; place-items: center; font-size: 12px; }
.chat-phases .done .phase-node { background: var(--done-soft); color: var(--done); }
.chat-phases .current { color: var(--ink); font-weight: 600; }
.chat-phases .current .phase-node { background: var(--selected); color: var(--accent-text); }
.chat-context .link-btn { text-align: left; font-size: 13px; }
.context-foot { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--border); }
.context-foot > p { color: var(--ink-2); font-size: 12px; line-height: 1.65; margin: 16px 0 0; }
.who { display: flex; align-items: center; gap: 10px; }
.who b { display: block; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.who span { font-size: 12px; color: var(--ink-2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center; font-weight: 650; background: var(--sunken); color: var(--ink); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-conversation { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.conversation-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: 22px 32px 20px; flex: none; }
.conversation-heading { display: flex; align-items: center; gap: 12px; }
.assistant-symbol { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border-radius: 10px; color: var(--accent-text); background: var(--selected); font-size: 22px; }
.conversation-heading h1 { font-size: 16px; font-weight: 650; margin: 0; }
.conversation-heading p { font-size: 12px; color: var(--ink-2); margin: 3px 0 0; }
#connection { margin-left: auto; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
#connection[data-state="connected"] { color: var(--done); }
#connection::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.mobile-role, .mobile-journey { display: none; }
.chat-progress { margin: 20px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; font-size: 12px; color: var(--ink-2); }
.chat-progress .line { grid-column: 1 / -1; height: 3px; }
.chat-progress #progress-label { color: var(--ink); font-weight: 500; }
.chat-progress[hidden] { display: none; }
.thread { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 28px 32px 12px; }
.thread-col { max-width: 760px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; min-width: 0; }
.chat-loading { text-align: center; color: var(--ink-2); font-size: 14px; padding: 24px; }
.stamp { align-self: center; font-size: 12.5px; color: var(--muted); margin: 8px 0 14px; }
.say { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; margin: 0 0 16px; animation: rise .35s var(--ease) both; }
.say + .say { margin-top: -6px; }
.say + .say .bot-av { visibility: hidden; }
.bot-av { width: 30px; height: 30px; border-radius: 9px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); display: grid; place-items: center; }
.bot-av img { width: 17px; height: 17px; object-fit: contain; }
.say .text { font-size: 16px; line-height: 1.6; padding-top: 3px; white-space: pre-line; overflow-wrap: anywhere; }
.me { align-self: flex-end; max-width: 82%; margin: 2px 0 20px; background: var(--me); padding: 10px 16px; border-radius: 18px 18px 6px 18px; font-size: 15.5px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; animation: rise .25s var(--ease) both; }
.no-anim .say, .no-anim .me, .no-anim .qcard { animation: none; }

/* A question: one focused card */
.qcard { margin: 4px 0 22px 44px; border-radius: 12px; padding: 24px; animation: rise .45s var(--ease) both; }
.qcard .k { font-size: 12px; font-weight: 600; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.qcard h3 { font-size: 21px; line-height: 1.3; letter-spacing: -.025em; font-weight: 650; margin: 8px 0 20px; white-space: pre-line; }
.opts { display: grid; gap: 10px; }
.qcard.type-choice:not(.answered) .opts, .qcard.type-yes_no:not(.answered) .opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 10px 16px; border-radius: var(--radius-control); border: 0; width: 100%; text-align: left;
  background: var(--field); box-shadow: inset 0 0 0 1px var(--hair-2); font-size: 16px; font-weight: 500; cursor: pointer;
  transition: box-shadow .15s, transform .12s var(--ease), background-color .15s; -webkit-tap-highlight-color: transparent; }
.opt:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
.opt:active { transform: scale(.99); }
.opt.on { background: var(--selected); box-shadow: inset 0 0 0 1.5px var(--accent-text); }
.opt[aria-pressed="true"] { background: var(--selected); box-shadow: inset 0 0 0 1.5px var(--accent-text); }
.question-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.opt.on kbd { background: var(--action); color: #fff; box-shadow: none; }
.opt .lbl { flex: 1; }
.opt .lbl small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.qcard .foot { margin-top: 16px; font-size: 13px; color: var(--muted); }
.qcard .help { margin: -10px 0 18px; font-size: 14.5px; color: var(--muted); white-space: pre-line; }
.qcard .actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.qcard.answered { opacity: .6; pointer-events: none; padding: 18px 22px; box-shadow: inset 0 0 0 1px var(--hair); background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.qcard.answered h3 { font-size: 16.5px; margin: 4px 0 12px; }
.qcard.answered h3:last-child { margin-bottom: 0; }
.qcard.answered .opt { min-height: 46px; }
.qcard.answered .opt:not(.on) { display: none; }

/* Quick replies that aren't a question, and buttons */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 18px 44px; animation: rise .35s .05s var(--ease) both; }
.chip { min-height: 44px; padding: 0 15px; border-radius: var(--radius-control); border: 0; background: var(--surface); color: var(--ink); font-size: 14.5px; font-weight: 500; cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--hair-2), var(--shadow-sm); transition: box-shadow .15s, transform .12s; }
.chip:hover { box-shadow: inset 0 0 0 1px var(--ink-2), var(--shadow-sm); }
.chip:active { transform: scale(.98); }
.chip[aria-pressed="true"] { background: var(--selected); box-shadow: inset 0 0 0 1.5px var(--accent-text); }
.actions-card { margin: -2px 0 18px 44px; display: flex; flex-wrap: wrap; gap: 10px; }
.offer-card { margin: 0 0 18px 44px; border-radius: 12px; overflow: hidden; max-width: 520px; }
.offer-card .head { padding: 20px 22px 18px; border-bottom: 1px solid var(--hair); }
.offer-card .head b { display: block; font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.offer-card .head span { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.offer-card .acts { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 22px 18px; }
.carousel { margin: 0 -20px 18px 24px; padding: 2px 20px 8px; display: flex; gap: 12px; min-width: 0; max-width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.carousel::-webkit-scrollbar { display: none; }
.carousel .offer-card { margin: 0; flex: 0 0 min(280px, 78vw); scroll-snap-align: start; }

.typing { display: inline-flex; gap: 5px; padding: 10px 2px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bob 1.1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }

.composer-wrap { padding: 12px 32px calc(18px + var(--safe-b)); flex: none; }
.composer { max-width: 760px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px; padding: 7px 7px 7px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--hair-2); }
.composer textarea { flex: 1; min-width: 0; border: 0; background: none; resize: none; padding: 10px 0; max-height: 140px; font-size: 16px; line-height: 1.45; color: var(--ink); }
.composer:focus-within { border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--action-ring); }
.composer textarea:focus { outline: none; }
.composer textarea::placeholder { color: var(--muted); }
.composer-note { max-width: 760px; margin: 10px auto 0; display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); font-size: 12px; }
.composer-note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.send { width: 44px; height: 44px; flex: none; border-radius: var(--radius-control); border: 0; display: grid; place-items: center; background: var(--action); color: var(--on-action); cursor: pointer; transition: opacity .15s; }
.send:disabled { background: var(--sunken); color: var(--ink-2); cursor: default; }
.send svg { width: 18px; height: 18px; }
.banner { display: none; padding: 12px 32px; background: var(--warn-soft); color: var(--ink); font-size: 13px; line-height: 1.6; border-bottom: 1px solid var(--border); flex: none; }
.banner.show { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.banner .link-btn { font-size: 13px; flex: none; padding: 0 4px; }
.candidate-chat .jcard { border-radius: 12px; }
.candidate-chat .jnow { border-radius: 8px; box-shadow: none; border: 1px solid var(--border); }

/* The journey drawer (all sizes) */
.drawer { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.drawer .shade { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .25s; }
.drawer .sheet-panel { position: absolute; top: 10px; right: 10px; bottom: 10px; width: min(380px, calc(100vw - 20px)); border-radius: 22px; padding: 22px; overflow-y: auto;
  transform: translateX(calc(100% + 20px)); transition: transform .32s var(--ease); background: var(--surface); box-shadow: var(--shadow-lift); }
.drawer.open { pointer-events: auto; }
.drawer.open .shade { opacity: 1; }
.drawer.open .sheet-panel { transform: none; }
.drawer .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.drawer .head h2 { margin: 0; font-size: 18px; font-weight: 650; }
.icon-btn { width: 44px; height: 44px; border-radius: var(--radius-control); border: 0; background: var(--sunken); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.trail-btn { min-height: 38px; padding: 0 12px; border-radius: var(--radius-control); border: 0; background: var(--sunken); color: var(--ink); font-weight: 600; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.trail-btn svg { width: 15px; height: 15px; }
.trail-btn .short { display: none; }

/* Sheets open over the chat */
.overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: end center; pointer-events: none; visibility: hidden; transition: visibility 0s .35s; }
.overlay .shade { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .25s; }
.overlay .frame-wrap { position: relative; width: min(560px, 100vw); height: min(88dvh, 860px); border-radius: var(--radius-dialog) var(--radius-dialog) 0 0; overflow: hidden; background: var(--surface);
  transform: translateY(100%); transition: transform .35s var(--ease); box-shadow: var(--shadow-lift); }
.overlay iframe { width: 100%; height: 100%; border: 0; display: block; background: transparent; }
.overlay .close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.overlay.open { pointer-events: auto; visibility: visible; transition: none; }
.overlay.open .shade { opacity: 1; }
.overlay.open .frame-wrap { transform: none; }
@media (min-width: 720px) {
  .overlay { place-items: center; }
  .overlay .frame-wrap { border-radius: var(--radius-dialog); transform: translateY(24px) scale(.98); opacity: 0; transition: transform .3s var(--ease), opacity .2s; }
  .overlay.open .frame-wrap { transform: none; opacity: 1; }
}
.drawer { visibility: hidden; transition: visibility 0s .35s; }
.drawer.open { visibility: visible; transition: none; }

@media (max-width: 900px) {
  .chat-layout { grid-template-columns: 224px minmax(0, 1fr); }
  .chat-context { padding: 24px 18px; }
  .conversation-head { padding: 22px 24px 18px; }
  .thread { padding: 24px 22px 12px; }
  .composer-wrap { padding-inline: 22px; }
}
@media (max-width: 720px) {
  .chat-bar { min-height: 62px; padding: max(10px, env(safe-area-inset-top)) 18px 10px; gap: 12px; }
  .chat-bar .mark .sub, .chat-back > span { display: none; }
  .chat-layout { display: flex; border: 0; }
  .chat-context { display: none; }
  .chat-conversation { flex: 1; }
  .conversation-head { padding: 18px 18px 14px; }
  .conversation-heading { gap: 9px; }
  .conversation-heading h1 { font-size: 15px; }
  .conversation-heading p { display: none; }
  .assistant-symbol { width: 32px; height: 32px; font-size: 19px; }
  #connection { font-size: 12px; }
  .mobile-role { display: block; font-size: 12px; color: var(--ink-2); margin: 14px 0 0; overflow-wrap: anywhere; }
  .mobile-journey { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 18px; min-height: 44px; border: 0; border-bottom: 1px solid var(--border); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12px; text-align: left; }
  .mobile-journey > span:last-child { white-space: nowrap; }
  .chat-progress { margin-top: 16px; }
  .thread { padding: 22px 16px 8px; }
  .say { grid-template-columns: 24px minmax(0, 1fr); gap: 10px; }
  .say .text { font-size: 15px; }
  .bot-av { width: 24px; height: 24px; border-radius: 6px; }
  .qcard { margin-left: 0; padding: 20px 18px; border-radius: 10px; }
  .qcard h3 { font-size: 19px; }
  .qcard.type-choice:not(.answered) .opts, .qcard.type-yes_no:not(.answered) .opts { grid-template-columns: 1fr; }
  .chips, .actions-card, .offer-card { margin-left: 0; }
  .carousel { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .qcard kbd, .qcard .foot.keys { display: none; }
  .composer-wrap { padding: 8px 16px calc(12px + var(--safe-b)); }
  .banner { padding: 10px 18px; }
}

/* ── Sheets (hours, review, offer, status) ─────────────────────────────── */

.candidate-sheet { background: var(--bg-1); }
.sheet-top { min-height: 76px; background: var(--surface); border-bottom: 1px solid var(--border); padding: max(16px, env(safe-area-inset-top)) 32px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sheet-top .mark { font-size: 14px; min-width: 0; }
.sheet-top .mark > span:not(.monogram):not(.sub) { overflow-wrap: anywhere; min-width: 0; }
.sheet-top > span { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.sheet { min-height: 460px; display: flex; flex-direction: column; max-width: 680px; margin: 32px auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); }
.sheet-header { padding: 30px 30px 24px; border-bottom: 1px solid var(--border); }
.sheet-kicker { font-size: 12px; font-weight: 600; color: var(--accent-text); margin: 0 0 10px; }
.sheet-title { font-size: 28px; line-height: 1.25; font-weight: 650; margin: 0; letter-spacing: -.035em; overflow-wrap: anywhere; }
.sheet-lead { color: var(--ink-2); margin: 10px 0 0; font-size: 15px; line-height: 1.65; }
.sheet-role { font-size: 12px; color: var(--ink-2); margin: 18px 0 0; padding-left: 12px; border-left: 2px solid var(--border); overflow-wrap: anywhere; }
.sheet-body { flex: 1; min-width: 0; padding: 26px 30px 30px; animation: fade .3s ease-out; }
.sheet-footer { position: sticky; bottom: 0; padding: 20px 30px calc(20px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; background: var(--surface); border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; z-index: 2; }
.sheet-footer .error { margin-top: 0; }
.sheet-note { font-size: 13px; color: var(--ink-2); text-align: center; margin: 0; line-height: 1.65; }
.sheet-outside { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.sheet-outside .site-foot { margin-top: 0; font-size: 12px; }
.sheet-section h2, .review-group h2 { font-size: 16px; margin: 0 0 8px; font-weight: 600; letter-spacing: -.02em; }
.section-help { font-size: 13px; color: var(--ink-2); margin: 0 0 18px; line-height: 1.65; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.presets .chip { min-height: 44px; font-size: 12px; padding: 8px 12px; }
.hours { display: grid; grid-template-columns: 44px repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; }
.hours .col-head { font-size: 12px; font-weight: 500; color: var(--ink-2); text-align: center; padding-bottom: 8px; }
.hours .day { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.slot { height: 48px; position: relative; border-radius: 6px; background: var(--field); border: 1px solid var(--hair-2); cursor: pointer; display: grid; place-items: center; color: transparent; transition: background-color .15s, border-color .15s; }
.slot input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
.slot svg { width: 18px; height: 18px; pointer-events: none; }
.slot:has(input:checked) { background: var(--selected); color: var(--accent-text); border-color: var(--accent-text); }
.slot:has(input:focus-visible) { outline: 3px solid var(--action-ring); outline-offset: 3px; }
.slot:has(input:disabled) { cursor: wait; opacity: .7; }
.summary { margin: 0; font-size: 13px; color: var(--ink-2); text-align: center; line-height: 1.6; }
.summary strong { color: var(--ink); }
.review-summary { background: var(--sunken); border-radius: 6px; padding: 12px 14px; color: var(--ink-2); font-size: 13px; margin-bottom: 24px; }
.review-groups { display: grid; gap: 26px; }
.answers { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.answers li { display: flex; align-items: flex-start; gap: 16px; padding: 18px; border-bottom: 1px solid var(--border); }
.answers li:last-child { border-bottom: 0; }
.answers .grow { flex: 1; min-width: 0; }
.answers .q { margin: 0; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.answers .a { margin: 6px 0 0; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-line; }
.answers .btn { min-height: 44px; padding: 0 12px; font-size: 13px; }
.offer-notice { font-size: 13px; line-height: 1.65; padding: 14px 16px; border-radius: 6px; background: var(--warn-soft); color: var(--ink); margin: 20px 0 0; }
.embedded .sheet-top, .embedded .sheet-outside { display: none; }
.embedded .sheet { margin: 0; border: 0; border-radius: 0; box-shadow: none; min-height: 100dvh; max-width: none; }
@media (max-width: 720px) {
  .sheet-top { padding: max(12px, env(safe-area-inset-top)) 18px 12px; min-height: 64px; }
  .sheet-top .mark .sub { display: none; }
  .sheet { margin: 20px 16px; }
  .sheet-header { padding: 24px 20px 20px; }
  .sheet-title { font-size: 25px; }
  .sheet-body { padding: 22px 20px 24px; }
  .sheet-footer { padding: 18px 20px calc(18px + var(--safe-b)); }
  .hours { grid-template-columns: 32px repeat(3, minmax(0, 1fr)); gap: 6px; }
  .hours .col-head { font-size: 12px; overflow-wrap: anywhere; }
  .answers li { padding: 14px; gap: 10px; }
}

/* Offer sheet: the offer at a glance, the letter, and signing. */
.of-glance { border-radius: 8px; padding: 22px; background: var(--surface-2); border: 1px solid var(--border); }
.of-glance .pay { margin: 0; font-size: 36px; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.of-glance .pay small { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.of-glance .paynote { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.of-glance dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--hair); }
.of-glance dt { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.of-glance dd { overflow-wrap: anywhere; margin: 2px 0 0; font-size: 14.5px; font-weight: 600; }
.of-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 2px 10px; font-size: 14px; font-weight: 600; }
.of-label a { font-weight: 500; color: var(--accent-text); text-decoration: none; font-size: 13.5px; }
.of-letter { background: var(--surface); border-radius: 8px; border: 1px solid var(--border); overflow-wrap: anywhere; padding: 26px 24px 28px; font-size: 15px; line-height: 1.65; }
.of-letterhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--hair); margin-bottom: 20px; }
.of-letterhead .co { font-weight: 650; display: flex; gap: 8px; align-items: center; }
.of-letterhead .co i { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--brand); }
.of-letterhead .meta { text-align: right; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.of-letter p { margin: 0 0 14px; }
.of-letter h3 { font-size: 14.5px; font-weight: 650; margin: 22px 0 6px; letter-spacing: -.01em; }
.of-letter ul { margin: 0 0 14px; padding-left: 18px; }
.of-letter li { margin: 3px 0; }
.of-from { margin-top: 22px; }
.of-from p { margin: 0; }
.of-from .who { font-weight: 600; margin-top: 10px; }
.of-from .role { color: var(--muted); font-size: 14px; }
.of-signed { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--hair); }
.of-signed h3 { margin-top: 0; }
.of-signed .grid { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: end; margin-top: 10px; }
.of-signed .ink { grid-column: 1 / -1; font-family: var(--script); font-size: 30px; line-height: 1.1; min-height: 36px; }
.of-signed .ink img { height: 56px; }
.of-signed .k { font-size: 12.5px; color: var(--muted); }
.of-signed .v { font-size: 14px; font-weight: 600; }
.of-accept { margin-top: 24px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); padding: 20px; }
.of-accept h3 { margin: 0 0 4px; font-size: 16px; font-weight: 650; }
.of-accept .sub { margin: 0; color: var(--ink-2); font-size: 14px; }
.of-tabs { display: inline-flex; background: var(--sunken); border-radius: var(--radius-control); padding: 3px; margin: 16px 0 8px; }
.of-tabs button { border: 0; background: none; font: inherit; font-size: 13.5px; color: var(--ink-2); padding: 8px 16px; min-height: 44px; border-radius: 4px; cursor: pointer; }
.of-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.of-pad { position: relative; height: 150px; border-radius: var(--r); background: #fff; border: 1px dashed #8994a3; touch-action: none; }
.of-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; color: #19232f; }
.of-pad .base { position: absolute; left: 18px; right: 18px; bottom: 34px; border-bottom: 1px solid #cfd5dd; pointer-events: none; }
.of-pad .hint { position: absolute; left: 18px; bottom: 12px; font-size: 12px; color: #626d7b; pointer-events: none; }
.of-pad .clear { min-height: 44px; position: absolute; right: 10px; top: 10px; border: 0; background: #edf0f4; color: #19232f; font: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 6px; cursor: pointer; }
.of-typed { height: 150px; border-radius: var(--r); background: var(--surface-2); border: 1px dashed var(--hair-2); display: flex; align-items: center; padding: 0 18px; font-family: var(--script); font-size: 34px; overflow-wrap: anywhere; overflow: auto; white-space: normal; }
.of-typed:empty::before { content: "Your signature appears here"; font-family: var(--font); font-size: 14px; color: var(--muted); }
.of-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 14px; color: var(--ink-2); line-height: 1.45; cursor: pointer; }
.of-consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent-text); flex: none; }
.of-decline-link { min-height: 44px; background: none; border: 0; font: inherit; font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 4px; align-self: center; }
.of-reasons { display: grid; gap: 8px; margin: 4px 0 16px; }
.of-reason { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer; font-size: 15px; }
.of-reason:has(input:checked) { box-shadow: inset 0 0 0 2px var(--accent-text); }
.of-reason input { accent-color: var(--accent-text); width: 18px; height: 18px; margin: 0; }
.of-note { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--hair-2); border-radius: var(--r-sm); padding: 12px 14px; resize: vertical; }
.of-note:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 4px var(--action-ring); }
.of-pill { display: inline-flex; align-items: center; gap: 6px; color: var(--done); background: var(--done-soft); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; }
.of-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.of-next { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.of-next li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); font-size: 14.5px; }
.of-next .n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; font-size: 12.5px; font-weight: 650; }
.of-next strong { display: block; font-weight: 600; }
.of-next .d { color: var(--muted); font-size: 13.5px; }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 14px; position: relative; padding-bottom: 20px; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 28px; bottom: 4px; width: 2px; background: var(--hair); }
.steps li.done:not(:last-child)::before { background: var(--hair-2); }
.steps .dot { flex: none; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--hair-2); background: var(--surface); display: grid; place-items: center; color: var(--done-soft); position: relative; z-index: 1; }
.steps .done .dot { background: var(--done); box-shadow: none; }
.steps .current .dot { box-shadow: inset 0 0 0 2px var(--brand), 0 0 0 4px var(--brand-ring); }
.steps .t { margin: 0; font-weight: 600; font-size: 15px; line-height: 24px; }
.steps .next .t { color: var(--muted); font-weight: 500; }
.steps .s { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.steps .progress.bar { height: 4px; border-radius: 4px; background: var(--hair); margin-top: 8px; overflow: hidden; max-width: 220px; }
.steps .progress.bar > span { display: block; height: 100%; background: var(--strong); }
.step-link { margin-top: 10px; min-height: 40px !important; padding: 0 14px !important; font-size: 14px !important; }

.done-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 28px; animation: rise .4s var(--ease) both; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--done-soft); color: var(--done); margin-bottom: 20px; }
.done-icon svg { width: 30px; height: 30px; }
.done-screen h2 { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -.025em; }
.done-screen p { margin: 10px 0 0; color: var(--ink-2); max-width: 36ch; }
.done-screen .btn { margin-top: 22px; }
.up-next .k .ic svg { width: 16px; height: 16px; display: block; }
.site-foot .links { display: flex; gap: 18px; flex-wrap: wrap; }
.panel > .toggle { background: none; border: 0; padding: 12px 0 0; min-height: 40px; color: var(--ink-2); font-weight: 600; font-size: 14px; cursor: pointer; }
.panel > .toggle:hover { color: var(--ink); }
@media (max-width: 480px) { .site-top .hide-sm { display: none; } .mark .sub { display: none; } }

/* ── Expired link ──────────────────────────────────────────────────────── */

.expired { flex: 1; display: grid; place-items: center; padding: 24px 20px 64px; }
.expired-card { width: min(460px, 100%); border-radius: var(--r-xl); padding: 36px 32px 30px; text-align: center; animation: rise .5s var(--ease) both; }
.expired-card h1 { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -.025em; }
.expired-card p { margin: 10px auto 0; color: var(--ink-2); max-width: 36ch; }
.expired-card .done-icon { margin: 0 auto 20px; }
.muted-icon { background: var(--sunken); color: var(--ink-2); }
.expired-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
.embedded .expired-top, .embedded .expired-actions .btn-secondary { display: none; }
.embedded .expired-card { box-shadow: none; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* A sheet inside the chat: the chat's close button sits top right. */
.embedded .sheet-header { padding-top: 28px; padding-right: 72px; }
.embedded .scene::before { display: none; }

/* "Your next steps" in the chat */
.jcard { margin: 2px 0 18px 44px; border-radius: 22px; padding: 22px 24px 18px; animation: rise .45s var(--ease) both; }
.jcard header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.jcard h3 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.jcard header .num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.jcard > .line { margin-top: 12px; }
.jnow { margin: 18px 0 6px; padding: 18px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair), var(--shadow-sm); }
.jnow .k { display: flex; align-items: center; gap: 9px; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.jnow b { display: block; font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.jnow p:not(.k) { margin: 4px 0 0; color: var(--ink-2); font-size: 14.5px; }
.jnow .acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.jnow.is-held .k { color: var(--warn); }
.jnow.is-done b { color: var(--done); }
.jlist { list-style: none; margin: 4px 0 0; padding: 0; }
.jlist li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--hair); font-size: 15px; }
.jlist li:last-child { border-bottom: 0; }
.jlist + .jlist { border-top: 1px solid var(--hair); }
.jlist .ic { width: 20px; height: 20px; flex: none; display: grid; place-items: center; color: var(--muted); }
.jlist .ic svg { width: 19px; height: 19px; }
.jlist .t { flex: 1; min-width: 0; }
.jlist .meta { font-size: 12.5px; color: var(--muted); }
.jlist li.done .ic { color: var(--done); }
.jlist li.done .t { color: var(--ink-2); }
.jlist li.now .t { font-weight: 600; }
.jlist li.now .ic { color: var(--ink); }
.jlist li.held .ic { color: var(--warn); }
.jlist li.later .t { color: var(--muted); }
.jtoggle { background: none; border: 0; padding: 10px 2px 2px; min-height: 40px; color: var(--ink-2); font-weight: 600; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.jtoggle svg { width: 15px; height: 15px; transition: transform .2s; }
.jtoggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.jmore { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--hair); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.jmore svg { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.jmore:hover svg { transform: translateX(2px); color: var(--ink); }
@media (max-width: 720px) { .jcard { margin-left: 0; padding: 20px 18px 16px; border-radius: 20px; } }

/* The status sheet */
.status-sum { padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair), var(--shadow-sm); }
.status-sum .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.status-sum b { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.status-sum .num { font-size: 13px; color: var(--muted); }
.sheet-body .jnow { margin: 14px 0 4px; }
.status-group { margin-top: 22px; }
.status-group h2 { margin: 0 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.status-group .jtoggle { padding-top: 4px; }

/* Bank question types */
.qcard .k { display: flex; justify-content: space-between; gap: 12px; }
.qcard .k .sec { color: var(--ink-2); font-weight: 600; text-align: right; }
.qcard .passage { margin: -6px 0 20px; padding: 14px 16px; border-radius: 12px; background: var(--sunken); color: var(--ink); font-size: 15px; line-height: 1.55; white-space: pre-line; font-variant-numeric: tabular-nums; }
.opts.scale { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.opts.scale .opt { justify-content: center; text-align: center; padding: 10px 6px; min-height: 52px; font-size: 14.5px; }
.opts.multi .opt .tick { width: 22px; height: 22px; flex: none; border-radius: 7px; box-shadow: inset 0 0 0 1.5px var(--hair-2); display: grid; place-items: center; transition: background-color .15s; }
.opts.multi .opt[aria-pressed="true"] { background: var(--selected); box-shadow: inset 0 0 0 1.5px var(--accent-text); }
.opts.multi .opt[aria-pressed="true"] .tick { background: var(--action); box-shadow: none; }
.opts.multi .opt[aria-pressed="true"] .tick::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.qcard .foot.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qcard .state-pick { display: flex; gap: 10px; }
.qcard .state-pick .input { flex: 1; height: 50px; }
.qcard .state-err { margin: 10px 0 0; color: var(--danger); }
.qcard.type-typing .foot { margin-top: 10px; }
.section-mark { align-self: stretch; display: flex; align-items: center; gap: 12px; margin: 10px 0 16px; font-size: 13px; font-weight: 600; color: var(--muted); }
.section-mark::before, .section-mark::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
@media (max-width: 720px) {
  .qcard .k .sec { display: none; }
  .opts.scale { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .opts.scale .opt .lbl { font-size: 13px; }
  .qcard .state-pick { flex-direction: column; }
}

/* Answer sheets */
.multi-choice { position: relative; }
.multi-choice input { width: 20px; height: 20px; flex: none; accent-color: var(--accent-text); margin: 0; }
.multi-choice:has(input:checked) { background: var(--selected); box-shadow: inset 0 0 0 1.5px var(--accent-text); }
.multi-choice:has(input:focus-visible) { outline: 3px solid var(--action-ring); outline-offset: 3px; }
.multi-choice:has(input:disabled) { opacity: .7; cursor: wait; }
.state-list { margin-top: 12px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); overflow: hidden; }
.state-row { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--hair); background: none; color: var(--ink); font-size: 15.5px; text-align: left; cursor: pointer; }
.state-row:last-child { border-bottom: 0; }
.state-row[aria-pressed="true"] { font-weight: 600; color: var(--accent-text); }
.state-row svg { width: 14px; height: 14px; }
.sheet-body .passage { margin: 0 0 14px; padding: 16px; border-radius: 14px; background: var(--sunken); font-size: 16px; line-height: 1.6; }
.typing-passage { user-select: none; -webkit-user-select: none; }
.typing-box { height: auto !important; min-height: 150px; padding: 14px 16px !important; line-height: 1.55; resize: vertical; font-size: 16px !important; }
.typing-stats { margin-top: 12px; text-align: left; font-variant-numeric: tabular-nums; }
.sheet-footer .link-btn { min-height: 44px; }

/* Shared touch geometry, including controls created by the sheet renderers. */
@media (max-width: 720px), (pointer: coarse) {
  .btn-sm, .chip, .icon-btn, .trail-btn, .of-tabs button, .of-pad .clear,
  .of-decline-link, .sheet-footer .link-btn, .answers .btn, .journey .toggle,
  .jtoggle, .panel > .toggle, .signin .row-links button, .danger-link {
    min-height: var(--control-height);
  }
  .icon-btn, .send { width: var(--control-height); height: var(--control-height); }
}
