:root {
  color-scheme: light;
  --ink: #132831;
  --muted: #49626b;
  --navy: #0d232e;
  --teal: #096659;
  --teal-hover: #064c43;
  --mint: #c5f2e7;
  --line: #ccdadb;
  --surface: #fff;
  --page: #f2f7f6;
  --focus: #9a4c08;
  font-family: "Inter", "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.55;
}

*, *::before, *::after { box-sizing: border-box }
body { margin: 0 }
a { color: var(--teal); text-underline-offset: .17em }
a:hover { color: var(--teal-hover) }
button, input, select { font: inherit }
button, select, input[type=file] { cursor: pointer }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px }
[hidden] { display: none !important }

.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 2; transform: translateY(-250%); padding: .6rem .85rem; background: #fff }
.skip-link:focus { transform: none }
.wrap { max-width: 71rem; width: calc(100% - 3rem); margin-inline: auto }
.masthead { background: var(--navy); color: white; border-bottom: 1px solid #28444e }
.masthead-inner { display: flex; justify-content: space-between; align-items: center; gap: .9rem 1.4rem; min-height: 4rem; padding-block: .7rem; flex-wrap: wrap }
.wordmark { display: inline-flex; align-items: center; flex-shrink: 0 }
.wordmark img { display: block; width: 10.25rem; height: auto }
.masthead nav { display: flex; align-items: center; gap: .55rem 1.15rem; flex-wrap: wrap }
.masthead nav a, .masthead .plain-button { color: #dcf3ef; font-size: .9rem }
.masthead nav a:hover, .masthead .plain-button:hover { color: white }
.masthead nav form { margin: 0 }
.preview-banner { background: #d9f1ec; color: #173d39; border-bottom: 1px solid #c2e0d8; font-size: .9rem }
.preview-banner p { margin-block: 0; padding-block: .6rem }
main { padding-block: clamp(1.6rem, 4vw, 3.65rem) 3.25rem; min-height: 78vh }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 3vw, 2.05rem); min-width: 0 }
.sheet + .sheet { margin-top: 1.2rem }
.narrow { max-width: 42rem; margin-inline: auto }
.heading { margin-bottom: 1.55rem }
.heading p { max-width: 65ch }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.15; letter-spacing: -.03em; font-weight: 760; text-wrap: pretty }
h1 { font-size: clamp(2.05rem, 5.4vw, 3.35rem) }
h2 { font-size: clamp(1.23rem, 2.6vw, 1.65rem) }
h3 { font-size: 1.12rem }
p { margin: .5rem 0 1rem }
p:last-child { margin-bottom: 0 }
.muted, .hint { color: var(--muted) }
.hint { font-size: .88rem }
.lead { color: var(--muted); font-size: clamp(1rem, 2vw, 1.12rem) }
.note { display: block; padding: .8rem 1rem; border-radius: .6rem; background: #eaf6f3; border: 1px solid #c1ded7; color: #1c4941; margin: 0 0 1.15rem; overflow-wrap: anywhere }
.note-error { background: #fff1ec; border-color: #f0c3b3; color: #852f20 }
.note-warning { background: #fffae9; border-color: #eddda8; color: #644711 }
.note p { margin: 0 }
.hero { background: #14323d; color: white; border: 1px solid #284a53; border-radius: 1rem; padding: clamp(1.2rem, 3.5vw, 2.45rem); margin-bottom: 1.2rem }
.hero p { color: #d8eae8 }
.hero .accent { color: var(--mint) }
.hero a { color: var(--mint) }
.start-hero { padding-block: clamp(1.2rem, 3vw, 1.9rem) }
.start-actions, .queue-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1rem }
.start-actions .button { color: var(--teal) }
#start-title { scroll-margin-top: 1rem }
.portal-help { padding-block: 0 2rem }
.accent { color: var(--teal) }
.columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(15.25rem, 1fr); align-items: start; gap: 1.2rem }
.columns-balanced { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch }
.columns > .sheet + .sheet { margin-top: 0 }

.field { margin-bottom: .95rem; min-width: 0 }
.field label { display: block; margin: 0 0 .26rem; font-weight: 680 }
.field input:not([type=checkbox]), .field select { width: 100%; min-width: 0; min-height: 2.75rem; padding: .55rem .7rem; border-radius: .48rem; border: 1px solid #94abad; color: var(--ink); background: #fbfefd }
.field input::placeholder { color: #576d75; opacity: 1 }
.field input[type=file] { padding: .45rem; font-size: .93rem }
.field input::file-selector-button { border: 1px solid #94abad; border-radius: .33rem; background: #e9f3f1; color: var(--ink); padding: .35rem .57rem; margin-right: .6rem; cursor: pointer }
.field input[type=checkbox] { appearance: auto; width: 1.135rem; height: 1.135rem; accent-color: var(--teal); margin: .19em 0 0; flex: 0 0 auto }
.choice { display: flex; align-items: start; gap: .62rem }
.field .choice label { font-weight: 500 }
.field .hint { margin: .25rem 0 0 }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1rem; margin-top: 1rem }
.action-row form { margin: 0 }
.button { display: inline-flex; min-height: 2.75rem; max-width: 100%; padding: .56rem 1rem; align-items: center; justify-content: center; text-align: center; border: 1px solid var(--teal); border-radius: .48rem; background: var(--teal); color: white; font-weight: 700; text-decoration: none; overflow-wrap: anywhere }
.button:hover { background: var(--teal-hover); border-color: var(--teal-hover); color: white }
.button.secondary { background: #fff; border-color: #94abad; color: var(--teal) }
.button.secondary:hover { background: #eaf6f3; border-color: var(--teal); color: var(--teal-hover) }
.button.danger { color: #8e3327; background: #fff; border-color: #b76b5c }
.button.danger:hover { background: #fff1ec; color: #741f14; border-color: #a44132 }
.plain-button { background: transparent; border: 0; padding: 0; text-decoration: underline; color: var(--teal); text-underline-offset: .17em }
.section-divider { border: 0; border-top: 1px solid var(--line); margin: 1.35rem 0 }

.case-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; flex-wrap: wrap }
.case-head h1 { margin-top: .2rem }
.folio, .code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere }
.folio { font-weight: 700; letter-spacing: .015em }
.case-head .folio { margin: .25rem 0 0 }
.status { display: inline-block; padding: .26rem .68rem; border: 1px solid #aed4cb; color: #195147; border-radius: 999px; background: #e6f5f1; font-size: .86rem; font-weight: 680 }
.progress { list-style: none; padding: 0; margin: 1rem 0 0 }
.progress li { display: grid; grid-template-columns: 1.18rem minmax(0, 1fr); gap: .62rem; align-items: center; margin: 0 0 .6rem; color: var(--muted); font-size: .94rem }
.progress .marker { width: .76rem; height: .76rem; margin: 0 auto; border: 1px solid #8d9d9f; border-radius: 50%; background: white }
.progress .done { color: #195147 }
.progress .done .marker { border-color: var(--teal); background: var(--teal) }
.progress [aria-current=step] { color: var(--ink); font-weight: 750 }
.progress [aria-current=step] .marker { border: .22rem solid var(--teal); width: .88rem; height: .88rem }

.meta { margin: .95rem 0 0; padding: 0 }
.meta div { display: grid; grid-template-columns: minmax(6rem, .33fr) minmax(0, 1fr); gap: .65rem; padding: .43rem 0; border-top: 1px solid #e3ebeb }
.meta dt { font-weight: 670; font-size: .9rem }
.meta dd { margin: 0; color: var(--muted); overflow-wrap: anywhere }
.total { display: block; color: var(--ink); font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 780; font-variant-numeric: tabular-nums }
.total small { color: var(--muted); font-size: 1rem }
.mail { border: 1px solid var(--line); border-radius: .65rem; padding: .9rem 1rem; margin: 0 0 .75rem }
.mail p { margin: .35rem 0 }
.mail .code { display: inline-block; margin: .25rem 0; background: #e4f3ef; color: #145445; padding: .32rem .6rem; border-radius: .3rem; font-weight: 750; font-size: 1.28rem; letter-spacing: .15em }
.case-list { list-style: none; padding: 0; margin: .6rem 0 0 }
.case-list li { border-top: 1px solid var(--line); padding: .6rem 0 }
.case-list a { display: block; overflow-wrap: anywhere; font-weight: 700 }
.case-list small { color: var(--muted) }
.queue-form { margin: 1rem 0 1.25rem }
.case-list a[aria-current] { text-decoration-thickness: .15em }

@media (max-width: 50rem) {
  .columns { grid-template-columns: 1fr }
}
@media (max-width: 34rem) {
  .wrap { width: calc(100% - 1.5rem) }
  .field-row { grid-template-columns: 1fr; gap: 0 }
  .masthead nav { gap: .5rem .75rem }
  .meta div { grid-template-columns: 1fr; gap: .12rem }
}

.intake-option { border: 1px solid var(--line); border-radius: .75rem; padding: 1rem; background: #f8fcfa }
.intake-option h3 { margin-bottom: .85rem }
.field textarea { font: inherit; color: var(--ink); width: 100%; display: block; min-height: 4.4rem; padding: .55rem .7rem; border-radius: .48rem; border: 1px solid #94abad; background: #fbfefd; resize: vertical }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere }
details summary { font-weight: 650; color: var(--teal); cursor: pointer }
details[open] summary { margin-bottom: .8rem }
@media (min-width: 50.001rem) {
  .staff-columns { grid-template-columns: minmax(16rem, 1fr) minmax(0, 2fr) }
}
