/* Public pages: request support and track a request. Same palette as the trainer dashboard. */
:root {
    --ink: #1f2d3d;
    --ink-soft: #46566a;
    --muted: #66768a;
    --line: #dfe6ec;
    --surface: #ffffff;
    --surface-soft: #f5f7fa;
    --mint: #f1f8f4;
    --accent: #0a7f58;
    --accent-hover: #086646;
    --accent-soft: #e1f6ec;
    --wine: #8f1d40;
    --wine-soft: #fbe9ef;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 10px rgba(31, 45, 61, 0.08);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--surface);
    -webkit-font-smoothing: antialiased; accent-color: var(--accent); caret-color: var(--accent);
}

::selection { background: #c5efdb; color: var(--ink); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link { position: absolute; left: 12px; top: -48px; z-index: 10; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- Top bar ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; color: var(--wine); text-decoration: none; }
.brand:hover { color: var(--wine); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 8px 12px; border-radius: var(--radius-sm); color: var(--ink-soft); font-weight: 500; font-size: 0.9375rem; text-decoration: none; transition: background 0.15s ease, color 0.15s ease; }
.site-nav a:hover { background: var(--mint); color: var(--accent-hover); }
.site-nav a[aria-current="page"] { color: var(--accent-hover); font-weight: 600; }
.site-nav .nav-signin { border: 1px solid var(--line); margin-left: 8px; color: var(--ink); }

/* ---------- Layout ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 48px 24px 72px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.page--narrow { grid-template-columns: minmax(0, 640px); justify-content: center; }

.intro { position: sticky; top: 32px; }
.intro h1 { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; text-wrap: balance; }
.intro .lead { margin-top: 14px; color: var(--ink-soft); font-size: 1.0625rem; max-width: 46ch; text-wrap: pretty; }

.steps { list-style: none; margin-top: 32px; counter-reset: step; }
.steps li { position: relative; padding: 0 0 22px 46px; counter-increment: step; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
    content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-hover); font-weight: 700; font-size: 0.875rem;
}
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 14px; top: 34px; bottom: 4px; width: 2px; background: var(--line); }
.steps strong { display: block; font-weight: 600; }
.steps span { color: var(--ink-soft); font-size: 0.9375rem; }

.intro-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.9375rem; }

/* ---------- Card and form ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.card-body { padding: 28px; }
.card-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.card-sub { margin-top: 4px; color: var(--ink-soft); }

fieldset { border: 0; margin-top: 28px; }
fieldset:first-of-type { margin-top: 0; }
legend { font-size: 1rem; font-weight: 600; margin-bottom: 14px; padding: 0; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 500; font-size: 0.9375rem; }
.field .optional { color: var(--muted); font-weight: 400; }
.hint { color: var(--muted); font-size: 0.8125rem; }

.input {
    width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #c9d3dc; border-radius: var(--radius-sm);
    background: var(--surface); color: var(--ink); font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea.input { min-height: 104px; resize: vertical; line-height: 1.5; }
.input::placeholder { color: #8a97a5; }
.input:hover { border-color: #a9b7c4; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[aria-invalid="true"] { border-color: var(--wine); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--wine-soft); }
.error { color: var(--wine); font-size: 0.8125rem; font-weight: 500; }
.error:empty { display: none; }

/* honeypot: hidden from people, visible to bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { margin-top: 28px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-foot .hint { flex: 1; min-width: 200px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
    border: 1px solid transparent; border-radius: var(--radius-sm); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-quiet { background: var(--surface); color: var(--ink); border-color: #c9d3dc; }
.btn-quiet:hover { background: var(--surface-soft); color: var(--ink); }
.btn[disabled] { opacity: 0.65; cursor: progress; }

.banner { margin-bottom: 20px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--wine-soft); color: var(--wine); font-weight: 500; }
.banner[hidden] { display: none; }

/* ---------- Success ---------- */
.done { text-align: left; }
.done h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.done p { margin-top: 10px; color: var(--ink-soft); max-width: 52ch; }
.reference { margin: 22px 0; padding: 18px 20px; border-radius: var(--radius); background: var(--mint); }
.reference dt { color: var(--ink-soft); font-size: 0.875rem; }
.reference dd { margin-top: 2px; font-size: 1.625rem; font-weight: 700; letter-spacing: 0.01em; color: var(--accent-hover); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.done-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
[hidden] { display: none !important; }

/* ---------- Tracking ---------- */
.track-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 12px; align-items: end; margin-top: 20px; }
.status-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.status-head h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.status-meta { margin-top: 2px; color: var(--ink-soft); font-size: 0.9375rem; }
.stage { padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: 0.875rem; background: var(--wine-soft); color: var(--wine); white-space: nowrap; }
.stage.is-good { background: var(--accent-soft); color: var(--accent-hover); }
.stage.is-closed { background: var(--surface-soft); color: var(--ink-soft); }

.trainer-line { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--mint); }
.trainer-line strong { font-weight: 600; }

.timeline { list-style: none; margin-top: 24px; }
.timeline li { position: relative; padding: 0 0 20px 28px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline li:last-child::before { box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline li:not(:last-child)::after { content: ''; position: absolute; left: 8px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline p { font-weight: 500; }
.timeline time { display: block; color: var(--muted); font-size: 0.8125rem; }

.site-footer { border-top: 1px solid var(--line); padding: 20px 24px; text-align: center; color: var(--muted); font-size: 0.875rem; }

@media (max-width: 900px) {
    .page { grid-template-columns: 1fr; gap: 32px; padding: 32px 16px 56px; }
    .intro { position: static; }
    .intro h1 { font-size: 1.75rem; }
}

@media (max-width: 600px) {
    .grid, .track-form { grid-template-columns: 1fr; }
    .card-body { padding: 20px; }
    .site-header-inner { padding: 0 16px; }
    .site-nav a { padding: 8px; font-size: 0.875rem; }
    .site-nav .nav-signin { display: none; }
    .form-foot .btn, .track-form .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
}

/* ---------- Request portal ---------- */
.banner--ok { background: var(--accent-soft); color: var(--accent-hover); margin: 18px 0 0; }
.progress { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; }
.progress li { padding-top: 10px; border-top: 4px solid var(--line); color: var(--muted); font-size: 0.875rem; font-weight: 500; }
.progress li.is-done { border-top-color: var(--accent); color: var(--accent-hover); }
.progress li.is-current { border-top-color: var(--wine); color: var(--ink); font-weight: 600; }
.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin-top: 14px; }
.contact dt { color: var(--muted); font-size: 0.8125rem; }
.contact dd { font-weight: 600; overflow-wrap: anywhere; }
.agreement { margin-top: 18px; padding: 20px; border-radius: var(--radius-sm); background: var(--surface-soft); }
.agreement h3 { margin-top: 16px; font-size: 0.9375rem; font-weight: 600; }
.agreement p, .agreement li { color: var(--ink-soft); margin-top: 6px; }
.agreement ul { padding-left: 20px; }
.agreement .pre { white-space: pre-line; }
.terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.terms dt { color: var(--muted); font-size: 0.8125rem; }
.terms dd { font-weight: 600; }
.more { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.more summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.more form { margin-top: 14px; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.choice { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; align-items: flex-start; }
.choice h3 { font-size: 1rem; font-weight: 600; }
.choice p { color: var(--ink-soft); margin: 6px 0 14px; font-size: 0.9375rem; }
.choice .field { width: 100%; }
.asked { margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: var(--wine-soft); color: var(--wine); font-size: 0.75rem; font-weight: 600; }
@media (max-width: 600px) { .contact, .terms, .choices { grid-template-columns: 1fr; } }
