/* Modernist design system (Claude Design): tokens copied from its styles.css, the rest mirrors PortalTalleristes. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/archivo-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-accent: #ec3013;
  --color-divider: color-mix(in srgb, #201e1d 40%, transparent);
  --color-neutral-300: #d7d3d3;
  --color-neutral-700: #605d5d;
  --color-neutral-800: #444141;
  --color-neutral-900: #2d2b2b;
  --color-accent-100: #fff2ef;
  --color-accent-600: #dd2b0f;
  --color-accent-700: #ae1800;
  --color-accent-800: #7c1405;
  --color-accent-900: #4d170e;
  --font-heading: 'Archivo', system-ui, sans-serif;
  --font-body: 'Archivo', system-ui, sans-serif;
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2d2b2b 22%, transparent);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--color-bg); }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.5;
  text-wrap: pretty;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3 { font-family: var(--font-heading); font-weight: 800; margin: 0; }
p { margin: 0; }
a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-800); }
button { font-family: inherit; }
svg { display: block; flex: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
[hidden] { display: none !important; }

/* — layout helpers — */
.grow { flex: 1; }
.min0 { min-width: 0; }
.column { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-2 { gap: 2px; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-40 { gap: 40px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.self-start { align-self: flex-start; }
.mt-2 { margin-top: 2px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-all { word-break: break-all; font-size: 18px; }
.small { font-size: 14px; }
.muted { color: var(--color-neutral-700); }
.accent { color: var(--color-accent); }
.ink { color: var(--color-text); }
.big { font-size: 17px; }
.lead { font-size: 16px; color: var(--color-neutral-800); }
.lead-sm { font-size: 15px; color: var(--color-neutral-800); }
.hint { font-size: 14px; color: var(--color-neutral-700); }
.hint-sm { font-size: 13px; color: var(--color-neutral-700); }
.surface { background: var(--color-surface); }
.rule { height: 2px; background: var(--color-divider); }

/* — buttons: flush-left labels, zero radius — */
.pt-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-weight: 800;
  text-align: left;
  text-decoration: none;
}
.pt-btn:hover { filter: brightness(0.95); }
.pt-btn:active { filter: brightness(0.88); }
.pt-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.pt-row:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); filter: none; }
.btn-primary { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { color: var(--color-bg); }
.btn-outline { border: 2px solid var(--color-divider); }
.btn-xl { width: 100%; min-height: 64px; padding: 0 20px; font-size: 18px; gap: 14px; }
.btn-lg { width: 100%; min-height: 56px; padding: 0 20px; font-size: 18px; gap: 12px; }
.btn-md { width: 100%; min-height: 48px; padding: 0 20px; font-size: 16px; }
.btn-sm { min-height: 48px; padding: 0 18px; font-size: 15px; gap: 8px; }
.link-btn { min-height: 44px; padding: 0 10px; color: var(--color-accent-700); font-size: 15px; white-space: nowrap; }
.link-btn:hover { color: var(--color-accent-800); }
.small-btn { font-size: 14px; gap: 6px; }
.icon-btn { width: 48px; height: 48px; justify-content: center; margin: -8px -8px 0 0; }

/* — entry and no-access screens — */
.narrow { min-height: 100vh; max-width: 460px; margin: 0 auto; padding: 56px 24px 40px; display: flex; flex-direction: column; }
.logo-slot {
  width: 80px; height: 80px; border: 2px dashed var(--color-divider);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-700);
}
.title { font-size: 30px; line-height: 1.1; letter-spacing: -0.015em; }
.entry-title { margin: 28px 0 8px; }
.denied-title { margin: 12px 0 16px; }
.subtitle { font-size: 17px; color: var(--color-neutral-700); }
.entry-rule { margin: 32px 0 28px; }
.entry-rule-bottom { margin: 32px 0 20px; }
.denied-rule { margin: 28px 0 24px; }
.entry-hint { margin-top: 20px; }
.google { gap: 14px; }
.google-g {
  width: 28px; height: 28px; background: var(--color-bg); color: var(--color-accent);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex: none;
}
.privacy { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--color-neutral-800); }
.privacy-icon { margin-top: 2px; }
.eyebrow { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-neutral-700); }
.eyebrow-small { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-neutral-700); }
.signed-as { padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; }
.denied-help { margin-top: 20px; }
.mail-btn { min-height: 52px; font-size: 16px; color: var(--color-text); }
.small-notice { margin-bottom: 16px; }

/* — home — */
.topbar { display: flex; align-items: center; gap: 16px; padding: 10px 20px; border-bottom: 2px solid var(--color-divider); }
.brand { font-family: var(--font-heading); font-weight: 800; font-size: 16px; margin-right: auto; white-space: nowrap; }
.who { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; max-width: 60%; line-height: 1.25; }
.who-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.who-email { font-size: 13px; color: var(--color-neutral-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.topbar .link-btn { min-height: 48px; padding: 0 12px; }

.page { max-width: 1100px; margin: 0 auto; padding: 24px 20px 56px; }
.helper-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px; margin-bottom: 24px; }
.helper-banner-text { flex: 1; min-width: 200px; font-size: 15px; }
.page-head { margin-bottom: 28px; }
.page-title { font-size: 28px; line-height: 1.1; letter-spacing: -0.015em; margin-bottom: 6px; }
.subtitle-sm { font-size: 16px; color: var(--color-neutral-700); }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 36px 56px; align-items: start; }

.month-card { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.kicker { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent-700); }
.month-title { font-size: 26px; line-height: 1.1; margin-bottom: 6px; }
.month-doc { font-size: 17px; }
.status-line { display: flex; align-items: center; gap: 10px; font-size: 16px; padding: 10px 0 2px; }
.done-line { color: var(--color-neutral-800); }
.late-box { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; padding: 12px 14px; background: var(--color-accent-100); color: var(--color-accent-900); }
.late-icon { margin-top: 1px; }
.month-upload { margin-top: 8px; }
.add-another { min-height: 48px; padding: 0 16px; margin-top: 4px; }
.late-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 16px; border: 2px solid var(--color-divider); font-size: 15px; }
.late-text { flex: 1; min-width: 180px; }
.late-note .link-btn { padding: 0 8px; }

.file-rows { display: flex; flex-direction: column; }
.file-rows.top-rule { border-top: 1px solid var(--color-divider); }
.file-row { display: flex; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--color-divider); font-size: 15px; }
.file-rows:not(.top-rule) .file-row { border-bottom: 0; border-top: 1px solid var(--color-divider); }
.file-row .link-btn { padding: 0 8px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--color-divider); }
.section-title { font-size: 20px; }
.section-meta { font-size: 14px; color: var(--color-neutral-700); white-space: nowrap; }
.all-done { width: 100%; min-height: 56px; padding: 0 4px; border-bottom: 1px solid var(--color-divider); font: inherit; font-size: 16px; }
.all-done strong { font-weight: 800; }
.toggle-label { font-size: 14px; color: var(--color-accent-700); font-weight: 800; font-family: var(--font-heading); }
.once-row { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--color-divider); }
.once-name { font-size: 16px; line-height: 1.3; }
.once-status { font-size: 15px; margin-top: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.history-item { border-bottom: 1px solid var(--color-divider); }
.history-row { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center; width: 100%; min-height: 60px; padding: 12px 4px; font: inherit; font-size: 16px; }
.history-row strong { font-weight: 800; }
.chevron { transition: transform 150ms ease-out; }
.chevron.is-open { transform: rotate(180deg); }
.history-body { padding: 0 4px 16px 36px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }

.helper-block { padding-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.helper-title { margin-top: 8px; }
.helper-card { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; padding: 16px; }
.helper-summary { font-size: 15px; margin-top: 6px; }
.helper-view { margin-top: 12px; padding: 10px 16px; align-self: flex-start; }
.helper-form { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.form-label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--color-neutral-800); }
.input {
  width: 100%; padding: 6px 10px; font: inherit; color: var(--color-text); caret-color: var(--color-accent);
  border: 1px solid var(--color-divider); border-radius: 0;
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
.form-input { min-height: 48px; font-size: 16px; background: var(--color-bg); }
.form-error { font-size: 15px; color: var(--color-accent-900); background: var(--color-accent-100); padding: 10px 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* — upload sheet: bottom sheet on the phone, dialog when wide — */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 10; display: flex; justify-content: center; align-items: flex-end;
  background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent);
  animation: fade-in 150ms ease-out;
}
.sheet-backdrop.is-wide { align-items: center; padding: 24px; }
.sheet {
  width: min(560px, 100%); max-height: 100%; overflow: auto; background: var(--color-bg); box-shadow: var(--shadow-lg);
  padding: 24px; padding-bottom: max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 20px;
  animation: slide-up 200ms ease-out;
}
.is-wide .sheet { animation: fade-in 150ms ease-out; }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; }
.sheet-head .kicker { margin-bottom: 6px; }
.sheet-title { font-size: 22px; line-height: 1.15; margin-bottom: 4px; }
.sheet-head .muted { font-size: 15px; }
.dropzone { border: 2px dashed var(--color-divider); padding: 36px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; cursor: pointer; }
.dropzone:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.dropzone .muted { font-size: 15px; }
.file-list { display: flex; flex-direction: column; border-top: 2px solid var(--color-divider); }
.picked { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--color-divider); font-size: 15px; }
.picked .small { font-size: 13px; }
.thumb { width: 52px; height: 52px; flex: none; background: var(--color-neutral-300); display: flex; align-items: center; justify-content: center; color: var(--color-neutral-700); }
.pdf-badge { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }
.progress { display: flex; flex-direction: column; gap: 12px; padding: 12px 0; }
.progress-row { display: flex; justify-content: space-between; font-size: 16px; }
.progress-track { height: 10px; background: var(--color-neutral-300); }
.progress-bar { height: 100%; background: var(--color-text); transition: width 120ms linear; }
.success { display: flex; flex-direction: column; gap: 12px; padding: 8px 0; }
.success-title { font-size: 22px; font-family: var(--font-heading); font-weight: 800; line-height: 1.15; }
.notice-error { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--color-accent-100); color: var(--color-accent-900); font-size: 15px; }
.notice-icon { margin-top: 2px; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-up { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
