* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -10%, rgba(26, 58, 107, 0.12), transparent 32%),
    linear-gradient(180deg, var(--paper), var(--paper));
  letter-spacing: 0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(15, 35, 65, 0.045) 0.7px, transparent 0.7px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
}

:root[data-theme="dark"] body::before { opacity: 0.35; mix-blend-mode: screen; }

button, input, select, textarea { font: inherit; color: inherit; }

button, a, summary { -webkit-tap-highlight-color: transparent; }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 20;
  background: var(--paper-2);
  color: var(--ink);
  padding: 8px 12px;
}

.skip:focus { top: 12px; }

.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

h1, h2, h3, p { margin: 0; }

h1, h2, .brand-mark, .kpi strong, .module-code, .ledger strong, .side-stack, .monogram {
  font-family: var(--font-display);
  font-weight: 500;
}

h1 { font-size: clamp(2.2rem, 4vw, 4.4rem); line-height: 0.95; letter-spacing: -0.03em; }
h2 { font-size: 1.45rem; line-height: 1.15; }
h3 { font-size: 1rem; font-weight: 600; }

.muted, .field small, .meta { color: var(--ink-soft); }

.fiction, .demo-flag {
  display: block;
  margin: 0;
  max-width: 32ch;
  border: 0;
  background: none;
  color: var(--ink-soft);
  padding: 0;
  border-radius: 0;
  font-size: 0.86rem;
  letter-spacing: 0;
  text-transform: none;
  text-align: right;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
}

.login-brand {
  position: relative;
  color: #f4f7fb;
  background:
    linear-gradient(160deg, rgba(36, 83, 143, 0.55), transparent 42%),
    #0f2341;
  padding: 40px 36px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
}

.login-brand::after { content: none; }

.login-brand, .login-panel { position: relative; z-index: 1; }
.brand-mark {
  display: flex;
  align-items: stretch;
  gap: 0.22em;
  font-size: clamp(4.2rem, 7vw, 6.4rem);
  line-height: 0.78;
  letter-spacing: -0.045em;
  max-width: none;
}
.brand-stack { display: flex; flex-direction: column; }
.brand-mark:focus,
.brand-mark:focus-visible { box-shadow: none; }
.brand-bar {
  width: 2px;
  margin: 0.08em 0;
  background: rgba(244, 247, 251, 0.88);
}
.brand-kicker::after {
  content: "";
  display: block;
  width: 2.4rem;
  height: 1px;
  margin-top: 14px;
  background: rgba(244, 247, 251, 0.5);
}
.brand-rotator {
  position: relative;
  z-index: 1;
  min-height: 1.5em;
  max-width: 34ch;
}
.brand-rotator p {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  max-width: none;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 450;
  letter-spacing: 0.02em;
  line-height: 1.45;
  color: rgba(213, 224, 238, 0.82);
  opacity: 0;
  animation: brandPhrase 25s infinite;
}
.brand-rotator p:nth-child(2) { animation-delay: 5s; }
.brand-rotator p:nth-child(3) { animation-delay: 10s; }
.brand-rotator p:nth-child(4) { animation-delay: 15s; }
.brand-rotator p:nth-child(5) { animation-delay: 20s; }
.system-version,
.app-version {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: rgba(213, 224, 238, 0.75);
}
.app-version {
  padding: 0 36px 22px;
  color: var(--ink-soft);
}
.brand-watermark {
  position: absolute;
  z-index: 0;
  right: -4%;
  bottom: -10%;
  width: min(92%, 640px);
  height: auto;
  color: rgba(213, 227, 245, 0.62);
  pointer-events: none;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 48%),
    linear-gradient(to bottom, transparent 0%, #000 52%);
  mask-composite: intersect;
  mask-repeat: no-repeat;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 48%),
    linear-gradient(to bottom, transparent 0%, #000 52%);
  -webkit-mask-composite: source-in;
  -webkit-mask-repeat: no-repeat;
}
@keyframes brandPhrase {
  0% { opacity: 0; }
  3% { opacity: 1; }
  17% { opacity: 1; }
  20% { opacity: 0; }
  100% { opacity: 0; }
}

.brand-kicker, .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-brand p { max-width: 36ch; color: #d5e0ee; }

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 28px;
}

.login-card {
  width: min(100%, 420px);
  display: grid;
  gap: 22px;
}

.panel-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.login-intro { display: grid; gap: 6px; }
.login-submit {
  width: 100%;
  min-height: 48px;
  justify-self: stretch;
  font-weight: 600;
}
.login-links { display: flex; justify-content: center; }
.login-version {
  margin: 2px 0 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}
.btn-link {
  background: none;
  border: 0;
  color: var(--pine);
  min-height: 44px;
  padding: 4px 8px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.recovery-note { margin: 0; text-align: center; color: var(--ink-soft); }

.form, .stack { display: grid; gap: 16px; }

.field { display: grid; gap: 6px; }
.field span { font-size: 0.86rem; font-weight: 600; }

input, select, textarea {
  width: 100%;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-height: 46px;
}

textarea { min-height: 96px; resize: vertical; }

input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }

.field-error { color: var(--danger); min-height: 1em; }

.actions, .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.btn, .icon-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--pine);
  color: #f4f7fb;
  padding: 12px 18px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

:root[data-theme="dark"] .btn { color: #0f2341; }

.btn-ghost, .icon-btn {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-copper { background: var(--pine-2); color: #f4f7fb; }
:root[data-theme="dark"] .btn-copper { color: #0f2341; background: var(--copper-2); }

.btn[disabled], .btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

.icon-btn { width: 44px; padding: 0; }

.shell {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  background: var(--paper);
  overflow: hidden;
}

.topbar {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.search { flex: 1; max-width: 420px; min-width: 0; }
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  width: 100%;
  padding: 0 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ink) 4%, var(--paper));
  border: 1px solid transparent;
}
.search-box .icon { width: 16px; height: 16px; color: var(--ink-soft); }
.search-box input {
  border: 0;
  background: transparent;
  min-height: 0;
  height: 32px;
  padding: 0;
  border-radius: 0;
}
.search-box input:focus-visible { box-shadow: none; }
.search-box:focus-within { box-shadow: var(--focus); }

.topbar .icon-btn {
  width: 40px;
  min-height: 40px;
  border-color: transparent;
  border-radius: 10px;
}
.topbar .icon-btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }

.sidebar {
  min-height: 0;
  position: relative;
  overflow: auto;
  padding: 16px 12px 12px;
  background: #0f2341;
  color: #f4f7fb;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

:root[data-theme="dark"] .sidebar {
  background: #08111e;
  border-right: 1px solid var(--line);
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  padding: 2px 8px 14px;
}
.side-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  background: #f4f7fb;
  border-radius: 10px;
}
.side-mark img { width: 24px; height: 24px; object-fit: contain; display: block; }
.side-copy { display: grid; gap: 3px; min-width: 0; }
.side-copy strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.side-brand small {
  color: rgba(213, 224, 238, 0.62);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.62rem;
}

.side-foot { margin-top: auto; display: grid; gap: 4px; padding-top: 12px; }
.side-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(244, 247, 251, 0.78);
  cursor: pointer;
  text-align: left;
}
.side-toggle:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.side-toggle .icon { width: 18px; height: 18px; }
.side-version {
  margin: 0;
  padding: 2px 10px 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(213, 224, 238, 0.45);
}

.nav { display: grid; gap: 6px; }
.nav a, .menu a, .menu button {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 12px;
  border-radius: 12px; text-decoration: none; color: inherit;
  background: transparent; border: 0; width: 100%; text-align: left; cursor: pointer;
}
.menu a:hover, .menu button:hover, .nav a:hover,
.nav a[aria-current="page"] {
  background: color-mix(in srgb, var(--copper) 16%, transparent);
}

.sidebar .nav a { color: rgba(244, 247, 251, 0.84); border-radius: 8px; font-size: 0.92rem; }
.sidebar .nav .icon { width: 18px; height: 18px; stroke-width: 1.75; }
.sidebar .nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar .nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 2px 0 0 rgba(255, 255, 255, 0.9);
}

.main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.content { flex: 1; overflow: auto; }
.content:has(.module-embed) { padding: 0; overflow: hidden; display: flex; }
.module-embed { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.embed-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 16px; height: 40px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.embed-bar a { color: var(--copper); text-decoration: none; }
.embed-bar span { margin-left: auto; color: var(--ink-soft); font-size: 0.82rem; }
.module-embed iframe { flex: 1; width: 100%; border: 0; background: var(--paper); }
.shell.is-collapsed { --sidebar: 72px; }
.shell.is-collapsed .sidebar { padding-inline: 10px; transition: width 520ms cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 520ms ease; }
.shell.is-collapsed.is-peek .main { grid-column: 2; }
.shell.is-collapsed.is-peek .sidebar {
  position: absolute;
  z-index: 30;
  top: 0;
  left: 0;
  bottom: 0;
  width: 216px;
  padding-inline: 12px;
  box-shadow: 16px 0 36px rgba(8, 17, 30, 0.22);
}
.shell.is-collapsed.is-peek .side-brand { justify-content: flex-start; padding: 2px 8px 14px; }
.shell.is-collapsed.is-peek .nav a { justify-content: flex-start; padding: 8px 12px; }
.shell.is-collapsed.is-peek .side-toggle { justify-content: flex-start; padding: 0 10px; }
.shell.is-collapsed.is-peek .side-copy,
.shell.is-collapsed.is-peek .nav span,
.shell.is-collapsed.is-peek .side-toggle span,
.shell.is-collapsed.is-peek .side-version {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  opacity: 1;
}
.shell.is-collapsed .side-brand,
.shell.is-collapsed .nav a,
.shell.is-collapsed .side-toggle { justify-content: center; padding-inline: 0; }
.side-brand, .side-toggle, .side-foot { position: relative; }
.shell.is-collapsed:not(.is-peek) .side-version {
  padding: 8px 0 0;
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0;
}
.shell.is-collapsed .side-copy,
.shell.is-collapsed .nav span,
.shell.is-collapsed .side-toggle span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 340ms ease 160ms;
}
.user-menu { position: relative; }
.user-menu summary {
  list-style: none;
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  min-height: 44px;
  padding: 3px 12px 3px 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: color-mix(in srgb, var(--ink) 4%, var(--paper)); }
.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1a3a6b;
  color: #f4f7fb;
  font-family: var(--font-display);
}
.user-copy { display: grid; gap: 1px; min-width: 0; }
.user-copy strong { font-size: 0.84rem; font-weight: 600; line-height: 1.15; white-space: nowrap; }
.user-menu summary small, .user-copy small { display: block; color: var(--ink-soft); font-size: 0.72rem; line-height: 1.15; white-space: nowrap; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  width: 240px; padding: 8px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow);
}

.content { padding: 32px clamp(20px, 3vw, 40px) 56px; display: grid; gap: 28px; align-content: start; }
.content h1 { font-size: clamp(2rem, 3vw, 2.65rem); line-height: 0.95; }
.content h2 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.content .eyebrow { letter-spacing: 0.02em; text-transform: none; font-size: 0.86rem; color: var(--ink-soft); }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; flex-wrap: wrap; }
.page-head p, .mast p, .pane-head p { max-width: 52ch; margin-top: 8px; color: var(--ink-soft); }
.mast p { max-width: 42ch; }

.ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}
.ledger article { min-width: 0; padding: 16px 20px 16px 0; display: grid; align-content: start; }
.ledger article + article { padding-left: 20px; border-left: 1px solid var(--line); }
.ledger article span { color: var(--ink-soft); font-size: 0.82rem; }
.ledger strong {
  display: block;
  margin: 8px 0 6px;
  font-size: clamp(1.7rem, 2.4vw, 2.45rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.72fr);
  gap: 40px;
  align-items: start;
}
.pane-head, .sheet, .pane-side, .pane-stack { display: grid; gap: 4px; }
.pane-stack { gap: 26px; align-content: start; }
.pane-side { gap: 26px; align-content: start; }
.notes { list-style: none; padding: 0; margin: 8px 0 0; }
.notes li {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.notes p { color: var(--ink-soft); margin-top: 2px; }
.dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--pine); }
.dot-warn { background: var(--warn); }
.dot-info { background: #4e74a8; }
.dot-danger { background: var(--danger); }
.dot-ok { background: var(--ok); }
.jump { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.jump a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--pine);
  font-weight: 600;
  text-decoration: none;
}
.jump a:hover { text-decoration: underline; text-underline-offset: 3px; }
:root[data-theme="dark"] .jump a { color: var(--copper-2); }

.kpi-grid, .card-grid, .split { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { grid-template-columns: 1.4fr 0.8fr; }
.card-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card, .module-card, .table-wrap, .empty, .loading-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

.card, .empty, .loading-card { padding: 18px; }
.kpi strong { display: block; font-size: 2rem; margin: 10px 0 4px; }
.kpi span, .module-card p, .activity li span { color: var(--ink-soft); }

.chart { width: 100%; height: auto; margin-top: 8px; color: var(--ink-soft); }
.chart line { stroke: currentColor; stroke-opacity: 0.18; stroke-width: 1; shape-rendering: crispEdges; }
.chart line.axis { stroke-opacity: 0.45; }
.chart rect { fill: #1a3a6b; }
:root[data-theme="dark"] .chart rect { fill: #9bb6d6; }
.chart text { fill: var(--ink-soft); font-size: 12px; font-family: var(--font-body); }

.activity { list-style: none; padding: 0; margin: 8px 0 0; }
.activity li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.activity li span { font-size: 0.8rem; font-variant-numeric: tabular-nums; }

.alert { border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; border: 1px solid var(--line); }
.alert + .alert { margin-top: 10px; }
.alert-warn { background: var(--warn-bg); }
.alert-info { background: var(--info-bg); }
.alert-danger { background: var(--danger-bg); }
.alert-ok { background: var(--ok-bg); }

.badge {
  display: inline-flex; align-items: center; min-height: 26px;
  padding: 2px 8px; border-radius: 999px; font-size: 0.75rem;
  border: 1px solid var(--line); background: var(--info-bg);
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-neutral { background: transparent; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filters .field { min-width: 180px; }

.module-card { padding: 18px; display: grid; gap: 10px; text-decoration: none; color: inherit; min-height: 220px; align-content: start; }
.module-card:hover { border-color: var(--copper); }
.module-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.module-code { color: var(--copper); letter-spacing: 0.08em; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.8rem; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--ink-soft); }
.sheet td:first-child { font-weight: 600; font-variant-numeric: tabular-nums; }

.empty { display: grid; justify-items: start; gap: 8px; }
.loading-card { display: grid; gap: 10px; }
.bar { height: 12px; border-radius: 999px; background: linear-gradient(90deg, var(--line), transparent); animation: pulse 1.1s ease-in-out infinite; }
.bar.short { width: 42%; }

dialog {
  width: min(480px, calc(100% - 24px));
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper-2);
  color: var(--ink);
  padding: 22px;
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(16, 22, 20, 0.55); }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 12px; }
.notice-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.notice-list p { color: var(--ink-soft); margin-top: 4px; }

.backdrop { display: none; }
.only-mobile { display: none; }

@media (max-width: 1099px) {
  .kpi-grid, .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .workspace { grid-template-columns: 1fr; }
  .ledger article,
  .ledger article + article { border-left: 0; padding: 14px 12px 14px 0; }
  .ledger article:nth-child(even) { border-left: 1px solid var(--line); padding-left: 16px; }
  .ledger article:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { min-height: 0; padding: 28px 22px; gap: 18px; }
  .brand-watermark { width: 78%; }
  .login-panel { padding: 28px 20px 36px; }
  .login-card { gap: 18px; }
  .shell { grid-template-columns: 1fr; }
  .shell.is-collapsed.is-peek .main { grid-column: auto; }
  .sidebar {
    position: fixed; z-index: 8; width: min(84vw, 280px);
    padding: 18px 14px 14px;
    transform: translateX(-105%); transition: transform 180ms ease;
  }
  .side-brand, .sidebar .nav a, .side-toggle { justify-content: flex-start; }
  .shell.is-open .sidebar { transform: none; }
  .shell.is-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(16, 22, 20, 0.45); z-index: 7; border: 0; }
  .only-mobile { display: inline-flex; }
  .topbar { gap: 8px; padding-inline: 12px; }
  .search { flex: 1 1 72px; max-width: none; }
  .search-box { min-width: 0; }
  .fiction { text-align: left; }
  .side-copy, .nav span, .side-toggle span, .side-version,
  .shell.is-collapsed .side-copy,
  .shell.is-collapsed .nav span,
  .shell.is-collapsed .side-toggle span,
  .shell.is-collapsed .side-version {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }
  .user-copy { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
  .user-menu summary { padding-right: 3px; }
  .activity li { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .brand-rotator p { opacity: 0; }
  .brand-rotator p:first-child { opacity: 1; }
}

@keyframes pulse {
  50% { opacity: 0.45; }
}
