/* Portal styles. Same palette and type as the public site (Heather). */
:root {
  --deep: #2B2940; --accent: #C6A5EE; --paper: #F8F6FB; --tint: #E8E3F3;
  --ink: #211F33; --muted: #625F78; --bg: var(--paper); --card: #fff; --line: #DDD8EA; --field: #A9A3BF;
  --brand: var(--deep); --brand-dark: #1D1B2E; --gold: var(--accent);
  --ok: #2F6B4F; --ok-bg: #E3F1E8; --warn: #6B4A0C; --warn-bg: #FBF0D9; --err: #9B2C3A; --err-bg: #FBE6E9; --lock: #8D8AA0;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 20px;
}
* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
.wrap { width: 100%; max-width: 62rem; margin: 0 auto; padding: 0 1rem; }
main.wrap { padding-top: 2rem; padding-bottom: 3rem; min-height: 70vh; }
.is-family main.wrap { max-width: 46rem; }
h1, h2, h3, .h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0 0 .5rem; letter-spacing: -.015em; text-wrap: balance; color: var(--deep); }
h1 { font-size: clamp(2rem, 5.5vw, 2.9rem); }
h2 { font-size: 1.55rem; margin-top: 2rem; }
.card > h2:first-child, .card h2:first-of-type, .stage-top h2, .overall-top h2 { margin-top: 0; }
h3, .h3 { font-size: 1.3rem; }
p { margin: 0 0 .9rem; }
a { color: var(--deep); text-underline-offset: .18em; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
a:hover { text-decoration-color: var(--deep); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; z-index: 50; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.muted { color: var(--muted); } .small { font-size: .86rem; } .right { text-align: right; } .center { text-align: center; } .grow { flex: 1; min-width: 0; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 40rem; }
.center .lead { margin-inline: auto; }
.eyebrow { font-size: .9rem; font-weight: 500; color: var(--muted); margin: 0 0 .3rem; }

/* Floating menu, as on the public site */
.top { position: sticky; top: 0; z-index: 20; padding: .7rem .8rem 0; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1rem; flex-wrap: wrap; max-width: 62rem; padding: .6rem .7rem .6rem 1.2rem; border-radius: 18px; background: var(--deep); color: #F3F0FA; box-shadow: 0 8px 24px rgba(43, 41, 64, .18); }
.brand { display: flex; align-items: center; gap: .55rem; color: #F3F0FA; text-decoration: none; font: 500 1.3rem/1 var(--sans); letter-spacing: -.03em; }
.brand svg { color: var(--accent); flex: none; }
.top nav { display: flex; align-items: center; gap: .2rem 1.15rem; flex-wrap: wrap; font-size: .92rem; }
.top nav a, .linkish { color: #F3F0FA; text-decoration: none; padding: .35rem 0; opacity: .88; }
.top nav a:hover, .linkish:hover { opacity: 1; text-decoration: underline; text-decoration-color: var(--accent); }
.linkish { background: none; border: 0; font: inherit; cursor: pointer; }
.top nav form { display: flex; }
.top .tour-link { background: var(--accent); color: var(--deep); opacity: 1; border-radius: 99px; padding: .4rem .95rem; font-weight: 600; }
.top .tour-link:hover { text-decoration: none; filter: brightness(1.06); }
.count { background: var(--accent); color: var(--deep); border-radius: 99px; padding: 0 .45rem; font-size: .8rem; font-weight: 700; }
.foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.2rem; padding-bottom: 2rem; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem; margin: 0 0 1rem; }
.narrow { max-width: 30rem; margin: 2.5rem auto; padding: 2rem; }
.list { list-style: none; padding: 0; margin: 0; }
.row { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.head-row { display: flex; gap: 1rem; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.2rem; }
.unread { border-left: 5px solid var(--accent); }
.prose p { max-width: 42rem; }
.overall { background: var(--tint); border-color: transparent; }

.flash { padding: .8rem 1.1rem; border-radius: 14px; margin: 0 0 1rem; border: 1px solid transparent; font-weight: 500; }
.flash-ok { background: var(--ok-bg); color: #1D4A35; }
.flash-error { background: var(--err-bg); color: var(--err); }
.flash-info { background: var(--warn-bg); color: var(--warn); font-weight: 400; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  padding: .6rem 1.3rem; min-height: 2.75rem; border-radius: 99px; border: 2px solid var(--deep); background: transparent; color: var(--deep); transition: background-color .15s, filter .15s; }
.btn:hover { background: var(--tint); }
.btn-primary { background: var(--deep); color: #fff; } .btn-primary { transition: background-color .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s; }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--deep); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(43, 41, 64, .25); }
.btn-big { font-size: 1.08rem; padding: .8rem 1.7rem; min-height: 3.2rem; }
.btn-small { padding: .3rem .95rem; min-height: 2.2rem; font-size: .9rem; }
.btn-quiet { border-color: var(--line); color: var(--ink); font-weight: 500; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--deep); } .btn-accent:hover { background: var(--accent); filter: brightness(1.06); }
.btn-row, .actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-start; }
.actions { margin-top: 1rem; }
.pad-top { padding-top: .9rem; }
details > summary { cursor: pointer; color: var(--deep); font-weight: 600; padding: .5rem 0; }

.field { margin: 0 0 1.15rem; border: 0; padding: 0; min-width: 0; }
label, legend { display: block; font-weight: 600; margin-bottom: .3rem; padding: 0; }
.opt { font-weight: 400; color: var(--muted); font-size: .88rem; }
.help { margin: -.1rem 0 .4rem; color: var(--muted); font-size: .92rem; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=password], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--field); border-radius: 12px; padding: .65rem .85rem; min-height: 3rem; }
input.short, input[type=date] { max-width: 14rem; }
textarea { min-height: 5.5rem; resize: vertical; }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--deep); }
.check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 500; padding: .6rem .8rem; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; margin: 0 0 .45rem; }
.check input { width: 1.4rem; height: 1.4rem; margin: .1rem 0 0; flex: none; accent-color: var(--deep); }
.check:has(input:checked) { border-color: var(--deep); background: var(--paper); }
.confirm { margin: 1rem 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0 1.25rem; }
.picks { display: grid; gap: .1rem; }

.bar { height: .6rem; background: var(--tint); border-radius: 99px; overflow: hidden; margin: .4rem 0 .3rem; }
.overall .bar { background: #fff; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--deep), #6B5CA8); border-radius: 99px; transition: width .4s ease; min-width: 0; }
.bar-big { height: 1rem; }
.overall-top { display: flex; justify-content: space-between; align-items: baseline; }
.pct { font-family: var(--serif); font-size: 2.2rem; color: var(--deep); font-variant-numeric: tabular-nums; }
.done-line { color: var(--ok); font-weight: 600; }
.stage-progress { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.stage-progress .bar { flex: 1 1 10rem; margin: 0; }
.saved { color: var(--ok); font-weight: 600; }

.pill, .todo { display: inline-block; font-size: .8rem; font-weight: 600; padding: .15rem .7rem; border-radius: 99px; background: var(--tint); color: #45415E; white-space: nowrap; }
.pill-complete { background: var(--ok-bg); color: #1D4A35; }
.pill-active, .pill-open { background: var(--tint); color: var(--deep); }
.pill-submitted { background: var(--warn-bg); color: var(--warn); }
.pill-locked, .pill-draft { background: #EEEDF2; color: #63607A; }
.todo { background: var(--accent); color: var(--deep); }

.formcard-top, .stage-top { display: flex; justify-content: space-between; gap: .8rem; align-items: flex-start; flex-wrap: wrap; }
.formcard-top h3, .formcard-top .h3 { margin-bottom: .15rem; }
.formcard-top p { margin: 0; }
.formcard-act { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.state { font-weight: 600; }
.state-open { color: var(--deep); } .state-submitted { color: var(--warn); } .state-complete { color: var(--ok); } .state-locked { color: var(--lock); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .6rem 0 0; }
.chip { font-size: .85rem; padding: .25rem .75rem .25rem .3rem; border-radius: 99px; border: 1.5px solid var(--line); background: #fff; display: flex; align-items: center; gap: .4rem; }
.chip em { font-style: normal; font-weight: 600; font-size: .75rem; color: var(--muted); }
.chip-n { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--deep); color: #fff; font: 700 .8rem var(--sans); flex: none; }
h2 .chip-n { width: 1.9rem; height: 1.9rem; font-size: .95rem; vertical-align: .2em; margin-right: .2rem; }
.chip-open { border-color: var(--deep); }
.chip-complete { border-color: transparent; background: var(--ok-bg); } .chip-complete .chip-n { background: var(--ok); }
.chip-submitted { border-color: transparent; background: var(--warn-bg); } .chip-submitted .chip-n { background: #A8761A; }
.chip-locked { color: var(--lock); border-style: dashed; } .chip-locked .chip-n { background: #B9B6C8; }
.stage-locked { background: transparent; border-style: dashed; }
.stage-locked h2 { color: var(--lock); } .stage-locked .chip-n { background: #B9B6C8; }
.locked-note { color: var(--muted); margin: 0; }
.stage-open { border-color: var(--deep); border-width: 2px; }

.answers { margin: 0; display: grid; gap: 0; }
.answers > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.answers dt { color: var(--muted); font-size: .92rem; }
.answers dd { margin: 0; font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }
.answers dd.empty { color: var(--lock); font-weight: 400; font-style: italic; }
.qs { margin: 0; padding-left: 1.2rem; } .qs li { margin-bottom: .3rem; }

.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .86rem; font-weight: 600; color: var(--muted); padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); }
.table td { padding: .95rem 1.2rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.w-bar { min-width: 9rem; }
.strong { font: 400 1.3rem/1.2 var(--serif); }
.people { list-style: none; margin: 0 0 .5rem; padding: 0; }
.people li { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.file { display: block; width: 100%; padding: .7rem; border: 2px dashed var(--field); border-radius: 12px; background: #fff; font: inherit; }
.people li.off { opacity: .6; }
.copybox { margin-top: .4rem; display: grid; gap: .2rem; } .copybox input { font-size: .8rem; min-height: 2.3rem; padding: .3rem .6rem; min-width: min(30rem, 70vw); }
.audit { list-style: none; margin: 0; padding: 0; font-size: .9rem; max-height: 26rem; overflow: auto; }
.audit li { display: grid; grid-template-columns: 10.5rem 1fr; gap: .8rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.audit time { color: var(--muted); font-variant-numeric: tabular-nums; }

.sigpad { display: block; width: 100%; max-width: 640px; height: auto; aspect-ratio: 16 / 5; background: #fff; border: 2px dashed var(--field); border-radius: 14px; touch-action: none; cursor: crosshair; margin-bottom: .5rem; }
.signed { padding: .8rem 0; border-top: 1px solid var(--line); }
.signed img { display: block; max-width: 16rem; max-height: 5rem; margin-bottom: .3rem; }

/* Sign-in and set-password pages: photograph behind the card */
.is-entry { background: var(--deep) url(/static/site/img/h-room.jpg?v=1794738862) center/cover fixed; }
.is-entry::before { content: ''; position: fixed; inset: 0; background: rgba(43, 41, 64, .72); }
.is-entry .top, .is-entry main, .is-entry .foot { position: relative; }
.is-entry .top-in { background: rgba(43, 41, 64, .5); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: none; }
.is-entry .foot { border-color: rgba(255, 255, 255, .2); color: #D9D4E8; } .is-entry .foot a { color: #fff; }
.is-entry .card { border: 0; box-shadow: 0 24px 60px rgba(20, 18, 34, .35); }

/* Guided tour */
.tour-invite { display: flex; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--deep); color: #F3F0FA; border: 0; }
.tour-invite[hidden] { display: none; } /* display:flex above would otherwise keep it on screen after Not now */
.tour-invite h2 { color: #fff; margin: 0 0 .2rem; } .tour-invite p { margin: 0; color: #CFC9E2; }
.tour-invite .btn-quiet { border-color: rgba(255, 255, 255, .35); color: #fff; } .tour-invite .btn-quiet:hover { background: rgba(255, 255, 255, .1); }
.tour-shade { position: fixed; inset: 0; z-index: 90; }
.tour-hole { position: fixed; z-index: 91; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(27, 25, 44, .68), 0 0 0 3px var(--accent); pointer-events: none; transition: top .25s, left .25s, width .25s, height .25s; }
.tour-hole.is-none { box-shadow: 0 0 0 9999px rgba(27, 25, 44, .68); }
.tour-card { position: fixed; z-index: 92; width: min(24rem, calc(100vw - 1.5rem)); background: #fff; color: var(--ink); border-radius: 20px; padding: 1.3rem 1.4rem 1.1rem; box-shadow: 0 24px 60px rgba(20, 18, 34, .4); }
.tour-card.is-centre { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(28rem, calc(100vw - 1.5rem)); }
.tour-card h2 { margin: 0 0 .4rem; font-size: 1.6rem; padding-right: 2rem; }
.tour-card p { margin: 0 0 1rem; }
.tour-steps { font-size: .84rem; color: var(--muted); margin-right: auto; }
.tour-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tour-close { position: absolute; top: .6rem; right: .7rem; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: transparent; font-size: 1.4rem; line-height: 1; color: var(--muted); cursor: pointer; }
.tour-close:hover { background: var(--tint); }
.tour-resume { position: fixed; z-index: 80; right: 1rem; bottom: 1rem; box-shadow: 0 10px 30px rgba(20, 18, 34, .3); }

@media (max-width: 640px) {
  .answers > div { grid-template-columns: 1fr; gap: .1rem; }
  .audit li { grid-template-columns: 1fr; gap: 0; }
  .sticky-actions .btn { width: 100%; }
  .card { padding: 1.1rem; }
  .table th:nth-child(2), .table td:nth-child(2) { display: none; }
  .top { position: static; }
}
@media (prefers-reduced-motion: reduce) { .bar span, .tour-hole { transition: none; } }
@media print { .top, .foot, .btn, nav, .tour-shade, .tour-hole, .tour-card { display: none !important; } body { background: #fff; } .card { border: 0; box-shadow: none; padding: 0; } }

/* A field hidden from people, left for automated form fillers to complete. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
