:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #eceef3; background: #121519; color-scheme: dark; font-synthesis: none;
  --surface: #191e24; --line: #2b333f; --muted: #a8b5c7; --blue: #779aff; --mint: #70ddbb; --amber: #f5cd75;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; background: var(--surface); padding: 14px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 96px; padding: 24px 3.8%; border-bottom: 1px solid var(--line); background: #181c21; }
.brand { display: inline-flex; align-items: center; gap: 13px; font-size: 27px; font-weight: 650; letter-spacing: -.8px; }
.brand-symbol { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: #668bff; color: #101728; font-size: 30px; font-weight: 750; letter-spacing: -2px; box-shadow: inset 0 1px 0 #ffffff26; }
.report-meta { display: flex; align-items: center; gap: 35px; color: #bed0e9; font-size: 15px; }
.mobile-snapshot { display: none; }
.readonly { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.readonly > span { width: 7px; height: 7px; border-radius: 50%; background: #9db8e6; }
.workspace { --heading-height: 58px; --heading-gap: 23px; --tabs-height: 38px; --tabs-gap: 15px; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 34px; max-width: 1760px; margin: auto; padding: 42px 3.8% 30px; align-items: start; }
.records { min-width: 0; scroll-margin-top: 24px; }
.records:focus { outline: none; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--heading-height); margin-bottom: var(--heading-gap); }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; color: #f4f3f6; }
h1 { margin: 0; font-size: clamp(36px, 3.1vw, 52px); line-height: 1.1; letter-spacing: -1.5px; white-space: nowrap; }
.search-controls { display: flex; gap: 11px; min-width: 0; }
.search { display: flex; align-items: center; gap: 10px; width: 215px; height: 43px; padding: 0 13px; border: 1px solid #35404d; background: #191e24; border-radius: 7px; }
.search svg { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: #a8bfdc; stroke-width: 1.6; stroke-linecap: round; }
.search input { padding: 10px 0; width: 100%; min-width: 0; border: 0; background: transparent; color: #f0f3f9; font-size: 16px; }
.search input::placeholder { color: #a8b5c7; opacity: 1; }
.search:focus-within { border-color: var(--blue); }
select { height: 43px; max-width: 132px; border: 1px solid #35404d; border-radius: 7px; background: #191e24; color: #e8edf5; padding: 0 18px 0 12px; font-size: 15px; }
#sort { max-width: none; width: 149px; }
.tabs { display: flex; gap: 30px; min-height: var(--tabs-height); margin-bottom: var(--tabs-gap); }
.tabs button { position: relative; display: inline-flex; align-items: center; gap: 11px; border: 0; background: transparent; padding: 7px 1px 14px; color: #b8c6dc; font-size: 17px; line-height: 17px; }
.tabs button.selected { color: #f1f4fb; }
.tabs button.selected span { color: #87a4ff; }
.tabs button.selected::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: #7497ff; }
.tabs button:hover { color: white; }
.tabs button span { font-variant-numeric: tabular-nums; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; font-size: 17px; }
th { color: #b9cce4; font-size: 15px; font-weight: 500; padding: 19px 14px; border-bottom: 1px solid #36414f; background: #1b222a; }
th:nth-child(1) { width: 15%; } th:nth-child(2) { width: 32%; } th:nth-child(3) { width: 16%; } th:nth-child(4) { width: 22%; } th:nth-child(5) { width: 10%; } th:nth-child(6) { width: 5%; }
.column-control { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; line-height: 1.4; }
.column-control:hover, .column-control.is-filtered { color: #a9bdff; }
.column-indicator { flex: 0 0 auto; color: #8fa9d3; font-size: 12px; }
.column-control.is-filtered .column-indicator { color: var(--blue); font-size: 9px; }
.column-menu { position: fixed; z-index: 20; width: 310px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow-y: auto; padding: 16px; border: 1px solid #46546a; border-radius: 10px; background: #1b222c; box-shadow: 0 16px 50px #0009; font-size: 16px; }
.column-menu-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.column-menu-heading strong { font-weight: 600; }
.column-menu button { border: 1px solid #3a485d; border-radius: 5px; padding: 9px 11px; background: #252f3d; font-size: 15px; }
.column-menu button:hover { background: #33415a; }
.column-menu #column-close { border: 0; padding: 2px 7px; background: transparent; font-size: 23px; line-height: 1; }
.column-sort-actions { display: flex; gap: 8px; margin-bottom: 14px; }
.column-sort-actions button { flex: 1; }
#column-search { width: 100%; padding: 10px 11px; border: 1px solid #46546a; border-radius: 5px; background: #121820; color: #edf2ff; font-size: 16px; }
.column-selection { display: flex; gap: 16px; margin: 9px 0 7px; }
.column-selection button { padding: 4px 0; border: 0; background: transparent; color: #a9bdff; }
.column-values { max-height: 230px; overflow-y: auto; overscroll-behavior: contain; border-block: 1px solid var(--line); }
.column-value { display: flex; align-items: flex-start; gap: 9px; padding: 9px 3px; cursor: pointer; line-height: 1.45; overflow-wrap: anywhere; }
.column-value:hover { background: #252f3d; }
.column-value input { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--blue); }
.column-no-values { color: var(--muted); }
.column-menu-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.column-menu #column-apply { background: #779aff; color: #0b1427; border-color: #779aff; font-weight: 600; padding-inline: 23px; }
td { padding: 24px 14px; border-bottom: 1px solid var(--line); line-height: 1.65; vertical-align: middle; overflow-wrap: anywhere; }
td:first-child, th:first-child { padding-left: 22px; }
.record-row { cursor: pointer; }
.record-row:hover { background: #202832; }
.record-row.is-open { background: #222c3b; }
.record-row.is-open > td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.record-toggle { border: 0; background: none; padding: 4px 0; text-align: left; cursor: pointer; }
.order-id { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 17px; letter-spacing: .15px; font-weight: 600; color: #edf2ff; white-space: nowrap; }
.project-text { white-space: pre-line; line-height: 1.65; }
.metadata { color: #c0cbdb; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.status { display: inline-flex; align-items: baseline; gap: 8px; color: #e9eef7; font-size: 16px; line-height: 1.5; }
.status::before { content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--amber); }
.status.finished::before { background: var(--mint); }
.status.working::before { background: var(--blue); }
.chevron { display: block; width: 8px; height: 8px; border: solid #b9cce4; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin: 0 auto 4px; flex: 0 0 auto; }
.is-open .chevron, details[open] > summary .chevron { transform: rotate(225deg); margin-top: 6px; }
.note-row td { padding: 0; }
.note-content { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 19px 24px; background: #1e2631; }
.note-label { color: #a7bad5; font-size: 14px; }
.note-text { color: #e6edf8; font-size: 16px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.cards { display: none; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 14px 2px; color: var(--muted); font-size: 14px; }
.table-footer button { border: 0; background: none; padding: 4px; color: #a9bdff; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.empty { padding: 48px 20px; text-align: center; color: #e2eaf7; }
.empty p { color: var(--muted); font-size: 15px; }
.latest { min-width: 0; }
.latest summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; height: var(--heading-height); margin-bottom: calc(var(--heading-gap) + var(--tabs-height) + var(--tabs-gap)); }
.latest summary::-webkit-details-marker { display: none; }
.latest h2 { font-size: 25px; letter-spacing: -.5px; margin: 0; line-height: 1.3; }
.latest summary .chevron { margin-right: 3px; width: 7px; height: 7px; }
.latest-items { border: 1px solid var(--line); border-radius: 9px; background: #191e24; overflow: hidden; }
.latest-item { width: 100%; display: flex; flex-direction: column; align-items: flex-start; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; padding: 23px 21px; }
.latest-item:last-child { border-bottom: 0; }
.latest-item:hover { background: #232b36; }
.latest-item:focus-visible { outline-offset: -4px; }
.latest-item-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.latest-item strong { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 17px; font-weight: 600; letter-spacing: .2px; }
.latest-arrow { color: #8b9fb8; font-size: 17px; line-height: 1; }
.latest-project { color: #9baecc; font-size: 14px; margin: 7px 0 15px; overflow-wrap: anywhere; }
.latest-date { color: var(--muted); font-size: 14px; margin: 10px 0 0 15px; font-variant-numeric: tabular-nums; }
.latest-caption { margin: 14px 0; font-size: 14px; color: #9aabc0; }
@media (min-width: 1600px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 310px; gap: 42px; }
  td { padding-top: 27px; padding-bottom: 27px; }
}
@media (max-width: 1180px) {
  .workspace { --heading-height: 103px; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; padding-inline: 24px; }
  .masthead { padding-inline: 24px; }
  .section-heading { flex-wrap: wrap; gap: 20px; }
  h1 { font-size: 36px; line-height: 40px; }
  .search-controls { width: 100%; } .search { flex: 1; }
  .latest summary { align-items: flex-start; } .latest h2 { font-size: 23px; line-height: 40px; }
  .latest summary .chevron, .latest details[open] > summary .chevron { margin-top: 16px; }
  .latest-item { padding: 22px 17px; } table { min-width: 690px; }
}
@media (max-width: 980px) {
  .masthead { min-height: 78px; padding: 20px; gap: 14px; }
  .brand { font-size: 23px; gap: 10px; } .brand-symbol { width: 34px; height: 34px; border-radius: 8px; font-size: 26px; }
  .report-meta { font-size: 14px; gap: 0; }
  #snapshot-date { display: none; }
  .readonly { gap: 7px; } .readonly > span { width: 6px; height: 6px; }
  .workspace { display: flex; flex-direction: column; gap: 0; padding: 24px 16px 16px; }
  .records { width: 100%; display: contents; }
  .section-heading { order: 0; display: contents; }
  h1 { order: 0; font-size: 37px; line-height: 1.2; margin: 0 4px 8px; letter-spacing: -1.2px; }
  .mobile-snapshot { display: block; order: 0; color: #bed0e9; font-size: 15px; margin: 0 4px 26px; }
  .latest { order: 1; position: static; width: 100%; padding: 0; margin: 0 0 18px; }
  .latest details { border: 1px solid var(--line); border-radius: 8px; background: #191e24; }
  .latest summary { height: auto; align-items: center; padding: 14px 16px; margin: 0; }
  .latest summary .chevron { margin-top: 0; } .latest details[open] > summary .chevron { margin-top: 6px; }
  .latest h2 { font-family: inherit; font-weight: 500; font-size: 16px; letter-spacing: 0; line-height: 1.3; }
  .latest-items { margin: 0 14px; border-radius: 0; border: 0; border-top: 1px solid var(--line); }
  .latest-item { padding: 17px 2px; } .latest-caption { margin: 12px 16px; }
  .tabs { order: 2; gap: 27px; margin: 0 4px 16px; }
  .tabs button { padding-bottom: 12px; font-size: 16px; gap: 8px; }
  .search-controls { order: 3; width: 100%; margin-bottom: 16px; gap: 9px; }
  .search { padding: 0 11px; } .search input { padding: 10px 0; font-size: 16px; }
  select { font-size: 15px; max-width: 114px; }
  .table-wrap { display: none; }
  .cards { display: grid; gap: 11px; order: 4; width: 100%; }
  .work-card { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 15px; cursor: pointer; }
  .work-card.is-open { border-color: #465b83; }
  .card-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
  .card-heading .record-toggle { flex-shrink: 0; }
  .card-heading .status { margin-left: auto; font-size: 14px; gap: 6px; line-height: 1.4; }
  .card-heading .status::before { width: 6px; height: 6px; flex-basis: 6px; }
  .card-heading .chevron { width: 7px; height: 7px; margin-right: 0; }
  .work-card .project-text { display: block; font-size: 16px; line-height: 1.7; color: #d0dced; overflow-wrap: anywhere; }
  .card-meta { display: flex; gap: 0; color: #a8bbd7; font-size: 14px; margin-top: 10px; font-variant-numeric: tabular-nums; }
  .card-meta span + span::before { content: "·"; display: inline-block; margin: 0 10px; }
  .work-card .note-content { margin-top: 16px; border-top: 1px solid #344254; padding: 13px 0 0; background: transparent; gap: 5px; }
  .note-text { font-size: 16px; }
  .empty, noscript { order: 4; width: 100%; } .table-footer { order: 5; width: 100%; }
}
@media (min-width: 641px) and (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .work-card { padding: 17px; }
}
@media (max-width: 640px) {
  .search-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .search { grid-column: 1 / -1; width: 100%; }
  .search-controls select { width: 100%; max-width: none; }
  #sort { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

/* Auth and editing reuse the dashboard's palette and type scale. */
button:disabled { opacity: .55; cursor: wait; }
textarea { font: inherit; resize: vertical; }
textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.primary-button, .quiet-button, .danger-button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 44px; border-radius: 7px; padding: 10px 16px; font-size: 16px; line-height: 1.4; border: 1px solid #3b485b; background: #202936; color: #eaf0fc; }
.primary-button { background: #779aff; color: #10182a; border-color: #779aff; font-weight: 600; }
.primary-button:hover { background: #91adff; }
.quiet-button:hover { background: #2b3748; }
.danger-button { background: #40252d; border-color: #87505d; color: #ffbdc7; }
.login-panel { width: min(100% - 40px, 440px); margin: clamp(48px, 10vh, 110px) auto 48px; }
.login-eyebrow { display: block; font-size: 12px; font-weight: 600; letter-spacing: 2px; color: #96affc; margin-bottom: 20px; }
.login-panel h1 { font-size: 48px; white-space: normal; }
.login-panel > p { color: var(--muted); line-height: 1.6; margin: 16px 0 30px; }
.login-panel .login-help { font-size: 14px; margin-top: 24px; }
.form-stack { display: grid; gap: 18px; }
.form-stack label, .activation-result label, .inline-form label { display: grid; gap: 9px; color: #c5d3e6; font-size: 15px; }
.form-stack input, .form-stack textarea, .form-stack select, .activation-result input, .inline-form input { width: 100%; max-width: none; padding: 11px 12px; border: 1px solid #3d4a5d; border-radius: 7px; background: #12181f; color: #eef3ff; font-size: 16px; min-height: 46px; }
.form-stack select { height: auto; }
.form-stack small, .activation-result small { color: var(--muted); line-height: 1.6; font-size: 13px; }
.form-error { margin: 0; color: #ffb6c1; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.app-dialog { width: min(600px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 26px; border: 1px solid #40506a; border-radius: 14px; background: #191f28; color: #eef3ff; overflow-y: auto; }
.app-dialog::backdrop { background: #05090dd9; }
.small-dialog { width: min(440px, calc(100% - 32px)); }
.app-dialog h2 { font-size: 29px; margin: 0; }
.app-dialog h3 { font-size: 17px; margin: 24px 0 18px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.dialog-heading .quiet-button { font-size: 23px; padding: 4px 12px; background: transparent; border-color: transparent; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 6px; }
.account-actions { display: grid; gap: 10px; margin-top: 22px; }
.status-options { display: grid; gap: 12px; margin-block: 20px; }
.status-options button { justify-content: space-between; padding: 15px; }
.status-options button[aria-pressed="true"] { opacity: 1; border-color: #6988ba; background: #243249; cursor: default; }
.current-status { color: #b2c5e1; font-size: 13px; }
.muted { color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.record-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.status-action { padding: 4px 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.status-action .status { text-decoration: underline; text-decoration-color: #69778b; text-underline-offset: 4px; }
.status-action:hover .status { color: white; text-decoration-color: var(--blue); }
.notice { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); width: max-content; padding: 13px 20px; border: 1px solid #506a92; background: #22324a; color: #edf4ff; border-radius: 9px; z-index: 40; box-shadow: 0 8px 30px #0006; }
.management-list { display: grid; gap: 12px; }
.management-item { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #141a22; overflow-wrap: anywhere; }
.management-item strong { display: block; font-size: 16px; }
.management-item p { margin: 7px 0 10px; font-size: 14px; color: var(--muted); }
.management-item .record-actions { margin-top: 0; }
.management-item .quiet-button { font-size: 14px; padding: 8px 12px; }
.activation-result { display: grid; gap: 12px; padding: 16px; border: 1px solid #516b9b; border-radius: 8px; margin-top: 20px; }
.form-stack .checkbox-label { display: flex; flex-direction: row; align-items: center; }
.checkbox-label input { width: 20px; min-height: 20px; accent-color: var(--blue); }
.permission-options { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.permission-options legend { padding: 0 6px; color: #c5d3e6; }
.inline-form { display: flex; gap: 10px; align-items: end; margin: 18px 0; }
.inline-form label { flex: 1; min-width: 0; }
#session-controls { gap: 12px; }
#snapshot-date { margin-right: 8px; }
@media (max-width: 980px) {
  .masthead { flex-wrap: wrap; gap: 14px; }
  #session-controls { gap: 8px; }
  #session-controls button { font-size: 14px; padding-inline: 12px; }
  .card-heading > .status-action { margin-left: auto; }
  .card-heading .status-action .status { font-size: 14px; }
}
@media (max-width: 640px) {
  .inline-form { flex-wrap: wrap; }
  .inline-form label { flex-basis: 100%; }
  .masthead { padding: 18px 16px; }
  #session-controls { margin-left: auto; }
  .login-panel h1 { font-size: 42px; margin-left: 0; }
  .app-dialog { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .record-actions .quiet-button, .record-actions .danger-button { font-size: 14px; padding-inline: 12px; }
  .tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: calc(100% - 8px); }
  .tabs button { flex-direction: column; justify-content: center; gap: 8px; }
}
