/* ============================================================
   HEALTH HACK · Participation Portal
   Extends the main design system (../styles.css)
   ============================================================ */

.portal-body { background: var(--white); }

/* ---------- Portal nav ---------- */
.pnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--grey-light);
}
.pnav-inner {
  max-width: var(--max); margin: 0 auto; padding: 18px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.pnav-right { display: flex; align-items: center; gap: 18px; }
.role-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--orange); border: 1.5px solid var(--orange); border-radius: 100px;
  padding: 7px 15px; white-space: nowrap;
}
.btn-sm { padding: 10px 20px; font-size: 14px; }
.pnav a.back {
  font-size: 14px; font-weight: 600; color: var(--ink-600); text-decoration: none;
}
.pnav a.back:hover { color: var(--orange); }

/* ---------- Login ---------- */
.login-wrap {
  min-height: calc(100vh - 74px);
  display: grid; grid-template-columns: 1fr 1fr;
}
.login-aside {
  background: var(--black); color: var(--white);
  padding: 80px 64px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-aside h2 { color: var(--white); margin: 24px 0 22px; font-size: clamp(34px,4vw,54px); }
.login-aside p { color: var(--grey-med); font-size: 17px; max-width: 420px; }
.login-facts { list-style: none; margin-top: 44px; }
.login-facts li {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 16px 0; border-bottom: 1px solid #262626; font-size: 15px;
}
.login-facts li span:first-child { color: var(--ink-400); }
.login-facts li span:last-child { font-weight: 700; text-align: right; }

.login-main { padding: 80px 64px; display: flex; align-items: center; }
.login-card { width: 100%; max-width: 480px; margin: 0 auto; }
.login-card h1 { font-size: clamp(38px,5vw,58px); margin-bottom: 18px; }
.login-card > p.lead { margin-bottom: 40px; font-size: 18px; }

/* Role selector */
.role-pick { display: grid; gap: 12px; margin-bottom: 30px; }
.role-opt {
  display: flex; align-items: center; gap: 16px; cursor: pointer;
  border: 1.5px solid var(--grey-light); border-radius: var(--radius-sm);
  padding: 18px 22px; transition: all 0.2s var(--ease); background: var(--white);
}
.role-opt:hover { border-color: var(--grey-med); }
.role-opt input { position: absolute; opacity: 0; pointer-events: none; }
.role-opt .dot {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--grey-med);
  flex-shrink: 0; position: relative; transition: all 0.2s var(--ease);
}
.role-opt .rl-title { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.role-opt .rl-sub { font-size: 13px; color: var(--ink-400); margin-top: 2px; }
.role-opt.selected { border-color: var(--black); background: var(--off-white); }
.role-opt.selected .dot { border-color: var(--orange); }
.role-opt.selected .dot::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--orange);
}

/* Fields */
.field { margin-bottom: 22px; }
.field label {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-400); margin-bottom: 10px;
}
.field input[type=text], .field input[type=email], .field input[type=password],
.field select, .field textarea {
  width: 100%; font-family: inherit; font-size: 17px; color: var(--black);
  background: var(--white); border: 1.5px solid var(--grey-light);
  border-radius: var(--radius-sm); padding: 16px 18px; transition: border-color 0.2s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--orange);
}
.field .hint { font-size: 13px; color: var(--ink-400); margin-top: 8px; }
.field-code input { letter-spacing: 0.3em; font-weight: 700; text-transform: uppercase; }

.status-msg { font-size: 15px; margin-top: 18px; min-height: 24px; }
.status-msg.err { color: #c62828; font-weight: 600; }
.status-msg.ok { color: #1b7f3b; font-weight: 600; }

/* ---------- Dashboard ---------- */
.dash-head { padding: 72px 0 48px; }
.dash-head h1 { font-size: clamp(40px,6vw,80px); margin: 22px 0 20px; }
.dash-head .lead { margin-bottom: 0; }

.tile-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; padding-bottom: 110px; }
.tile {
  display: flex; flex-direction: column; text-decoration: none; color: var(--black);
  background: var(--off-white); border-radius: var(--radius); padding: 36px;
  border: 1.5px solid transparent; transition: all 0.28s var(--ease); min-height: 250px;
}
.tile:hover { transform: translateY(-6px); background: var(--black); color: var(--white); }
.tile:hover h3 { color: var(--white); }
.tile:hover p { color: var(--grey-med); }
.tile:hover .icon-chip { background: rgba(255,90,31,0.22); }
.tile:hover .tile-go { color: var(--orange); }
.tile h3 { margin-bottom: 10px; transition: color 0.28s var(--ease); }
.tile p { font-size: 15px; color: var(--ink-600); line-height: 1.55; transition: color 0.28s var(--ease); }
.tile .tile-go {
  margin-top: auto; padding-top: 22px; font-size: 13px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange);
  transition: color 0.28s var(--ease);
}
.tile .icon-chip { margin-bottom: 22px; }

/* Status pill on a tile */
.tile-status {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 100px; margin-bottom: 14px;
}
.tile-status.todo { background: var(--orange); color: var(--white); }
.tile-status.done { background: #d6f0dd; color: #1b7f3b; }

/* ---------- Content pages ---------- */
.page-head { padding: 64px 0 40px; }
.page-head h1 { font-size: clamp(38px,5.4vw,72px); margin: 20px 0 18px; }
.page-body { padding-bottom: 110px; }
.prose { max-width: 780px; }
.prose h2 { font-size: 30px; margin: 46px 0 16px; }
.prose h3 { font-size: 20px; margin: 32px 0 10px; }
.prose p { font-size: 17px; color: var(--ink-600); margin-bottom: 16px; }
.prose ul { margin: 0 0 20px 22px; }
.prose li { font-size: 17px; color: var(--ink-600); margin-bottom: 10px; }
.prose strong { color: var(--black); }

.doc-frame {
  width: 100%; height: 82vh; min-height: 560px; border: 1.5px solid var(--grey-light);
  border-radius: var(--radius); background: var(--off-white);
}
.map-fig { margin-bottom: 44px; }
.map-fig img {
  width: 100%; height: auto; display: block;
  border: 1.5px solid var(--grey-light); border-radius: var(--radius);
}
.map-fig figcaption { font-size: 15px; color: var(--ink-400); margin-top: 14px; }

.notice {
  background: var(--orange-soft); border-left: 4px solid var(--orange);
  border-radius: var(--radius-sm); padding: 24px 28px; margin: 28px 0;
}
.notice p { font-size: 16px; color: var(--ink-600); margin: 0; }
.notice strong { color: var(--black); }

/* Remembered team */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.team-note {
  font-size: 15px; color: var(--ink-400); margin: 0 0 30px;
}
.team-note strong { color: var(--black); font-weight: 700; }
.team-note a {
  color: var(--orange); font-weight: 600; text-decoration: none; margin-left: 10px;
}
.team-note a:hover { text-decoration: underline; }

/* Consent */
.consent-doc {
  max-height: 420px; overflow-y: auto; border: 1.5px solid var(--grey-light);
  border-radius: var(--radius-sm); padding: 32px; background: var(--off-white); margin-bottom: 32px;
}
.consent-doc h3 { font-size: 17px; margin: 26px 0 8px; }
.consent-doc h3:first-child { margin-top: 0; }
.consent-doc p { font-size: 15px; color: var(--ink-600); margin-bottom: 12px; line-height: 1.6; }
.check-row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.check-row input { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; accent-color: var(--orange); }
.check-row label { font-size: 16px; color: var(--ink-600); line-height: 1.5; }

/* Participant type. Deliberately NOT wrapped in .field: the .field label
   rule uppercases every label inside it, which would shout the options. */
.type-block { margin-bottom: 22px; }
.type-block .type-head {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-400); margin-bottom: 6px;
}
.type-block .type-hint { font-size: 13px; color: var(--ink-400); margin: 0 0 14px; }
.type-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0 24px; }
.type-grid .check-row { margin-bottom: 12px; }
.type-grid .check-row label { font-size: 15px; }
.type-other {
  width: 100%; font-family: inherit; font-size: 17px; color: var(--black);
  background: var(--white); border: 1.5px solid var(--grey-light);
  border-radius: var(--radius-sm); padding: 14px 18px; margin-top: 8px;
  transition: border-color 0.2s var(--ease);
}
.type-other:focus { outline: none; border-color: var(--orange); }
@media (max-width: 720px) { .type-grid { grid-template-columns: repeat(2,1fr); } }

.sig-input {
  font-family: "Georgia", serif !important; font-size: 26px !important; font-style: italic;
}

/* Upload */
.drop-zone {
  border: 2px dashed var(--grey-med); border-radius: var(--radius);
  padding: 60px 40px; text-align: center; cursor: pointer; background: var(--off-white);
  transition: all 0.22s var(--ease);
}
.drop-zone:hover, .drop-zone.over { border-color: var(--orange); background: var(--orange-soft); }
.drop-zone .dz-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.drop-zone .dz-sub { font-size: 15px; color: var(--ink-400); }
.file-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--off-white); border: 1.5px solid var(--grey-light);
  border-radius: var(--radius-sm); padding: 18px 22px; margin-top: 22px;
}
.file-chip .fc-name { font-weight: 700; font-size: 16px; word-break: break-all; }
.file-chip .fc-size { font-size: 14px; color: var(--ink-400); white-space: nowrap; }
.progress { height: 8px; background: var(--grey-light); border-radius: 100px; overflow: hidden; margin-top: 20px; }
.progress span { display: block; height: 100%; width: 0; background: var(--orange); transition: width 0.3s var(--ease); }

/* Judge scorecard list */
.judge-list { display: grid; gap: 14px; max-width: 640px; }
.judge-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: var(--off-white); border: 1.5px solid var(--grey-light);
  border-radius: var(--radius-sm); padding: 22px 26px; text-decoration: none; color: var(--black);
  transition: all 0.22s var(--ease);
}
.judge-row:hover { border-color: var(--orange); transform: translateX(4px); }
.judge-row .jr-name { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.judge-row .jr-go { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); }

/* ============================================================
   DOCUMENT PAGES
   Handbooks, programme and panel, as real pages rather than
   embedded PDFs. Everything below is built to stay readable
   at 360px, because that is what people will actually use.
   ============================================================ */

/* Sticky section jump bar */
.doc-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.94); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1.5px solid var(--grey-light);
  margin-bottom: 54px;
}
.doc-nav ul {
  display: flex; gap: 6px; list-style: none; overflow-x: auto;
  padding: 12px 0; margin: 0; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.doc-nav ul::-webkit-scrollbar { display: none; }
.doc-nav a {
  display: block; white-space: nowrap; text-decoration: none;
  font-size: 13px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-600);
  padding: 8px 15px; border-radius: 100px; transition: all 0.18s var(--ease);
}
.doc-nav a:hover { background: var(--off-white); color: var(--black); }
.doc-nav a.on { background: var(--black); color: var(--white); }

/* Section rhythm */
.doc-sec { padding-top: 18px; margin-bottom: 76px; scroll-margin-top: 78px; }
.doc-sec > h2 {
  font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -0.035em;
  line-height: 1.06; margin: 0 0 14px;
}
.doc-sec > .sub {
  font-size: 17px; color: var(--orange); font-weight: 700;
  letter-spacing: -0.015em; margin: 0 0 26px;
}
.doc-sec > p { font-size: 17px; line-height: 1.65; color: var(--ink-600); max-width: 68ch; margin: 0 0 18px; }
.doc-sec > p strong { color: var(--black); font-weight: 700; }

/* Small caps label */
.label-sm {
  display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--orange); margin: 0 0 18px;
}

/* Generic card grid: used for facts, roles, values */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: 18px; margin: 26px 0 8px; }
.card-grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.info-card {
  background: var(--off-white); border: 1.5px solid var(--grey-light);
  border-radius: var(--radius-sm); padding: 26px 24px;
}
.info-card .ic-num {
  font-size: 12px; font-weight: 800; letter-spacing: 0.14em; color: var(--orange);
  display: block; margin-bottom: 10px;
}
.info-card h3 { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; line-height: 1.25; }
.info-card p { font-size: 15px; line-height: 1.6; color: var(--ink-600); margin: 0; }
.info-card p + p { margin-top: 10px; }
.info-card ul { margin: 10px 0 0; padding-left: 18px; }
.info-card li { font-size: 15px; line-height: 1.6; color: var(--ink-600); margin-bottom: 7px; }

/* Big stat card */
.stat-card { background: var(--black); color: var(--white); border-color: var(--black); }
.stat-card h3, .stat-card p { color: var(--white); }
.stat-card .big { font-size: 38px; font-weight: 900; letter-spacing: -0.04em; line-height: 1; margin: 0 0 6px; }
.stat-card .big.orange { color: var(--orange); }

/* Weighted criteria */
.crit-list { display: grid; gap: 12px; margin: 26px 0 8px; }
.crit {
  display: grid; grid-template-columns: 44px 1fr 132px; gap: 20px; align-items: center;
  background: var(--off-white); border: 1.5px solid var(--grey-light);
  border-radius: var(--radius-sm); padding: 20px 24px;
}
.crit .c-num { font-size: 22px; font-weight: 900; color: var(--orange); letter-spacing: -0.03em; }
.crit .c-name { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.crit .c-ask { font-size: 14px; line-height: 1.55; color: var(--ink-600); margin: 0; }
.crit .c-weight { text-align: right; }
.crit .c-pct { font-size: 20px; font-weight: 900; letter-spacing: -0.03em; display: block; margin-bottom: 6px; }
.crit .c-bar { display: block; height: 6px; border-radius: 100px; background: var(--grey-light); overflow: hidden; }
.crit .c-bar i { display: block; height: 100%; background: var(--orange); border-radius: 100px; }

/* 1–5 scoring scale */
.scale { display: grid; gap: 10px; margin: 26px 0 8px; }
.scale-row {
  display: grid; grid-template-columns: 58px 1fr; gap: 20px; align-items: center;
  border: 1.5px solid var(--grey-light); border-radius: var(--radius-sm); padding: 16px 22px;
}
.scale-row .s-n {
  font-size: 30px; font-weight: 900; letter-spacing: -0.04em; text-align: center;
  color: var(--white); background: var(--orange); border-radius: 12px; padding: 4px 0;
}
.scale-row .s-t { font-size: 15px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); margin: 0 0 3px; }
.scale-row .s-d { font-size: 15px; color: var(--ink-600); margin: 0; line-height: 1.5; }
.scale-row:nth-child(1) .s-n { background: #c2410c; }
.scale-row:nth-child(2) .s-n { background: #ea580c; }
.scale-row:nth-child(3) .s-n { background: #f97316; }
.scale-row:nth-child(4) .s-n { background: #fb923c; }
.scale-row:nth-child(5) .s-n { background: #fdba74; color: var(--black); }

/* Programme schedule */
.day { margin-bottom: 46px; }
.day-head {
  border-top: 3px solid var(--black); padding-top: 18px; margin-bottom: 6px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px;
}
.day-head .d-tag { font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange); }
.day-head .d-date { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.day-head .d-hours { font-size: 15px; color: var(--ink-400); font-weight: 500; margin-left: auto; }
.slot {
  display: grid; grid-template-columns: 132px 1fr; gap: 24px;
  padding: 17px 4px; border-bottom: 1px solid var(--grey-light);
}
.slot .s-time { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.slot .s-name { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
.slot .s-detail { font-size: 14.5px; line-height: 1.55; color: var(--ink-600); margin: 0; }
.slot.key { background: var(--orange-soft); border-radius: 12px; border-bottom-color: transparent; padding-left: 18px; padding-right: 18px; }
.slot.key .s-name { color: var(--orange); }
.slot.close .s-time, .slot.close .s-name { color: var(--ink-400); }

/* Judge profile cards */
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 26px 0 8px; }
.jp-card {
  background: var(--off-white); border: 1.5px solid var(--grey-light);
  border-radius: var(--radius-sm); padding: 28px 24px;
}
.jp-card .jp-ini {
  width: 52px; height: 52px; border-radius: 14px; background: var(--orange); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 18px;
}
.jp-card .jp-role { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-400); margin: 0 0 6px; }
.jp-card h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 8px; line-height: 1.2; }
.jp-card p { font-size: 14.5px; line-height: 1.55; color: var(--ink-600); margin: 0; }

/* Pull quote */
.pull {
  border-left: 4px solid var(--orange); padding: 6px 0 6px 26px; margin: 34px 0;
  font-size: clamp(21px, 3.2vw, 28px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.25;
}
.pull span { color: var(--orange); }

/* Definition rows: practical info */
.deflist { display: grid; gap: 0; margin: 24px 0 8px; max-width: 620px; }
.deflist div {
  display: grid; grid-template-columns: 176px 1fr; gap: 20px;
  padding: 15px 0; border-bottom: 1px solid var(--grey-light);
}
.deflist dt { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-400); }
.deflist dd { font-size: 16px; margin: 0; line-height: 1.5; }

/* Do / don't columns */
.dodont { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin: 26px 0 8px; }
.dd-col { border-radius: var(--radius-sm); padding: 26px 24px; border: 1.5px solid var(--grey-light); }
.dd-col h3 { font-size: 15px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 16px; }
.dd-col ul { margin: 0; padding-left: 18px; }
.dd-col li { font-size: 15px; line-height: 1.6; color: var(--ink-600); margin-bottom: 10px; }
.dd-col.yes { background: var(--orange-soft); border-color: #ffd9c7; }
.dd-col.yes h3 { color: var(--orange); }

/* Back-to-top */
.doc-top { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--orange); text-decoration: none; }
.doc-top:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .doc-sec { margin-bottom: 58px; }
  .crit { grid-template-columns: 34px 1fr; gap: 14px; padding: 18px 20px; }
  .crit .c-weight { grid-column: 2; text-align: left; display: flex; align-items: center; gap: 12px; }
  .crit .c-pct { margin: 0; font-size: 17px; }
  .crit .c-bar { flex: 1; }
  .slot { grid-template-columns: 1fr; gap: 5px; padding: 15px 4px; }
  .slot.key { padding-left: 16px; padding-right: 16px; }
  .slot .s-time { color: var(--orange); font-size: 14px; }
  .day-head .d-hours { margin-left: 0; width: 100%; }
  .deflist div { grid-template-columns: 1fr; gap: 4px; }
  .scale-row { grid-template-columns: 46px 1fr; gap: 16px; padding: 14px 18px; }
  .scale-row .s-n { font-size: 24px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-aside { padding: 56px 32px; order: 2; }
  .login-main { padding: 56px 32px; order: 1; }
  .tile-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 700px) {
  .pnav-inner { padding: 16px 22px; }
  .pnav-right { gap: 12px; }
  .login-aside, .login-main { padding: 44px 22px; }
  .tile-grid { grid-template-columns: 1fr; gap: 18px; padding-bottom: 70px; }
  .tile { min-height: 0; padding: 30px; }
  .dash-head { padding: 48px 0 34px; }
  .doc-frame { height: 68vh; min-height: 420px; }
  .consent-doc { padding: 22px; max-height: 340px; }
  .judge-row { padding: 18px 20px; }
}
