/* ==========================================================================
   HALEWOOD DESIGN SYSTEM — COMPONENTS
   Every screen in the portal is assembled from the components below.
   All values come from tokens.css — no literal colours, sizes or fonts here
   or on any page. See HALEWOOD_DESIGN_SYSTEM.md for markup and usage rules.

   Component index
     1. Base                     8. SecondaryButton / PrimaryButton
     2. HalewoodHeader           9. ProgressIndicator
     3. PageShell / HalewoodFooter  10. InformationPanel
     4. ContentCard             11. AssessmentPanel
     5. SectionHeading          12. CameraFrame, Dialog, Reference
     6. FormField / SelectField / CheckField   13. Landing (Hero, StartCard, Pipeline)
     7. UploadField / FileList  14. Prose, 15. Admin, 16. Utilities
   ========================================================================== */

/* 1. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  color: var(--text-primary);
  background: var(--background-primary);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-heading); color: var(--halewood-navy); line-height: var(--leading-tight); margin: 0; }
p { margin: 0 0 var(--space-4); }
a { color: var(--halewood-navy); text-underline-offset: 3px; }
a:hover { color: var(--halewood-navy-deep); }
b, strong { font-weight: var(--weight-bold); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

/* 2. HalewoodHeader  <hw-header> ------------------------------------------ */
hw-header { display: block; flex: none; }
.hw-header {
  background: var(--halewood-navy-deep);
  color: var(--text-on-navy);
  border-bottom: 1px solid var(--border-on-navy);
}
.hw-header__inner {
  max-width: var(--width-wide);
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}
.hw-logo { display: inline-flex; flex-direction: column; align-items: center; color: var(--text-on-navy); text-decoration: none; line-height: 1; }
.hw-logo:hover { color: var(--text-on-navy); }
.hw-logo__word {
  font-family: var(--font-body); font-weight: var(--weight-medium);
  font-size: 1.5rem; letter-spacing: var(--tracking-logo); margin-right: calc(var(--tracking-logo) * -1);
  text-transform: uppercase;
}
.hw-logo__sub {
  margin-top: var(--space-2);
  font-size: 0.5625rem; letter-spacing: 0.5em; margin-right: -0.5em;
  text-transform: uppercase; color: var(--text-on-navy-muted);
}
.hw-logo img { display: block; height: 38px; width: auto; }
.hw-header__context {
  font-size: var(--text-caption); font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-caps); text-transform: uppercase; text-align: right;
  color: var(--text-on-navy);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--halewood-gold);
}

/* 3. PageShell + HalewoodFooter ------------------------------------------- */
.hw-shell {
  flex: 1 0 auto;
  width: 100%;
  max-width: calc(var(--width-content) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--space-6) var(--gutter) var(--space-7);
}
.hw-shell--admin { max-width: calc(var(--width-admin) + 2 * var(--gutter)); }
.hw-shell__vacancy {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2);
  margin-bottom: var(--space-4);
  font-size: var(--text-small); color: var(--text-secondary);
}
.hw-shell__vacancy b { color: var(--halewood-navy); font-weight: var(--weight-medium); }

hw-footer { display: block; flex: none; }
.hw-footer {
  padding: var(--space-4) var(--gutter) var(--space-5);
  text-align: center;
  font-size: var(--text-caption);
  line-height: 1.7;
  color: var(--text-secondary);
}
.hw-footer a { color: var(--text-secondary); }
.hw-landing:not(.hidden) ~ hw-footer .hw-footer__help { display: none; }

/* 4. ContentCard ---------------------------------------------------------- */
.hw-card {
  background: var(--background-secondary);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--halewood-navy);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-6);
}
.hw-card--center { text-align: center; }
.hw-card__title { font-size: var(--text-h2); font-weight: var(--weight-heading); margin-bottom: var(--space-2); }
.hw-card__title--danger { color: var(--status-danger); }
.hw-card__lead { color: var(--text-secondary); margin-bottom: var(--space-5); }
.hw-card__actions {
  display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center;
  margin-top: var(--space-6); padding-top: var(--space-5);
  border-top: 1px solid var(--border-color);
}
.hw-card__actions--center { justify-content: center; }
.hw-card__actions--bare { border-top: 0; padding-top: 0; margin-top: var(--space-5); }

/* 5. SectionHeading ------------------------------------------------------- */
.hw-section-heading {
  display: flex; align-items: center; gap: var(--space-3);
  margin: var(--space-6) 0 var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-caption); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--halewood-navy);
}
.hw-section-heading::after { content: ""; flex: 1; height: 1px; background: var(--border-color); }
.hw-section-heading:first-child { margin-top: 0; }
.hw-subheading { font-size: var(--text-h3); font-weight: var(--weight-heading); margin: var(--space-6) 0 var(--space-2); }

/* 6. FormField / SelectField / CheckField --------------------------------- */
.hw-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-5); }
.hw-field { margin-top: var(--space-4); min-width: 0; }
.hw-field__label {
  display: block; margin-bottom: var(--space-2);
  font-size: var(--text-small); font-weight: var(--weight-medium); color: var(--text-primary);
}
.hw-field__hint { margin: var(--space-2) 0 0; font-size: var(--text-small); color: var(--text-secondary); }
.hw-input, .hw-textarea, .hw-select select {
  width: 100%;
  min-height: var(--control-height);
  padding: 0 var(--space-4);
  font: inherit; color: var(--text-primary);
  background: var(--surface-muted);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.hw-textarea { min-height: 120px; padding: var(--space-3) var(--space-4); resize: vertical; line-height: var(--leading-body); }
.hw-input::placeholder, .hw-textarea::placeholder { color: var(--text-secondary); opacity: .75; }
.hw-input:hover, .hw-textarea:hover, .hw-select select:hover { border-color: var(--halewood-navy); }
.hw-input:focus, .hw-textarea:focus, .hw-select select:focus {
  outline: none; background: var(--halewood-white);
  border-color: var(--halewood-navy); box-shadow: var(--focus-ring);
}
.hw-input--narrow { max-width: 340px; }

.hw-select { position: relative; }
.hw-select select { appearance: none; -webkit-appearance: none; padding-right: var(--space-7); cursor: pointer; text-overflow: ellipsis; }
.hw-select::after {
  content: ""; position: absolute; right: var(--space-4); top: 50%;
  width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--halewood-navy); border-bottom: 2px solid var(--halewood-navy);
  transform: rotate(45deg); pointer-events: none;
}

.hw-check {
  display: flex; gap: var(--space-3); align-items: flex-start;
  margin-top: var(--space-5);
  padding: var(--space-4);
  background: var(--surface-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: var(--text-small);
}
.hw-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--halewood-navy); cursor: pointer; }

.hw-error { min-height: 1.4em; margin-top: var(--space-3); font-size: var(--text-small); font-weight: var(--weight-medium); color: var(--status-danger); }
.hw-error:empty { min-height: 0; margin-top: 0; }

/* 7. UploadField + FileList ----------------------------------------------- */
.hw-upload {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4);
  padding: var(--space-5);
  background: var(--surface-muted);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
}
.hw-upload:hover, .hw-upload:focus-within { border-color: var(--halewood-navy); }
.hw-upload input[type=file] { flex: 1 1 240px; min-width: 0; font: inherit; font-size: var(--text-small); color: var(--text-secondary); }
.hw-upload input[type=file]::file-selector-button {
  margin-right: var(--space-4);
  min-height: 40px; padding: 0 var(--space-5);
  font-family: var(--font-heading); font-weight: 600; font-size: var(--text-small);
  color: var(--halewood-navy); background: var(--halewood-white);
  border: 1.5px solid var(--halewood-navy); border-radius: var(--radius-sm); cursor: pointer;
}
.hw-upload__or { font-size: var(--text-small); color: var(--text-secondary); }

.hw-filelist { margin-top: var(--space-3); display: grid; gap: var(--space-2); }
.hw-filelist:empty { margin-top: 0; }
.hw-file {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--halewood-white);
  border: 1px solid var(--border-color); border-radius: var(--radius-sm);
  font-size: var(--text-small);
}
.hw-file__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-file__status {
  flex: none; font-size: var(--text-caption); font-weight: var(--weight-bold);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary);
}
.hw-file__status.is-ok { color: var(--status-success); }
.hw-file__status.is-error { color: var(--status-danger); }

/* 8. PrimaryButton / SecondaryButton -------------------------------------- */
.hw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--control-height);
  padding: 0 var(--space-6);
  font-family: var(--font-heading); font-size: var(--text-body); font-weight: 600;
  text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.hw-btn--primary { background: var(--halewood-navy); border-color: var(--halewood-navy); color: var(--text-on-navy); }
.hw-btn--primary:hover { background: var(--halewood-navy-deep); border-color: var(--halewood-navy-deep); color: var(--text-on-navy); }
.hw-btn--secondary { background: transparent; border-color: var(--halewood-navy); color: var(--halewood-navy); }
.hw-btn--secondary:hover { background: var(--surface-selected); }
.hw-btn--danger { background: var(--status-danger); border-color: var(--status-danger); color: var(--text-on-navy); }
.hw-btn:disabled, .hw-btn[aria-disabled=true] { opacity: .38; cursor: not-allowed; }
.hw-btn--block { width: 100%; }
.hw-btn--sm { min-height: 40px; padding: 0 var(--space-4); font-size: var(--text-small); }

/* 9. ProgressIndicator ---------------------------------------------------- */
.hw-progress { margin-bottom: var(--space-5); }
.hw-progress__meta { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); margin-bottom: var(--space-2); }
.hw-progress__label { font-family: var(--font-heading); font-weight: 600; color: var(--halewood-navy); }
.hw-progress__step {
  font-size: var(--text-caption); font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-secondary);
}
.hw-progress__track { display: flex; gap: var(--space-1); }
.hw-progress__track span { flex: 1; height: 4px; border-radius: var(--radius-pill); background: var(--border-color); }
.hw-progress__track span.is-done { background: var(--halewood-gold); }
.hw-progress__track span.is-current { background: var(--halewood-navy); }

/* 10. InformationPanel ---------------------------------------------------- */
.hw-info {
  margin: var(--space-5) 0;
  padding: var(--space-4) var(--space-5);
  background: var(--gold-tint);
  border: 1px solid var(--gold-tint-border);
  border-left: 3px solid var(--halewood-gold);
  border-radius: var(--radius-sm);
  font-size: var(--text-small);
}
.hw-info > :last-child { margin-bottom: 0; }
.hw-info--danger { background: var(--status-danger-tint); border-color: var(--status-danger-border); border-left-color: var(--status-danger); }
.hw-list { margin: 0 0 var(--space-4); padding: 0; list-style: none; }
.hw-list li { position: relative; padding-left: var(--space-5); margin-bottom: var(--space-2); }
.hw-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 7px; height: 7px; background: var(--halewood-gold); border-radius: 1px; transform: rotate(45deg);
}

/* 11. AssessmentPanel ----------------------------------------------------- */
.hw-assessment__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.hw-assessment__category {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-caption); font-weight: var(--weight-bold);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-on-navy); background: var(--halewood-navy); border-radius: var(--radius-sm);
}
.hw-assessment__meta { font-size: var(--text-small); font-weight: var(--weight-medium); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.hw-assessment__timer { height: 6px; margin-bottom: var(--space-5); background: var(--border-color); border-radius: var(--radius-pill); overflow: hidden; }
.hw-assessment__timer .fill { height: 100%; width: 100%; background: var(--status-success); transition: width 1s linear, background .3s; }
.hw-assessment__timer .fill.low { background: var(--status-warning); }
.hw-assessment__timer .fill.crit { background: var(--status-danger); }
.hw-assessment__question { margin-bottom: var(--space-5); font-size: var(--text-lead); font-weight: var(--weight-medium); line-height: 1.5; user-select: none; }
.hw-assessment__options { display: grid; gap: var(--space-3); }
.hw-option {
  width: 100%; min-height: var(--control-height);
  padding: var(--space-3) var(--space-4);
  font: inherit; text-align: left; line-height: 1.45; color: var(--text-primary);
  background: var(--surface-muted);
  border: 1.5px solid var(--border-color); border-radius: var(--radius-sm);
  cursor: pointer; user-select: none;
  transition: border-color .15s, background .15s;
}
.hw-option:hover { border-color: var(--halewood-navy); }
.hw-option.sel { border-color: var(--halewood-navy); background: var(--surface-selected); font-weight: var(--weight-medium); box-shadow: inset 3px 0 0 var(--halewood-navy); }

/* 12. CameraFrame, Monitor, Dialog, Reference ----------------------------- */
.hw-camera { margin: var(--space-5) 0; text-align: center; }
.hw-camera video, .hw-camera canvas {
  width: 100%; max-width: 420px; max-height: 55vh; max-height: 55dvh; object-fit: cover;
  background: var(--halewood-navy-deep);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
}
.hw-camera__status { min-height: 1.5em; margin-top: var(--space-2); font-size: var(--text-small); font-weight: var(--weight-medium); color: var(--text-secondary); }
.hw-camera__status.ok { color: var(--status-success); }
.hw-camera__status.bad { color: var(--status-danger); }

.hw-monitor {
  position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 50;
  width: 112px; overflow: hidden;
  background: var(--halewood-navy-deep);
  border: 2px solid var(--halewood-gold); border-radius: var(--radius-md);
}
.hw-monitor video { display: block; width: 100%; }
.hw-monitor__label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0;
  font-size: 9px; letter-spacing: 0.14em; text-align: center;
  color: var(--text-on-navy); background: var(--overlay-navy);
}

.hw-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-5);
  background: var(--overlay-navy);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.hw-dialog {
  width: 100%; max-width: 480px;
  max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto;
  padding: var(--space-6);
  text-align: center;
  background: var(--background-secondary);
  border-top: 3px solid var(--halewood-gold); border-radius: var(--radius-md);
  box-shadow: var(--shadow-raised);
}
.hw-dialog--wide { max-width: 580px; }
.hw-dialog__title { font-size: var(--text-h3); font-weight: var(--weight-heading); margin-bottom: var(--space-3); }
.hw-dialog__title--danger { color: var(--status-danger); }
.hw-dialog video, .hw-dialog canvas {
  width: 100%; max-height: 50vh; max-height: 50dvh; object-fit: contain;
  margin-top: var(--space-3);
  background: var(--halewood-navy-deep); border-radius: var(--radius-md);
}
.hw-dialog__actions {
  position: sticky; bottom: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3);
  margin-top: var(--space-3); padding: var(--space-3) 0 var(--space-1);
  background: var(--background-secondary);
}

.hw-reference {
  display: inline-block; margin: var(--space-4) 0 var(--space-5);
  padding: var(--space-4) var(--space-6);
  font-family: var(--font-heading); font-size: var(--text-h1); font-weight: var(--weight-heading);
  letter-spacing: 0.04em; color: var(--halewood-navy);
  background: var(--surface-muted);
  border: 1.5px dashed var(--halewood-gold); border-radius: var(--radius-md);
}

/* 13. Landing: Hero, StartCard, Pipeline ---------------------------------- */
/* The whole landing page (header + hero + pipeline + footer) fits one desktop screen:
   the hero takes whatever height is left, it never forces the page to scroll. */
.hw-landing { flex: 1 0 auto; display: flex; flex-direction: column; }
.hw-hero {
  flex: 1 0 auto; display: flex;
  color: var(--text-on-navy);
  background: var(--hero-overlay), var(--hero-image) right top / var(--hero-image-size) no-repeat, var(--hero-base);
}
.hw-hero__inner {
  width: 100%; max-width: var(--width-wide); margin: 0 auto;
  padding: var(--hero-pad) var(--gutter) 0;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--space-7); align-items: end;
}
.hw-hero__copy { align-self: center; padding-bottom: var(--hero-pad); }
.hw-kicker {
  margin: 0 0 var(--space-4);
  font-size: var(--text-caption); font-weight: var(--weight-regular);
  letter-spacing: 0.42em; text-transform: uppercase; color: var(--text-on-navy-muted);
}
.hw-hero__title { font-size: var(--text-display); font-weight: var(--weight-heading); color: var(--text-on-navy); letter-spacing: -0.015em; }
.hw-hero__title span { display: block; font-weight: var(--weight-light); }
.hw-hero__rule { width: 72px; height: 3px; margin: var(--space-5) 0; background: var(--halewood-gold); border: 0; }
.hw-hero__lead { max-width: 34em; margin: 0; font-size: var(--text-lead); font-weight: var(--weight-light); color: var(--text-on-navy); }

.hw-start {
  position: relative;
  margin-bottom: calc(var(--hero-card-overhang) * -1);
  padding: var(--space-6);
  color: var(--text-primary);
  background: var(--background-secondary);
  border-top: 3px solid var(--halewood-gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-raised);
}
.hw-start__title { font-size: var(--text-h1); font-weight: var(--weight-heading); margin-bottom: var(--space-4); }
.hw-start .hw-field { margin-top: 0; }
.hw-start .hw-field__label { font-size: var(--text-body); font-weight: var(--weight-regular); }
.hw-start .hw-btn { margin-top: var(--space-4); }

.hw-pipeline { flex: none; width: 100%; max-width: var(--width-wide); margin: 0 auto; padding: var(--space-5) var(--gutter) var(--space-4); }
.hw-pipeline__title {
  margin-bottom: var(--space-3);
  font-family: var(--font-body); font-size: var(--text-caption); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-secondary);
}
.hw-pipeline__list { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0; padding: 0; list-style: none; }
.hw-pipeline__list li { padding: var(--space-1) var(--space-4); border-left: 1px solid var(--border-strong); font-family: var(--font-heading); font-weight: 600; line-height: 1.3; color: var(--halewood-navy); }
.hw-pipeline__list li:first-child { padding-left: 0; border-left: 0; }
.hw-pipeline__index { display: block; margin-bottom: var(--space-2); font-family: var(--font-body); font-size: var(--text-caption); font-weight: var(--weight-bold); letter-spacing: 0.14em; color: var(--halewood-gold); }

/* 14. Prose (privacy notice, long-form text) ------------------------------ */
.hw-prose h2 { font-size: var(--text-h3); font-weight: var(--weight-heading); margin: var(--space-6) 0 var(--space-2); }
.hw-prose ul { padding-left: var(--space-5); margin: 0 0 var(--space-4); }
.hw-prose li { margin-bottom: var(--space-2); }
.hw-meta { font-size: var(--text-small); color: var(--text-secondary); }

/* 15. Admin (recruitment dashboard) --------------------------------------- */
.hw-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.hw-toolbar__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.hw-table-wrap { overflow-x: auto; }
.hw-table { width: 100%; border-collapse: collapse; font-size: var(--text-small); }
.hw-table th { padding: var(--space-2) var(--space-3); text-align: left; font-size: var(--text-caption); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); border-bottom: 2px solid var(--border-color); }
.hw-table td { padding: var(--space-3); border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.hw-table tr.row { cursor: pointer; }
.hw-table tr.row:hover { background: var(--surface-muted); }
.hw-kv td { padding: var(--space-1) var(--space-3) var(--space-1) 0; vertical-align: top; }
.hw-kv td:first-child { width: 200px; color: var(--text-secondary); }
.hw-pill { display: inline-block; padding: 2px var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-caption); font-weight: var(--weight-bold); }
.hw-pill--success { background: var(--status-success-tint); color: var(--status-success); }
.hw-pill--warning { background: var(--status-warning-tint); color: var(--status-warning); }
.hw-chip { display: inline-block; margin: 0 var(--space-1) 3px 0; padding: 2px var(--space-2); border-radius: var(--radius-sm); font-size: var(--text-caption); font-weight: var(--weight-medium); background: var(--status-danger-tint); color: var(--status-danger); }
.hw-score { font-weight: var(--weight-heading); }
.hw-score.g, .hw-text-success { color: var(--status-success); }
.hw-score.w { color: var(--status-warning); }
.hw-score.b, .hw-text-danger { color: var(--status-danger); }
.hw-text-muted { color: var(--text-secondary); }
.hw-photos { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: var(--space-3) 0; }
.hw-photos figure { margin: 0; text-align: center; }
.hw-photos img { display: block; max-width: 180px; max-height: 180px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); }
.hw-photos--sm img { max-width: 110px; max-height: 110px; }
.hw-photos figcaption { margin-top: var(--space-1); font-size: var(--text-caption); color: var(--text-secondary); }
.hw-quiet { padding: var(--space-3) var(--space-4); background: var(--surface-muted); border-radius: var(--radius-sm); }
.hw-quiet--log { max-height: 200px; overflow-y: auto; font-size: var(--text-small); color: var(--text-secondary); }
.hw-quiet--pre { white-space: pre-wrap; }
.hw-review { display: grid; gap: var(--space-2); }
.hw-review__item { display: flex; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--surface-muted); border-left: 4px solid var(--border-strong); border-radius: var(--radius-sm); }
.hw-review__mark { flex: none; width: 22px; font-size: var(--text-lead); font-weight: var(--weight-bold); }
.hw-review__item.is-right { border-color: var(--status-success); } .hw-review__item.is-right .hw-review__mark { color: var(--status-success); }
.hw-review__item.is-wrong { border-color: var(--status-danger); background: var(--status-danger-tint); } .hw-review__item.is-wrong .hw-review__mark { color: var(--status-danger); }
.hw-review__item.is-part { border-color: var(--status-warning); } .hw-review__item.is-part .hw-review__mark { color: var(--status-warning); }
.hw-review__meta { font-size: var(--text-caption); color: var(--text-secondary); }

/* 16. Utilities ----------------------------------------------------------- */
.hidden { display: none !important; }

/* ---- Tablet (max 960px) -------------------------------------------------- */
@media (max-width: 960px) {
  .hw-hero { background: var(--hero-overlay-compact), var(--hero-image) center / cover no-repeat, var(--hero-base); }
  .hw-hero__inner { grid-template-columns: 1fr; gap: var(--space-6); padding-top: var(--space-7); }
  .hw-hero__copy { padding-bottom: 0; }
  .hw-start { max-width: 640px; }
  /* single column: the card now overhangs the pipeline's left side, so clear it */
  .hw-pipeline { padding-top: calc(var(--hero-card-overhang) + var(--space-5)); }
  .hw-pipeline__list { grid-template-columns: repeat(3, 1fr); row-gap: var(--space-5); }
  .hw-pipeline__list li:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
}

/* ---- Mobile (max 600px) -------------------------------------------------- */
@media (max-width: 600px) {
  .hw-logo__word { font-size: 1.125rem; }
  .hw-logo__sub { font-size: 0.5rem; margin-top: 6px; }
  .hw-header__context { max-width: 14em; font-size: 0.625rem; letter-spacing: 0.16em; line-height: 1.5; }
  .hw-shell { padding-top: var(--space-5); }
  .hw-card, .hw-start { padding: var(--space-5) var(--space-4); }
  .hw-grid-2 { grid-template-columns: 1fr; }
  .hw-card__actions .hw-btn { flex: 1 1 100%; }
  .hw-hero__inner { padding-top: var(--space-6); }
  .hw-hero__lead { font-size: var(--text-body); }
  .hw-start__title { font-size: var(--text-h2); }
  .hw-pipeline__list { grid-template-columns: repeat(2, 1fr); }
  .hw-pipeline__list li:nth-child(3n + 1) { padding-left: var(--space-4); border-left: 1px solid var(--border-strong); }
  .hw-pipeline__list li:nth-child(2n + 1) { padding-left: 0; border-left: 0; }
  .hw-assessment__question { font-size: var(--text-body); }
  .hw-overlay { align-items: flex-start; padding: var(--space-3); }
  .hw-dialog { padding: var(--space-5) var(--space-4); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .hw-dialog__actions .hw-btn { flex: 1 1 auto; padding: 0 var(--space-4); }
  .hw-kv td:first-child { width: 120px; }
}

@media print {
  hw-header, hw-footer, .hw-progress { display: none; }
  body { background: var(--halewood-white); }
}
