@font-face {
  font-family: "Inter Tight";
  src: url("/static/fonts/InterTight-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("/static/fonts/InterTight-Italic-Variable.ttf") format("truetype");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

/* Screen accents sampled from the supplied references, not print conversions. */
:root {
  color-scheme: light;
  --brand-blue: #6bace4; --brand-lilac: #c0a1dc; --brand-coral: #e25f55;
  --canvas: #f0f1f2; --surface: #fff; --surface-soft: #f7f7f8; --surface-hover: #eef1f5;
  --text: #202125; --muted: #62656d; --border: #d8dade; --border-strong: #a2a6af;
  --primary: #25262a; --on-primary: #fff; --primary-hover: #43464e; --focus: #21659e;
  --danger: #ab332d; --danger-soft: #fff0ee; --danger-border: #e8b9b4;
  --pending: #7c5900; --pending-soft: #fff8db; --pending-border: #d7bd65;
  --posted: #24623b; --posted-soft: #eaf5ed; --posted-border: #a0c8ac;
  --disabled-text: #777b83;
  --metal: linear-gradient(112deg, #f6f6f7 0%, #e3e4e7 26%, #fafafa 49%, #e6e7ea 75%, #f4f4f5 100%);
  --sidebar: 232px; --header-height: 80px; --gutter: clamp(24px, 2.5vw, 64px);
  --radius: 8px; --shadow: 0 1px 2px #15192008;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --canvas: #17181b; --surface: #202226; --surface-soft: #27292e; --surface-hover: #30343b;
  --text: #f1f2f4; --muted: #afb3bc; --border: #3c3f46; --border-strong: #737883;
  --primary: #e9ebef; --on-primary: #1b1d21; --primary-hover: #fff; --focus: #8bc6f4;
  --danger: #ffaba3; --danger-soft: #3b2526; --danger-border: #79504f;
  --pending: #f0cf70; --pending-soft: #39321f; --pending-border: #75622e;
  --posted: #9ad5ad; --posted-soft: #21372b; --posted-border: #416a4c;
  --disabled-text: #90949e;
  --metal: linear-gradient(112deg, #2d2f34 0%, #202226 26%, #383b42 49%, #25272c 75%, #303238 100%);
  --shadow: 0 1px 2px #0002;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); scrollbar-color: var(--border-strong) var(--canvas); }
body { margin: 0; font: 15px/1.45 "Inter Tight", "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { min-height: 38px; padding: 8px 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; font-weight: 550; line-height: 1.25; cursor: pointer; }
button:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--muted); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: not-allowed; color: var(--disabled-text); background: var(--surface-soft); border-color: var(--border); }
:where(button, input, select, textarea, a, summary, #workspace):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
input, select, textarea { width: 100%; min-height: 40px; padding: 9px 11px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 5px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:disabled, select:disabled, textarea:disabled { color: var(--disabled-text); background: var(--surface-soft); }
input[type=checkbox] { width: 16px; height: 16px; min-height: 0; margin: 0 8px 0 0; vertical-align: middle; accent-color: var(--focus); }
label { display: block; margin: 18px 0; font-size: 14px; font-weight: 550; }
label input:not([type=checkbox]), label select, label textarea { display: block; margin-top: 7px; font-weight: 400; }
h1, h2, h3 { line-height: 1.18; }
h1 { margin: 0; font-size: clamp(28px, 2vw, 38px); font-weight: 650; letter-spacing: -.035em; }
h2 { margin: 0 0 22px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
h3 { font-size: 17px; font-weight: 600; }
.eyebrow, .nav-caption { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow { margin: 0 0 8px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand strong { display: block; font-size: 23px; font-weight: 750; line-height: 1.1; letter-spacing: -.055em; }
.brand small { display: block; margin-top: 4px; font-size: 9px; line-height: 1; font-weight: 600; letter-spacing: .18em; }
.brand-symbol { display: block; flex-shrink: 0; }
.brand-symbol img { display: block; border-radius: 50%; }
.brand-symbol .brand-dark { display: none; }
[data-theme=dark] .brand-symbol .brand-light { display: none; }
[data-theme=dark] .brand-symbol .brand-dark { display: block; }
.app-header { display: flex; align-items: center; gap: 24px; min-height: var(--header-height); padding: 14px 24px; border-bottom: 1px solid var(--border-strong); background: var(--metal); }
.app-header > .brand { width: calc(var(--sidebar) - 24px); }
#profile { flex: 1; min-width: 0; color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.header-preferences { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.language-picker, .theme-picker { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; color: var(--muted); font-weight: 500; }
.language-picker select, .theme-picker select { width: auto; min-height: 34px; margin-top: 0; padding: 6px 9px; font-size: 12px; border-color: var(--border-strong); background: var(--surface); }
#logout { min-height: 34px; padding: 6px 12px; font-size: 12px; background: transparent; }
.layout { display: flex; align-items: stretch; min-height: calc(100vh - var(--header-height)); }
nav { position: sticky; top: 0; display: flex; flex-direction: column; align-self: flex-start; width: var(--sidebar); height: calc(100vh - var(--header-height)); min-height: 510px; padding: 28px 14px 18px; border-right: 1px solid var(--border); flex-shrink: 0; background: var(--surface-soft); overflow-y: auto; }
.nav-caption { margin: 0 12px 20px; }
nav a { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; margin-bottom: 4px; padding: 10px 12px; color: var(--muted); text-decoration: none; border: 1px solid transparent; border-radius: 6px; font-size: 14px; font-weight: 500; line-height: 1.3; }
nav a:hover { color: var(--text); background: var(--surface-hover); }
nav a[aria-current=page] { color: var(--on-primary); background: var(--primary); border-color: var(--primary); font-weight: 650; }
nav a:has(+ .submodule) { margin-top: 10px; }
nav .submodule { position: relative; margin-left: 20px; width: calc(100% - 20px); min-height: 35px; padding: 8px 10px 8px 23px; font-size: 13px; }
nav .submodule::before { content: ""; position: absolute; left: 10px; top: 50%; width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
.nav-icon { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav-footer { margin-top: auto; padding: 30px 12px 0; font-size: 9px; letter-spacing: .12em; color: var(--muted); }
.brand-swatches { display: flex; gap: 4px; margin-bottom: 10px; }
.brand-swatches i { width: 16px; height: 5px; background: var(--brand-blue); }
.brand-swatches i:nth-child(2) { background: var(--brand-lilac); }
.brand-swatches i:nth-child(3) { background: var(--brand-coral); }
main { flex: 1; min-width: 0; padding: 34px var(--gutter) 48px; }
.toolbar, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.converter-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar { justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.toolbar > div { flex: 1; min-width: 0; }
.toolbar h1 { overflow-wrap: anywhere; }
#create, #save, #login-form button[type=submit] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); font-weight: 600; }
#create:hover:not(:disabled), #save:hover:not(:disabled), #login-form button[type=submit]:hover:not(:disabled) { background: var(--primary-hover); }
#create::before { content: "+"; margin-right: 9px; font-size: 19px; font-weight: 400; vertical-align: -1px; }
#create:disabled, #save:disabled { color: var(--disabled-text); background: var(--surface-soft); border-color: var(--border); }
#message { margin: 0 0 15px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
#message:empty, .error:empty { display: none; }
#workspace { overflow-x: auto; padding: 22px; min-height: 100px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
#workspace:has(> table) { padding: 0; }
#workspace:has(.matrix-workspace) { padding: 0; background: none; border: 0; box-shadow: none; overflow: visible; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; border-bottom: 1px solid var(--border); padding: 16px 18px; vertical-align: top; }
th { background: var(--surface-soft); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-hover); }
td button { min-height: 30px; margin: 0 6px 5px 0; padding: 6px 9px; font-size: 12px; }
.directory-table td { vertical-align: middle; overflow-wrap: anywhere; }
.directory-table td:first-child { width: 68px; color: var(--muted); font-size: 12px; }
.directory-table td:nth-child(2) { min-width: 160px; font-weight: 600; }
.directory-table .row-actions { white-space: nowrap; width: 1%; }
.row-actions button { margin-bottom: 0; }
.row-actions button:last-child { margin-right: 0; }
.button-danger-quiet:not(:disabled) { color: var(--danger); background: transparent; border-color: transparent; }
.button-danger-quiet:hover:not(:disabled) { background: var(--danger-soft); border-color: var(--danger-border); }
dialog { width: 480px; max-width: calc(100vw - 64px); max-height: calc(100dvh - 64px); overflow: auto; padding: 28px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 24px 80px #0004; }
dialog::backdrop { background: #0c101b88; backdrop-filter: blur(3px); }
dialog dt { font-weight: 600; color: var(--muted); margin-top: 8px; }
dialog dd { margin: 3px 0 0; overflow-wrap: anywhere; }
dialog .actions { justify-content: flex-end; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border); }
#delete-dialog button[value=delete] { color: var(--danger); border-color: var(--danger-border); background: var(--danger-soft); }
.error, #message.error { color: var(--danger); }
.hint { color: var(--muted); font-size: 12px; line-height: 1.55; }
#message.error, #login-error:not(:empty), #editor-error:not(:empty) { padding: 12px 14px; border: 1px solid var(--danger-border); background: var(--danger-soft); border-radius: 6px; }
#poster-sync { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 18px 20px; margin-bottom: 20px; }
#poster-sync label { max-width: 360px; margin-top: 0; }
#operation-notifications:not([hidden]) { margin: 0 0 20px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--danger); border-radius: var(--radius); }
#operation-notifications h2 { font-size: 18px; margin-bottom: 12px; }
#starting { width: fit-content; margin: 20vh auto; color: var(--muted); }
.skip-link { position: fixed; z-index: 10; top: -100px; left: 24px; padding: 10px 18px; color: var(--on-primary); background: var(--primary); border-radius: 5px; }
.skip-link:focus { top: 12px; }
#login-view { width: 440px; margin: max(32px, 10vh) auto; padding: 32px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--border-strong); border-radius: 10px; box-shadow: 0 12px 48px #0000000b; }
.login-preferences { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 40px; }
.login-preferences label { flex-direction: column; align-items: flex-start; gap: 5px; }
.login-brand { margin-bottom: 36px; }
.login-brand strong { font-size: 32px; }
#login-view h1 { margin-bottom: 24px; }
#login-form button[type=submit] { width: 100%; margin-top: 6px; min-height: 44px; }

/* Desktop density: compact laptops, common 16:9 / 16:10, then large monitors. */
@media (max-width: 1366px) {
  :root { --sidebar: 210px; --gutter: 24px; --header-height: 72px; }
  body { font-size: 14px; }
  .app-header { gap: 16px; padding-inline: 20px; }
  .app-header > .brand { width: calc(var(--sidebar) - 20px); }
  .header-preferences { gap: 10px; }
  .header-preferences label > span { display: none; }
  main { padding-top: 26px; }
  nav { padding-top: 20px; }
  th, td { padding: 13px 14px; }
  table { font-size: 13px; }
  .directory-table td:nth-child(2) { min-width: 140px; }
}
@media (min-width: 2200px) {
  :root { --sidebar: 264px; --header-height: 88px; }
  body { font-size: 16px; }
  nav a { font-size: 15px; min-height: 46px; }
  nav .submodule { font-size: 14px; }
  th, td { padding: 19px 22px; }
  table { font-size: 15px; }
  .header-preferences select, #profile { font-size: 14px; }
}
@media (max-height: 800px) {
  nav { min-height: 0; padding-top: 16px; }
  .nav-caption { margin-bottom: 12px; }
  nav a { min-height: 36px; padding-block: 8px; }
  nav .submodule { min-height: 32px; padding-block: 7px; }
  .nav-footer { padding-top: 18px; }
  main { padding-top: 24px; }
  #login-view { margin: 24px auto; padding: 24px 32px; }
  .login-preferences { margin-bottom: 24px; }
  .login-brand { margin-bottom: 24px; }
}
/* Remain usable in a split desktop window and at browser zoom. */
@media (max-width: 1000px) {
  :root { --sidebar: 184px; --gutter: 18px; }
  .app-header { flex-wrap: wrap; gap: 14px; }
  .app-header > .brand { width: auto; }
  .header-preferences { margin-left: auto; }
  .toolbar { align-items: flex-start; }
  h1 { font-size: 27px; }
  nav { padding-inline: 8px; }
  nav .submodule { margin-left: 10px; width: calc(100% - 10px); }
}
@media (forced-colors: active) {
  nav a[aria-current=page] { outline: 2px solid Highlight; }
  .brand-symbol { forced-color-adjust: none; }
}

