/* Slow Registry: a warm, quiet palette, a wider reading column, and tighter vertical spacing. */

:root {
  --md-primary-fg-color: #4e3b31;
  --md-primary-fg-color--light: #6b5446;
  --md-primary-fg-color--dark: #36281f;
  --md-accent-fg-color: #b4602a;
  --md-accent-fg-color--transparent: rgba(180, 96, 42, 0.1);
  --sr-quiet: #6f6a66;
  --sr-rule: #e4ddd6;
  --sr-tint: #f7f2ec;
  --md-typeset-a-color: #9a4f1f;
  --sr-button: #9a4f1f;
  --sr-button-fg: #ffffff;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #4e3b31;
  --md-accent-fg-color: #e09a63;
  --md-accent-fg-color--transparent: rgba(224, 154, 99, 0.12);
  --md-default-bg-color: #1f1b19;
  --sr-quiet: #b7aea7;
  --sr-rule: #3a332f;
  --sr-tint: #2a2421;
  --md-typeset-a-color: #e0a77a;
  --sr-button: #e09a63;
  --sr-button-fg: #1f1b19;
}

/* Wider content column */
.md-grid { max-width: 1400px; }

/* Tighter vertical rhythm */
.md-typeset { font-size: 0.8rem; line-height: 1.6; }
.md-typeset h1 { margin-bottom: 0.6em; font-weight: 600; color: var(--md-default-fg-color); }
.md-typeset h2 { margin: 1.4em 0 0.5em; font-weight: 600; }
.md-typeset h3 { margin: 1.1em 0 0.4em; font-weight: 600; }
.md-typeset p, .md-typeset ul, .md-typeset ol { margin-top: 0.5em; margin-bottom: 0.5em; }
.md-typeset li { margin-bottom: 0.25em; }
.md-typeset .admonition, .md-typeset details { margin: 0.9em 0; }

/* Case studies read as the author's own voice */
.md-typeset .case-study {
  border-left: 3px solid var(--md-accent-fg-color);
  background: var(--sr-tint);
  padding: 0.4em 1.1em;
  border-radius: 0 6px 6px 0;
}

/* Two-column "AI can / only a person can" panel */
.md-typeset .two-roads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0.8em 0;
}
.md-typeset .two-roads > div {
  border: 1px solid var(--sr-rule);
  border-radius: 8px;
  padding: 0.3em 1em 0.5em;
}
.md-typeset .two-roads h3 { margin-top: 0.5em; font-size: 0.85rem; }
@media (max-width: 700px) {
  .md-typeset .two-roads { grid-template-columns: 1fr; }
}

/* Take-home line */
.md-typeset .take-home {
  font-size: 0.92rem;
  font-weight: 500;
  border-top: 1px solid var(--sr-rule);
  border-bottom: 1px solid var(--sr-rule);
  padding: 0.6em 0;
  margin: 1.2em 0;
}

.md-typeset .quiet { color: var(--sr-quiet); }

/* Tables */
.md-typeset table:not([class]) { font-size: 0.74rem; }

/* Workbook: fill-in tables */
.md-typeset .workbook { margin: 0.6em 0 1.1em; }
.md-typeset .workbook .md-typeset__scrollwrap { margin: 0; }
.md-typeset .workbook .md-typeset__table { display: block; padding: 0; }
.md-typeset .workbook table:not([class]) { display: table; width: 100%; table-layout: auto; margin: 0; }
.md-typeset .workbook th { vertical-align: bottom; }
.md-typeset .workbook td { height: 2.3em; min-width: 5.5em; vertical-align: top; }
.md-typeset .workbook td[contenteditable] { cursor: text; }
.md-typeset .workbook td[contenteditable]:hover { background: var(--md-accent-fg-color--transparent); }
.md-typeset .workbook td[contenteditable]:focus { outline: 2px solid var(--md-accent-fg-color); outline-offset: -2px; background: var(--md-default-bg-color); }
.md-typeset .workbook td.wb-label { font-weight: 600; background: var(--sr-tint); width: 30%; }
.md-typeset .workbook.labels table:not([class]) th:first-child { width: 30%; }
.wb-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.6em 0 1em; padding: 0.6em 0.8em; border: 1px solid var(--sr-rule); border-radius: 8px; background: var(--sr-tint); }
.wb-toolbar button, .md-typeset .wb-add {
  border: 1px solid var(--md-accent-fg-color);
  background: none;
  color: var(--md-default-fg-color);
  border-radius: 6px;
  padding: 0.3em 0.85em;
  cursor: pointer;
  font-size: 0.7rem;
}
.wb-toolbar button.primary { background: var(--sr-button); border-color: var(--sr-button); color: var(--sr-button-fg); }
.md-typeset .wb-add { margin-top: 0.4em; font-size: 0.66rem; padding: 0.2em 0.7em; }
.wb-status { color: var(--sr-quiet); font-size: 0.68rem; }
.wb-profile { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.8rem; margin: 0.6em 0; }
.wb-profile label { display: flex; flex-direction: column; gap: 0.25em; font-size: 0.72rem; font-weight: 600; }
.wb-profile input { font: inherit; font-weight: 400; padding: 0.4em 0.55em; border: 1px solid var(--sr-rule); border-radius: 6px; background: var(--md-default-bg-color); color: var(--md-default-fg-color); }
.wb-profile input:focus { outline: 2px solid var(--md-accent-fg-color); outline-offset: 0; }

/* Print: the page itself, with folded answers opened and workbook tables ruled for handwriting */
@media print {
  .md-header, .md-tabs, .md-sidebar, .md-footer, .md-source, .md-search, .headerlink, .md-top, .wb-toolbar, .wb-add, .lab-controls { display: none !important; }
  .md-main__inner { margin: 0; }
  .md-content { max-width: 100%; }
  .md-typeset details { display: block; }
  .md-typeset details > *:not(summary) { display: block !important; }
  .md-typeset .workbook table:not([class]) { font-size: 9pt; border-collapse: collapse; }
  .md-typeset .workbook th, .md-typeset .workbook td { border: 1px solid #888 !important; }
  .md-typeset .workbook td { height: 2.8em; background: none !important; }
  .md-typeset .workbook td.wb-label { background: #f2f2f2 !important; }
  .md-typeset .workbook tr { break-inside: avoid; }
}

/* Interactive lab */
.lab-table-wrap { overflow-x: auto; border: 1px solid var(--sr-rule); border-radius: 8px; }
.lab-table { border-collapse: collapse; font-size: 0.68rem; width: 100%; }
.lab-table th, .lab-table td { border-bottom: 1px solid var(--sr-rule); padding: 0.3em 0.45em; text-align: left; white-space: nowrap; }
.lab-table th { position: sticky; top: 0; background: var(--md-default-bg-color); font-weight: 600; }
.lab-table td.cell { cursor: pointer; }
.lab-table td.cell:hover { background: var(--md-accent-fg-color--transparent); }
.lab-table td.flagged { outline: 2px solid var(--md-accent-fg-color); outline-offset: -2px; background: var(--md-accent-fg-color--transparent); }
.lab-table td.hit { background: rgba(46, 125, 50, 0.16); }
.lab-table td.missed { background: rgba(198, 120, 0, 0.18); }
.lab-table td.extra { background: rgba(120, 120, 120, 0.15); text-decoration: line-through; }
.lab-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.8em 0; align-items: center; }
.lab-controls button {
  border: 1px solid var(--md-accent-fg-color);
  background: none;
  color: var(--md-default-fg-color);
  border-radius: 6px;
  padding: 0.35em 0.9em;
  cursor: pointer;
  font-size: 0.72rem;
}
.lab-controls button.primary { background: var(--sr-button); border-color: var(--sr-button); color: var(--sr-button-fg); }
.lab-status { color: var(--sr-quiet); font-size: 0.72rem; }
.lab-feedback li { margin-bottom: 0.4em; }
.lab-key { display: inline-block; padding: 0 0.4em; border-radius: 4px; margin-right: 0.3em; font-size: 0.68rem; }
.lab-key.hit { background: rgba(46, 125, 50, 0.16); }
.lab-key.missed { background: rgba(198, 120, 0, 0.18); }
.lab-key.extra { background: rgba(120, 120, 120, 0.15); }

/* Staircase figure */
.md-typeset figure.staircase { display: block; width: 100%; max-width: 760px; margin: 1.2em 0; }
.md-typeset figure.staircase svg { display: block; width: 100%; height: auto; }
.md-typeset figure.staircase figcaption { color: var(--sr-quiet); font-size: 0.72rem; max-width: none; margin: 0.4em 0 0; text-align: left; }

/* Home page */
.md-typeset .sr-hero { padding: 1.4em 0 1.2em; border-bottom: 1px solid var(--sr-rule); margin-bottom: 1.4em; }
.md-typeset .sr-hero h1 { font-size: 2.4rem; margin: 0.1em 0 0.15em; letter-spacing: -0.01em; }
.md-typeset .sr-kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.68rem; color: var(--md-accent-fg-color); margin: 0; font-weight: 600; }
.md-typeset .sr-subtitle { font-size: 1.05rem; margin: 0 0 0.3em; }
.md-typeset .sr-cover { color: var(--sr-quiet); font-style: italic; margin: 0 0 1.1em; }
.md-typeset .sr-hero .md-button { margin: 0.2em 0.5em 0.2em 0; }
.md-typeset .sr-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 2rem; }
@media (max-width: 760px) { .md-typeset .sr-parts { grid-template-columns: 1fr; } }
.md-typeset .sr-parts ol { padding-left: 0.4em; margin-left: 1.6em; }
.md-typeset .workbook.wb-form thead { display: none; }
@media print { .md-typeset .workbook.wb-form thead { display: none; } }
.md-typeset .sr-parts h3 { margin-top: 0.6em; font-size: 0.85rem; color: var(--md-accent-fg-color); }
.md-typeset .sr-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.8rem; margin: 0.8em 0; }
.md-typeset .sr-cards > div { border: 1px solid var(--sr-rule); border-radius: 8px; padding: 0.2em 1em 0.4em; background: var(--sr-tint); }

/* Chapter figures */
.md-typeset figure.sr-figure { display: block; width: 100%; margin: 1.2em 0; }
.md-typeset figure.sr-figure svg { display: block; width: 100%; height: auto; }
.md-typeset figure.sr-figure figcaption { color: var(--sr-quiet); font-size: 0.72rem; font-style: normal; max-width: none; margin: 0.4em 0 0; text-align: left; }
.md-typeset figure.staircase figcaption { font-style: normal; }
.md-typeset .sr-byline { margin: 0 0 1.1em; font-weight: 600; }
@media print { .md-typeset figure.sr-figure, .md-typeset figure.staircase { break-inside: avoid; } }

/* Prompts and other long text blocks wrap instead of scrolling sideways. */
.md-typeset pre > code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
