:root {
  color-scheme: light;
  font: 15px/1.5 "Segoe UI", "Microsoft YaHei UI", system-ui, sans-serif;
  color: #1d2937;
  background: #f4f7fb;
  --surface: #fff;
  --muted: #506176;
  --border: #d7e0ea;
  --accent: #2152b6;
  --accent-soft: #edf3ff;
  --error: #8d2923;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.skip { position: fixed; z-index: 4; background: var(--surface); padding: 8px 14px; transform: translateY(-120%); }
.skip:focus { transform: translateY(0); }
.topbar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(16px, 4vw, 64px);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.brand { color: #202d40; font-weight: 700; font-size: 17px; text-decoration: none; }
.brand span { color: var(--muted); font-weight: 450; font-size: 14px; margin-left: 7px; }
#account, .row, .actions { display: flex; align-items: center; gap: 9px; }
#account, .row { justify-content: space-between; }
#account { flex-wrap: wrap; }
.actions { flex-wrap: wrap; justify-content: flex-end; }
.shell { width: min(1460px, 100%); margin: 0 auto; padding: 22px clamp(14px, 3vw, 40px) 50px; }
.workspace { display: grid; grid-template-columns: minmax(194px, 240px) minmax(0, 1fr); gap: 18px; align-items: start; }
.sidebar, .card, .signin {
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 0;
}
.sidebar, #nav, #view, .stack { display: grid; align-content: start; gap: 12px; }
.content, .workspace > *, .grid > * { min-width: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-size: clamp(23px, 3vw, 32px); line-height: 1.25; font-weight: 650; }
h2 { font-size: 18px; font-weight: 640; }
h3 { font-size: 15px; font-weight: 640; }
.muted { color: var(--muted); }
.formats { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.formats ul, .timeline, .inbox, .file-list, .member-list { list-style: none; padding: 0; margin: 0; }
.formats ul { display: grid; gap: 4px; margin-top: 6px; }
.formats .unavailable { color: var(--error); }
.field { display: grid; gap: 4px; font-size: 14px; }
.field input, .field select { width: 100%; }
button, .button, input:not([type=checkbox]), select {
  min-height: 38px;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 11px;
  font: inherit;
}
button, .button { cursor: pointer; }
button:hover:not(:disabled), .button:hover { border-color: var(--accent); }
.button { display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; }
button:disabled { opacity: .55; cursor: default; }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 620; }
button.danger { color: var(--error); }
.nav-button { width: 100%; text-align: left; border-color: transparent; }
.nav-button[aria-current=page], .file-button[aria-current=true] { background: var(--accent-soft); color: var(--accent); border-color: #b9cbe9; }
.grid { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(0, 2fr); align-items: start; gap: 12px; }
.drop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); gap: 9px; }
.drop {
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 76px;
  width: 100%;
  text-align: left;
  border-style: dashed;
  border-color: #99add0;
}
.drop[data-dragging=true] { background: var(--accent-soft); border-color: var(--accent); }
.drop strong { font-weight: 650; }
.drop span { color: var(--muted); font-size: 13px; }
.file-list { display: grid; gap: 5px; max-height: 480px; overflow: auto; }
.file-button { width: 100%; text-align: left; overflow-wrap: anywhere; }
.inbox, .member-list, .timeline { display: grid; gap: 7px; }
.inbox li, .member-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.inbox li:last-child, .member-list li:last-child { border-bottom: 0; }
.row > :first-child { min-width: 0; overflow-wrap: anywhere; }
.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 12px;
  padding: 9px 0;
}
.facts dt, .subtle { color: var(--muted); font-size: 14px; }
.facts dd, .event { overflow-wrap: anywhere; }
.details { border-top: 1px solid var(--border); padding-top: 9px; }
.details summary { cursor: pointer; font-weight: 600; width: fit-content; }
.timeline { margin-top: 9px; }
.event { border-left: 2px solid #b9cbe9; padding-left: 9px; }
.event span { display: block; }
.signin { width: min(470px, 100%); display: grid; gap: 12px; justify-items: start; margin: 8vh auto 0; }
.status, .error { margin-bottom: 12px; overflow-wrap: anywhere; }
.status:empty { display: none; }
.status { color: var(--muted); }
.error { padding: 8px 11px; border: 1px solid #ecccca; border-radius: 8px; background: #fff2f1; color: var(--error); }
dialog {
  width: min(560px, calc(100% - 28px));
  max-height: calc(100% - 30px);
  padding: 21px;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 55px rgb(9 27 56 / 18%);
  color: inherit;
}
dialog::backdrop { background: rgb(10 28 57 / 48%); }
dialog form { display: grid; gap: 13px; }
.notice { white-space: pre-wrap; overflow-wrap: anywhere; }
.check { display: flex; align-items: baseline; gap: 6px; cursor: pointer; }
fieldset { border: 1px solid var(--border); border-radius: 8px; margin: 0; min-width: 0; }
.permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 6px; }
@media (max-width: 790px) { .workspace, .grid { grid-template-columns: 1fr; } .file-list { max-height: 260px; } }
@media (max-width: 420px) { .brand span { display: none; } .row { align-items: flex-start; } .facts { grid-template-columns: 1fr; } }
