:root {
  color-scheme: dark;
  --ground: #141312;
  --surface: #1e1d1b;
  --card: #282624;
  --line: #3c3835;
  --ink: #f5eee6;
  --mute: #c2b8ae;
  --petal: #f1bc99;
  --round: 14px;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--ground);
}
* { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  margin: 0;
  background: radial-gradient(ellipse at 50% -12%, #342923 0, transparent 47rem);
  font-size: 15px;
  line-height: 1.5;
}
button, input, textarea, select { font: inherit; }
button, summary, a { touch-action: manipulation; }
button, summary { cursor: pointer; }
button { user-select: none; -webkit-user-select: none; }
button {
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: .52rem .85rem;
  line-height: 1.32;
  -webkit-tap-highlight-color: transparent;
}
button:active:not(:disabled) { background-color: #3e352f; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, a:focus-visible, summary:focus-visible, .table-scroll:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--petal);
  outline-offset: 3px;
}
a { color: var(--petal); text-underline-offset: .22em; }
svg { flex-shrink: 0; }
button svg, .symbol svg {
  display: block; width: 1.35rem; height: 1.35rem; fill: none;
  stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.shell {
  width: min(100%, 1040px);
  min-width: 0;
  margin: 0 auto;
  padding: max(clamp(16px, 3vw, 36px), env(safe-area-inset-top, 0px))
    max(20px, env(safe-area-inset-right, 0px))
    max(40px, env(safe-area-inset-bottom, 0px))
    max(20px, env(safe-area-inset-left, 0px));
}
header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: clamp(12px, 2.2vw, 22px); min-width: 0; }
.brand > div { min-width: 0; overflow-wrap: anywhere; }
.brand img {
  flex: none;
  width: clamp(62px, 8vw, 84px); height: auto; aspect-ratio: 1;
  object-fit: cover; border-radius: 22%; box-shadow: 0 2px 18px #0003;
}
.brand small {
  display: block; text-transform: uppercase; font-size: 10px; font-weight: 650;
  letter-spacing: .13em; color: var(--petal); margin-bottom: 2px;
}
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: clamp(31px, 4vw, 47px); line-height: 1.06; font-weight: 620; letter-spacing: -.045em; }
.brand p { margin-top: 6px; color: var(--mute); font-size: clamp(12px, 1.8vw, 15px); }
h2 { font-size: clamp(20px, 2.6vw, 25px); line-height: 1.24; font-weight: 620; letter-spacing: -.028em; }
h3 { font-size: 18px; line-height: 1.35; letter-spacing: -.015em; }
.tabs {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  margin: 22px 0 24px; padding: 4px; border: 1px solid var(--line);
  border-radius: 13px; background: #191817;
}
.tabs button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 0; min-height: 44px; padding: 7px 3px; color: var(--mute);
  border-color: transparent; background: transparent; font-weight: 600;
}
.tabs button svg { width: 16px; height: 16px; }
.tabs button.active, .tabs button[aria-selected="true"],
.tabs button[aria-current="page"] {
  color: #f7d5bd; background: #342c27; border-color: #514036;
}
main { min-width: 0; }
.heading {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin: 22px 0 11px;
}
.heading > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
main > :first-child { margin-top: 0; }
.path {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 10px; border-radius: 17px;
  background: #181715; border: 1px solid #302c29;
}
.stage, .direction {
  width: 100%; display: grid; grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center; gap: 14px; text-align: start; position: relative;
  border: 1px solid transparent; border-radius: 11px;
}
.stage {
  min-height: 62px; padding: 9px 17px 9px 12px;
  background: linear-gradient(100deg, #302a26, #272522 58%);
}
.stage + .stage::before {
  content: ""; position: absolute; height: 9px; left: 31px; top: -11px;
  border-left: 1px solid #796355;
}
.symbol { display: inline-grid; place-items: center; color: var(--petal); }
.stage .symbol { width: 37px; height: 37px; background: #42352d; border-radius: 10px; }
.copy { min-width: 0; overflow-wrap: anywhere; }
.copy strong { display: block; font-size: 15px; font-weight: 620; }
.copy small { display: block; color: var(--mute); font-size: 12px; margin-top: 3px; line-height: 1.4; }
.arrow { color: #c2a892; font-size: 19px; }
.directions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.direction {
  min-height: 76px; padding: 12px 14px; gap: 12px;
  border-color: var(--line); background: var(--surface);
}
.direction .symbol { color: #d1b9a4; }
.direction .arrow { font-size: 15px; align-self: start; }
.panel, dialog {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--round);
}
.panel { padding: clamp(15px, 2.3vw, 23px); min-width: 0; }
.panel + .panel, .panel + .actions { margin-top: 12px; }
.panel .heading:first-child { margin-top: 0; }
.stack, form { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 13px; }
.stack > .panel + .panel { margin: 0; }
.row, .actions, .chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.actions { justify-content: flex-start; }
.chips { margin: 0 0 16px; }
.chips button { max-width: 100%; border-radius: 99px; font-size: 13px; }
.chips .active, button[aria-pressed="true"] { border-color: #8f6850; background-color: #3a2f27; color: #f5c8a9; }
button.primary, .primary {
  font-weight: 650; color: #2b211a; border-color: transparent; background: #e9b995;
}
.muted, .panel small { color: var(--mute); }
label { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 5px; font-weight: 580; color: #ddd5cc; }
input:not([type="checkbox"]), select, textarea {
  display: block; width: 100%; min-width: 0; padding: 10px 12px;
  border: 1px solid #58504a; border-radius: 8px; background: #171615; color: var(--ink);
  font-size: 16px; font-weight: 400;
}
textarea { min-height: 88px; resize: vertical; }
input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--petal); flex: none; margin: 0; }
.task {
  display: flex; align-items: flex-start; gap: 11px; padding: 10px 0;
  border-bottom: 1px solid var(--line); font-weight: 400; cursor: pointer;
}
.task:last-child { border-bottom: 0; }
.task input { margin-top: 2px; }
.task span { min-width: 0; overflow-wrap: anywhere; }
.task:has(:checked) { color: var(--mute); text-decoration: line-through; }
.track { padding: 13px 0; min-width: 0; overflow-wrap: anywhere; }
.track + .track { border-top: 1px solid var(--line); }
dialog {
  width: min(620px, calc(100% - 28px)); max-height: min(85dvh, 850px);
  min-width: 0;
  overflow-y: auto; overscroll-behavior: contain; padding: clamp(16px, 3vw, 28px);
  color: var(--ink); box-shadow: 0 24px 90px #0008;
}
dialog::backdrop { background: #090807bf; }
dialog .heading { margin-top: 0; }
details { min-width: 0; max-width: 100%; }
summary { color: #ebcdb6; font-weight: 580; overflow-wrap: anywhere; }
.prose { width: 100%; min-width: 0; max-width: 100%; line-height: 1.65; color: #ded6cd; overflow-wrap: anywhere; }
.prose > * + * { margin-top: .8em; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); margin: 1.15em 0 .45em; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.table-block { width: 100%; min-width: 0; max-width: 100%; }
.table-hint { display: none; margin-bottom: 8px; color: var(--mute); font-size: 12px; }
.table-scroll, .table-wrap {
  /* Wide cells must not contribute to the width of the surrounding grid/details. */
  width: 100%; min-width: 0; max-width: 100%; contain: inline-size;
  overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: #8f6850 var(--surface);
  border: 1px solid var(--line); border-radius: 10px;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: start; }
th, td { padding: 10px 12px; vertical-align: top; border: 1px solid var(--line); min-width: 8rem; line-height: 1.5; }
th { color: var(--ink); background: #292622; }
[hidden] { display: none !important; }
@media (hover: hover) and (pointer: fine) {
  button:hover:not(:disabled) { border-color: #817064; background-color: #35302b; }
  .stage:hover, .direction:hover { border-color: #8b6b54; }
  button.primary:hover { background: #f5cba9; }
  a:hover, summary:hover { color: #ffdbbf; }
}
@media (min-width: 960px) {
  .directions { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .direction { grid-template-columns: minmax(0, 1fr) auto; align-content: start; gap: 7px; min-height: 92px; }
  .direction .symbol { justify-self: start; }
  .direction .copy { grid-row: 2; grid-column: 1 / -1; }
  .direction .arrow { grid-column: 2; grid-row: 1; }
}
@media (max-width: 560px) {
  .shell { padding: max(16px,env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) max(28px,env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px)); }
  header { align-items: start; gap: 10px; }
  h1 { font-size: clamp(26px, 7vw, 32px); }
  .brand img { width: 54px; border-radius: 13px; }
  .brand small { font-size: 9px; }
  .brand p { line-height: 1.45; }
  .tabs { margin: 16px 0 19px; gap: 1px; }
  .tabs button { font-size: 13px; gap: 4px; }
  .tabs button svg { width: 14px; }
  .path { padding: 7px; gap: 8px; }
  .stage { padding: 10px 9px; gap: 9px; }
  .stage .symbol { width: 31px; height: 33px; }
  .stage + .stage::before { left: 24px; height: 7px; top: -9px; }
  .direction { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-content: start; padding: 11px; }
  .direction .symbol { justify-self: start; }
  .direction .copy { grid-row: 2; grid-column: 1 / -1; }
  .direction .arrow { grid-column: 2; grid-row: 1; }
  .copy strong { font-size: 14px; }
  dialog { padding: 16px 16px max(16px, env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 650px) {
  .table-block--wide .table-hint { display: block; }
}
@media (pointer: coarse) {
  button { min-height: 44px; min-width: 44px; }
  summary { padding-block: 12px; }
}
