:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  --canvas: #f4f7f3;
  --paper: #fff;
  --ink: #182722;
  --muted: #52615a;
  --line: #dfe7df;
  --pine: #142f25;
  --pine-light: #21503d;
  --lime: #a4d65e;
  --wash: #edf5e8;
  --focus: #477d2d;
  --shadow: 0 1px 2px #152d2320, 0 8px 26px #33563e06;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.55;
}

*, *::before, *::after { box-sizing: border-box; }
body { min-width: 300px; margin: 0; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: var(--pine-light); text-underline-offset: .2em; }
button, label:has(input[type="radio"]), summary { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
img { max-width: 100%; height: auto; }
p, h1, h2, h3, h4 { margin: 0; }
h1, h2, h3, h4 { line-height: 1.22; }
h1 { font-size: clamp(1.9rem, 3.5vw, 2.65rem); letter-spacing: -.055em; }
h2 { font-size: clamp(1.22rem, 2vw, 1.5rem); letter-spacing: -.035em; }
h3 { font-size: 1.07rem; letter-spacing: -.02em; }
h4 { font-size: 1rem; }
small, .small { font-size: .86rem; }
.subtle, .muted { color: var(--muted); }
.eyebrow { color: #53704f; font-size: .75rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.stack { display: grid; align-content: start; gap: 1rem; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2rem; min-height: 100vh; max-height: 100vh; overflow-y: auto; padding: 1.6rem 1.1rem 1.25rem; background: var(--paper); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .8rem; min-height: 48px; padding-inline: .65rem; color: var(--pine); font-weight: 780; line-height: 1.2; text-decoration: none; }
.brand > img { flex: none; width: 49px; max-height: 38px; object-fit: contain; }
.brand strong, .brand b { display: block; }
.brand small { color: var(--muted); font-weight: 550; }
.nav-menu { display: grid; gap: .35rem; }
.nav-menu > .eyebrow { margin: 0 .68rem .35rem; }
.nav-link { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 46px; padding: .62rem .73rem; border: 1px solid transparent; border-radius: .65rem; background: transparent; color: var(--muted); text-align: left; text-decoration: none; font-size: .92rem; font-weight: 650; }
.nav-link > :last-child:is(small, .chip) { margin-left: auto; }
.nav-link:hover { background: #f5f8f4; color: var(--ink); }
.nav-link[aria-current]:not([aria-current="false"]), .nav-link.active, .nav-link[aria-selected="true"] { background: var(--wash); border-color: #e2eedb; color: #25452e; font-weight: 740; }
.sidebar-bottom { display: grid; gap: .75rem; margin-top: auto; border-top: 1px solid var(--line); padding: 1rem .48rem 0; }
.sidebar-bottom > button { justify-content: flex-start; }
.avatar { display: inline-grid; place-items: center; flex: 0 0 auto; width: 2.35rem; height: 2.35rem; border: 1px solid #dde8da; border-radius: .7rem; background: #eaf2e6; color: #33513a; font-size: .8rem; font-weight: 800; }
.main-shell { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem 1.15rem; min-height: 69px; padding: .75rem clamp(1.25rem, 3.2vw, 3rem); border-bottom: 1px solid var(--line); background: var(--paper); }
.breadcrumb, .crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; color: var(--muted); font-size: .88rem; }
.breadcrumb strong, .crumbs strong { color: var(--pine); }
.role-switch { display: inline-flex; align-items: center; gap: .24rem; padding: .22rem; border: 1px solid #e3eae2; border-radius: .7rem; background: #f2f5f1; }
.role-switch button, .role-switch a { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 34px; padding: .25rem .7rem; border: 1px solid transparent; border-radius: .49rem; background: transparent; color: var(--muted); text-decoration: none; font-size: .83rem; font-weight: 700; white-space: nowrap; }
.role-switch :is(button,a):is([aria-pressed="true"],[aria-selected="true"],[aria-current="page"],.active) { border-color: #e0e7df; background: var(--paper); color: var(--pine); box-shadow: 0 1px 3px #1b39231a; }
.content { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 1.45rem; width: 100%; max-width: 1510px; margin: 0 auto; padding: clamp(1.2rem, 2.7vw, 2.5rem) clamp(1.25rem, 3.2vw, 3rem) 3rem; }
.content > * { min-width: 0; }
.mobile-nav { display: none; }

.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 205px; overflow: hidden; padding: clamp(1.55rem, 3vw, 2.85rem); border: 1px solid #25483a; border-radius: 1.15rem; background: #173629; color: #f6fbf4; box-shadow: 0 10px 30px #1b39251a; }
.hero::after { position: absolute; z-index: -1; inset: 0 0 0 45%; content: ""; background: repeating-linear-gradient(90deg, transparent 0 31px, #b2e98120 31px 32px), repeating-linear-gradient(0deg, transparent 0 31px, #b2e98115 31px 32px), linear-gradient(120deg, transparent 30%, #b8ee7c26 135%); mask-image: linear-gradient(90deg, transparent 2%, #000 85%); transform: skewX(-19deg) scale(1.2); transform-origin: right; pointer-events: none; }
.hero-content { display: grid; justify-items: start; gap: .62rem; max-width: 55ch; }
.hero h1, .hero h2 { color: inherit; }
.hero .eyebrow { color: #cfebaa; }
.hero p, .hero .muted, .hero .subtle { color: #e1eee3; }
.hero .inline, .hero .action { margin-top: .35rem; }
.hero-art { position: absolute; z-index: -1; right: 6%; width: clamp(125px, 23vw, 320px); aspect-ratio: 1.6; border: 1px solid #b9e88860; border-radius: 5px; transform: perspective(380px) rotateY(-29deg) rotateX(11deg); opacity: .5; pointer-events: none; }
.hero-art::before, .hero-art::after { position: absolute; inset: 12%; border: 1px solid #b9e88855; border-radius: inherit; content: ""; }
.hero-art::after { inset: 25%; }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.metric { display: grid; align-content: start; min-width: 0; min-height: 111px; gap: .3rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: .95rem; background: var(--paper); box-shadow: var(--shadow); }
.metric .inline { justify-content: space-between; gap: .4rem; }
.metric p { font-size: .86rem; color: var(--muted); }
.metric-number { font-size: 1.8rem; font-weight: 780; letter-spacing: -.055em; line-height: 1; }
.metric-icon { display: inline-grid; place-items: center; flex: none; width: 2.1rem; height: 2.1rem; border-radius: .6rem; background: #ecf5e7; color: #365b36; }
.metric:nth-child(2) .metric-icon { background: #fbf2df; color: #774b12; }
.metric:nth-child(3) .metric-icon { background: #eaf2ed; color: #355947; }
.metric-icon svg, .nav-link svg, .action svg, .icon-button svg, .role-switch svg { flex: none; width: 1.05rem; height: 1.05rem; }

.page-heading, .section-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; }
.page-heading > div:first-child, .section-heading > div:first-child { display: grid; gap: .28rem; }
.page-heading p, .section-heading p { color: var(--muted); }
.panel, .box { min-width: 0; border: 1px solid var(--line); border-radius: .95rem; background: var(--paper); box-shadow: var(--shadow); }
.box, .panel:not(.queue-panel) { padding: clamp(1rem, 2vw, 1.45rem); }
.box-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .65rem; margin-bottom: .9rem; }
.box-head > div:first-child { display: grid; gap: .25rem; }
.queue-panel { overflow: hidden; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: .9rem 1rem; }
.filter-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.filter-tabs button { min-height: 36px; padding: .35rem .62rem; border: 1px solid transparent; border-radius: .53rem; background: transparent; font-size: .84rem; font-weight: 690; color: var(--muted); }
.filter-tabs button:hover { background: #f3f7f1; }
.filter-tabs button:is([aria-pressed="true"], [aria-selected="true"], .active) { color: #29462e; background: var(--wash); border-color: #e2eedb; }
.search { display: flex; align-items: center; gap: .45rem; min-width: 12em; max-width: 100%; }
.search > svg { width: 1rem; height: 1rem; flex: none; color: var(--muted); }
.table-wrap { position: relative; max-width: 100%; overflow-x: auto; }
.queue-table { width: 100%; border-collapse: collapse; text-align: left; }
.queue-table :is(th,td) { padding: .81rem .95rem; border-top: 1px solid #edf1ec; vertical-align: middle; }
.queue-table th { background: #f8faf7; color: #44584a; font-size: .8rem; font-weight: 760; white-space: nowrap; }
.queue-table td { min-height: 61px; font-size: .91rem; }
.queue-table > tbody > tr:hover { background: #fafcf9; }
.queue-table td:first-child { min-width: 164px; }
.queue-table td:last-child { width: 1%; white-space: nowrap; }
.team-table td:first-child { overflow-wrap: anywhere; }
.person { display: flex; align-items: center; gap: .58rem; }
.person :is(strong,b,small) { display: block; }
.person small { color: var(--muted); }
.status, .chip { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; padding: .22rem .58rem; border: 1px solid #e0e7e0; border-radius: 50rem; background: #f0f3f0; color: #485952; font-size: .76rem; font-weight: 740; line-height: 1.28; }
.status[data-status="review"] { border-color: #d9e9f5; background: #eaf3fa; color: #315574; }
.status[data-status="complement"] { border-color: #f1e4ca; background: #fcf3df; color: #774813; }
.status[data-status="complete"] { border-color: #ddebd4; background: #edf6e6; color: #3d5930; }
.status[data-status="partner"] { border-color: #eadff3; background: #f4eef9; color: #5e4271; }
.notice-dot { display: inline-block; flex: none; width: .46rem; height: .46rem; border-radius: 50%; background: #659a35; }

.action, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 42px; max-width: 100%; padding: .52rem .83rem; border: 1px solid transparent; border-radius: .58rem; background: #eaf3e7; color: #1d3f2c; font-size: .9rem; font-weight: 730; line-height: 1.2; text-align: center; text-decoration: none; }
.action:hover, .icon-button:hover { background: #ddebd8; }
.primary { background: var(--pine); border-color: var(--pine); color: #fff; }
.primary:hover { background: var(--pine-light); border-color: var(--pine-light); }
.hero .primary { border-color: var(--lime); background: var(--lime); color: #1b3020; }
.hero .primary:hover { background: #b4e078; }
.secondary { background: var(--paper); border-color: var(--line); color: var(--pine); }
.secondary:hover { background: #f2f7ef; }
.ghost { background: transparent; border-color: transparent; color: var(--pine); }
.ghost:hover { background: var(--wash); }
.hero .ghost, .hero .secondary { border-color: #d6e9d452; background: #fff1; color: #fff; }
.icon-button { flex: none; min-width: 40px; padding: .5rem; border-color: var(--line); background: var(--paper); }
.text-link { min-height: 35px; padding: .2rem .3rem; border: 0; background: transparent; color: #345d36; text-decoration: underline; text-underline-offset: .2em; font-size: .88rem; font-weight: 720; }
.text-link:hover { color: #163d21; }
.blank { display: grid; justify-items: center; gap: .55rem; min-height: 145px; align-content: center; padding: 1.5rem; text-align: center; color: var(--muted); }

.split { display: grid; grid-template-columns: minmax(0, 1.78fr) minmax(240px, 1fr); align-items: start; gap: 1.18rem; }
.split > * { min-width: 0; }
.scope, .patient-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .72rem; color: var(--muted); font-size: .88rem; }
.steps { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.steps > * { display: flex; align-items: center; gap: .43rem; min-height: 38px; padding: .37rem .65rem; border: 1px solid var(--line); border-radius: .57rem; background: var(--paper); color: var(--muted); font-size: .83rem; font-weight: 690; }
.steps [aria-current="step"], .steps .active { background: #eaf4e4; color: var(--pine); border-color: #d6e7cf; }
.steps [data-complete="true"], .steps .complete { background: #f6faf3; color: #476841; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .68rem; }
.option-card { position: relative; display: flex; align-items: flex-start; gap: .6rem; min-height: 76px; padding: .84rem .92rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--paper); color: var(--ink); text-align: left; }
.option-card:hover { border-color: #94ac8e; background: #fafcf9; }
.option-card:has(input:checked), .option-card[aria-pressed="true"], .option-card.selected { border-color: #86a774; background: #f0f7ea; box-shadow: 0 0 0 1px #86a774; }
.option-card:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.option-card strong, .option-card small { display: block; }
.option-card small { color: var(--muted); line-height: 1.4; margin-top: .2rem; }
.option-card input[type="radio"] { flex: none; margin: .2rem 0 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .9rem; }
.field { display: grid; align-content: start; gap: .32rem; min-width: 0; }
.field :is(label, legend), label.field { font-size: .88rem; font-weight: 710; }
.field input, .field select, .field textarea { width: 100%; }
input:not([type="radio"],[type="checkbox"],[type="file"]), select, textarea { min-height: 42px; min-width: 0; padding: .53rem .65rem; border: 1px solid #d4ded3; border-radius: .52rem; background: #fff; color: var(--ink); }
input::placeholder, textarea::placeholder { color: #64736a; }
textarea { min-height: 91px; resize: vertical; }
input:is([type="radio"],[type="checkbox"]) { accent-color: #416b33; width: 1rem; height: 1rem; }
select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 48%, #52615a 50%), linear-gradient(135deg, #52615a 48%, transparent 50%); background-size: 5px 5px; background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-repeat: no-repeat; }
.hint { color: var(--muted); font-size: .82rem; font-weight: 500; }
.upload-row, .pending-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem; padding: .76rem .85rem; border: 1px solid var(--line); border-radius: .64rem; }
.upload-row + .upload-row, .pending-row + .pending-row { margin-top: .5rem; }
.upload-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.upload-actions .action { min-height: 36px; font-size: .8rem; }
.pending-list { display: grid; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.pending-list .pending-row { margin: 0; }
.pending-row:has(textarea) { align-items: flex-start; }
.pending-row textarea { width: 100%; }
.timeline { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; }
.event { position: relative; display: grid; gap: .16rem; border-left: 1px solid #e0e9dd; margin-left: .27rem; padding: .25rem 0 .8rem .84rem; }
.event::before { content: ""; position: absolute; left: -.24rem; top: .68rem; width: .44rem; height: .44rem; border: 1px solid #fff; border-radius: 50%; background: #789e64; }
.event:last-child { padding-bottom: .25rem; }
.event p, .event time, .event small { color: var(--muted); font-size: .82rem; }
.file-pill { display: inline-flex; align-items: center; gap: .34rem; max-width: 100%; border: 1px solid #dfebdb; border-radius: .45rem; padding: .26rem .45rem; background: #f2f8f0; color: #38583b; overflow-wrap: anywhere; font-size: .8rem; }

.message { padding: .75rem .9rem; border: 1px solid #dfead9; border-radius: .64rem; background: #f1f8ed; color: #31533a; }
.message[data-tone="warning"], .message[data-tone="warn"] { border-color: #efdfbb; background: #fff6e3; color: #654318; }
.message[data-tone="error"] { border-color: #f0d0ce; background: #fff1f0; color: #8a332d; }
.message[data-tone="info"] { border-color: #dce9f3; background: #f1f7fc; color: #294c69; }
.toast { z-index: 10; position: fixed; right: 1.2rem; bottom: 1.2rem; max-width: min(460px, calc(100% - 2.4rem)); border: 1px solid #517d60; border-radius: .65rem; padding: .75rem 1rem; background: var(--pine); color: #fff; box-shadow: 0 10px 32px #132b2540; font-size: .88rem; }
.toast:empty { display: none; }
dialog, .dialog { max-width: min(590px, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow: auto; padding: 1.35rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--paper); color: var(--ink); box-shadow: 0 20px 65px #132b2533; }
dialog::backdrop { background: #0f251c70; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { padding-inline: .73rem; }
  .queue-table :is(th,td) { padding-inline: .7rem; }
}

@media (max-width: 830px) {
  .app-shell { display: flex; flex-direction: column; }
  .sidebar { position: static; display: grid; min-height: 0; max-height: none; grid-template-columns: auto 1fr; align-items: center; gap: .6rem .9rem; padding: .6rem .85rem; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .brand { min-height: 37px; padding-inline: .2rem; }
  .brand > img { width: 37px; max-height: 30px; }
  .nav-menu { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .25rem; }
  .nav-menu > .eyebrow, .sidebar-bottom { display: none; }
  .nav-link { width: auto; min-height: 34px; padding: .33rem .45rem; gap: .4rem; font-size: .8rem; }
  .nav-link > small { display: none; }
  .topbar { min-height: 55px; padding: .56rem 1rem; }
  .content { padding: 1rem 1rem 2rem; gap: 1rem; }
  .hero { min-height: 176px; }
  .metrics { gap: .58rem; }
  .metric { min-height: 94px; padding: .68rem .64rem; }
  .metric-number { font-size: 1.55rem; }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .sidebar { grid-template-columns: 1fr; align-items: start; gap: .35rem; }
  .brand + .nav-menu, .nav-menu { justify-content: flex-start; }
  .nav-link { min-height: 40px; }
  .nav-link svg { width: .9rem; height: .9rem; }
  .topbar { align-items: flex-start; }
  .topbar .role-switch { width: 100%; }
  .role-switch :is(button,a) { flex: 1; min-height: 38px; }
  .content { padding-inline: .82rem; }
  .hero { min-height: 163px; padding: 1.12rem; }
  .hero::after { inset-inline-start: 62%; }
  .hero-art { opacity: .25; right: 2%; }
  .hero p { max-width: 32ch; font-size: .92rem; }
  .metrics { gap: .42rem; }
  .metric { min-height: 80px; border-radius: .7rem; padding: .54rem .47rem; }
  .metric p, .metric > small { font-size: .72rem; line-height: 1.25; }
  .metric-icon { width: 1.6rem; height: 1.6rem; border-radius: .4rem; }
  .metric-icon svg { width: .88rem; height: .88rem; }
  .metric-number { font-size: 1.3rem; }
  .toolbar { padding: .68rem; }
  .search { width: 100%; }
  .search :is(input, label) { flex: 1; }
  .filter-tabs button { min-height: 40px; }
  .fields, .option-grid { grid-template-columns: 1fr; }
  .option-card { min-height: initial; }
  .queue-table { min-width: 560px; }
  .team-table { display: block; min-width: 0; }
  .team-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .team-table tbody { display: block; }
  .team-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem .65rem; padding: .8rem; }
  .team-table tbody tr + tr { border-top: 1px solid var(--line); }
  .team-table tbody td { min-width: 0; min-height: 0; padding: 0; border: 0; }
  .team-table tbody td:first-child, .team-table tbody td:last-child { grid-column: 1 / -1; width: auto; }
  .team-table .action { min-height: 44px; }
  .upload-actions { width: 100%; }
  .upload-actions .action { min-height: 41px; }
  .steps > * { padding-inline: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.top-actions, .scope { display: flex; align-items: center; gap: .55rem; }
.scope > div { min-width: 0; }
.scope p { color: var(--muted); font-size: .8rem; }
.mobile-reset { display: none; }
.metric { text-align: left; transition: border-color .18s, box-shadow .18s; }
.metric:hover { border-color: #92ab8b; box-shadow: 0 5px 18px #1b392319; }
.metric > span:last-child { display: grid; gap: .3rem; margin-top: .15rem; }
.metric > span:last-child .subtle { font-size: .85rem; line-height: 1.25; }
.queue-table td > .subtle, .person .subtle, .row-content > :is(.subtle,.hint) { display: block; font-size: .81rem; line-height: 1.45; }
.case-heading { display: grid; align-items: start; justify-content: stretch; }
.case-heading .inline { justify-content: space-between; align-items: end; }
.case-heading h1 { margin: .25rem 0; }
.case-heading .back-link { justify-self: start; font-size: .88rem; }
.case-summary { margin: 0 0 .9rem; display: grid; gap: .65rem; }
.case-summary dt { color: var(--muted); font-size: .8rem; }
.case-summary dd { margin: 0; font-weight: 650; }
.context-box .action + .action { margin-top: .35rem; }
.context-box .hint { margin-top: .6rem; }
.tenant-layout { display: grid; gap: 1rem; max-width: 900px; width: 100%; }
.doc-group { display: grid; gap: .65rem; margin-top: 1rem; }
.doc-group + .doc-group { border-top: 1px solid var(--line); padding-top: 1rem; }
.doc-group > h3 { margin-bottom: .15rem; }
.row-content { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.row-content > strong { display: block; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; margin-top: 1.2rem; }
.example-actions { margin-top: .75rem; }
.module-card { display: grid; align-content: start; gap: .48rem; text-decoration: none; }
.module-card:hover { border-color: #92ab8b; }
.module-card > strong { font-size: 1.15rem; }
.module-card > span { color: var(--muted); }
.result-box { display: grid; justify-items: start; gap: .6rem; }
.result-box > p { max-width: 57ch; }
.file-preview { margin-block: .75rem; background: #f4f7f3; border: 1px dashed #d5e2d2; border-radius: .65rem; }
.pending-group > h3 { margin-bottom: .55rem; }
.pending-group + .pending-group { margin-top: 1rem; }
.file-version { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .35rem .75rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.file-version time { color: var(--muted); font-size: .8rem; }
.access-shell { min-height: 100vh; }
.access-bar { justify-content: space-between; }
.access-content { max-width: 1000px; width: 100%; }
.access-card { width: min(100%, 470px); margin: clamp(1rem, 5vh, 3rem) auto 0; }
.privacy-content { display: grid; gap: .75rem; max-width: 55ch; }
.privacy-content a { font-weight: 700; }
.privacy-content summary { font-weight: 700; }
.privacy-content details p { margin-top: .45rem; }
.retention-items { border: 1px solid var(--line); border-radius: .65rem; min-width: 0; }
.access-form { display: grid; gap: .85rem; }
.access-form > button { justify-self: start; margin-top: .35rem; }

.maintenance-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(10rem, 1fr); gap: .85rem; margin-bottom: .9rem; }
.maintenance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: .9rem; }
.maintenance-card { display: grid; align-content: start; gap: .65rem; overflow-wrap: anywhere; }
.maintenance-card h2 { font-size: 1.1rem; }
.maintenance-detail-tags, .maintenance-message { margin-bottom: .75rem; }
.maintenance-message { margin-top: 1rem; }
.maintenance-message textarea, .maintenance-preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.maintenance-preserve-lines { max-width: 100%; }
@media (max-width: 560px) {
  .maintenance-filters { grid-template-columns: 1fr; }
}
label.action { cursor: pointer; }
.upload-actions:has(input[type="file"]:disabled) label.action { opacity: .58; cursor: wait; }
.upload-actions:has(input[type="file"]:focus-visible) label.action { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (max-width: 1080px) {
  .sidebar-bottom > .action { white-space: normal; text-align: left; }
}
@media (max-width: 850px) {
  .mobile-reset { display: inline-grid; }
}
@media (max-width: 520px) {
  .metric > span:last-child .subtle { font-size: .75rem; }
  .top-actions { flex-wrap: wrap; max-width: 100%; }
  .case-heading .inline { align-items: start; }
  .form-actions > .primary { min-height: 44px; }
}
