:root {
  color-scheme: light;
  --ink: #162438;
  --muted: #526278;
  --line: #d8e2ed;
  --paper: #f3f6fa;
  --panel: #fff;
  --brand: #005ca8;
  --accent: #0090ff;
  --blue-pale: #eaf4ff;
  --gold-pale: #fff4da;
  --urgent: #794400;
  --green-pale: #e9f5ef;
  --green: #246647;
  font-family: Satoshi, Inter, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.17; letter-spacing: -.028em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.12rem; }
p + p { margin-top: 8px; }
a { color: var(--brand); text-underline-offset: .18em; overflow-wrap: anywhere; }
button, select, textarea, input { font: inherit; color: inherit; }
button, select, input { min-height: 44px; }
button, input, select, textarea {
  border: 1px solid #a7b8ca;
  border-radius: 7px;
  background: var(--panel);
  padding: 8px 12px;
}
button, select, summary { cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--brand); }
button:disabled { opacity: .64; cursor: wait; }
:focus-visible { outline: 3px solid #9a5400; outline-offset: 3px; }
textarea { width: 100%; resize: vertical; }
label { font-weight: 650; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset:disabled { opacity: .72; }
.primary { background: var(--brand); color: white; border-color: var(--brand); font-weight: 650; }
.primary:hover:not(:disabled) { background: #03487f; }
.skip { position: absolute; top: 10px; left: 10px; z-index: 1; background: white; padding: 10px; transform: translateY(-200%); }
.skip:focus { transform: none; }
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); }
.topbar-inner, main { max-width: 1380px; margin: auto; padding-inline: clamp(15px, 4vw, 48px); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 14px; }
.identity, .actions, .views { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.identity { gap: 16px; }
.wordmark { font-size: 1.25rem; font-weight: 850; letter-spacing: -.07em; white-space: nowrap; }
.wordmark span { color: var(--accent); }
.room { color: var(--muted); font-weight: 650; border-left: 1px solid var(--line); padding-left: 16px; }
.signed-in { display: flex; align-items: center; gap: 12px; }
.signed-in button { min-height: 36px; font-size: .875rem; }
main { padding-top: clamp(22px, 4vw, 44px); padding-bottom: 48px; }
.pagehead { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 22px; }
.pagehead h1 { margin-bottom: 5px; }
.views { gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: #e8eef5; }
.views button { background: transparent; border-color: transparent; padding-inline: 12px; }
.views button[aria-pressed="true"] { background: var(--panel); border-color: var(--line); font-weight: 650; color: var(--brand); }
.login { max-width: 460px; margin: 25px auto; }
.login h1 { font-size: 2rem; }
.login form { margin-top: 18px; }
.feedback { margin: 0 0 16px; padding: 9px 13px; border-radius: 7px; background: var(--blue-pale); color: var(--ink); }
.feedback:empty { display: none; }
.feedback[data-kind="error"] { background: var(--gold-pale); color: var(--urgent); }
.layout { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); align-items: start; gap: 18px; }
.case-columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(255px, 1fr); gap: 18px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.panel + .panel { margin-top: 14px; }
.content { padding: clamp(16px, 2.5vw, 25px); }
.panel-title { padding: 16px; border-bottom: 1px solid var(--line); }
.panel-title h2 { font-size: 1rem; }
.panel-title select { width: 100%; margin-top: 7px; }
.case-list { list-style: none; margin: 0; padding: 6px; }
.case-list a {
  display: grid; gap: 3px; min-height: 65px; padding: 10px 12px;
  border: 1px solid transparent; border-radius: 7px; color: var(--ink); text-decoration: none;
}
.case-list a:hover { background: var(--paper); }
.case-list a[aria-current="page"] { background: var(--blue-pale); border-color: #c5ddf5; box-shadow: inset 3px 0 var(--brand); }
.meta { color: var(--muted); font-size: .875rem; }
.due { color: var(--urgent); font-weight: 650; }
.tag { display: inline-block; padding: 3px 8px; border-radius: 5px; background: var(--blue-pale); color: var(--brand); font-size: .8125rem; font-weight: 650; }
.tag.good { background: var(--green-pale); color: var(--green); }
.tag.pending { background: var(--gold-pale); color: var(--urgent); }
.case-title { display: grid; gap: 8px; justify-items: start; }
.section { border-top: 1px solid var(--line); margin-top: 19px; padding-top: 16px; }
.section h3 { margin-bottom: 7px; }
.advice { background: var(--paper); border-left: 3px solid var(--brand); padding: 13px; margin-top: 10px; border-radius: 0 6px 6px 0; }
.prose, .message p, pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.summary-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.details { display: grid; gap: 8px; margin: 10px 0 0; }
.details > div { display: flex; gap: 10px; flex-wrap: wrap; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; max-width: 100%; }
details > :not(summary) { margin-top: 9px; }
summary { color: var(--brand); font-weight: 650; }
.form-stack { display: grid; gap: 8px; justify-items: start; }
.form-stack input, .form-stack textarea, .form-stack select { width: 100%; }
.form-stack label { width: 100%; }
.actions { margin-top: 12px; }
.thread-select { width: 100%; margin: 7px 0; }
.messages { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 9px; }
.message { padding: 9px 11px; background: var(--paper); border-radius: 7px; }
.message.assistant { background: var(--blue-pale); }
.message b { display: block; font-size: .8125rem; }
.thread-head h2, .requests h2 { font-size: 1.23rem; margin-bottom: 8px; }
.labeled { margin-top: 8px; }
.error-panel { padding: 15px; }
.situation .topbar-inner, .situation main { max-width: 1100px; }
.situation .layout { grid-template-columns: minmax(215px, 278px) minmax(0, 1fr); }
.situation .content { padding: clamp(17px, 3vw, 30px); }
.situation .advice { padding: 14px 16px; }
.situation .section > form { margin-top: 10px; }
.version-list { margin: 7px 0 0; padding-left: 20px; }
.version-list li + li { margin-top: 6px; }

@media (max-width: 1110px) {
  .case-columns { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .layout, .situation .layout { grid-template-columns: 1fr; }
  .case-list { display: flex; overflow-x: auto; scroll-snap-type: x proximity; }
  .case-list li { flex: 0 0 min(72vw, 225px); scroll-snap-align: start; }
  .topbar-inner { min-height: 59px; }
  .signed-in > span { display: none; }
  .identity { gap: 9px; }
  .room { font-size: .875rem; padding-left: 9px; }
  .views { width: 100%; }
  .views button { flex: 1; }
}

@media (max-width: 380px) {
  .wordmark { font-size: 1.06rem; }
  .signed-in button { padding-inline: 7px; }
}
