:root {
  --ink: #161412;
  --ink-soft: #5b5648;
  --rosewood: #141414;       /* deep brand accent — near-black in light mode */
  --rosewood-deep: #000000;
  --brass: #a4854c;          /* exact gold sampled from the Rosewood shield mark */
  --on-accent: #ffffff;      /* text/icon color that sits on top of --rosewood */
  --cream: #ffffff;
  --paper: #ffffff;
  --panel: #faf8f4;
  --line: #e2ded4;
  --danger: #a3312a;
  --danger-bg: #fbeceb;
  --success: #2f6a43;
  --success-bg: #eaf5ee;
  --radius: 10px;
  --shadow: 0 18px 40px -28px rgba(20, 10, 5, 0.45);
  --focus: 0 0 0 3px rgba(164, 133, 76, 0.45);
  --honeycomb-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='83.14' viewBox='0 0 72 83.14'%3E%3Cg fill='none' stroke='%23a4854c' stroke-opacity='.14' stroke-width='1.25'%3E%3Cpath d='M-24 0-12-20.78h24L24 0 12 20.78h-24Z'/%3E%3Cpath d='M12 20.78 24 0h24l12 20.78-12 20.78H24Z'/%3E%3Cpath d='M-24 41.57-12 20.78h24L24 41.57 12 62.35h-24Z'/%3E%3Cpath d='M12 62.35 24 41.57h24l12 20.78-12 20.79H24Z'/%3E%3C/g%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f2ede2;
    --ink-soft: #c7bfae;
    --rosewood: #c9a768;
    --rosewood-deep: #a4854c;
    --brass: #c9a768;
    --on-accent: #141414;
    --cream: #121212;
    --paper: #121212;
    --panel: #1a1a1a;
    --line: #2e2b26;
    --danger: #e08a83;
    --danger-bg: #3a1f1c;
    --success: #9bd18f;
    --success-bg: #1f2b1c;
    --honeycomb-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='83.14' viewBox='0 0 72 83.14'%3E%3Cg fill='none' stroke='%23c9a768' stroke-opacity='.16' stroke-width='1.25'%3E%3Cpath d='M-24 0-12-20.78h24L24 0 12 20.78h-24Z'/%3E%3Cpath d='M12 20.78 24 0h24l12 20.78-12 20.78H24Z'/%3E%3Cpath d='M-24 41.57-12 20.78h24L24 41.57 12 62.35h-24Z'/%3E%3Cpath d='M12 62.35 24 41.57h24l12 20.78-12 20.79H24Z'/%3E%3C/g%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] {
  --ink: #f2ede2;
  --ink-soft: #c7bfae;
  --rosewood: #c9a768;
  --rosewood-deep: #a4854c;
  --brass: #c9a768;
  --on-accent: #141414;
  --cream: #121212;
  --paper: #121212;
  --panel: #1a1a1a;
  --line: #2e2b26;
  --danger: #e08a83;
  --danger-bg: #3a1f1c;
  --success: #9bd18f;
  --success-bg: #1f2b1c;
  --honeycomb-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='83.14' viewBox='0 0 72 83.14'%3E%3Cg fill='none' stroke='%23c9a768' stroke-opacity='.16' stroke-width='1.25'%3E%3Cpath d='M-24 0-12-20.78h24L24 0 12 20.78h-24Z'/%3E%3Cpath d='M12 20.78 24 0h24l12 20.78-12 20.78H24Z'/%3E%3Cpath d='M-24 41.57-12 20.78h24L24 41.57 12 62.35h-24Z'/%3E%3Cpath d='M12 62.35 24 41.57h24l12 20.78-12 20.79H24Z'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: "Public Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Brand-gold, flat-top hexagonal cells behind applicant-facing pages. */
body {
  background-color: var(--paper);
  background-image: var(--honeycomb-pattern);
  background-size: 108px 125px;
  background-attachment: fixed;
}

h1, h2, h3, h4 {
  font-family: "Source Serif 4", Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

a { color: var(--brass); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

.site-header {
  background: linear-gradient(135deg, #1a1a1a, #000000);
  color: #fff;
  padding: 18px 24px;
}
.site-header .wrap {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-header .brand {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-header .brand img {
  height: 30px;
  width: auto;
  display: block;
  flex: 0 0 auto;
}
.site-header .brand small {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: #e8c988;
  letter-spacing: 0.04em;
}
.site-header nav a {
  color: #f3e8e2;
  text-decoration: none;
  font-size: 0.92rem;
  margin-left: 18px;
}
.site-header nav a:hover { text-decoration: underline; }
.site-header nav a[aria-current="page"] { color: var(--brass, #c9a768); font-weight: 600; }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.container.narrow { max-width: 720px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}

.masthead {
  text-align: center;
  padding: 6px 0 30px;
}
.masthead .kicker {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
  font-weight: 700;
}
.masthead h1 { font-size: clamp(26px, 4.4vw, 36px); max-width: 46ch; margin: 0 auto; }
.masthead .sub {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

/* legacy hero (kept for any page still using it) */
.hero {
  text-align: left;
  padding: 24px 28px 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--brass);
  font-weight: 700;
  margin-bottom: 8px;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.fact {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.fact .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.fact .value { font-family: "IBM Plex Mono", monospace; font-size: 1.15rem; font-weight: 600; color: var(--brass); }

/* ---- FAQ page: details/summary accordion ---- */
.faq-list { display: grid; gap: 14px; }
.faq-item { padding: 20px 28px; }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h2 { margin: 0; }
.faq-item summary::before {
  content: "\002B";
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--brass);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}
.faq-item[open] summary::before { content: "\2212"; }
.faq-item summary:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.faq-item > *:not(summary) { margin-top: 14px; }
.faq-item p:last-child, .faq-item ul:last-child { margin-bottom: 0; }

.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.req-list li { display: flex; gap: 10px; font-size: 14px; align-items: flex-start; }
.req-list .dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--brass); }

/* ---- Application progress: band + progress bar + stepper ---- */
.progress-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
}
.band {
  background: linear-gradient(135deg, #1a1a1a, #000000);
  color: #f3e8e2;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.band .band-title { font-family: "Source Serif 4", serif; font-weight: 600; font-size: 17px; }
.band .progress-text { font-size: 12px; letter-spacing: 0.06em; opacity: 0.85; }
.progress-track { height: 4px; background: rgba(255, 255, 255, 0.18); }
.progress-fill { height: 100%; background: var(--brass); transition: width 0.25s ease; }
@media (prefers-reduced-motion: reduce) { .progress-fill { transition: none; } }

.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 14px 16px;
  counter-reset: step;
}
.stepper li { flex: 1 1 auto; min-width: 96px; }
.stepper button {
  width: 100%;
  background: none;
  border: none;
  color: var(--ink-soft);
  padding: 10px 6px 4px;
  border-radius: 8px;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.stepper button::before {
  counter-increment: step;
  content: counter(step);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--ink-soft);
  background: var(--paper);
}
.stepper li.current button { color: var(--ink); font-weight: 700; }
.stepper li.current button::before { background: var(--rosewood); border-color: var(--rosewood); color: var(--on-accent); }
.stepper li.done button::before { content: "\2713"; background: transparent; border-color: var(--brass); color: var(--brass); }
.stepper button:hover { background: rgba(164, 133, 76, 0.1); }

/* Forms */
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 4px; }
.field { margin-bottom: 18px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 620px) {
  .field-row { grid-template-columns: 1fr; }
}
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="month"], input[type="number"], input[type="password"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
}
textarea { min-height: 140px; resize: vertical; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.error-text {
  color: var(--danger);
  font-size: 0.82rem;
  margin-top: 4px;
}
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 18px; }
legend { font-weight: 700; padding: 0 6px; }
.radio-row { display: flex; gap: 20px; flex-wrap: wrap; }
.radio-row label { font-weight: 400; display: flex; align-items: center; gap: 8px; margin: 0; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.checkbox-row input { margin-top: 4px; }
.checkbox-row label { font-weight: 400; margin: 0; }

.essay-prompt {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.btn-primary { background: var(--rosewood); color: var(--on-accent); border-color: var(--rosewood); }
.btn-primary:hover { background: var(--rosewood-deep); border-color: var(--rosewood-deep); }
.btn-primary:disabled { background: var(--line); border-color: var(--line); color: var(--ink-soft); cursor: not-allowed; }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--panel); }
.btn-text { background: none; color: var(--brass); padding: 6px 4px; }
.btn-danger { background: var(--paper); color: var(--danger); border-color: var(--danger); }
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* Alerts / states */
.alert { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; font-size: 0.94rem; }
.alert-info { background: rgba(164, 133, 76, 0.14); color: var(--ink); }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-success { background: var(--success-bg); color: var(--success); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.badge-complete { background: var(--success-bg); color: var(--success); }
.badge-missing { background: var(--danger-bg); color: var(--danger); }
.badge-status { background: rgba(164, 133, 76, 0.14); color: var(--ink); }

.spinner {
  display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line);
  border-top-color: var(--brass); border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-soft); }

.file-drop {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  background: var(--paper);
}
.file-current {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(164, 133, 76, 0.12); border-radius: 8px; padding: 12px 14px; margin-top: 10px;
}

.review-section { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 18px; }
.review-section:last-child { border-bottom: none; }
.review-row { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; font-size: 0.94rem; }
.review-row .k { color: var(--ink-soft); }
.review-row .v { text-align: right; font-weight: 600; }

table.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.data-table th { color: var(--ink-soft); font-weight: 700; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.04em; }
.data-table tr:hover td { background: rgba(164, 133, 76, 0.08); }
.table-wrap { overflow-x: auto; }

.autosave-note { font-size: 0.8rem; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; min-height: 18px; }

.site-footer { text-align: center; color: var(--ink-soft); font-size: 0.82rem; padding: 24px; }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}
