:root {
  color-scheme: light;
  --bg: #edf4f2;
  --panel: #fff;
  --text: #142e32;
  --muted: #3d565b;
  --line: #6a827e;
  --accent: #006b62;
  --button: #fff;
  --focus: #8a4b00;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
:root[data-mode="dark"] {
  color-scheme: dark;
  --bg: #111e23;
  --panel: #1b2d33;
  --text: #f1f7f7;
  --muted: #c2d7d9;
  --line: #647f86;
  --accent: #82e2d5;
  --button: #102c29;
  --focus: #ffd17c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]):not([data-mode="dark"]) {
    color-scheme: dark;
    --bg: #111e23;
    --panel: #1b2d33;
    --text: #f1f7f7;
    --muted: #c2d7d9;
    --line: #647f86;
    --accent: #82e2d5;
    --button: #102c29;
    --focus: #ffd17c;
  }
}
:root[data-theme="flow"][data-mode="light"],
:root[data-theme="flow"] {
  --accent: #1458a2;
  --button: #fff;
}
:root[data-theme="momentum"] {
  --accent: #783b98;
  --button: #fff;
}
:root[data-mode="dark"][data-theme="flow"] {
  --accent: #abd2ff;
  --button: #112a44;
}
:root[data-mode="dark"][data-theme="momentum"] {
  --accent: #edbfff;
  --button: #31173e;
}
:root[data-contrast="true"],
:root[data-mode="light"][data-contrast="true"] {
  --bg: #fff;
  --panel: #fff;
  --text: #000;
  --muted: #222;
  --line: #333;
  --accent: #003c38;
  --button: #fff;
  --focus: #773d00;
}
:root[data-mode="dark"][data-contrast="true"] {
  --bg: #000;
  --panel: #080808;
  --text: #fff;
  --muted: #eee;
  --line: #ddd;
  --accent: #a9fff0;
  --button: #000;
  --focus: #ffe1a1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}
header,
main,
footer {
  width: min(74rem, 100%);
  margin: auto;
  padding: 1.5rem;
}
header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 3rem;
}
h1,
h2,
h3 {
  line-height: 1.18;
  font-family: Georgia, "Times New Roman", serif;
}
h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin: 0.5rem 0 1rem;
}
h2 {
  font-size: 1.8rem;
  margin: 0.5rem 0 1rem;
}
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 750;
  font-size: 0.8rem;
  margin: 0;
}
.appearance {
  min-width: 11rem;
}
.card,
.notice {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
  padding: 1.5rem;
  margin: 1rem 0;
  overflow-wrap: anywhere;
}
.notice {
  border-left: 0.35rem solid var(--accent);
}
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
}
.effort-editor {
  min-inline-size: 0;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
.metrics-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
}
.metric-card {
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 1rem;
  min-inline-size: 0;
}
.metric-card h3 {
  font: inherit;
  margin: 0 0 0.5rem;
}
.metric-card strong {
  font-size: 1.8rem;
  color: var(--accent);
}
.effort-timeline {
  margin: 1rem 0;
  min-inline-size: 0;
}
.effort-timeline svg {
  display: block;
  inline-size: 100%;
  max-block-size: 15rem;
}
.effort-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
}
.effort-point {
  fill: var(--accent);
}
.metrics-table-region {
  max-inline-size: 100%;
  overflow-x: auto;
}
.metrics-table-region table {
  inline-size: 100%;
  border-collapse: collapse;
}
.metrics-table-region th,
.metrics-table-region td {
  text-align: start;
  padding: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.metrics-table-region caption {
  text-align: start;
  font-weight: 650;
}
.quality-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1.5rem;
}
.quality-layout > div {
  min-inline-size: 0;
}
.quality-layout > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}
.quality-layout .secondary {
  color: var(--text);
  background: var(--panel);
  border-color: var(--line);
}
.quality-layout button[aria-pressed="true"] {
  color: var(--button);
  background: var(--accent);
  border-color: var(--accent);
}
.quality-layout textarea {
  inline-size: 100%;
  min-block-size: 5rem;
  padding: 0.6rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  font: inherit;
  resize: vertical;
}
.quality-layout button {
  overflow-wrap: anywhere;
  max-inline-size: 100%;
}
label {
  display: block;
  font-weight: 650;
  margin: 0.65rem 0;
}
input:not([type="checkbox"]),
select {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  padding: 0.6rem;
  font: inherit;
}
input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--accent);
  vertical-align: middle;
  margin-right: 0.5rem;
}
button {
  min-height: 2.75rem;
  font: inherit;
  font-weight: 650;
  color: var(--button);
  background: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 0.5rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
}
button:disabled {
  background: var(--panel);
  color: var(--muted);
  border-color: var(--line);
  cursor: not-allowed;
}
.toolbar,
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.actions {
  margin-top: 1rem;
}
.toolbar p {
  flex: 1 1 20rem;
}
.hint,
footer {
  color: var(--muted);
}
.board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
}
.task {
  border: 1px solid var(--line);
  padding: 1rem;
  border-radius: 0.7rem;
}
.task p {
  margin: 0.5rem 0;
}
.story-task-group {
  min-inline-size: 0;
  margin: 0.75rem 0;
  padding: 0.5rem 0.75rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
.story-task-group legend {
  max-inline-size: 100%;
  font-weight: 750;
}
.backlog-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(5rem, 7rem);
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
}
details {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
summary {
  cursor: pointer;
  font-weight: 750;
}
a {
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  top: -10rem;
  padding: 1rem;
  background: var(--panel);
  z-index: 2;
}
.skip:focus {
  top: 0;
}
@media (max-width: 40rem) {
  .quality-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  header {
    flex-direction: column;
    padding-top: 1.5rem;
  }
  header,
  main,
  footer {
    padding: 1rem;
  }
  .card {
    padding: 1rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  .effort-line {
    stroke: CanvasText;
  }
  .effort-point {
    fill: CanvasText;
  }
  button {
    border: 2px solid ButtonText;
  }
  .card,
  .notice,
  .task {
    border-color: CanvasText;
  }
}
