@font-face {
  font-family: 'PT Mono';
  src: url('/assets/fonts/pt_mono.ttf') format('truetype');
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #101714;
  --panel: #17211b;
  --line: #344139;
  --text: #eeeae0;
  --muted: #b8c0b5;
  --brass: #e4bd72;
  --font: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --mono: Consolas, 'Courier New', monospace;
  --hero-art: url('/roadmap-workshop-20261120.webp');
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--ink); font: 16px/1.6 var(--font); }
a { text-decoration: none; color: inherit; }
button, select, input, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
[hidden], body[data-demo='no'] .demo-only, body[data-demo='yes'] .actual-only,
body[data-mode='public'] .admin-only, body[data-mode='public'] .admin-nav,
body[data-mode='admin'] .public-only, body[data-mode='admin'] .site-nav { display: none !important; }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; clip-path: inset(50%); overflow: hidden; }
.skip { position: absolute; z-index: 5; top: 8px; left: 10px; padding: 8px 12px; background: var(--ink); transform: translateY(-145%); }
.skip:focus { transform: none; }
.frame { width: min( calc(100% - 96px), 1248px); margin-inline: auto; }

.topbar { position: sticky; top: 0; z-index: 2; background: var(--ink); border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; font: 600 18px/1.2 var(--font); letter-spacing: .06em; }
.brand b { color: var(--brass); font-weight: 500; }
.brand small { display: block; margin-top: 5px; font: 9px/1.5 var(--mono); letter-spacing: .18em; color: var(--muted); }
.site-nav, .admin-nav, .top-actions { display: flex; align-items: center; gap: clamp(10px, 1.2vw, 18px); }
.site-nav, .admin-nav { font-size: 14px; color: var(--muted); }
.site-nav a, .admin-nav a, .admin-nav button { padding: 8px 0; white-space: nowrap; }
.site-nav a:hover, .admin-nav a:hover, .current { color: var(--brass); }
.top-actions { justify-content: flex-end; gap: 13px; white-space: nowrap; }
.quiet, .primary, .menu, .danger, select { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--ink); font-size: 14px; font-weight: 600; }
.quiet:hover, .menu:hover, select:hover { border-color: var(--brass); }
.top-actions .quiet { min-height: 44px; padding: 0; border: 0; color: var(--muted); }
.top-actions .quiet:hover, .language-control a:hover { color: var(--brass); }
.discord-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--text); font-size: 14px; }
.discord-link span { color: var(--muted); }
.discord-link:hover { color: var(--brass); }
.primary { color: #252014; background: var(--brass); border-color: var(--brass); }
.primary:hover { background: #f1ce91; }
.language-control { display: flex; align-items: center; gap: 5px; color: var(--muted); font: 12px/1 var(--mono); }
.language-control a { display: inline-grid; min-height: 44px; place-items: center; }
.language-current { color: var(--brass); }
.menu { display: none; }
.menu::before, .menu::after { content: ''; width: 16px; height: 1px; background: currentColor; }

.title-inner { padding-block: 45px 23px; }
.title-inner h1 { margin: 0; font-size: clamp(2.35rem, 4.8vw, 4rem); font-weight: 620; line-height: 1.08; letter-spacing: -.055em; }
.title-inner p { margin: 8px 0 0; color: var(--muted); }
body[data-mode='public'] .title-strip {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, #101714 0%, #101714ef 24%, #101714ba 46%, #10171436 64%, #10171408 100%),
    linear-gradient(0deg, #101714c9, #10171400 48%),
    var(--hero-art) center 55% / cover no-repeat;
}
body[data-mode='public'] .title-inner {
  display: grid;
  align-items: end;
  min-height: clamp(235px, 24vw, 345px);
  padding-block: 40px clamp(33px, 4vw, 58px);
}
body[data-mode='public'] .title-inner h1 {
  max-width: 19ch;
  font: 400 clamp(2.3rem, 4.5vw, 4.35rem)/1.1 'PT Mono', var(--mono);
  letter-spacing: -.045em;
  text-wrap: balance;
}
body[data-mode='public'] .title-inner p {
  max-width: 42ch;
  margin-top: 11px;
  font-size: clamp(.95rem, 1.45vw, 1.1rem);
  text-wrap: pretty;
}

.content { padding-bottom: 48px; }
body[data-mode='public'] .content { padding-top: 23px; }
.board-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.board-toolbar:has(> :not([hidden]):is(.filters, .demo-only, #add)) { margin-bottom: 14px; }
body[data-demo='no'][data-mode='public'] .board-toolbar:has(.filters[hidden]) { margin-bottom: 0; }
.board-toolbar > :last-child, .filters { margin-left: auto; }
.demo-note { margin: 0; color: var(--muted); font-size: 13px; }
.demo-edit { color: var(--brass); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; gap: 18px; }
.lane { display: flex; flex-direction: column; min-width: 0; min-height: 95px; border-top: 1px solid var(--line); }
.lane[data-stage='active'] { border-top-color: var(--brass); }
.lane-head { display: flex; align-items: baseline; gap: 9px; min-height: 52px; padding: 14px 0 10px; }
.lane-head h2 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.25; }
.lane[data-stage='active'] .lane-head h2 { color: var(--brass); }
.count { margin-left: auto; color: var(--muted); font: 12px/1.4 var(--mono); }
.cards { display: grid; align-content: start; gap: 8px; list-style: none; padding: 0; margin: 0; flex: 1; }
.card { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 12px; overflow-wrap: anywhere; }
.card[data-draft] { border-style: dashed; }
.card[draggable='true'] { cursor: grab; }
.card.dragging { opacity: .45; }
.lane.drop-target { outline: 1px solid var(--brass); outline-offset: 3px; }
.card.drop-before { border-top: 2px solid var(--brass); }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag { color: var(--muted); font-size: 12px; }
.draft { color: var(--brass); }
.card h3 { margin: 4px 0 0; font-size: 16px; font-weight: 620; line-height: 1.3; }
.card p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.48; white-space: pre-line; }
.card .edit { min-height: 36px; padding: 4px 0; margin-top: 6px; border: 0; color: var(--brass); background: transparent; }
.card .edit:hover { text-decoration: underline; text-underline-offset: 4px; }
#empty-board { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.footer { padding-block: 18px 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer a:hover { color: var(--brass); }
#feedback, #edit-error { color: var(--brass); }

.pane-switch { display: flex; gap: 20px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.pane-switch button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; border: 0; border-bottom: 1px solid transparent; color: var(--muted); background: transparent; font-size: 14px; }
.pane-switch button[aria-pressed='true'] { color: var(--brass); border-bottom-color: var(--brass); }
.inbox-heading, .inbox-entry { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 26px; }
.inbox-heading { margin-bottom: 14px; }
.inbox-heading h2 { margin: 0; font-size: 21px; font-weight: 620; }
.inbox-heading p, .inbox-copy, #inbox-status, #import-hint { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.inbox-entry { border-top: 1px solid var(--line); padding-block: 12px; overflow-wrap: anywhere; }
.inbox-entry h3 { margin: 3px 0 0; font-size: 16px; font-weight: 620; }
.inbox-entry .tag { margin: 0; }
.inbox-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 12px; flex-shrink: 0; }
.discord-source { color: var(--brass); font-size: 14px; }
.discord-source:hover { text-decoration: underline; text-underline-offset: 3px; }
#import-hint { margin-block: 15px; }

dialog { max-width: 640px; width: calc(100% - 24px); max-height: calc(100% - 30px); padding: 22px; border: 1px solid #526857; border-radius: 11px; background: #17221b; color: var(--text); }
dialog::backdrop { background: #070c09c9; }
.dialog-heading, .dialog-actions { display: flex; align-items: center; gap: 9px; }
.dialog-heading { justify-content: space-between; margin-bottom: 15px; }
.dialog-heading h2 { margin: 0; font-size: 23px; }
.close { font-size: 22px; line-height: 1; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fields label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.fields input, .fields textarea, .fields select { width: 100%; min-width: 0; min-height: 39px; background: #111a14; border: 1px solid #495d4f; border-radius: 6px; padding: 7px 8px; color: var(--text); }
.fields textarea { resize: vertical; }
.visibility { display: flex; align-items: center; gap: 8px; margin: 16px 0; cursor: pointer; }
.visibility input { width: 17px; height: 17px; accent-color: var(--brass); }
.dialog-actions { justify-content: flex-end; flex-wrap: wrap; }
.danger { color: #ffb6a7; margin-right: auto; }
.danger:hover { border-color: #ffb6a7; }

@media (max-width: 1160px) {
  .frame { width: calc(100% - 48px); }
}
@media (min-width: 1001px) and (max-width: 1160px) {
  .topbar-inner { gap: 12px; }
  .brand { gap: 8px; font-size: 15px; }
  .brand img { width: 32px; height: 32px; }
  .site-nav { gap: 9px; font-size: 13px; }
  .top-actions { gap: 9px; }
  .discord-link { font-size: 13px; }
}
@media (max-width: 1000px) {
  .topbar-inner { justify-content: flex-start; min-height: 66px; }
  .top-actions { margin-left: auto; }
  .menu { display: inline-flex; flex-direction: column; gap: 5px; order: 3; min-width: 40px; }
  .site-nav { position: absolute; top: 100%; right: 0; left: 0; display: none; align-items: flex-start; flex-direction: column; gap: 0; max-height: calc(100dvh - 66px); overflow-y: auto; padding: 6px 24px; border-bottom: 1px solid var(--line); background: var(--ink); }
  .site-nav a { width: 100%; min-height: 44px; }
  .site-nav.open { display: flex; }
}
@media (max-width: 1050px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 550px) {
  .frame { width: calc(100% - 32px); }
  .topbar-inner { flex-wrap: wrap; gap: 5px 7px; }
  .brand { font-size: 13px; gap: 5px; }
  .brand img { width: 28px; height: 28px; }
  .brand small { font-size: 7px; letter-spacing: .1em; }
  .top-actions { gap: 7px; }
  .top-actions a, .menu { font-size: 12px; }
  .menu { min-width: 32px; padding-inline: 7px; }
  .admin-nav { order: 4; flex-basis: 100%; }
  .title-inner { padding-block: 28px 16px; }
  body[data-mode='public'] .title-strip {
    background:
      linear-gradient(0deg, #101714fa, #101714c9 32%, #10171432 77%, #10171406),
      var(--hero-art) 77% 52% / cover no-repeat;
  }
  body[data-mode='public'] .title-inner { min-height: 240px; padding-block: 42px 25px; }
  body[data-mode='public'] .title-inner h1 { font-size: clamp(1.9rem, 7.9vw, 2.55rem); }
  body[data-mode='public'] .title-inner p { margin-top: 7px; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .lane { min-height: 0; }
  .content { padding-bottom: 30px; }
  .inbox-entry { flex-direction: column; }
  .inbox-actions { justify-content: flex-start; }
  dialog { padding: 14px; }
  .fields { grid-template-columns: minmax(0, 1fr); }
}
