:root {
  --page: #f5f6ef;
  --paper: #fdfef9;
  --ink: #1e322e;
  --muted: #54665e;
  --line: #cbd4c7;
  --green: #175640;
  --light: #e2ecd7;
  --error: #992e22;
  font: 16px/1.5 "Inter", "Roboto", system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
button, input { font: inherit; }
a { color: var(--green); text-underline-offset: .2em; }
button { cursor: pointer; }
button, .action-link { border-radius: 6px; }
button:disabled { opacity: .52; cursor: default; }
:focus-visible { outline: 3px solid #a85d0c; outline-offset: 3px; }
main:focus { outline: none; }
.skip { position: absolute; top: -8em; padding: .7rem; background: var(--paper); z-index: 3; }
.skip:focus { top: 0; }
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.bar, main { width: min(1376px, 94%); margin-inline: auto; }
.bar { min-height: 72px; display: flex; align-items: center; gap: clamp(16px, 4vw, 72px); }
.brand { display: inline-flex; gap: 12px; align-items: center; font-size: 1.33rem; font-weight: 750; letter-spacing: -.04em; text-decoration: none; color: var(--ink); }
.brand-icon { position: relative; width: 35px; height: 34px; background: var(--green); border-radius: 8px; }
.brand-icon::before, .brand-icon::after { content: ""; position: absolute; background: #ecf2cd; border-radius: 2px; left: 8px; }
.brand-icon::before { width: 9px; height: 7px; top: 9px; }
.brand-icon::after { width: 20px; height: 12px; top: 12px; }
nav { display: flex; gap: 4px; }
nav button, .quiet { background: transparent; border: 0; color: var(--muted); padding: 8px 13px; font-size: .94rem; }
nav button[aria-current="page"], nav button:hover, .quiet:hover { background: var(--light); color: var(--green); }
.account { display: flex; align-items: center; gap: 12px; margin-left: auto; min-width: 0; }
#account-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 26ch; font-size: .94rem; font-weight: 600; }
main { padding-block: clamp(28px, 4vw, 64px) 64px; }
h1, h2, p, pre { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.12; letter-spacing: -.054em; font-weight: 680; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.25; font-weight: 670; letter-spacing: -.035em; }
.muted, .hint { color: var(--muted); }
.hint, .eyebrow { font-size: .86rem; }
.page-title { margin-bottom: 2rem; }
.page-title p:not(:empty) { margin-top: .65rem; }
.eyebrow { font-weight: 620; color: var(--muted); margin-bottom: .4rem; }
.primary, .secondary { padding: 9px 16px; font-size: .93rem; font-weight: 620; }
.primary { color: white; background: var(--green); border: 1px solid var(--green); }
.primary:hover:not(:disabled) { background: #0a4430; }
.secondary { background: var(--paper); color: var(--green); border: 1px solid #a4b4a4; }
.secondary:hover:not(:disabled) { background: var(--light); }
.feedback { color: var(--green); overflow-wrap: anywhere; }
.feedback:not(:empty) { margin-top: 1rem; padding: .65rem .9rem; background: #e6efdf; border-left: 3px solid #58804d; }
.feedback.error { background: #fae9e1; color: var(--error); border-color: #b45942; }
.panel, .table-wrap, .login-panel { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.panel { padding: clamp(17px, 2.3vw, 32px); }
.login-panel { width: min(100%, 820px); margin: clamp(16px, 7vh, 82px) auto; display: grid; grid-template-columns: .75fr 1fr; overflow: hidden; }
.login-body { padding: clamp(25px, 4vw, 54px); }
.login-body h1 { font-size: clamp(1.85rem, 3vw, 2.65rem); }
.login-body .muted { margin-top: .8rem; }
#login-form { display: grid; gap: 6px; margin-top: 2rem; }
form label, legend { font-size: .9rem; font-weight: 620; }
#login-form input { width: 100%; padding: 8px 12px; border: 1px solid #a8b7a9; border-radius: 5px; background: #fff; margin-bottom: 10px; }
#login-form .primary { margin-top: .3rem; }
.login-art { display: grid; place-items: center; min-height: 200px; background-color: #234e3f; background-image: radial-gradient(#729582 1px, transparent 1px); background-size: 17px 17px; }
.cabinet { position: relative; padding: 7px; display: grid; gap: 3px; width: 53%; aspect-ratio: 1 / 1.18; border: 2px solid #e2e3b7; border-radius: 6px; background: #284b41; box-shadow: 11px 10px 0 #183d32; transform: rotate(-6deg); }
.cabinet i { position: relative; border: 1px solid #9fc1a4; border-radius: 3px; background: #42715b; }
.cabinet i::before, .cabinet i::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); }
.cabinet i::before { top: 27%; width: 23%; height: 13%; background: #dfdfb5; border: 2px solid #294b3e; border-radius: 1px; }
.cabinet i::after { top: 57%; width: 14%; height: 8%; border: 2px solid #d4d8ab; border-top: 0; border-radius: 0 0 3px 3px; }
.upload { border-top: 3px solid var(--green); }
#upload-form { margin-top: 17px; display: flex; align-items: flex-start; gap: clamp(16px, 3vw, 50px); flex-wrap: wrap; }
.file-field { flex: 1 1 280px; display: grid; gap: 5px; min-width: 0; }
.file-field input { width: 100%; padding: 4px; font-size: .92rem; color: var(--ink); background: #f5f7f0; border: 1px dashed #9bac9e; border-radius: 6px; }
input::file-selector-button { font: inherit; margin-right: 9px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 5px 10px; color: var(--ink); cursor: pointer; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 5px; }
.segmented { display: flex; padding: 3px; border: 1px solid var(--line); background: #f0f3ea; border-radius: 6px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.segmented span { display: block; padding: 5px 12px; border-radius: 4px; font-weight: 500; color: var(--muted); }
.segmented input:checked + span { color: var(--green); background: white; box-shadow: 0 1px 3px #192c1726; font-weight: 650; }
.segmented input:focus-visible + span { outline: 2px solid #a85d0c; }
.upload-button { margin-top: 26px; }
.section-head, .table-bar, .table-bar > div, .actions { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.table-bar, .section-head { justify-content: space-between; }
.table-bar { margin: 2rem 0 1rem; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; text-align: left; }
th, td { padding: 12px 14px; overflow-wrap: anywhere; }
th { font-size: .78rem; font-weight: 620; letter-spacing: .015em; color: var(--muted); background: #edf1e7; }
td { border-top: 1px solid #dce2d7; }
td.empty { color: var(--muted); padding: 2rem; text-align: center; }
.file-name { min-width: 120px; font-weight: 610; }
.row-actions { display: flex; align-items: center; gap: 3px 10px; flex-wrap: wrap; }
.action-link { appearance: none; background: transparent; border: 0; color: var(--green); text-decoration: underline; text-underline-offset: .2em; font: inherit; padding: 3px 0; text-align: left; }
.danger { color: #984534; }
.file-kind, .access-mode, .result-tag { display: inline-block; border-radius: 4px; padding: .1rem .42rem; white-space: nowrap; font-size: .78rem; }
.file-kind { background: #e9eee5; color: #304835; font-family: "IBM Plex Mono", monospace; font-weight: 650; }
.access-mode { background: #eceee9; }
.shared, .result-ok { background: #e1ecd8; color: #315a34; }
.result-denied, .result-error { background: #fae9e1; color: var(--error); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green); vertical-align: middle; }
.back { display: inline-block; margin-bottom: 1.5rem; }
#preview-text { margin-top: 1.4rem; font: .94rem/1.65 "IBM Plex Mono", ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
#archive { margin-top: 2rem; }
#archive .table-wrap { margin-top: 1rem; }
#archive-message:not(:empty) { margin-top: .5rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 1.2rem; margin: 1.2rem 0 0; }
.facts div { border-left: 3px solid #bfceb5; padding-left: 12px; }
.facts dt { font-size: .86rem; color: var(--muted); }
.facts dd { margin: .15rem 0 0; font-weight: 650; font-size: 1.35rem; }
#disk-path { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .bar { flex-wrap: wrap; gap: .3rem 1.2rem; padding-block: .75rem; }
  nav { order: 3; width: 100%; }
  .login-panel { grid-template-columns: 1fr; max-width: 460px; margin-top: 0; }
  .login-art { min-height: 95px; }
  .cabinet { width: 72px; }
  .bar, main { width: 93%; }
  .table-wrap table { min-width: 760px; }
  #archive table { min-width: 360px; }
  .upload-button { margin-top: 0; align-self: center; }
}
@media (max-width: 480px) {
  .table-bar { align-items: flex-start; }
  .account { gap: 4px; }
  #account-name { max-width: 12ch; }
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
