
:root {
  color-scheme: light dark;
  --bg: #fcfcfb; --fg: #272725; --muted: #666560; --border: #e4e3df;
  --rail: #f3f2ef; --panel: #f7f6f3; --hover: #ecebe7; --accent: #343431;
  --accent-fg: #ffffff; --danger: #b33134; --ok: #39704a; --warn: #8b641d;
  --code: #efeeea; --chip: #efeeeb; --started: #a88629; --done: #637e67; --canceled: #989791;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #20211f; --fg: #e9e8e4; --muted: #b0afa8; --border: #393a36; --rail: #292a27;
    --panel: #262724; --hover: #363733; --accent: #e2e1dc; --accent-fg: #232420;
    --danger: #ed9690; --ok: #93bd9d; --warn: #dfbd75; --code: #31322e; --chip: #33342f;
    --started: #d3af55; --done: #92b199; --canceled: #aaa99f; }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--fg); font: 13px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { margin: 0 0 18px; font-size: 24px; line-height: 1.3; font-weight: 650; letter-spacing: -.025em; overflow-wrap: anywhere; }
h2 { margin: 28px 0 12px; font-size: 14px; line-height: 1.4; font-weight: 600; }
h3 { margin: 16px 0 8px; font-size: 13px; font-weight: 600; }
p { margin: 10px 0; }
.muted { color: var(--muted); } .small { font-size: 11px; }
code, pre, kbd, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }
code { background: var(--code); border-radius: 3px; padding: 2px 4px; }
pre { background: var(--code); padding: 12px; border-radius: 4px; overflow-x: auto; }
pre code { background: none; padding: 0; }
kbd { display: inline-block; border: 1px solid var(--border); border-radius: 3px; padding: 0 4px; color: var(--muted); font-size: 10px; line-height: 16px; }
a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--muted); outline-offset: 3px; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 40; padding: 10px 16px; background: var(--bg); border: 2px solid var(--accent); }
.skip-link:focus { top: 10px; }
.mobile-menu-toggle { display: none; }
.workspace-nav { position: fixed; inset: 0 auto 0 0; width: 196px; padding: 16px 12px 12px; display: flex; flex-direction: column; gap: 0; background: var(--rail); border-right: 1px solid var(--border); z-index: 12; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 9px; padding: 0 6px 20px; color: var(--fg); font-size: 13px; line-height: 1.35; font-weight: 650; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); font-size: 19px; }
.brand small { display: block; font-size: 10px; font-weight: 400; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 5px; color: var(--fg); min-height: 30px; }
.nav a:hover, .nav a.active { background: var(--hover); text-decoration: none; }
.nav a.active { font-weight: 600; }
.nav-icon { color: var(--muted); flex-shrink: 0; }
.nav-section-label { padding: 19px 8px 7px; font-size: 11px; font-weight: 500; color: var(--muted); }
.badge { display: inline-block; border-radius: 4px; min-width: 16px; padding: 0 4px; background: var(--hover); color: var(--fg); font-size: 10px; line-height: 17px; }
.sidebar { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a { display: block; padding: 6px 9px; border-radius: 4px; color: var(--muted); font-size: 12px; }
.sidebar li a:hover, .sidebar li a.active { background: var(--hover); color: var(--fg); text-decoration: none; }
.sidebar h3 { margin: 15px 9px 5px; font-size: 11px; font-weight: 500; color: var(--muted); }
.workspace-account { margin-top: auto; padding: 24px 0 0; }
.workspace-account > a { display: block; padding: 10px 8px 0; color: var(--fg); font-size: 12px; }
.workspace-account small { display: block; font-size: 10px; color: var(--muted); }
.workspace-account form { margin: 6px 8px 0; }
.topbar { margin-left: 196px; padding: 9px 24px; height: 52px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--border); }
.topbar form { margin: 0; } .spacer { flex: 1; }
.breadcrumb { display: flex; align-items: center; gap: 14px; font-size: 12px; white-space: nowrap; }
.breadcrumb > span { color: var(--muted); } .breadcrumb strong { font-weight: 500; }
.topbar input[type=search] { width: 180px; border-color: transparent; background: var(--panel); font-size: 11px; min-height: 28px; }
.jump-menu { position: relative; }
.jump-menu > summary { white-space: nowrap; color: var(--muted); font-size: 11px; list-style: none; }
.jump-menu > form { position: absolute; top: 32px; right: 0; display: flex; gap: 6px; background: var(--bg); border: 1px solid var(--border); padding: 12px; border-radius: 6px; z-index: 20; }
.jump-menu input { width: 140px; }
.topbar .button { white-space: nowrap; min-height: 28px; padding: 4px 9px; font-size: 11px; }
.main { padding: 28px 32px; min-width: 0; }
.signed-in .main { margin-left: 196px; }
.layout { display: block; }
.layout > section { min-width: 0; }
.view-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-height: 26px; }
.view-heading h1 { font-size: 17px; margin: 0; letter-spacing: -.015em; }
.view-heading > a { font-size: 11px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding-bottom: 16px; margin-bottom: 0; }
.filters label, .filters .filter { display: flex; flex-direction: column; gap: 3px; font-size: 10px; color: var(--muted); }
.filters select, .filters .menu > summary { font-size: 11px; min-height: 28px; padding: 4px 8px; }
.filters .menu > summary { padding-right: 24px; }
.filters button { min-height: 28px; font-size: 11px; padding: 4px 10px; }
.filters > a { font-size: 11px; padding-bottom: 4px; color: var(--muted); }
input, select, textarea, button { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 6px 9px; min-height: 32px; }
select { max-width: 100%; } input { min-width: 0; } input[type=checkbox] { min-height: 0; }
textarea { width: 100%; min-height: 120px; resize: vertical; font: inherit; font-size: 13px; line-height: 1.65; }
textarea.tall { min-height: 360px; }
button, .button { display: inline-block; cursor: pointer; padding: 6px 11px; min-height: 32px; border: 1px solid var(--border); border-radius: 4px; background: var(--panel); color: var(--fg); font-size: 12px; }
button:hover, .button:hover { background: var(--hover); text-decoration: none; }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.primary kbd { color: inherit; border-color: currentColor; opacity: .65; }
button.link { min-height: 24px; background: none; border: none; padding: 0; color: var(--muted); font-size: 11px; }
button.danger, .danger-text { color: var(--danger); }
.field, .form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--muted); }
.field { margin-bottom: 14px; }
.field input, .field textarea { width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 12px 16px; margin-bottom: 14px; }
.inline { display: inline; margin: 0; }
.row, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.actions { margin-top: 12px; }
.panel { padding: 18px 20px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 5px; background: var(--bg); }
.panel > h1:first-child, .panel > h2:first-child { margin-top: 0; }
.main > .panel { max-width: 900px; }
.empty-state { padding: 36px 0; border-top: 1px solid var(--border); } .empty-state h2 { margin-top: 0; }
.table-scroll { max-width: 100%; overflow-x: auto; }
table.list { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 12px; }
table.list th { padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--muted); text-align: left; font-size: 10px; font-weight: 500; }
table.list td { padding: 10px; vertical-align: top; border-bottom: 1px solid var(--border); }
table.list tbody tr:hover { background: var(--panel); }
.title-link { color: var(--fg); font-weight: 500; }
table.issue-list { min-width: 0; }
.issue-list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.issue-list tbody { display: block; }
.issue-list tr { display: grid; grid-template-columns: 76px minmax(180px, 1fr) 126px 78px 105px; align-items: start; border-top: 1px solid var(--border); padding: 12px 4px; gap: 8px; }
table.issue-list td { display: block; padding: 0; border: 0; min-width: 0; font-size: 11px; }
.issue-list .id { padding-top: 2px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.issue-list .id a { color: var(--muted); }
.issue-list .title-link { font-size: 13px; line-height: 1.4; }
.issue-row-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; color: var(--muted); font-size: 10px; }
.issue-row-meta a { color: var(--muted); }
.issue-labels { display: inline; margin-left: 6px; }
.issue-labels .chip { font-size: 10px; padding: 0 5px; line-height: 16px; }
table.issue-list td:nth-child(6), table.issue-list td:nth-child(7) { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 3px; background: var(--chip); padding: 0 6px; font-size: 11px; line-height: 20px; margin: 0 3px 2px 0; }
.dot-svg { flex-shrink: 0; }
.status { display: inline-flex; align-items: center; white-space: nowrap; font-size: 11px; gap: 6px; }
.status::before { content: ""; display: inline-block; width: 10px; height: 10px; border: 1.5px solid var(--muted); border-radius: 50%; flex-shrink: 0; }
.status.t-started::before { border-color: var(--started); background: var(--started); }
.status.t-completed::before { border-color: var(--done); background: var(--done); }
.status.t-canceled::before, .status.t-duplicate::before { border-color: var(--canceled); background: var(--canceled); }
.status.t-backlog::before { border-style: dashed; }
.prio { font-size: 10px; white-space: nowrap; }
.prio-1 { color: var(--danger); font-weight: 600; } .prio-2 { color: var(--warn); } .prio-0 { color: var(--muted); }
.layout-issue { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 48px; max-width: 1180px; margin: 10px auto; }
.layout-issue > * { min-width: 0; }
.layout-issue > section { padding: 8px 4px; }
.layout-issue h1 { margin: 12px 0 20px; font-size: 25px; }
.properties-rail { padding: 10px 0 0 24px; border-left: 1px solid var(--border); }
.properties-rail > h2 { margin: 0 0 16px; font-size: 12px; }
.properties-rail .panel { border: 0; padding: 0; margin-bottom: 24px; }
.properties-rail .field { margin-bottom: 12px; font-size: 10px; }
.properties-rail input, .properties-rail select, .properties-rail .menu > summary { min-height: 30px; font-size: 12px; }
.property-form { margin-bottom: 24px; }
.property-form > .primary { width: 100%; }
.props { display: grid; grid-template-columns: 75px minmax(0, 1fr); gap: 8px; font-size: 11px; }
.props dt { color: var(--muted); } .props dd { margin: 0; overflow-wrap: anywhere; }
.issue-record { border-top: 1px solid var(--border); padding-top: 12px; }
.support-section { border-bottom: 1px solid var(--border); padding: 12px 0; }
.support-section > summary { color: var(--fg); font-size: 12px; }
.support-section > summary .muted { margin-left: 6px; font-size: 10px; }
.document-content { padding: 0 0 24px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.markdown { font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.document-content h1 { font-size: 19px; }
.main:has(> .document-content) .view-heading h1 { font-size: 25px; }
.markdown p, .markdown ul, .markdown ol { max-width: 78ch; }
.markdown > :first-child { margin-top: 0; } .markdown > :last-child { margin-bottom: 0; }
.markdown img { max-width: 100%; }
.markdown table { border-collapse: collapse; } .markdown th, .markdown td { border: 1px solid var(--border); padding: 5px 8px; }
.markdown blockquote { margin: 0; padding-left: 14px; border-left: 3px solid var(--border); color: var(--muted); }
.main:has(> .document-content) { max-width: 1080px; padding: 48px 64px; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); padding: 6px 24px 6px 9px; min-width: 120px; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; font-size: 12px; color: var(--fg); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: "\25BE"; position: absolute; right: 9px; color: var(--muted); }
.menu-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 220px; max-height: 340px; overflow-y: auto; padding: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 5px; box-shadow: 0 5px 18px #00000012; }
.menu.static > summary { max-width: none; }
.menu.static .menu-list { position: static; min-width: 0; box-shadow: none; margin-top: 4px; max-height: 260px; }
.check { display: flex; align-items: center; gap: 7px; padding: 4px 6px; font-size: 12px; color: var(--fg); cursor: pointer; }
.check:hover { background: var(--hover); } .check input { margin: 0; }
.menu-group { padding: 8px 6px 3px; color: var(--muted); font-size: 10px; }
details > summary { cursor: pointer; color: var(--muted); font-size: 12px; }
details[open] > summary { margin-bottom: 12px; }
.comment { padding: 15px 0; border-bottom: 1px solid var(--border); }
.comment .meta { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.comment .markdown { font-size: 13px; }
.replies { margin-left: 16px; padding-left: 14px; border-left: 1px solid var(--border); }
.history, .plain { padding: 0; list-style: none; } .history li, .plain li { margin-bottom: 8px; }
.history { color: var(--muted); font-size: 11px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(245px, 1fr); gap: 20px; overflow-x: auto; padding: 8px 0 16px; }
.column { padding: 0; min-height: 160px; }
.column h2 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 14px; padding: 8px 0; font-size: 11px; }
.card { display: block; padding: 12px; margin-bottom: 8px; color: var(--fg); border: 1px solid var(--border); border-radius: 5px; background: var(--bg); }
.card:hover { background: var(--panel); text-decoration: none; }
.card .id { color: var(--muted); font-size: 10px; margin-bottom: 7px; }
.card .row { margin-top: 9px; }
.notice { padding: 12px 14px; border: 1px solid var(--border); border-radius: 4px; margin-bottom: 16px; background: var(--panel); }
.notice.error { color: var(--danger); border-color: var(--danger); } .notice.ok { border-color: var(--ok); }
.secret { display: block; overflow-wrap: anywhere; padding: 8px; margin: 8px 0; user-select: all; }
.unread td { font-weight: 600; } .retired { opacity: .65; }
.login { max-width: 390px; margin: 12vh auto; padding: 28px; }
.login h1 { font-size: 20px; } .login .primary { width: 100%; }
.pager { display: flex; gap: 16px; margin-top: 16px; font-size: 11px; }
.footer { margin: 24px 24px 0 228px; padding: 12px 0; font-size: 10px; color: var(--muted); border-top: 1px solid var(--border); }
@media (max-width: 1100px) {
  .main { padding: 24px; }
  .layout-issue { gap: 24px; grid-template-columns: minmax(0, 1fr) 230px; }
  .issue-list tr { grid-template-columns: 70px minmax(150px, 1fr) 115px 70px; }
  table.issue-list td:nth-child(5) { grid-column: 2; font-size: 10px; color: var(--muted); }
  .topbar { gap: 10px; padding-left: 24px; padding-right: 24px; }
  .breadcrumb > span { display: none; }
  .jump-menu > summary kbd { display: none; }
}
@media (max-width: 760px) {
  .workspace-menu { position: relative; z-index: 25; }
  .mobile-menu-toggle { display: block; height: 42px; padding: 11px 16px; margin: 0 !important; border-bottom: 1px solid var(--border); background: var(--rail); color: var(--fg); font-size: 12px; }
  .mobile-menu-toggle::after { content: "▾"; float: right; color: var(--muted); }
  .workspace-nav { position: absolute; inset: 42px 0 auto; width: auto; max-height: calc(100vh - 42px); padding: 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .workspace-account { padding-top: 12px; }
  .topbar { margin-left: 0; padding: 10px 16px; height: auto; gap: 10px; flex-wrap: wrap; }
  .topbar form[role=search] { flex: 1 1 130px; }
  .topbar input[type=search] { width: 100%; }
  .topbar .breadcrumb, .topbar .spacer { display: none; }
  .topbar .button { font-size: 11px; }
  .topbar .jump-menu { order: 3; }
  .topbar .jump-menu > form { left: 0; right: auto; }
  .signed-in .main { margin-left: 0; }
  .main { padding: 22px 16px; }
  .footer { margin: 20px 16px 0; }
  .layout-issue { grid-template-columns: 1fr; gap: 24px; margin: 0; }
  .layout-issue > section { padding: 0; }
  .layout-issue h1 { font-size: 22px; }
  .properties-rail { border-left: 0; border-top: 1px solid var(--border); padding: 20px 0 0; }
  .property-form { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
  .property-form > button { grid-column: 1 / -1; }
  .property-form input, .property-form select, .property-form .menu > summary { width: 100%; min-width: 0; }
  .filters { gap: 6px; }
  .filters > label, .filters > .filter { flex: 1 1 110px; min-width: 0; }
  .filters .menu > summary { min-width: 0; max-width: none; }
  .filters select { width: 100%; }
  .issue-list tr { grid-template-columns: 65px minmax(0, 1fr); gap: 6px 8px; padding: 12px 0; }
  table.issue-list td:nth-child(2) { grid-column: 2; grid-row: 1 / 3; }
  table.issue-list td:nth-child(3) { grid-column: 2; grid-row: 3; }
  table.issue-list td:nth-child(4) { grid-column: 1; grid-row: 2; }
  table.issue-list td:nth-child(5) { grid-column: 2; grid-row: 4; }
  .issue-labels { display: block; margin: 5px 0 0; }
  .issue-row-meta { gap: 4px 10px; font-size: 10px; }
  .board { grid-auto-columns: minmax(260px, 80vw); gap: 14px; }
  .main:has(> .document-content) { padding: 28px 16px; }
  .panel { padding: 16px; }
  .login { margin-top: 6vh; }
}
@media print { .workspace-menu, .topbar, .footer, .skip-link { display: none; } .signed-in .main { margin-left: 0; } }
