:root {
  color-scheme: light;
  --paper: #f7f4ed;
  --white: #fffdf8;
  --ink: #203b34;
  --forest: #233f36;
  --muted: #52615b;
  --clay: #89432e;
  --rule: #cfc6b5;
  --pale: #e8ece3;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Avenir Next', Avenir, 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.55 var(--sans); }
.wrap { width: min(76rem, calc(100% - clamp(2rem, 8vw, 7rem))); margin-inline: auto; }
button, select, input { font: inherit; }
button, a, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; text-underline-offset: .23em; }
:where(a, button, select, input):focus-visible { outline: 3px solid #b46c3b; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.05em; line-height: 1.06; }
h1 { font-size: clamp(3.15rem, 6.5vw, 6.75rem); }
h2 { font-size: clamp(2rem, 3vw, 3rem); }
.skip { position: absolute; top: .4rem; left: .5rem; transform: translateY(-180%); background: var(--white); padding: .65rem 1rem; z-index: 3; }
.skip:focus { transform: none; }
.mast { position: sticky; top: 0; z-index: 2; color: #f2e5ce; background: #040c0d; border-bottom: 1px solid rgba(216,154,61,.42); }
.mast-inner { display: flex; min-height: 70px; width: min(1120px, calc(100% - 64px)); gap: 1.2rem; align-items: center; }
@media (max-width: 900px) { .mast-inner { width: min(calc(100% - 38px),720px); } }
@media (max-width: 560px) { .mast-inner { min-height: 64px; } }
.mast-label { padding-left: 1.1rem; border-left: 1px solid #7f9185; font-size: .94rem; }
.signout { min-height: 2.75rem; margin-left: auto; color: inherit; background: transparent; padding: .25rem .85rem; border-radius: .2rem; border: 1px solid #8a9a8c; }
.signout:hover { background: #314e42; }
.eyebrow { margin-bottom: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--clay); font-size: .875rem; font-weight: 650; }
.gate { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(3rem, 9vw, 9rem); padding-block: clamp(3rem, 9vw, 8rem); align-items: start; }
.introduction { margin-top: 1.4rem; max-width: 34ch; color: var(--muted); font-size: clamp(1.075rem, 1.7vw, 1.35rem); }
.entry { border-block: 1px solid var(--rule); padding: clamp(1.25rem, 3vw, 2.5rem) 0; }
.qa, .room-note { color: var(--muted); font-size: .9rem; }
.qa { margin-bottom: 1.4rem; }
.entry section > p { margin-top: .9rem; color: var(--muted); }
form label { display: block; margin: 1.35rem 0 .35rem; font-size: .92rem; font-weight: 600; }
select { max-width: 100%; color: var(--ink); border: 1px solid #a79e8c; border-radius: .2rem; background: var(--white); min-height: 2.875rem; padding: .45rem .7rem; }

.primary { display: block; min-height: 3rem; width: 100%; margin-top: 1rem; padding: .6rem 1rem; border: 0; border-radius: .2rem; color: var(--white); background: var(--forest); font-weight: 600; }
.primary:hover { background: #172e25; }
.issued { margin-top: 1.35rem; padding: 1rem; border-left: 3px solid #6a7964; background: var(--pale); }
.action-link, .quiet-link { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; }
.quiet-link { margin-top: .35rem; }
.status { margin-top: .75rem; color: var(--clay); }
.status:empty { margin: 0; }
.room-intro { padding-block: clamp(2.2rem, 5vw, 4.75rem) 1.8rem; border-bottom: 1px solid var(--rule); }
.room-intro h1 { font-size: clamp(3rem, 5.6vw, 5.5rem); }
.client-name { margin-top: .85rem; color: var(--muted); }
.room-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, .40fr); gap: clamp(2rem, 5vw, 5rem); padding-top: 2.35rem; align-items: start; }
.room-grid:has(.atlas-card[hidden]) { grid-template-columns: 1fr; }
.section-heading { display: flex; align-items: end; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.category { display: flex; gap: .5rem; align-items: center; }
.category label { color: var(--muted); font-size: .9rem; }
.file-list { list-style: none; padding: 0; margin: 0; }
.file { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.25rem; align-items: center; padding: 1rem 0; border-top: 1px solid var(--rule); }
.file:last-child { border-bottom: 1px solid var(--rule); }
.file-name { font-weight: 600; font-size: 1.06rem; overflow-wrap: anywhere; }
.file-meta { color: var(--muted); font-size: .9rem; margin-top: .15rem; }
.download { display: inline-flex; padding: .45rem 0; min-height: 2.75rem; align-items: center; font-weight: 600; }
.atlas-card { padding: clamp(1.25rem, 2.6vw, 2.25rem); background: var(--pale); border-top: 2px solid #6a7964; }
.atlas-card h2 { font-size: clamp(1.7rem, 2.4vw, 2.25rem); }
.atlas-card p { margin: .8rem 0 .55rem; color: var(--muted); }
.room-note { padding-block: 2rem; }
@media (max-width: 48rem) {
  .gate, .room-grid { grid-template-columns: 1fr; gap: 2rem; }
  .gate { padding-block: 2.5rem; }
  .room-grid { padding-top: 1.65rem; }
  .section-heading { align-items: center; }
}
@media (max-width: 32rem) {
  .mast-inner { gap: .65rem; }
  .mast-label { padding-left: .65rem; }
  .section-heading { display: block; }
  .category { margin-top: .85rem; }
  .file { gap: .65rem; }
}

.dashboard { padding-bottom: 4rem; }
.section-lead, .panel > p, .panel form > p, .agreement-document p { color: var(--muted); margin: .7rem 0; }
.dashboard .file-list { margin-top: 1.3rem; max-width: 55rem; }
.room-body { padding-top: 1.5rem; }
.panel { margin: 1rem 0 2rem; padding: clamp(1.2rem, 3vw, 2.5rem); border: 1px solid var(--rule); background: var(--white); }
.panel .eyebrow { margin: 0 0 .55rem; color: var(--clay); }
.panel h2 { font-size: clamp(1.65rem, 3vw, 2.6rem); }
.room-grid { padding-block: 1rem 2.5rem; }
input:not([type=checkbox]), #director-login-form input { display: block; color: var(--ink); padding: .55rem .65rem; width: min(100%,32rem); min-height: 2.85rem; border: 1px solid #a79e8c; border-radius: .2rem; background: #fff; }
input[type=file] { max-width: 100%; }
input::file-selector-button { font: inherit; margin-right: .6rem; border: 0; border-radius: .15rem; color: var(--ink); padding: .25rem .55rem; background: var(--pale); }
.hint { font-size: .92rem; color: var(--muted); }
button.secondary { min-height: 2.8rem; color: var(--forest); background: transparent; padding: .45rem 1rem; border: 1px solid var(--forest); border-radius: .2rem; font-weight: 600; }
button.secondary:hover { background: var(--pale); }
.text-button { min-height: 2.75rem; padding: .3rem 0; background: none; border: 0; color: var(--forest); text-align: left; text-decoration: underline; text-underline-offset: .22em; font-weight: 600; }
#return-director { margin-bottom: .55rem; }
#recipient-field { margin: .9rem 0 0; }
#recipient-field label, .issued label { display: block; margin-bottom: .35rem; font-size: .92rem; font-weight: 600; }
.issued { max-width: 45rem; }
.issued p { margin: .4rem 0 0; color: var(--muted); }
.code { color: var(--forest); letter-spacing: .11em; }
.actions { margin-top: .95rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.agreement-document { border-top: 1px solid var(--rule); margin-top: 1.2rem; padding-top: 1rem; max-width: 72ch; }
.agreement-document h3 { font: 500 1.45rem var(--serif); margin: 0 0 .7rem; }
#document-body { white-space: pre-line; }
.check { display: flex; align-items: flex-start; gap: .55rem; min-height: 2.75rem; }
.check input { flex: 0 0 1.15rem; width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; accent-color: var(--forest); }
.panel .primary, .panel form { width: min(100%,32rem); }
.panel .status { color: var(--clay); }
.uploaded-list { margin-top: 1.4rem; }
.upload-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
@media (max-width: 32rem) {
  .file:has(.upload-actions) { grid-template-columns: 1fr; row-gap: .1rem; }
  .panel { padding: 1rem; }
}
#proof-options { margin-top: 1.5rem; border-top: 1px solid var(--rule); padding-top: .7rem; }
#proof-options summary { cursor: pointer; min-height: 2.75rem; padding: .55rem 0; text-decoration: underline; }
#proof-options summary:focus-visible { outline: 3px solid #b46c3b; outline-offset: 3px; }
#proof-options .secondary { margin-top: .6rem; }

.help { margin-top: 1rem; color: var(--muted); }
.help summary { width: fit-content; min-height: 2.75rem; padding-block: .6rem; cursor: pointer; text-decoration: underline; text-underline-offset: .23em; }
.help summary:focus-visible { outline: 3px solid #b46c3b; outline-offset: 3px; }
.entry form { max-width: 32rem; }
.manager-account { max-width: 32rem; }
.settings-submit { margin-top: 1rem; }
.signers { padding-inline-start: 1.3rem; margin-block: .75rem; color: var(--muted); }
.signers:empty { display: none; }

.reader-head, .reader-controls, .reader-links { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1rem; }
.reader-head { justify-content:space-between; }
.reader-picker { margin:1.2rem 0 .75rem; }
.reader-picker label { display:block; margin-bottom:.25rem; font-weight:600; }
.reader-picker select { width:min(100%,34rem); }
.reader-controls button:disabled { cursor:default; }
.reader-controls .text-button[aria-pressed=true] { font-weight:750; }
.reader-sheet { overflow:auto; max-width:100%; border:1px solid var(--rule); margin-top:1rem; background:var(--paper); }
.reader-sheet canvas { width:100%; height:auto; display:block; user-select:none; -webkit-touch-callout:none; }
.reader-sheet.reader-zoom canvas { width:max(150%,62rem); }
.reader-links { margin-top:.5rem; }
#reader-heading { scroll-margin-top:6rem; }
@media print {
  .atlas-reader, #atlas-card { display:none !important; }
}
