:root {
  color-scheme: light;
  --bg: #f7f4ea;
  --panel: #fffdf7;
  --panel-strong: #f1ead9;
  --border: #d5c6a0;
  --text: #2e2618;
  --muted: #746650;
  --accent: #8a3b12;
  --idle: #ddd4c1;
  --pretimer: #f3d47a;
  --posttimer: #d7863f;
  --shadow: 0 18px 40px rgba(54, 36, 12, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  background:
    radial-gradient(circle at top, rgba(255, 244, 215, 0.75), transparent 34%),
    linear-gradient(180deg, #fcfaf4 0%, var(--bg) 100%);
  color: var(--text);
}

main#quarto-document-content > header#title-block-header {
  display: none !important;
}

.page {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.hero,
.doc-section,
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 2rem;
  right: 2rem;
  bottom: 1.2rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(138, 59, 18, 0.4), rgba(138, 59, 18, 0.05));
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-weight: 700;
}

.intro,
.section-heading p,
.doc-section p,
.hint {
  color: var(--muted);
}

.intro-secondary {
  max-width: 54rem;
  margin-bottom: 0;
  font-size: 1rem;
}

.hero-section + .hero-section {
  margin-top: 1.4rem;
}

.hero-section h2 {
  margin-bottom: 0.65rem;
  font-size: 1.08rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-table-wrap {
  margin: 1rem 0 1.1rem;
  display: flex;
  justify-content: center;
}

.focus-status {
  margin: 0.6rem 0 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff8e7;
  display: inline-block;
}

.focus-status.is-active {
  color: #184c2c;
  background: #e6f4dd;
  border-color: #9dbf8c;
}

.demo-shell {
  margin-top: 1.5rem;
}

.section-heading {
  margin-bottom: 1rem;
}

.demo-tips {
  margin: 0 0 1.15rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid #e3d8bf;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbf8ef, #f5efe0);
  max-width: 720px;
  width: 100%;
}

.demo-tips h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  color: var(--accent);
}

.tips-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text);
  columns: 2;
  column-gap: 2rem;
}

.tips-list li + li {
  margin-top: 0.35rem;
}

.tips-list code {
  font-size: 0.92em;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  align-items: start;
}

.card {
  padding: 1.25rem;
}

.preview-panel {
  min-height: 140px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 2px solid var(--border);
  background: var(--panel-strong);
  transition: background-color 120ms linear, border-color 120ms linear, transform 120ms linear;
}

.preview-panel.idle {
  background: linear-gradient(135deg, #f3efe4, #ece2cc);
  border-color: var(--idle);
}

.preview-panel.pretimer {
  background: linear-gradient(135deg, #fff0b8, var(--pretimer));
  border-color: #d0a129;
}

.preview-panel.posttimer {
  background: linear-gradient(135deg, #f6bc7b, var(--posttimer));
  border-color: #a85413;
  transform: translateY(-1px);
}

.preview-text {
  font-size: clamp(2.4rem, 8vw, 4.5rem);
  line-height: 1;
  text-align: center;
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

textarea {
  width: 100%;
  min-height: 180px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  font-size: 1.05rem;
  color: var(--text);
  background: #fffefa;
  resize: vertical;
}

button {
  border: 1px solid #9f6a2f;
  border-radius: 999px;
  background: var(--accent);
  color: #fff8eb;
  padding: 0.55rem 0.9rem;
  font: inherit;
  cursor: pointer;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0;
}

.status-grid div {
  padding: 0.8rem;
  border-radius: 12px;
  background: #faf5e8;
  border: 1px solid #e5d8bb;
}

dt {
  font-size: 0.85rem;
  color: var(--muted);
}

dd {
  margin: 0.35rem 0 0;
  font-weight: 700;
}

.doc-section {
  margin-top: 1.5rem;
  padding: 1.5rem 1.75rem;
}

.table-wrap {
  overflow-x: auto;
}

.mapping-table {
  width: auto;
  max-width: 100%;
  border-collapse: collapse;
  background: #fffef9;
}

.mapping-table th,
.mapping-table td {
  padding: 0.38rem 0.34rem;
  border-bottom: 1px solid #e7dcc2;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  font-size: 0.9rem;
}

.mapping-table th {
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  color: #5d4f38;
  background: #f6efdf;
}

.mapping-table th[scope="row"] {
  text-align: left;
  width: 6.75rem;
  position: sticky;
  left: 0;
  z-index: 1;
}

.mapping-table td {
  min-width: 3.45rem;
}

.mapping-table tbody tr:first-child th,
.mapping-table tbody tr:first-child td {
  background: #f1e7cf;
}

.mapping-table tbody tr:nth-child(2) {
  background: #fcf8ee;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 1rem, 1080px);
    padding-top: 1rem;
  }

  .tips-list {
    columns: 1;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }
}
