@font-face {
  font-family: Montserrat;
  src: url("/montserrat0.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("/montserrat1.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #171714;
  --canvas: #f6f5f0;
  --paper: #fff;
  --muted: #615d52;
  --edge: #e4dfd2;
  --accent: #ffdb36;
  --accent-hover: #ffe66b;
  --focus: #745712;
  --danger: #992f25;
  --radius: 14px;
  font: 400 14px/1.55 Montserrat, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(1.75rem, 5vw, 2.45rem); letter-spacing: -.035em; }
h2 { font-size: 1.18rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: #ffdb3644; }
button, .button-link {
  min-block-size: 44px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: .58rem .92rem;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
button:disabled { cursor: wait; opacity: .62; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
a { color: #60470b; }
.primary { background: var(--accent); }
.primary:hover { background: var(--accent-hover); }
.quiet { background: var(--paper); border-color: var(--edge); }
.quiet:hover { background: var(--canvas); }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-block-size: 44px;
  border: 1px solid #d6d0c1;
  border-radius: 8px;
  background: var(--paper);
  padding: .58rem .72rem;
}
textarea { resize: vertical; }
input[type=file] { font-size: .87rem; }
input[type=file]::file-selector-button {
  color: var(--ink);
  font: inherit;
  background: var(--canvas);
  border: 1px solid var(--edge);
  border-radius: 5px;
  padding: .24rem .5rem;
  margin-inline-end: .55rem;
}
label { display: grid; gap: .33rem; font-weight: 700; }
label :is(input, select, textarea) { font-weight: 400; }
form { display: grid; gap: .88rem; min-width: 0; }
.muted, time { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.topbar { background: var(--ink); border-bottom: 3px solid var(--accent); color: var(--paper); }
.topbar-content {
  max-width: 1190px;
  margin-inline: auto;
  padding: .72rem clamp(.8rem, 4vw, 2rem);
  min-height: 63px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.brand { display: flex; align-items: center; gap: .62rem; font-weight: 700; line-height: 1.18; }
.brand strong { color: var(--accent); }
.logotype {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 7px;
  color: var(--ink);
  background: var(--accent);
  letter-spacing: -.085em;
  font-size: .99rem;
  transform: rotate(-4deg);
}
.account { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.account span { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-action { background: transparent; color: var(--paper); border-color: #656354; }
.top-action:hover { background: #35342e; }
.topbar :focus-visible { outline-color: var(--accent); }
main { max-width: 1190px; padding: clamp(1.1rem, 4vw, 2.35rem) clamp(.75rem, 4vw, 2rem) 3rem; margin-inline: auto; }
.card { min-width: 0; background: var(--paper); border: 1px solid var(--edge); border-radius: var(--radius); }
.notice, .auth { max-width: 430px; padding: clamp(1rem, 5vw, 1.8rem); margin: 2vh auto; }
.auth { display: grid; gap: .85rem; }
.auth .primary { margin-top: .4rem; }
.page-heading, .section-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.page-heading { margin-bottom: 1.25rem; }
#dashboard-summary { margin-top: .35rem; }
.workspace { display: grid; gap: 1rem; align-items: start; }
.workspace.with-owner { grid-template-columns: minmax(0, 1fr) minmax(255px, .42fr); }
.queue-head { display: grid; gap: .8rem; padding: 1rem; border-bottom: 1px solid var(--edge); }
.filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, .42fr); gap: .55rem; }
.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-height: 64px;
  text-align: start;
  justify-items: start;
  gap: .65rem;
  border: 0;
  border-bottom: 1px solid var(--edge);
  border-radius: 0;
  font-weight: 400;
  background: var(--paper);
  padding: .7rem 1rem;
}
.task-row:last-child { border-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.task-row:hover { background: #fffbed; }
.task-row:focus-visible { outline-offset: -3px; }
.task-row-copy { display: grid; gap: .18rem; min-width: 0; overflow-wrap: anywhere; }
.task-row-copy b { font-size: .96rem; }
.task-row-copy small, .empty { color: var(--muted); }
.task-row-side { display: grid; gap: .25rem; justify-items: end; }
.unread { color: #6c4700; font-weight: 700; font-size: .75rem; }
.badge { display: inline-block; padding: .24rem .55rem; background: #f2efe5; border-radius: 7px; color: #514a3a; font-size: .72rem; font-weight: 700; line-height: 1.35; white-space: nowrap; }
.badge[data-state=active] { background: #fff0a7; color: #5c4300; }
.badge[data-state=review] { background: #e5edff; color: #2b4e78; }
.badge[data-state=closed] { background: #e6f4df; color: #34562b; }
.badge[data-state=problem] { background: #faede7; color: #873b26; }
.empty { padding: 1rem; }
.owner-panel { display: grid; gap: .75rem; min-width: 0; }
.owner-card { padding: 1rem; display: grid; gap: .72rem; }
.owner-card h2 { font-size: 1.06rem; }
.compact-list, .timeline { list-style: none; padding: 0; }
.compact-list li { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding: .45rem 0; border-top: 1px solid var(--edge); overflow-wrap: anywhere; }
.compact-list li:first-child { border-top: 0; }
.compact-list li span + span { color: var(--muted); font-size: .78rem; text-align: end; }
.compact-list .empty { padding: .25rem 0; }
.metric-list { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,auto); gap: .38rem; font-size: .84rem; overflow-wrap: anywhere; }
.metric-list dd { text-align: end; color: var(--muted); }
.ops summary { cursor: pointer; min-height: 44px; display: list-item; padding-block: .7rem; font-weight: 700; font-size: .85rem; }
.ops li { display: grid; gap: .2rem; font-size: .82rem; }
.ops li span + span { text-align: start; }
.banner { padding: .7rem .95rem; margin-bottom: 1rem; border: 1px solid #dacb9d; background: #fff9e1; border-radius: 9px; }
.form-note { color: var(--muted); font-size: .83rem; }
.form-note:empty { display: none; }
.form-note[data-error=true] { color: var(--danger); }
dialog {
  padding: 0;
  border: 1px solid var(--edge);
  border-radius: 16px;
  width: min(100% - 2rem, 650px);
  max-height: min(90dvh, 960px);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 18px 70px #28210f30;
}
dialog::backdrop { background: #181711aa; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 1.2rem;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--paper);
  border-bottom: 1px solid var(--edge);
  overflow-wrap: anywhere;
}
.dialog-head h2 { font-size: 1.28rem; }
.close { padding: 0; min-width: 44px; font-size: 1.25rem; align-self: start; }
.dialog-content { padding: 1rem 1.2rem 1.35rem; display: grid; gap: .9rem; }
.dialog-content p, .dialog-content li { overflow-wrap: anywhere; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.input-help { margin-top: -.5rem; font-size: .82rem; }
.eyebrow { font-size: .78rem; color: var(--muted); }
.task-body, .timeline li p { white-space: pre-wrap; }
.button-link { justify-self: start; color: var(--ink); }
.detail-section { display: grid; gap: .55rem; padding-top: .88rem; border-top: 1px solid var(--edge); }
.compact-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .55rem; }
.timeline li { padding: .56rem .75rem; border-inline-start: 2px solid #f2d35f; background: #faf9f5; margin-bottom: .35rem; border-radius: 0 6px 6px 0; }
.timeline time { font-size: .75rem; }
.timeline p { margin-top: .2rem; }
@media (max-width: 760px) {
  .workspace.with-owner { grid-template-columns: minmax(0, 1fr); }
  .owner-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .page-heading { flex-direction: column; align-items: stretch; gap: .72rem; }
  .owner-panel { grid-template-columns: minmax(0, 1fr); }
  .filters { grid-template-columns: minmax(0, 1fr) minmax(116px, .65fr); }
  .queue-head, .task-row { padding-inline: .72rem; }
  .account span { display: none; }
  .topbar-content { padding-block: .48rem; }
  dialog { width: min(100% - .85rem, 650px); max-height: 96dvh; }
  .dialog-head, .dialog-content { padding-inline: .8rem; }
  .compact-form { grid-template-columns: minmax(0,1fr); }
  input:not([type=file]), textarea, select { font-size: 16px; }
}
@media (max-width: 350px) {
  .filters { grid-template-columns: minmax(0, 1fr); }
  .task-row { grid-template-columns: minmax(0, 1fr); }
  .task-row-side { display: flex; align-items: center; }
}

.development-nav { display: flex; flex-wrap: wrap; gap: .45rem; margin: -.45rem 0 1rem; }
.development-nav button[aria-pressed=true] { background: var(--accent); border-color: var(--accent); }
.history-note { padding: .55rem 1rem 0; }
.history-footer { display: flex; gap: .55rem; padding: .75rem 1rem; border-top: 1px solid var(--edge); }
#development-history .queue-head { gap: .2rem; }
#development-history .task-row .task-row-copy small { overflow-wrap: anywhere; }
.candidate-task-list:empty { display: none; }
.candidate-task-list li { padding-block: .35rem; }
.candidate-task-list button {
  justify-content: space-between;
  gap: .6rem;
  width: 100%;
  min-width: 0;
  text-align: start;
}
.candidate-task-list button b { overflow-wrap: anywhere; }
.candidate-dialog { width: min(100% - 2rem, 760px); }
.candidate-meta { grid-template-columns: minmax(90px,1fr) minmax(0,3fr); }
.candidate-diff {
  margin: 0;
  min-width: 0;
  max-height: 48dvh;
  overflow: auto;
  padding: .7rem .8rem;
  background: #f6f5f0;
  border: 1px solid var(--edge);
  border-radius: 8px;
  font: .77rem/1.55 ui-monospace, Consolas, monospace;
}
@media (max-width: 520px) {
  .development-nav > button { flex: 1 1 auto; }
  .candidate-dialog { width: min(100% - .85rem, 760px); }
  .candidate-diff-head { flex-wrap: wrap; }
}
