:root {
  --bg: #ffffff;
  --surface: #f5f8fc;
  --ink: #0f1f3d;
  --ink-soft: #5a6782;
  --line: #e3e9f2;
  --blue: #1d63ed;
  --blue-dark: #1650c4;
  --blue-soft: #e8f0fe;
  --green: #17a673;
  --green-dark: #128a5f;
  --green-soft: #e3f6ee;
  --warn-soft: #fff6e0;
  --warn-line: #f2dc9f;
  --error-soft: #fdecec;
  --error-line: #f5c2c2;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 31, 61, .05), 0 8px 24px rgba(15, 31, 61, .06);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--blue); }
img { max-width: 100%; }

.wrap { max-width: 1100px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 760px; }
.page { padding-block: 40px 72px; }
.eyebrow { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--green); margin-bottom: 10px; display: block; }
.lede { font-size: 1.15rem; color: var(--ink-soft); }
.hint { font-weight: 400; color: var(--ink-soft); font-size: .9rem; }

/* Header & footer */
.site-header { padding-block: 18px; border-bottom: 1px solid var(--line); }
.logo { font-weight: 800; font-size: 1.4rem; text-decoration: none; letter-spacing: -.03em; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
.logo b { color: var(--blue); font-weight: inherit; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--blue), var(--green)); display: grid; place-items: center; }
.logo-mark svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; padding: 8px 14px; border-radius: 10px; }
.nav a:hover { background: var(--blue-soft); }
.nav a[aria-current="page"] { color: var(--blue); background: var(--blue-soft); }
.site-footer { border-top: 1px solid var(--line); padding-block: 24px; color: var(--ink-soft); font-size: .9rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 12px; border: 2px solid transparent;
  font: 700 1rem var(--font); text-decoration: none; cursor: pointer;
  background: var(--blue); color: #fff; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-green { background: var(--green); }
.btn-green:hover { background: var(--green-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-small { padding: 8px 14px; font-size: .9rem; border-radius: 10px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Home */
.home { display: grid; place-items: center; text-align: center; padding-block: clamp(48px, 12vh, 120px); }
.home-inner { max-width: 720px; width: 100%; }
.home .lede { margin-inline: auto; max-width: 36em; }
.home .btn-row { justify-content: center; margin: 32px auto 0; max-width: 440px; }
.home .btn { flex: 1 1 180px; padding-block: 18px; font-size: 1.1rem; }
.home-bg { background: linear-gradient(180deg, var(--blue-soft) 0%, #fff 70%); }

/* Forms */
.form-card { background: #fff; border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); box-shadow: var(--shadow); border: 1px solid var(--line); }
.form-grid { display: grid; gap: 22px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 18px; }
.form-section { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); border-bottom: 1px solid var(--line); padding-bottom: 8px; margin: 6px 0 -6px; }
label, legend { font-weight: 600; display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=number], input[type=tel], input[type=url], select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
textarea { min-height: 110px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { margin: 0; font-weight: 500; position: relative; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick span {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; font-size: .92rem; user-select: none;
}
.pick span svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pick input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.pick input:focus-visible + span { outline: 3px solid var(--blue-soft); outline-offset: 2px; }

.notice { padding: 16px 18px; border-radius: 12px; background: var(--green-soft); border: 1px solid #b9e6d3; margin: 0; }
.notice.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.notice.error { background: var(--error-soft); border-color: var(--error-line); }
.notice.info { background: var(--blue-soft); border-color: #c6d8fb; }

/* Icons */
.icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tint-0 { background: var(--blue-soft); color: var(--blue-dark); }
.tint-1 { background: var(--green-soft); color: var(--green-dark); }

/* Jobs */
.jobs-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; padding-block: 32px 72px; }
@media (max-width: 860px) { .jobs-layout { grid-template-columns: 1fr; } }
.summary { position: sticky; top: 16px; }
@media (max-width: 860px) { .summary { position: static; } }
.summary dl { margin: 0 0 16px; }
.summary dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 700; margin-top: 12px; }
.summary dd { margin: 2px 0 0; font-weight: 600; }
.toggle { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 16px 0; cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: var(--blue); }

.results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.results-head p { margin: 0; color: var(--ink-soft); }
.job-list { display: grid; gap: 14px; }
.job { background: #fff; border-radius: var(--radius); padding: 20px 22px; border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.job > .icon { grid-row: span 2; }
.job-body { display: grid; gap: 8px; min-width: 0; }
.job.top { border: 2px solid var(--green); }
.job.dim { opacity: .6; }
.job-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; flex-wrap: wrap; }
.job h3 { margin: 0; }
.job .biz { color: var(--ink-soft); font-weight: 600; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .92rem; color: var(--ink-soft); }
.meta b { color: var(--ink); }
.badge { font-size: .76rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge.great { background: var(--green); color: #fff; }
.badge.good { background: var(--green-soft); color: var(--green-dark); }
.badge.age { background: var(--warn-soft); color: #8a5a00; }
.badge.new { background: var(--blue); color: #fff; }
.why { font-size: .88rem; color: var(--green-dark); font-weight: 600; }
.apply { font-size: .92rem; border-top: 1px dashed var(--line); padding-top: 10px; display: none; }
.job.open .apply { display: block; }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-soft); }
@media (max-width: 520px) { .job { grid-template-columns: 1fr; } .job > .icon { grid-row: auto; } }

/* Demo inbox (stands in for real emails until the backend is connected) */
.inbox { margin-top: 28px; border: 2px dashed #c6d8fb; border-radius: var(--radius); padding: 20px; background: var(--surface); }
.inbox h3 { display: flex; align-items: center; gap: 8px; }
.inbox .tag { font-size: .72rem; background: var(--blue); color: #fff; padding: 2px 8px; border-radius: 999px; letter-spacing: .04em; }
.email { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-top: 12px; }
.email-head { font-size: .85rem; color: var(--ink-soft); border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 10px; }
.email-head b { color: var(--ink); }
.email dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: .92rem; margin: 10px 0 14px; }
.email dt { color: var(--ink-soft); }
.email dd { margin: 0; overflow-wrap: anywhere; }

/* ---- Accounts & messaging ---- */
.site-header .wrap { flex-wrap: wrap; }
.nav { flex-wrap: wrap; }
.footer-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-row a { color: var(--ink-soft); }

.auth-card { max-width: 520px; margin: 0 auto; }
.role-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.role-choice a { display: block; padding: 22px; border: 1.5px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: #fff; }
.role-choice a:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.role-choice strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.role-choice span { color: var(--ink-soft); font-size: .92rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 0; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; cursor: pointer; text-decoration: underline; }

.status { font-size: .76rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.status.review { background: var(--warn-soft); color: #8a5a00; }
.status.approved { background: var(--green-soft); color: var(--green-dark); }
.status.rejected, .status.closed { background: var(--line); color: var(--ink-soft); }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; }
.panel-head h3 { margin: 0; }
.applicant { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.muted { color: var(--ink-soft); }
.section-title { margin: 40px 0 14px; }

dialog { border: 0; border-radius: 18px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(15, 31, 61, .3); color: var(--ink); }
dialog::backdrop { background: rgba(15, 31, 61, .5); }
dialog form { padding: 24px; display: grid; gap: 16px; }
dialog h2 { font-size: 1.4rem; margin: 0; }

/* Messages page */
.chat-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; padding-block: 28px 48px; align-items: start; }
@media (max-width: 820px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-layout.has-thread .convo-list { display: none; }
  .chat-layout:not(.has-thread) .thread { display: none; }
}
.convo-list { display: grid; gap: 8px; }
.convo { display: block; text-decoration: none; color: var(--ink); padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.convo:hover { border-color: var(--blue); }
.convo[aria-current="true"] { border-color: var(--blue); background: var(--blue-soft); }
.convo strong { display: block; }
.convo small { color: var(--ink-soft); }
.thread { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 520px; }
.thread-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.thread-head h2 { font-size: 1.15rem; margin: 0; }
.safety { margin: 12px 20px 0; font-size: .86rem; }
.bubbles { flex: 1; padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 60vh; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 16px; background: var(--surface); white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: var(--blue); color: #fff; }
.bubble small { display: block; font-size: .72rem; opacity: .7; margin-top: 4px; }
.composer { border-top: 1px solid var(--line); padding: 14px 20px; display: flex; gap: 10px; align-items: end; }
.composer textarea { min-height: 48px; height: 48px; flex: 1; }

/* Admin & legal */
.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { padding: 9px 16px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font: 600 .95rem var(--font); cursor: pointer; color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.draft-banner { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 12px; padding: 14px 18px; margin-bottom: 24px; }
.prose h2 { margin-top: 1.6em; font-size: 1.4rem; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }

/* Plan choice on the job form */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.plan { margin: 0; font-weight: 400; position: relative; }
.plan input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.plan span { display: grid; gap: 2px; height: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.plan strong { font-size: 1rem; }
.plan b { color: var(--blue); }
.plan small { color: var(--ink-soft); font-size: .85rem; line-height: 1.4; }
.plan input:checked + span { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.plan input:focus-visible + span { outline: 3px solid var(--blue-soft); outline-offset: 2px; }

/* Hire tracking */
.status.applied { background: var(--blue-soft); color: var(--blue-dark); }
.status.hired { background: var(--green-soft); color: var(--green-dark); }
.status.ended, .status.no { background: var(--line); color: var(--ink-soft); }
.status.check { background: var(--error-soft); color: #a3261b; }
.hire-bar { margin: 12px 20px 0; padding: 12px 14px; border-radius: 12px; background: var(--surface); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .92rem; }
.hire-bar:empty { display: none; }
.hire-bar.ask { background: var(--green-soft); }

/* Interviews */
.interview { margin: 12px 20px 0; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--blue); background: var(--blue-soft); display: grid; gap: 10px; font-size: .95rem; }
.interview:empty { display: none; }
.interview.plain { border-color: var(--line); background: var(--surface); }
.interview .times { display: flex; gap: 8px; flex-wrap: wrap; }
.interview .tip { font-size: .86rem; background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 10px; padding: 8px 12px; margin: 0; }

/* Home page (redesigned 29 Nov 2026 to feel less template-like; old version saved in firstshift-snapshots) */
.front { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 56px; align-items: start; padding-block: clamp(40px, 8vh, 88px) 72px; }
@media (max-width: 860px) { .front { grid-template-columns: 1fr; gap: 36px; } }
.front h1 { font-family: "DM Serif Display", Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -.01em; margin-bottom: 24px; max-width: 13em; }
.front-lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 34em; }
.front-buttons { margin: 30px 0 48px; }
.front-buttons .btn { padding: 15px 28px; font-size: 1.05rem; }
.front-how { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 28px; border-top: 1px solid var(--line); padding-top: 28px; }
.front-how h2, .front-facts h2 { font-family: "DM Serif Display", Georgia, serif; font-weight: 400; font-size: 1.45rem; letter-spacing: 0; margin-bottom: 10px; }
.front-how ol { margin: 0; padding-left: 1.2em; color: var(--ink-soft); }
.front-how li { margin-bottom: 6px; }
.front-facts { border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 4px; padding: 22px 24px; background: #fff; }
.front-facts ul { list-style: none; margin: 0 0 14px; padding: 0; }
.front-facts li { padding: 9px 0; border-bottom: 1px dashed var(--line); color: var(--ink-soft); }
.front-facts li:last-child { border-bottom: 0; }
.front-facts strong { color: var(--ink); }
.front-facts p { margin: 0; font-size: .92rem; }
.front-side { display: grid; gap: 20px; }
.front-photo { margin: 0; }
.front-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
.front-photo figcaption { font-size: .78rem; color: var(--ink-soft); margin-top: 6px; text-align: right; }
.front-photo figcaption a { color: inherit; }
.front-quote { margin: 0; padding: 2px 0 2px 18px; border-left: 4px solid var(--blue); }
.front-quote p { font-family: "DM Serif Display", Georgia, serif; font-size: clamp(1.25rem, 2.4vw, 1.5rem); line-height: 1.3; margin: 0 0 8px; color: var(--ink); }
.front-quote footer { color: var(--ink-soft); font-size: .95rem; }
/* Keep both home page columns the same height */
.front { align-items: stretch; }
.front-side { display: flex; flex-direction: column; gap: 18px; }
.front-photo img { aspect-ratio: 16 / 9; }
.front-facts { flex: 1; padding: 18px 22px; }
.front-facts h2 { margin-bottom: 4px; }
.front-facts li { padding: 7px 0; font-size: .95rem; }
.front-facts ul { margin-bottom: 8px; }
