@import url('fonts.css');

/* Fogarty green on light gray / charcoal (ux-standards H1). Brass is the
   secondary mark colour; amber only for "needs attention". */
:root {
  color-scheme: light;
  --paper: #eceeee;
  --surface: #f8f9f9;
  --surface-alt: #e2e5e5;
  --ink: #1c2023;
  --ink-muted: #545b60;
  --border: #cfd4d4;
  --border-strong: #868e92; /* 3:1 on paper/surface for control edges (D5) */
  --accent: #007f60;
  --accent-ink: #ffffff;
  --accent-soft: #d5ebe3;
  --link: #006b51;
  --brass: #8a6a1f;
  --success: #1f6f3f;
  --success-soft: #dcefe2;
  --warning: #8a5a00;
  --warning-soft: #f8e9c8;
  --danger: #b42318;
  --danger-soft: #fbe1de;
  --shadow: 0 1px 2px rgba(28, 32, 35, 0.06), 0 6px 18px rgba(28, 32, 35, 0.08);
  --font-brand: 'Mr Eaves', 'Mr Eaves Display', Georgia, serif;
  --font-ui: 'Atkinson Hyperlegible Next', system-ui, sans-serif;
  --font-mono: 'Atkinson Hyperlegible Mono', ui-monospace, monospace;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --paper: #1a1c1e; --surface: #222527; --surface-alt: #2b2f31; --ink: #e6e9ea; --ink-muted: #a9b1b5;
    --border: #363b3e; --border-strong: #6f787d; --accent: #2bb08a; --accent-ink: #0d1f19; --accent-soft: #173a30;
    --link: #4cc9a3; --brass: #d0ad5a; --success: #5cc48a; --success-soft: #19331f; --warning: #e0ac45; --warning-soft: #3a2e12;
    --danger: #ff8a80; --danger-soft: #3d1f1d; --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 22px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --paper: #1a1c1e; --surface: #222527; --surface-alt: #2b2f31; --ink: #e6e9ea; --ink-muted: #a9b1b5;
  --border: #363b3e; --border-strong: #6f787d; --accent: #2bb08a; --accent-ink: #0d1f19; --accent-soft: #173a30;
  --link: #4cc9a3; --brass: #d0ad5a; --success: #5cc48a; --success-soft: #19331f; --warning: #e0ac45; --warning-soft: #3a2e12;
  --danger: #ff8a80; --danger-soft: #3d1f1d; --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 22px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-ui); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, .wordmark, .brand-mark { font-family: var(--font-brand); font-weight: 700; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.05; margin: 0 0 0.35em; }
h2 { font-size: 1.75rem; line-height: 1.15; margin: 0 0 0.5em; }
h3 { font-size: 1.3rem; margin: 0 0 0.4em; }
.eyebrow { font-family: var(--font-ui); text-transform: uppercase; letter-spacing: 0.09em; font-size: 0.75rem; font-weight: 700; color: var(--brass); margin: 0 0 8px; }
.muted { color: var(--ink-muted); }
.hint { color: var(--ink-muted); font-size: 0.88rem; margin: 4px 0 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 680px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: 0.95rem; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--surface-alt); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-lg { min-height: 50px; padding: 12px 24px; font-size: 1.05rem; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 0.86rem; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--link); }
.btn-ghost:hover { background: var(--surface-alt); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.theme-toggle { background: none; border: 1px solid var(--border-strong); border-radius: 8px; padding: 6px 10px; min-height: 36px; cursor: pointer; font-size: 0.85rem; }

/* ---- forms ---- */
label { font-weight: 700; font-size: 0.92rem; }
.field { margin-bottom: 18px; }
.field > label { display: block; margin-bottom: 6px; }
input[type='text'], input:not([type]), input[type='email'], input[type='tel'], input[type='url'], input[type='password'], input[type='number'], input[type='date'], input[type='search'], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink);
}
input[type='file'] { display: block; padding: 10px; border: 1px dashed var(--border-strong); border-radius: 9px; width: 100%; background: var(--surface); }
textarea { resize: vertical; }
[aria-invalid='true'] { border-color: var(--danger) !important; box-shadow: 0 0 0 1px var(--danger); }
.field-error { color: var(--danger); font-size: 0.88rem; font-weight: 700; margin: 6px 0 0; }
.field-error::before { content: '⚠ '; }
fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
legend { font-family: var(--font-brand); font-weight: 700; font-size: 1.3rem; margin-bottom: 10px; padding: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-alert { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); padding: 12px 14px; border-radius: 10px; font-weight: 700; margin-bottom: 18px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.seg { display: flex; gap: 10px; flex-wrap: wrap; }
.seg label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); font-weight: 600; cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.must-q { margin: 0 0 8px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }

/* ---- public site ---- */
.site-head { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-head-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 1.6rem; color: var(--ink); text-decoration: none; }
.wordmark-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 1.3rem; font-weight: 800; }
.wordmark-sub { color: var(--accent); font-weight: 400; }
.site-nav { display: flex; align-items: center; gap: 18px; font-size: 0.95rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--link); text-decoration: underline; }
.hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 64px 0 56px; }
.hero h1 { max-width: 14ch; }
.lede { font-size: 1.2rem; max-width: 62ch; margin: 0 0 14px; }
.lede-sm { color: var(--ink-muted); max-width: 60ch; margin: 0 0 26px; }
.roles { padding-top: 48px; padding-bottom: 24px; }
.count { font-family: var(--font-mono); font-size: 1rem; background: var(--accent-soft); color: var(--link); border-radius: 999px; padding: 2px 10px; vertical-align: middle; }
.dept { margin-bottom: 26px; }
.role-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.role-card {
  display: grid; gap: 4px; padding: 18px 20px; border-radius: var(--radius); text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); position: relative;
}
.role-card:hover { border-color: var(--accent); }
.role-title { font-family: var(--font-brand); font-size: 1.45rem; font-weight: 700; color: var(--ink); }
.role-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-muted); font-size: 0.92rem; margin: 0; }
.role-meta span + span::before { content: '·'; margin-right: 16px; color: var(--border-strong); }
.role-summary { margin-top: 4px; max-width: 70ch; }
.role-go { color: var(--link); font-weight: 700; font-size: 0.92rem; margin-top: 6px; }
.empty-roles { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 28px; max-width: 70ch; }
.how { padding-top: 32px; padding-bottom: 64px; }
.how-lede { max-width: 66ch; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 2px; }
.steps li::before { content: counter(s); font-family: var(--font-mono); color: var(--brass); font-weight: 700; }
.steps strong { font-size: 1.05rem; }
.steps span { color: var(--ink-muted); font-size: 0.95rem; }
.job { padding-top: 28px; padding-bottom: 64px; }
.crumb { margin: 0 0 18px; }
.job-head { margin-bottom: 30px; }
.job-head .role-meta { margin-bottom: 14px; font-size: 1rem; }
.job-body { max-width: 72ch; }
.job-body section { margin-bottom: 30px; }
.prose ul, .musts { padding-left: 1.2em; }
.prose li, .musts li { margin-bottom: 6px; }
.apply { max-width: 760px; margin-top: 18px; scroll-margin-top: 16px; }
.done { padding: 72px 24px; text-align: center; }
.done .lede { margin-left: auto; margin-right: auto; }
.done-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 2rem; margin: 0 auto 18px; }
.center-block { padding: 72px 24px; }
.site-foot { border-top: 1px solid var(--border); padding: 28px 0 36px; font-size: 0.88rem; color: var(--ink-muted); background: var(--surface); }
.site-foot p { max-width: 90ch; }

/* ---- questionnaire ---- */
.quiz { padding-top: 36px; padding-bottom: 72px; }
.quiz h2 { margin-top: 34px; }
.progress { position: sticky; top: 0; z-index: 2; height: 8px; background: var(--surface-alt); border-radius: 999px; overflow: hidden; margin-top: 18px; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.progress-label { font-size: 0.88rem; color: var(--ink-muted); margin: 6px 0 0; font-family: var(--font-mono); }
.q { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 0 0 14px; scroll-margin-top: 24px; }
.q legend { font-family: var(--font-ui); font-size: 1.05rem; font-weight: 600; float: left; width: 100%; margin-bottom: 12px; }
.q legend + * { clear: both; }
.q-missing { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.qnum { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--link); font-family: var(--font-mono); font-size: 0.85rem; margin-right: 6px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 10px; margin-bottom: 8px; font-weight: 400; cursor: pointer; clear: both; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin-top: 4px; width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; clear: both; }
.scale-opt { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 10px 6px; border: 1px solid var(--border-strong); border-radius: 10px; font-weight: 500; font-size: 0.88rem; cursor: pointer; }
.scale-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.scale-opt input { width: 20px; height: 20px; accent-color: var(--accent); }
.quiz-submit { margin-top: 28px; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .site-nav a:not(:first-child) { display: none; }
  .hero { padding: 40px 0; }
  .scale { grid-template-columns: 1fr; }
  .scale-opt { grid-template-columns: auto 1fr; justify-items: start; text-align: left; }
}
