@font-face {
  font-family: "Instrument Sans";
  src: url("/static/review/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --deep: #032425;
  --green: #416858;
  --signal: #c8ff16;
  --cocoon: #dedbcc;
  --mist: #e5eae6;
  --canvas: #f5f7f5;
  --white: #fff;
  --line: #d7dfd9;
  --control-line: #b6c6bd;
  --selected: #edf2eb;
  --control-height: 2rem;
  --row-padding: .425rem;
  --row-gap: .2rem;
  --row-title: .8125rem;
  --detail-padding: 1.125rem;
  --error: #9c3434;
  font-family: "Instrument Sans", sans-serif;
  color: var(--deep);
  background: var(--canvas);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; }
body[data-density="comfortable"] {
  --control-height: 2.375rem;
  --row-padding: .75rem;
  --row-gap: .35rem;
  --row-title: .9375rem;
  --detail-padding: 1.5rem;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
a { color: var(--green); text-underline-offset: .15em; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.brand :focus-visible { outline-color: var(--signal); }
#main:focus { outline: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
p { line-height: 1.5; }
.frame { width: 100%; max-width: 100rem; margin-inline: auto; padding-inline: clamp(.75rem, 2vw, 1.25rem); }
.skip { position: absolute; z-index: 3; left: 1rem; top: .5rem; transform: translateY(-160%); background: var(--signal); padding: .6rem 1rem; color: var(--deep); }
.skip:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.brand { background: var(--deep); color: var(--white); }
.brand-inner { display: flex; align-items: center; gap: .75rem; min-height: 3.25rem; padding-block: .375rem; }
.wordmark { width: 5.125rem; height: auto; flex: none; }
.brand-label { border-inline-start: 1px solid var(--green); padding-inline-start: .75rem; color: var(--mist); font-size: .8125rem; }
.account { display: flex; align-items: center; gap: .75rem; margin-inline-start: auto; font-size: .8125rem; min-width: 0; }
#account-name { overflow-wrap: anywhere; }
.button { display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--control-line); border-radius: .375rem; background: var(--white); color: var(--deep); padding: .5rem .75rem; font-weight: 600; text-align: center; }
.button:hover { background: var(--mist); }
.primary { background: var(--signal); border-color: var(--signal); }
.primary:hover { background: #b7ee0c; border-color: #b7ee0c; }
.header-button { min-height: 2rem; background: transparent; color: inherit; border-color: #658779; padding: .25rem .625rem; }
.header-button:hover { background: var(--green); }

.card { background: var(--white); border: 1px solid #d7dfd9; border-radius: .9rem; }
.entry-card { max-width: 28rem; margin: clamp(2rem, 10vh, 7rem) auto; padding: clamp(1.25rem, 5vw, 2rem); }
.entry-card h1 { font-size: 1.8rem; }
.entry-card > p { margin-block: .65rem 1.15rem; color: var(--green); }
.entry-card .primary { width: 100%; }
.center-message { padding: 3rem 0; color: var(--green); text-align: center; }
form { display: grid; gap: 1rem; }
label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
input, select, textarea { width: 100%; min-width: 0; min-height: 2.75rem; border: 1px solid #c9d4cd; border-radius: .5rem; background: var(--white); color: var(--deep); padding: .55rem .65rem; }
textarea { min-height: 6rem; resize: vertical; }
input[type="checkbox"] { width: 1.125rem; min-height: 1.125rem; accent-color: var(--deep); }
.checkbox { display: flex; align-items: center; gap: .5rem; }
.help { color: var(--green); font-size: .86rem; }
.feedback { color: var(--error); font-size: .9rem; overflow-wrap: anywhere; }
.notice { padding: .75rem 1rem; border: 1px solid var(--mist); background: var(--white); border-radius: .55rem; margin-bottom: 1rem; }
.notice[data-tone="success"] { color: var(--green); }

#workspace { display: flex; flex-direction: column; min-width: 0; }
#workspace .button { min-height: var(--control-height); padding: .25rem .625rem; font-size: .8125rem; }
#workspace .notice { margin-bottom: .625rem; padding: .4rem .625rem; }

.overview { padding-block: .625rem; }
.overview-heading, .actions, .dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.overview-heading > div:first-child { min-width: 0; }
.title-line { display: flex; flex-wrap: wrap; align-items: center; gap: .1875rem .5rem; }
#workspace-summary { margin-top: .1875rem; font-size: .75rem; }
#workspace-summary:empty { display: none; }
.overview h1 { font-size: clamp(1.25rem, 2vw, 1.4375rem); font-weight: 650; letter-spacing: -.025em; overflow-wrap: anywhere; }
.release { display: inline-block; font-size: .6875rem; font-weight: 650; line-height: 1.35; background: var(--cocoon); padding: .0625rem .375rem; border-radius: .1875rem; }
.release:empty { display: none; }
.metrics { display: flex; flex-wrap: wrap; align-items: baseline; gap: .125rem .625rem; margin-top: .375rem; }
.metrics:empty { display: none; }
.metric { display: flex; align-items: baseline; gap: .25rem; }
.metric + .metric { padding-inline-start: .625rem; border-inline-start: 1px solid var(--control-line); }
.metric dt { color: var(--green); font-size: .75rem; }
.metric dd { order: -1; font-weight: 650; font-size: .8125rem; font-variant-numeric: tabular-nums; }

.workspace-tools { display: flex; align-items: center; gap: .375rem; }
.display-options { position: relative; }
.display-options > summary { cursor: pointer; display: flex; align-items: center; gap: .375rem; min-height: var(--control-height); padding: .25rem .625rem; list-style: none; border: 1px solid var(--control-line); border-radius: .375rem; background: var(--white); font-size: .8125rem; font-weight: 600; }
.display-options > summary::-webkit-details-marker { display: none; }
.display-options > summary::after { content: ""; display: block; width: .375rem; height: .375rem; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-.1rem) rotate(45deg); }
.display-options[open] > summary, .display-options > summary:hover, #focus-mode[aria-pressed="true"] { background: var(--mist); }
.display-panel { position: absolute; z-index: 2; inset-block-start: calc(100% + .375rem); inset-inline-end: 0; display: grid; gap: .625rem; width: 13rem; padding: .75rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--white); box-shadow: 0 .4rem 1.2rem rgb(3 36 37 / .12); }
.display-panel label, .display-panel select { font-size: .8125rem; }
.display-panel select { min-height: var(--control-height); padding-block: .25rem; }

.board { display: grid; grid-template-columns: clamp(20rem, 30vw, 25rem) minmax(0, 1fr); min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: .5rem; background: var(--white); }
.board > .card { min-width: 0; min-height: 0; border: 0; border-radius: inherit; background: transparent; }
.board > .queue { display: flex; flex-direction: column; border-inline-end: 1px solid var(--line); border-start-end-radius: 0; border-end-end-radius: 0; }
.queue-top { padding: .625rem .75rem; display: grid; gap: .375rem; background: var(--white); border-start-start-radius: inherit; border-block-end: 1px solid var(--line); }
.queue-heading { display: flex; align-items: center; justify-content: space-between; gap: .375rem; min-height: 1.125rem; }
.queue-top h2 { font-size: .875rem; font-weight: 650; }
#workspace #clear-filters { min-height: 1.125rem; padding: 0 .25rem; border-color: transparent; color: var(--green); font-size: .6875rem; }
.scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .125rem; padding: .125rem; border-radius: .375rem; background: var(--mist); }
.scope button { min-height: calc(var(--control-height) - .25rem); border: 0; border-radius: .25rem; background: transparent; color: var(--deep); padding: .15rem .25rem; font-size: .75rem; font-weight: 600; }
.scope button:hover { background: var(--white); }
.scope [aria-pressed="true"], .scope [aria-pressed="true"]:hover { background: var(--deep); color: var(--white); }
.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem; }
.filters input, .filters select { min-height: var(--control-height); padding: .25rem .375rem; border-color: var(--control-line); border-radius: .3125rem; font-size: .75rem; }
.filters input::placeholder { color: var(--green); opacity: 1; }
.completion-control { min-height: 1.5rem; gap: .4rem; color: var(--green); font-size: .75rem; font-weight: 500; }
.completion-control input { width: .9375rem; min-height: .9375rem; margin: 0; }
.queue-scroll:focus-visible { outline-offset: -2px; }
.list-status { padding: .25rem .75rem; font-size: .6875rem; color: var(--green); background: var(--canvas); }
.list-status:empty { display: none; }
.issues { padding: 0; list-style: none; margin: 0; }
.issue-button { display: grid; width: 100%; gap: var(--row-gap); background: var(--white); border: 0; border-block-start: 1px solid var(--line); border-inline-start: 3px solid transparent; text-align: start; color: var(--deep); padding: var(--row-padding) .75rem var(--row-padding) calc(.75rem - 3px); }
.issues > li:last-child { border-block-end: 1px solid var(--line); }
.issue-button:focus-visible { outline-offset: -3px; }
.issue-button[data-state] { border-inline-start-color: var(--state-ink); background: var(--state-wash); }
.issue-button[data-state]:hover, .issue-button[data-state][aria-current="true"] { background: var(--state-selected); }
.issue-button[aria-current="true"] { box-shadow: inset 0 0 0 1px var(--state-ink); }
[data-state="waiting"] { --state-ink: #606b72; --state-wash: #f7f8f9; --state-selected: #e8ecef; --state-badge: #e8ecef; }
[data-state="active"] { --state-ink: #215e9a; --state-wash: #f2f7fd; --state-selected: #deebfa; --state-badge: #deebfa; }
[data-state="overdue"] { --state-ink: #a42e38; --state-wash: #fff3f3; --state-selected: #fce1e3; --state-badge: #fce1e3; }
[data-state="done"] { --state-ink: #286844; --state-wash: #f1f8f2; --state-selected: #dfefe2; --state-badge: #dfefe2; }
.issue-meta { display: flex; flex-wrap: wrap; gap: .125rem .375rem; align-items: center; justify-content: space-between; color: var(--green); font-size: .6875rem; font-weight: 550; line-height: 1.3; overflow-wrap: anywhere; }
.issue-summary { overflow-wrap: anywhere; font-size: var(--row-title); font-weight: 650; line-height: 1.3; }
.issue-classification { display: flex; flex-wrap: wrap; gap: .1875rem .25rem; }
.ticket-badge, .status { display: inline-block; max-width: 100%; padding: .0625rem .3rem; border: 1px solid transparent; border-radius: .25rem; background: var(--mist); color: var(--deep); font-size: .6875rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.ticket-badge { border-color: var(--line); background: var(--selected); }
.status[data-state] { color: var(--state-ink); background: var(--state-badge); border-color: currentColor; }
.issue-type[data-category="fehler"], .issue-type[data-category="stoerung"] { color: var(--deep); background: var(--white); border-color: #a9bbb0; }
.issue-priority { color: var(--green); background: var(--canvas); }
.issue-priority[data-priority="hoch"] { color: #75470e; background: #fff4df; border-color: #e6d1a6; }
.issue-priority[data-priority="kritisch"] { color: #75470e; background: #fff4df; border-color: #b88d3f; }
.more { margin: .625rem .75rem; }

.detail-toolbar { display: flex; justify-content: flex-end; gap: .375rem; padding: .5rem var(--detail-padding); border-block-end: 1px solid var(--line); background: var(--white); border-start-end-radius: inherit; }
#detail { padding: .75rem var(--detail-padding) var(--detail-padding); }
.detail h2 { margin-top: .3125rem; font-size: 1.25rem; font-weight: 650; letter-spacing: -.015em; overflow-wrap: anywhere; }
.detail .issue-meta { justify-content: flex-start; }
.detail .center-message, .empty-state { padding: clamp(2rem, 8vh, 4rem) .5rem; text-align: center; color: var(--green); }
#detail:is(.empty-state) { padding: clamp(2rem, 8vh, 4rem) .5rem; }
.detail .center-message, .detail .empty-state { font-size: .875rem; }
.back { display: none; }
.metadata { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: .4375rem .875rem; padding: .625rem .75rem; margin-top: .75rem; background: var(--canvas); border: 1px solid var(--line); border-radius: .375rem; }
.metadata dt { font-size: .6875rem; color: var(--green); line-height: 1.3; }
.metadata dd { font-weight: 500; font-size: .8125rem; line-height: 1.35; overflow-wrap: anywhere; }
.metadata > div { min-width: 0; }
.detail-section { border-block-start: 1px solid var(--line); padding-top: .75rem; margin-top: .75rem; }
.detail-section h3 { font-size: .875rem; font-weight: 650; margin-bottom: .375rem; }
.detail-section .user-text { font-size: .875rem; line-height: 1.55; }
.user-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.comments { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.comment { border: 1px solid var(--line); border-radius: .375rem; padding: .5rem .625rem; font-size: .875rem; }
.comment-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem .5rem; margin-bottom: .25rem; }
.comment-heading time { color: var(--green); font-size: .6875rem; }
.reply { margin-top: .625rem; gap: .5rem; }
.reply label { gap: .25rem; font-size: .8125rem; }
.reply textarea { min-height: 4.25rem; font-size: .875rem; border-color: var(--control-line); }
.reply input[type="file"] { min-height: var(--control-height); padding: .25rem; font-size: .8125rem; border-color: var(--control-line); }
.reply .button { justify-self: start; }
.attachments { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .35rem; }
.attachment { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; overflow-wrap: anywhere; }
.attachment a { font-weight: 600; }
.upload-status { display: grid; gap: .35rem; font-weight: 400; }
progress { accent-color: var(--green); width: 100%; }

dialog { border: 1px solid #d7dfd9; color: var(--deep); border-radius: .85rem; padding: clamp(1rem, 4vw, 1.5rem); width: min(36rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); overflow: auto; }
dialog::backdrop { background: rgb(3 36 37 / .57); }
.dialog-heading { margin-bottom: 1rem; }
.dialog-heading h2 { font-size: 1.35rem; }
.dynamic-fields { display: grid; gap: .8rem; }
.dynamic-fields:empty { display: none; }
.form-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

@media (width > 48rem) {
  body[data-screen="workspace"] { height: 100dvh; min-height: 30rem; display: flex; flex-direction: column; }
  body[data-screen="workspace"] #main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 1rem; }
  body[data-screen="workspace"] #workspace { flex: 1; min-height: 0; }
  body[data-screen="workspace"] .board { flex: 1; grid-template-rows: minmax(0, 1fr); }
  .queue-scroll, .detail { min-height: 0; overflow: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; }
  .detail { scroll-padding-block-start: calc(var(--control-height) + 1.125rem); }
  .detail-toolbar { position: sticky; inset-block-start: 0; z-index: 1; }
  body[data-view="focus"] .board { grid-template-columns: minmax(0, 1fr); }
  body[data-view="focus"] .board > .queue { display: none; }
  body[data-view="focus"] #detail { max-width: 65rem; margin-inline: auto; }
}

@media (max-width: 48rem) {
  #workspace { padding-bottom: 1rem; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .board > .queue { border-inline-end: 0; border-radius: inherit; }
  .board > .detail { display: none; }
  .board[data-detail-open="true"] > .queue { display: none; }
  .board[data-detail-open="true"] > .detail { display: block; }
  .detail-toolbar { justify-content: start; border-start-start-radius: inherit; }
  .back { display: inline-flex; }
  #focus-mode { display: none; }
}

@media (max-width: 48rem), (pointer: coarse) {
  body, body[data-density="comfortable"] { --control-height: 2.75rem; }
  .header-button, .scope button { min-height: 2.75rem; }
  .filters input[type="search"], .reply textarea { font-size: 1rem; }
  .display-panel .checkbox, .completion-control, #workspace #clear-filters { min-height: 2.75rem; }
}

@media (max-width: 31rem) {
  .brand-inner { flex-wrap: wrap; gap: .25rem .625rem; }
  .brand-label { padding-inline-start: .625rem; }
  .account { flex-basis: 100%; justify-content: space-between; }
  .overview-heading { align-items: start; flex-direction: column; }
  .actions { position: relative; justify-content: flex-start; }
  .display-options { position: static; }
}

@media (forced-colors: active) {
  .scope [aria-pressed="true"], #focus-mode[aria-pressed="true"] { outline: 1px solid Highlight; outline-offset: -2px; }
  .issue-button[aria-current="true"] { border-inline-start-color: Highlight; }
  .brand :focus-visible { outline-color: Highlight; }
}
