/* Matrix Energy — Staff Health Enrolment
   Brand: Matrix sky blue, the lowercase wordmark, the station canopy.
   Interface: quiet, normal sizes, made for phones first. */

:root {
  --deep: #045f98;
  --deep-ink: #034a77;
  --mid: #217cb1;
  --sky: #3a9ad3;
  --ice: #cfe5f4;
  --pale: #e6f1f9;
  --mist: #f3f8fc;
  --ink: #12283a;
  --ink-2: #3d5568;
  --muted: #6b8193;
  --line: #dde7ef;
  --line-2: #c5d6e3;
  --danger: #b8382d;
  --ok: #1c7c52;

  --head: "Montserrat", "Segoe UI", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --r: 6px;
  --field: #eef4f9;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--deep); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--head); }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(80% 90% at 100% 100%, rgba(120, 188, 216, .55), transparent 70%),
    linear-gradient(170deg, #045f98 0%, #0b6aa1 45%, #2a85b7 100%);
  padding: 20px 0 120px;
}
.hero--compact { padding-bottom: 110px; }
.hero-inner { position: relative; z-index: 2; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand img { width: 104px; height: auto; }
.hero-place { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--ice); }
.hero-text { margin-top: 32px; max-width: 540px; }
.eyebrow-light {
  margin: 0 0 8px;
  font-family: var(--head); font-weight: 600; font-size: 12px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ice);
}
.hero h1 { margin: 0; font-weight: 600; font-size: 28px; line-height: 1.2; }
.hero-intro { margin: 8px 0 0; color: #e4f0f8; font-size: 15px; max-width: 480px; }
.hero-link { display: inline-block; margin-top: 10px; color: #fff; font-size: 15px; font-weight: 600; text-underline-offset: 3px; }
.hero-link:hover { color: var(--ice); }

.hero-canopy {
  position: absolute; left: 0; bottom: 0; z-index: 1;
  width: 640px; height: auto; max-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 35%), linear-gradient(to right, #000 65%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0, #000 35%), linear-gradient(to right, #000 65%, transparent 100%);
  mask-composite: intersect;
  pointer-events: none;
}
.hero-cloud { position: absolute; right: 0; bottom: 0; z-index: 1; width: 180px; height: auto; opacity: .9; pointer-events: none; }

/* ---------- Main ---------- */
.sheet { padding: 32px 0 64px; }

/* Progress */
.progress { margin-bottom: 16px; }
.progress-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 14px; }
.progress-meta span { color: var(--muted); }
.progress-meta strong { font-weight: 600; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.steps li {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0 0;
  border-top: 3px solid var(--line-2);
  color: var(--muted); font-size: 15px; font-weight: 600;
}
.steps b {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid currentColor;
  font-family: var(--head); font-size: 12px; font-weight: 600;
}
.steps li.is-done { border-color: var(--sky); color: var(--mid); }
.steps li.is-active { border-color: var(--deep); color: var(--deep); }
.steps li.is-active b { background: var(--deep); border-color: var(--deep); color: #fff; }
.progress-bar { height: 3px; background: #dbe7f0; border-radius: 2px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 25%; background: var(--deep); transition: width .25s ease; }

/* Sections */
.card { background: #fff; border-radius: 10px; padding: 24px; }
.card + .card { margin-top: 16px; }
.card-head { margin-bottom: 18px; }
.section-title { margin: 0; font-weight: 600; font-size: 17px; line-height: 1.3; color: var(--ink); }
.hint { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.note { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* Fields */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.span-2 { grid-column: 1 / -1; }
.field { min-width: 0; margin: 0; padding: 0; border: 0; }
.field label, .label { display: block; margin-bottom: 5px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.req { color: var(--danger); font-style: normal; }
input[type=text], input:not([type]), input[type=email], input[type=tel], input[type=date], input[type=password], input[type=search], select {
  display: block; width: 100%;
  height: 42px; padding: 0 12px;
  background: var(--field);
  border: 1px solid transparent;
  border-radius: var(--r);
  font-size: 16px; /* 16px stops iPhones zooming into fields */
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
input[type=date] { min-height: 42px; }
select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236b8193' stroke-width='1.6' d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input::placeholder { color: #9fb1bf; }
input:focus, select:focus { outline: none; background: #fff; border-color: var(--deep); box-shadow: 0 0 0 3px rgba(4, 95, 152, .1); }
.field.has-error input, .field.has-error select { border-color: var(--danger); }
.err { margin: 5px 0 0; color: var(--danger); font-size: 14px; }
.err:empty { display: none; }

/* Photo */
.photo { display: flex; align-items: center; gap: 16px; }
.photo-frame {
  flex: none; width: 76px; height: 95px;
  border: 1px solid transparent; border-radius: var(--r);
  background: var(--field); color: var(--muted);
  cursor: pointer; overflow: hidden; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.photo-frame:hover, .photo-frame:focus-visible { border-color: var(--deep); color: var(--deep); outline: none; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-empty { display: flex; }
.photo.has-photo .photo-frame { background: none; }
.photo-help p { margin: 0 0 6px; color: var(--muted); font-size: 14px; max-width: 300px; }
.field.has-error .photo-frame { border-color: var(--danger); }

/* Conditions */
.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 16px; margin: 8px 0 12px; }
.check { display: flex; align-items: center; gap: 9px; min-height: 36px; font-size: 15px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 0; flex: none; accent-color: var(--deep); }

/* Dependants */
.deps { display: grid; gap: 16px; }
.dep { border-radius: 8px; background: var(--mist); }
.dep-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px 0;
}
.dep-head h3 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
.dep-tag { color: var(--muted); font-weight: 500; }
.dep-remove { border: 0; background: none; color: var(--danger); font-size: 14px; font-weight: 600; cursor: pointer; padding: 6px 0; }
.dep-remove:hover { text-decoration: underline; }
.dep .grid { padding: 12px 14px 16px; }
.dep input[type=text], .dep input:not([type]), .dep input[type=email], .dep input[type=tel], .dep input[type=date], .dep select { background-color: #fff; }
.dep .photo-frame { background: #fff; }
.deps-empty { padding: 4px 0; color: var(--muted); font-size: 15px; }
.deps-empty p { margin: 0; }
.btn-add { margin-top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px;
  border-radius: var(--r); border: 0;
  font-family: var(--body); font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--deep); color: #fff; }
.btn-primary:hover { background: var(--deep-ink); }
.btn-primary[disabled] { opacity: .65; cursor: progress; }
.btn-ghost { background: var(--pale); color: var(--deep); }
.btn-ghost:hover { background: #d8e9f5; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; }

.form-nav { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.form-nav #next, .form-nav #submit { margin-left: auto; }
.form-nav--end { justify-content: flex-end; margin-top: 4px; }
.autosave { color: var(--muted); font-size: 14px; }
.form-error {
  margin: 16px 0 0; padding: 12px 14px;
  border-radius: var(--r); background: #fdf0ee; color: #8c2a21;
  font-size: 15px;
}
.form-error a { color: inherit; font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Review */
.review { display: grid; gap: 22px; }
.consent {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 24px; padding: 14px 16px;
  background: var(--mist); border-radius: var(--r);
  font-size: 15px; cursor: pointer;
}
.consent input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--deep); }

/* ---------- Done / policy numbers ---------- */
.done-head { margin-bottom: 16px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; color: var(--ok); font-size: 15px; font-weight: 600; }
.eyebrow::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='1.8' d='m1 4 2.6 2.6L9 1'/%3E%3C/svg%3E") center no-repeat;
}
.done-title { margin: 0; font-size: 21px; font-weight: 600; line-height: 1.25; color: var(--ink); }
.notice {
  margin: 0 0 18px; padding: 12px 14px;
  background: #fff6e0; border-radius: var(--r);
  color: #5b4510; font-size: 15px;
}

.policy-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: center;
  padding: 18px;
  border-radius: 10px;
  color: #fff;
  background:
    radial-gradient(80% 120% at 100% 100%, rgba(120,188,216,.45), transparent 60%),
    linear-gradient(160deg, #045f98 0%, #0d6ca3 60%, #2a85b7 100%);
}
.pc-logo { position: absolute; top: 16px; right: 18px; width: 64px; height: auto; opacity: .95; }
.pc-photo {
  grid-row: span 2;
  width: 64px; height: 80px; border-radius: 6px; overflow: hidden;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
}
.pc-photo img { width: 100%; height: 100%; object-fit: cover; }
.pc-photo a { display: block; width: 100%; height: 100%; }
.pc-initials { font-family: var(--head); font-weight: 600; font-size: 22px; }
.pc-body { display: flex; flex-direction: column; min-width: 0; padding-right: 60px; }
.pc-label { font-size: 14px; color: var(--ice); }
.pc-number {
  margin: 2px 0 6px;
  font-family: var(--head); font-weight: 600; font-size: 22px; line-height: 1.25;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
  overflow-wrap: anywhere;
}
.pc-name { font-weight: 600; font-size: 16px; }
.pc-meta { color: var(--ice); font-size: 14px; }
.policy-card .copy { grid-column: 2; justify-self: start; margin-top: 12px; }

.copy {
  border: 0; background: var(--pale); color: var(--deep);
  border-radius: var(--r); padding: 4px 12px; min-height: 32px;
  font: 600 14px var(--body); cursor: pointer;
}
.copy:hover { background: #d8e9f5; }
.copy.is-copied { background: var(--ok); border-color: var(--ok); color: #fff; }
.copy-light { background: rgba(255,255,255,.16); color: #fff; }
.copy-light:hover { background: rgba(255,255,255,.26); }

.sub-title { margin: 24px 0 8px; font-size: 15px; font-weight: 600; color: var(--ink); }
.dep-numbers { list-style: none; margin: 0; padding: 4px 0; background: #fff; border-radius: 10px; }
.dep-numbers li { display: grid; grid-template-columns: 36px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 14px; }

.dn-avatar, .dep-numbers li > img {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  background: var(--pale); color: var(--deep);
  font-family: var(--head); font-weight: 600; font-size: 14px;
}
.dn-who { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.dn-who b { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.dn-who span { font-size: 14px; color: var(--muted); }
.dn-number { font-family: var(--head); font-weight: 600; font-size: 15px; color: var(--deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.done-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.done .note { margin-top: 16px; }

/* ---------- Footer ---------- */
.site-foot { color: var(--muted); padding: 8px 0 28px; font-size: 13px; }
.foot-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; }
.foot-logo { width: 64px; height: auto; opacity: .8; }
.foot-note { margin: 0; }
.foot-note a { color: var(--deep); }

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 16px 0 24px; }
  .hero--compact { padding-bottom: 22px; }
  .brand img { width: 84px; }
  .hero-place { font-size: 13px; }
  .hero-text { margin-top: 22px; }
  .eyebrow-light { font-size: 11px; margin-bottom: 6px; }
  .hero h1 { font-size: 22px; }
  .hero-intro { font-size: 15px; margin-top: 8px; }
  .hero-link { font-size: 15px; margin-top: 10px; }
  .hero-canopy, .hero-cloud { display: none; }

  .sheet { padding: 0 0 32px; }
  .wrap.narrow { padding: 0; }

  .progress { margin: 0; padding: 12px 16px 10px; background: var(--mist); position: sticky; top: 0; z-index: 5; }

  .card { border-radius: 0; padding: 18px 16px 22px; }
  .card + .card { margin-top: 8px; }
  .card-head { margin-bottom: 18px; }
  .section-title { font-size: 16px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .checks { grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .dep .grid { padding: 16px 14px 18px; }

  .form-nav { margin: 0; padding: 14px 16px; background: #fff; }
  .form-nav .btn-primary { flex: 1; }
  .autosave { display: none; }
  .form-error { margin: 12px 16px 0; }

  .review { gap: 20px; }
  
  .done { padding: 20px 16px 0; }
  .done-title { font-size: 19px; }
  .policy-card { padding: 16px; column-gap: 14px; }
  .pc-photo { width: 56px; height: 70px; }
  .pc-number { font-size: 20px; }
  .pc-body { padding-right: 0; }
  .pc-logo { width: 52px; top: 14px; right: 14px; }
  .dep-numbers li { grid-template-columns: 34px 1fr auto; gap: 2px 12px; }
  .dn-avatar, .dep-numbers li > img { width: 34px; height: 34px; grid-row: span 2; }
  .dn-number { grid-column: 2; font-size: 15px; }
  .dep-numbers .copy { grid-column: 3; grid-row: 1 / span 2; }
  .done-actions { flex-direction: column; }
  .done-actions .btn { width: 100%; }

  .site-foot { padding: 18px 0 24px; }
  .foot-grid { justify-content: center; }
}

/* ---------- Print: just the numbers ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  .hero, .progress, .site-foot, .done-actions, .copy, .enrol, .form-nav, .done .note { display: none !important; }
  .sheet { padding: 0; }
  .policy-card { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- HR console ---------- */
.hr-bar { background: var(--deep); color: #fff; }
.hr-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.hr-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-size: 15px; }
.hr-brand img { width: 80px; height: auto; }
.hr-brand span { padding-left: 12px; border-left: 1px solid rgba(255,255,255,.35); color: var(--ice); }
.hr-main { padding: 24px 0 56px; }
.hr-main .card + .card, .hr-main .policy-card + .card { margin-top: 16px; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.tile { background: #fff; border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; }
.tile-n { font-family: var(--head); font-weight: 600; font-size: 22px; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.tile-l { margin-top: 2px; font-size: 14px; color: var(--muted); }

.hr-list { padding: 22px; }
.hr-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.hr-search { display: flex; gap: 8px; flex: 1 1 340px; max-width: 520px; }
.hr-search input { flex: 1; min-width: 0; height: 36px; font-size: 15px; }
.table-scroll { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
.hr-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hr-table th { text-align: left; padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.hr-table td { padding: 8px 10px; border-top: 1px solid #edf2f6; vertical-align: middle; }
.hr-table tbody tr:hover { background: var(--mist); }
.hr-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.hr-table .nowrap { white-space: nowrap; }
.thumb { width: 32px; height: 40px; object-fit: cover; border-radius: 3px; background: var(--pale); }
.pn { font-weight: 600; color: var(--deep); text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pn:hover { text-decoration: underline; }
.pager { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 14px; }
.pager a { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; background: var(--pale); border-radius: var(--r); text-decoration: none; font-size: 14px; }
.pager a[aria-current] { background: var(--deep); border-color: var(--deep); color: #fff; }
.empty { margin: 8px 0; color: var(--ink-2); }
.share code { background: var(--mist); padding: 2px 6px; border-radius: 3px; font-size: 14px; }
.flash { margin: 0 0 14px; padding: 10px 14px; background: #e8f5ee; border-radius: var(--r); color: #155c3d; font-size: 15px; }

.crumbs { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.section-title.sm { font-size: 17px; margin-bottom: 14px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 1px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.dim { color: #a9bccb; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #982c23; }

.hr-login { max-width: 400px; margin: 28px auto 0; padding: 0 0 26px; overflow: hidden; }
.hr-login-photo { width: 100%; height: 120px; object-fit: cover; object-position: center 30%; margin-bottom: 22px; }
.hr-login .card-head, .hr-login .form-error, .hr-login-form { margin-left: 26px; margin-right: 26px; }
.hr-login-form { display: grid; gap: 14px; }

@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .hr-list { padding: 16px; }
  .table-scroll { margin: 0 -16px; padding: 0 16px; }
  .hr-main .card { border-radius: 10px; padding: 18px 16px; }
  .hr-login { margin: 16px 16px 0; padding: 0 0 22px; }
  .hr-login .card-head, .hr-login .form-error, .hr-login-form { margin-left: 18px; margin-right: 18px; }
}

.photo-empty { flex-direction: column; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; }

/* ---------- Phone-friendly HR + lookup ---------- */
.hr-cards { display: none; list-style: none; margin: 0; padding: 0; }
.find-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.text-link { font-size: 15px; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.hr-dep { display: block; padding: 14px 0; }
.hr-dep + .hr-dep { border-top: 1px solid #edf2f6; }
.hr-dep-head { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; margin: 0 0 12px; }
.hr-dep-head img { width: 56px; height: 70px; object-fit: cover; border-radius: 4px; background: var(--pale); }
.hr-dep-id { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.hr-dep-id b { font-weight: 600; }
.hc-meta { color: var(--muted); font-size: 14px; }

@media (max-width: 640px) {
  .hr-bar-inner { min-height: 52px; padding-top: 8px; padding-bottom: 8px; }
  .hr-brand img { width: 72px; }


  .hr-main { padding: 14px 0 40px; }
  .hr-main .wrap { padding: 0 12px; }
  .tiles { grid-template-columns: repeat(4, 1fr); gap: 0; background: #fff; border-radius: 10px; padding: 12px 4px; margin-bottom: 12px; }
  .tile { background: none; border-radius: 0; padding: 0 8px; align-items: center; text-align: center; }
  .tile-n { font-size: 19px; }
  .tile-l { font-size: 12px; line-height: 1.25; }

  .hr-list { padding: 16px 0 8px; }
  .hr-list-head { padding: 0 14px; margin-bottom: 8px; }
  .hr-search { flex-basis: 100%; max-width: none; }
  .table-scroll { display: none; }
  .hr-cards { display: block; }
  .hr-cards a { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; text-decoration: none; color: var(--ink); }
  .hr-cards a:active { background: var(--mist); }
  .hr-cards li + li a { border-top: 1px solid #edf2f6; }
  .hr-cards .thumb { width: 40px; height: 50px; }
  .hc-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
  .hc-main b { font-weight: 600; font-size: 15px; }
  .hc-pn { color: var(--deep); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
  .hc-meta { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hc-go { color: #a9bccb; }
  .hr-list .note, .hr-list .empty, .hr-list .share, .pager { padding: 0 14px; }

  .crumbs { padding: 0 4px; }
  .hr-main .policy-card { border-radius: 10px; }
  .facts { grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .hr-dep-head { grid-template-columns: 48px 1fr auto; gap: 12px; }
  .hr-dep-head img { width: 48px; height: 60px; }
  .danger-zone .btn { width: 100%; }

  .find-actions { flex-direction: column; align-items: stretch; text-align: center; gap: 14px; }
}

/* HR: sign out + downloads */
.hr-signout { margin: 0; }
.hr-signout button { background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: var(--r); padding: 7px 14px; font: 600 14px var(--body); cursor: pointer; }
.hr-signout button:hover { background: rgba(255,255,255,.24); }
.hr-bar-inner { flex-wrap: nowrap; }
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.dl { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: #fff; border-radius: 10px; text-decoration: none; color: var(--ink); }
.dl:hover { background: #fbfdff; box-shadow: 0 0 0 2px var(--pale); }
.dl-icon { flex: none; width: 36px; height: 36px; border-radius: 8px; background: var(--pale); color: var(--deep); display: flex; align-items: center; justify-content: center; }
.dl-text { display: flex; flex-direction: column; line-height: 1.35; }
.dl-text b { font-weight: 600; color: var(--deep); }
.dl-text span { font-size: 14px; color: var(--muted); }
.crumbs a { font-weight: 600; text-decoration: none; }
.foot-grid { justify-content: center; }
@media (max-width: 640px) {
  .downloads { grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
}

/* ---------- Finished screen: the card ---------- */
.done { max-width: 420px; margin: 0 auto; padding-top: 8px; }
.done-head { text-align: center; margin-bottom: 22px; }
.done-title { margin: 0; font-size: 22px; font-weight: 600; color: var(--ink); }
.done-sub { margin: 6px auto 0; max-width: 320px; color: var(--muted); font-size: 15px; }

.idcard {
  position: relative; overflow: hidden; isolation: isolate;
  width: 100%; max-width: 360px; margin: 0 auto;
  aspect-ratio: 1.586 / 1;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 18px 20px 16px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #034f80 0%, #0a68a2 48%, #3a95c7 100%);
  box-shadow: 0 1px 2px rgba(3, 50, 85, .25), 0 22px 40px -22px rgba(3, 60, 100, .7);
}
.idcard::before { /* soft sky light, like the flyers */
  content: ""; position: absolute; z-index: -1;
  width: 340px; height: 340px; right: -150px; top: -190px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), rgba(255,255,255,0) 65%);
}
.idcard::after { /* the long stroke of the matrix "x" */
  content: ""; position: absolute; z-index: -1;
  width: 2px; height: 260px; right: 74px; top: -40px;
  background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.18), rgba(255,255,255,0));
  transform: rotate(-38deg);
}
.idcard-top { display: flex; align-items: center; justify-content: space-between; }
.idcard-top img { width: 62px; height: auto; }
.idcard-top span { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.idcard-mid { display: flex; align-items: center; gap: 14px; }
.idcard-photo {
  flex: none; width: 50px; height: 62px; border-radius: 7px; object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255,255,255,.85);
}
.idcard-photo.is-initials { display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.18); font-family: var(--head); font-weight: 600; font-size: 18px; }
.idcard-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.idcard-name { font-family: var(--head); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idcard-role { font-size: 13px; color: rgba(255,255,255,.75); }
.idcard-bottom { display: flex; flex-direction: column; }
.idcard-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.idcard-number {
  font-family: var(--head); font-weight: 500; font-size: 21px; letter-spacing: .08em;
  font-variant-numeric: tabular-nums; text-shadow: 0 1px 1px rgba(0,0,0,.15);
}

.idcard-copy { text-align: center; margin: 14px 0 0; }
.link-btn, .num-btn, .link-plain {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: none; padding: 6px 8px; border-radius: 6px;
  color: var(--deep); font: 600 15px var(--body); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.link-btn:hover, .num-btn:hover { background: var(--pale); }
.link-btn.is-copied, .num-btn.is-copied { color: var(--ok); }

.done-section { margin: 30px 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.people { list-style: none; margin: 0; padding: 4px 0; background: #fff; border-radius: 14px; }
.people li { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; }
.people-photo { flex: none; width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.people-photo.is-initials { display: flex; align-items: center; justify-content: center; background: var(--pale); color: var(--deep); font-family: var(--head); font-weight: 600; font-size: 13px; }
.people-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.people-who b { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.people-who span { font-size: 13.5px; color: var(--muted); }
.num-btn { flex: none; font-family: var(--head); font-weight: 500; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.num-btn svg { color: #8fb3cc; }

.done .done-actions { display: block; margin-top: 28px; text-align: center; }
.done .done-actions .btn { width: 100%; }
.done-links { margin: 10px 0 0; display: flex; align-items: center; justify-content: center; gap: 4px; color: #a9bccb; }
.done-links a { padding: 6px 8px; font-weight: 600; font-size: 15px; text-decoration: none; }
.done-links a:hover, .link-plain:hover { text-decoration: underline; }
.done-foot { margin: 22px auto 0; max-width: 340px; text-align: center; color: var(--muted); font-size: 13.5px; }

@media (max-width: 640px) {
  .done { padding: 24px 16px 0; }
  .done-title { font-size: 20px; }
  .idcard { padding: 16px 18px 14px; }
  .idcard-number { font-size: 19px; }
}
@media print {
  .idcard { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .idcard-copy, .num-btn svg, .done-foot { display: none !important; }
}

/* ---------- Review step (works at any width) ---------- */
.opt { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 4px; }
.review { display: grid; gap: 22px; }
.rv-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.rv-head h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rv-head button { border: 0; background: none; padding: 4px 0; color: var(--deep); font: 600 15px var(--body); cursor: pointer; }
.rv-card { background: var(--mist); border-radius: 12px; padding: 14px; }
.rv-card + .rv-card { margin-top: 10px; }
.rv-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rv-top img, .rv-nophoto { flex: none; width: 44px; height: 55px; border-radius: 6px; object-fit: cover; background: var(--pale); }
.rv-top div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.rv-top b { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.rv-top span { font-size: 14px; color: var(--muted); }
.rv-list { margin: 12px 0 0; display: grid; gap: 8px; }
.rv-list div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; font-size: 15px; }
.rv-list dt { color: var(--muted); }
.rv-list dd { margin: 0; overflow-wrap: anywhere; }
.consent { margin-top: 22px; }
@media (max-width: 640px) {
  .rv-list div { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
}
