:root {
  color-scheme: light;
  --paper: #f4f1e8;
  --paper-deep: #e8e4d8;
  --ink: #11110f;
  --muted: #66655e;
  --line: #c9c5b9;
  --signal: #c7ff2e;
  --signal-dark: #9bcc13;
  --white: #fffef9;
  --danger: #9b2f22;
  --max-width: 1180px;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

p,
h1,
h2,
h3,
dd {
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--signal-dark);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border: 2px solid var(--ink);
  background: var(--signal);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.signal-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 3px 3px 0 var(--ink);
}

.eyebrow,
.field-label,
.project-label,
.section-number {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow,
.project-label {
  color: var(--muted);
}

.text-link {
  font-size: 14px;
  font-weight: 700;
  text-underline-offset: 4px;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: 220px;
  margin-top: 34px;
  padding: 15px 17px;
  border: 2px solid var(--ink);
  background: var(--signal);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.primary-link:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.public-header,
.public-footer,
.public-main,
.app-header,
.app-main {
  width: min(var(--max-width), calc(100% - 40px));
  margin-inline: auto;
}

.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
}

.public-main {
  padding-block: clamp(54px, 9vw, 128px) 70px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
  column-gap: clamp(36px, 8vw, 120px);
  align-items: end;
}

.hero .eyebrow,
.hero h1 {
  grid-column: 1;
}

.hero h1 {
  margin: 15px 0 0;
  font-family: var(--serif);
  font-size: clamp(64px, 10.6vw, 150px);
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: -0.07em;
}

.hero-copy {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  padding-bottom: 12px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(21px, 2.2vw, 30px);
  line-height: 1.22;
}

.hero .primary-link {
  grid-column: 2;
}

.public-loop {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(80px, 12vw, 170px);
  border-top: 2px solid var(--ink);
}

.public-loop > div {
  min-width: 0;
  padding: 20px 24px 8px 0;
  border-right: 1px solid var(--line);
}

.public-loop > div + div {
  padding-left: 24px;
}

.public-loop > div:last-child {
  border-right: 0;
}

.section-number {
  color: var(--signal-dark);
}

.public-loop h2 {
  margin: 38px 0 14px;
  font-family: var(--serif);
  font-size: clamp(27px, 3vw, 39px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.public-loop p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.public-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding-block: 24px 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.public-footer p {
  max-width: 560px;
  margin: 0;
}

.centered-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 100vh;
  color: var(--muted);
}

.centered-state p {
  margin: 0;
}

.login-view {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px 20px;
}

.login-panel {
  display: grid;
  width: min(100%, 680px);
  min-height: min(680px, calc(100vh - 56px));
  padding: clamp(28px, 6vw, 62px);
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 10px 10px 0 var(--signal);
}

.login-panel > div {
  align-self: center;
}

.login-panel h1 {
  margin: 14px 0 22px;
  font-family: var(--serif);
  font-size: clamp(52px, 9vw, 86px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.login-copy {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.login-form {
  align-self: end;
}

.login-form label,
.action-dialog label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

input,
textarea {
  width: 100%;
  min-width: 0;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
}

input {
  min-height: 50px;
  padding: 10px 13px;
}

textarea {
  resize: vertical;
  padding: 12px 13px;
  line-height: 1.45;
}

.button {
  min-height: 50px;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  border-radius: 0;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.button-dark {
  background: var(--ink);
  color: var(--white);
}

.button-light {
  background: var(--white);
}

.button-signal {
  background: var(--signal);
}

.button:disabled,
.outcome-button:disabled,
.quiet-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.form-error {
  margin: 9px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.app-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.last-updated {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quiet-button {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.quiet-button:hover {
  border-color: var(--ink);
}

.app-main {
  padding-block: 38px 76px;
}

.state-notice {
  margin-bottom: 22px;
  padding: 13px 16px;
  border: 1px solid var(--ink);
  background: var(--signal);
  font-size: 13px;
  font-weight: 700;
}

.state-notice.is-warning {
  background: var(--white);
  color: var(--danger);
}

.decision-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.queue-position {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.decision-card {
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 8px 8px 0 var(--ink);
}

.decision-body {
  padding: clamp(24px, 5vw, 58px);
}

.project-label {
  margin-bottom: 20px;
}

.decision-card h1 {
  max-width: 1000px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 7.2vw, 94px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.decision-field {
  max-width: 810px;
  margin-top: 38px;
}

.decision-field h2 {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.decision-field p {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(19px, 2.1vw, 26px);
  line-height: 1.28;
}

.recommended-action {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  margin-top: 40px;
  padding: 22px 24px;
  border: 2px solid var(--ink);
  background: var(--signal);
}

.recommended-action p {
  margin: 0;
}

#decision-action {
  font-size: clamp(18px, 2.2vw, 25px);
  font-weight: 750;
  line-height: 1.25;
}

.decision-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 40px 0 0;
  border-top: 1px solid var(--line);
}

.decision-facts > div {
  min-width: 0;
  padding: 18px 22px 0 0;
  border-right: 1px solid var(--line);
}

.decision-facts > div + div {
  padding-left: 22px;
}

.decision-facts > div:last-child {
  border-right: 0;
}

.decision-facts dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.decision-facts dd {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

details {
  min-width: 0;
}

summary {
  cursor: pointer;
  list-style-position: outside;
}

.evidence-details {
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.evidence-details > summary,
.secondary-panels > details > summary {
  padding: 17px 2px;
  font-size: 13px;
  font-weight: 750;
}

.summary-count {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
}

.details-content {
  min-width: 0;
  padding: 2px 2px 19px;
  color: var(--muted);
  font-size: 13px;
}

.details-content > :first-child {
  margin-top: 0;
}

.details-content > :last-child {
  margin-bottom: 0;
}

.details-content ul,
.details-content ol {
  margin: 0;
  padding-left: 21px;
}

.details-content li + li {
  margin-top: 8px;
}

.internal-record {
  margin-top: 14px;
  border-top: 1px dotted var(--line);
}

.internal-record summary {
  padding-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.internal-record dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 7px 12px;
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 10px;
}

.internal-record dt {
  color: var(--ink);
  font-weight: 700;
}

.internal-record dd {
  margin: 0;
  word-break: break-all;
}

.decision-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}

.outcome-button {
  min-height: 64px;
  padding: 13px;
  border: 0;
  border-right: 1px solid var(--ink);
  background: var(--white);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.outcome-button:last-child {
  border-right: 0;
}

.outcome-button:hover {
  background: var(--paper-deep);
}

.outcome-approve,
.outcome-approve:hover {
  background: var(--signal);
}

.empty-state {
  padding: clamp(42px, 8vw, 90px);
  border: 2px solid var(--ink);
  background: var(--white);
  text-align: center;
}

.empty-mark {
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0 auto 24px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--signal);
  font-weight: 900;
}

.empty-state h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 7vw, 78px);
  font-weight: 400;
  letter-spacing: -0.05em;
}

.empty-state p:last-child {
  margin: 16px auto 0;
  color: var(--muted);
}

.action-status {
  margin: 24px 0 0;
  padding: 14px 16px;
  border-left: 5px solid var(--signal-dark);
  background: var(--white);
  font-size: 14px;
  font-weight: 700;
}

.compact-surface {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-width: 0;
  margin-top: 52px;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
}

.surface-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.surface-heading h2 {
  margin: 0;
  font-size: 14px;
}

.count-badge {
  min-width: 23px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
}

.compact-list,
.queue-list {
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-list li,
.queue-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.compact-list li:first-child,
.queue-list li:first-child {
  padding-top: 0;
}

.compact-list li:last-child,
.queue-list li:last-child {
  border-bottom: 0;
}

.item-title {
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
}

.item-meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-align: right;
  text-transform: uppercase;
}

.empty-list {
  color: var(--muted);
  font-size: 13px;
}

.secondary-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 54px;
  border-top: 2px solid var(--ink);
  border-left: 1px solid var(--line);
}

.secondary-panels > details {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.secondary-panels > details > summary,
.secondary-panels > details > .details-content {
  padding-inline: 17px;
}

.project-grid,
.history-list,
.change-list,
.evidence-list {
  list-style: none;
  padding: 0 !important;
}

.project-grid li,
.history-list li,
.change-list li,
.evidence-list li {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.project-grid li:last-child,
.history-list li:last-child,
.change-list li:last-child,
.evidence-list li:last-child {
  border-bottom: 0;
}

.support-title {
  display: block;
  color: var(--ink);
  font-weight: 700;
}

.support-meta {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.action-dialog {
  width: min(580px, calc(100% - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow-y: auto;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  box-shadow: 8px 8px 0 var(--signal);
}

.action-dialog::backdrop {
  background: rgb(17 17 15 / 70%);
}

.action-dialog form {
  padding: clamp(24px, 5vw, 42px);
}

.action-dialog h2 {
  margin: 14px 0 18px;
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}

.dialog-action {
  padding: 16px;
  border: 1px solid var(--ink);
  background: var(--signal);
  font-weight: 750;
}

.dialog-note {
  color: var(--muted);
  font-size: 13px;
}

.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
}

@media (max-width: 820px) {
  .hero {
    display: block;
  }

  .hero-copy {
    max-width: 600px;
    margin-top: 44px;
  }

  .public-loop {
    grid-template-columns: 1fr;
  }

  .public-loop > div,
  .public-loop > div + div {
    padding: 20px 0 26px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .public-loop > div:last-child {
    border-bottom: 0;
  }

  .public-loop h2 {
    margin-top: 26px;
  }

  .decision-facts {
    grid-template-columns: 1fr;
  }

  .decision-facts > div,
  .decision-facts > div + div {
    padding: 16px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .decision-facts > div:last-child {
    border-bottom: 0;
  }

  .compact-surface {
    grid-template-columns: 1fr;
    gap: 19px;
  }
}

@media (max-width: 610px) {
  .public-header,
  .public-footer,
  .public-main,
  .app-header,
  .app-main {
    width: min(100% - 24px, var(--max-width));
  }

  .public-header {
    padding-block: 18px;
  }

  .public-header .text-link span {
    display: none;
  }

  .hero h1 {
    font-size: clamp(58px, 20vw, 88px);
  }

  .public-footer {
    display: block;
  }

  .public-footer .text-link {
    display: inline-block;
    margin-top: 16px;
  }

  .login-view {
    padding: 12px;
  }

  .login-panel {
    min-height: calc(100vh - 24px);
    padding: 27px 22px;
    box-shadow: 5px 5px 0 var(--signal);
  }

  .password-row {
    grid-template-columns: 1fr;
  }

  .password-row .button {
    margin-top: 9px;
  }

  .app-header {
    min-height: 88px;
    align-items: flex-start;
    padding-block: 17px;
  }

  .header-actions {
    flex-wrap: wrap;
    gap: 9px 14px;
  }

  .last-updated {
    width: 100%;
    text-align: right;
  }

  .app-main {
    padding-top: 26px;
  }

  .decision-heading {
    align-items: flex-start;
  }

  .decision-card {
    box-shadow: 5px 5px 0 var(--ink);
  }

  .decision-body {
    padding: 24px 19px;
  }

  .decision-card h1 {
    font-size: clamp(42px, 14vw, 66px);
  }

  .recommended-action {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px;
  }

  .decision-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .outcome-button {
    border-bottom: 1px solid var(--ink);
  }

  .outcome-button:nth-child(2) {
    border-right: 0;
  }

  .outcome-button:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .secondary-panels {
    grid-template-columns: 1fr;
  }

  .compact-list li,
  .queue-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .item-meta {
    text-align: left;
  }

  .dialog-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.deck-main {
  width: min(920px, calc(100% - 40px));
  margin-inline: auto;
  padding: 26px 0 80px;
}

.composer {
  padding: clamp(20px, 4vw, 34px);
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 6px 6px 0 var(--signal);
}

.composer-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.composer h1 {
  margin: 7px 0 0;
  font-family: var(--serif);
  font-size: clamp(31px, 5vw, 50px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}

.composer-context {
  max-width: 330px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.composer-selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.composer label > span,
.task-label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.task-label {
  margin-top: 15px;
}

#task-input {
  min-height: 104px;
}

.composer-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 10px;
}

.composer-submit p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.working-strip,
.up-next {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 22px;
  margin-top: 30px;
  padding-top: 12px;
  border-top: 2px solid var(--ink);
}

.strip-heading {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.strip-heading h2 {
  margin: 0;
  font-size: 13px;
}

.working-list,
.peek-list {
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.working-list li,
.peek-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.working-list li:first-child,
.peek-list li:first-child {
  padding-top: 0;
}

.working-list li:last-child,
.peek-list li:last-child {
  border-bottom: 0;
}

.current-card-region {
  margin-top: 38px;
}

.card-deck-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.active-card {
  display: flex;
  min-height: max(560px, calc(100svh - 220px));
  flex-direction: column;
  justify-content: space-between;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 8px 8px 0 var(--ink);
}

.card-body {
  padding: clamp(24px, 5vw, 52px);
}

.active-card h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 7vw, 78px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.card-section {
  max-width: 720px;
  margin-top: 30px;
}

.card-section h2,
.next-block h2 {
  margin: 0 0 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-section p,
.card-section ul {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(18px, 2.2vw, 23px);
  line-height: 1.3;
}

.card-section ul {
  padding-left: 21px;
}

.card-section li + li {
  margin-top: 7px;
}

.recommended-block,
.ask-block,
.next-block {
  max-width: none;
  margin-top: 32px;
  padding: 20px;
  border: 2px solid var(--ink);
  background: var(--signal);
}

.ask-block {
  background: var(--paper);
}

.next-block dl,
.card-facts {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 9px 18px;
  margin: 0;
}

.next-block dt,
.card-facts dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.next-block dd,
.card-facts dd {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}

.card-facts {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.card-actions,
.decision-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
}

.card-action {
  min-width: 0;
  min-height: 62px;
  padding: 12px 8px;
  border: 0;
  border-right: 1px solid var(--ink);
  background: var(--white);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.card-action:last-child {
  border-right: 0;
}

.card-action:hover {
  background: var(--paper-deep);
}

.card-action.primary,
.card-action.primary:hover {
  background: var(--signal);
}

.view-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 42px;
  border-top: 2px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.view-nav button {
  min-height: 54px;
  padding: 10px;
  border: 0;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.view-nav button:hover {
  background: var(--white);
}

.drawer-dialog,
.artifact-dialog {
  width: min(760px, calc(100% - 24px));
  height: min(780px, calc(100svh - 24px));
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  box-shadow: 8px 8px 0 var(--signal);
}

.drawer-dialog::backdrop,
.artifact-dialog::backdrop {
  background: rgb(17 17 15 / 70%);
}

.drawer-shell {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
}

.drawer-shell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 2px solid var(--ink);
}

.drawer-shell h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 400;
}

.drawer-content,
.artifact-dialog pre {
  min-width: 0;
  margin: 0;
  padding: 22px;
  overflow: auto;
}

.drawer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.drawer-list > li {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.drawer-list > li:first-child {
  padding-top: 0;
}

.reentry-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--ink);
  background: var(--signal);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.raw-history,
.artifact-dialog pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 11px;
}

@media (max-width: 610px) {
  .deck-main {
    width: calc(100% - 24px);
    padding-top: 16px;
  }

  .app-header {
    width: calc(100% - 24px);
  }

  .composer {
    padding: 18px 15px;
    box-shadow: 4px 4px 0 var(--signal);
  }

  .composer-heading {
    display: block;
  }

  .composer-context {
    max-width: none;
    margin-top: 10px;
    text-align: left;
  }

  .composer-selectors {
    grid-template-columns: 1fr;
  }

  .composer-submit {
    display: grid;
    grid-template-columns: 1fr;
  }

  .composer-submit .button {
    width: 100%;
  }

  .working-strip,
  .up-next {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .working-list li,
  .peek-list li {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .item-meta {
    text-align: left;
  }

  .active-card {
    min-height: calc(100svh - 120px);
    box-shadow: 4px 4px 0 var(--ink);
  }

  .card-body {
    padding: 24px 17px;
  }

  .active-card h1 {
    font-size: clamp(39px, 13vw, 56px);
  }

  .next-block dl,
  .card-facts {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .next-block dd,
  .card-facts dd {
    margin-bottom: 10px;
  }

  .card-actions,
  .decision-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-action {
    border-bottom: 1px solid var(--ink);
  }

  .card-action:nth-child(2) {
    border-right: 0;
  }

  .card-action:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .view-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drawer-dialog,
  .artifact-dialog {
    width: calc(100% - 12px);
    height: calc(100svh - 12px);
  }

  .drawer-list > li {
    align-items: flex-start;
    flex-direction: column;
  }

  .reentry-button {
    width: 100%;
  }
}
