:root {
  --paper: #f6f1e7;
  --paper-2: #efe6d6;
  --ink: #2b211a;
  --ink-2: #5d4b3c;
  --wood: #6b4a2b;
  --wood-light: #d9c3a5;
  --orange: #e3772b;
  --orange-soft: #f3b07a;
  --moss: #6f7d4f;
  --shadow: 0 1px 2px rgba(43, 33, 26, .08), 0 8px 24px rgba(43, 33, 26, .08);
  --radius: 14px;
  --display: "Fraunces", Georgia, serif;
  --body: "Nunito Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(227, 119, 43, .14), transparent 60%),
    repeating-linear-gradient(90deg, rgba(107, 74, 43, .025) 0 2px, transparent 2px 38px),
    var(--paper);
  line-height: 1.5;
}
a { color: var(--wood); }
main { max-width: 1080px; margin: 0 auto; padding: 0 20px 60px; }

.top {
  max-width: 1080px; margin: 0 auto; padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: -.01em; }
.top nav { display: flex; gap: 18px; }
.top nav a { text-decoration: none; color: var(--ink-2); font-weight: 600; }
.top nav a:hover { color: var(--orange); }

.top nav { align-items: center; }
.top nav a.cta { color: var(--ink); background: var(--orange); padding: 7px 14px; border-radius: 999px; }
.top nav a.cta:hover { color: var(--ink); background: var(--orange-soft); }

h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -.015em; line-height: 1.1; margin: 0 0 10px; }
.sub { color: var(--ink-2); margin: 0 0 22px; font-size: 1.05rem; }
section { padding: 56px 0 8px; }
.band { padding-top: 64px; }
:where(a, button, summary):focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.hero { padding: 40px 0 10px; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 5.6vw, 4rem); line-height: 1.02; letter-spacing: -.025em; margin: 0 0 16px; }
.hero p { font-size: 1.15rem; color: var(--ink-2); margin: 0; max-width: 34em; }
.hero-stage { width: 100%; aspect-ratio: 2 / 1; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--paper-2); display: block; margin-top: 26px; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px !important; }
.button { display: inline-block; text-decoration: none; font-weight: 700; padding: 11px 20px; border-radius: 999px; border: 1px solid var(--wood); color: var(--wood); background: #fffdf8; }
.button.primary { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.button:hover { background: var(--paper-2); }
.button.primary:hover { background: var(--orange-soft); border-color: var(--orange-soft); }
@media (min-width: 900px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; align-items: center; }
  .hero-stage { margin-top: 0; }
}

.prompts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
@media (min-width: 900px) {
  .ask { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 36px; align-items: start; }
  .ask > div:first-child { position: sticky; top: 24px; }
  .prompts { flex-direction: column; align-items: flex-start; }
}
.prompts button { font: inherit; font-size: .95rem; text-align: left; padding: 8px 14px; border-radius: 16px; border: 1px solid var(--wood-light); background: #fffdf8; color: var(--ink-2); cursor: pointer; max-width: 100%; }
.prompts button:hover { border-color: var(--orange); }
.prompts button[aria-selected=true] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chat { background: #fffdf8; border: 1px solid rgba(107, 74, 43, .14); border-radius: 20px; box-shadow: var(--shadow); padding: 18px; }
.said { margin: 0 0 14px auto; width: fit-content; max-width: 80%; background: var(--paper-2); padding: 10px 14px; border-radius: 18px 18px 4px 18px; }
.chat iframe { display: block; width: 100%; height: 520px; border: 0; color-scheme: light; transition: height .2s; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tile { font: inherit; color: inherit; text-align: left; cursor: pointer; background: #fffdf8; border: 1px solid rgba(107, 74, 43, .14); border-radius: var(--radius); padding: 10px 10px 12px; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile:hover { transform: translateY(-2px); border-color: var(--orange-soft); }
.tile canvas { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; background: var(--paper-2); display: block; margin-bottom: 8px; }
.tile b { font-family: var(--display); font-weight: 600; font-size: 1.1rem; padding: 0 4px; }
.tile small { color: var(--wood); font-size: .82rem; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: rgba(227, 119, 43, .12); color: #a8521a; white-space: nowrap; }
.pill.low { background: rgba(111, 125, 79, .14); color: #55613a; }

.url { display: flex; gap: 8px; align-items: center; max-width: 680px; margin: 0 0 24px; }
.url code { flex: 1; min-width: 0; overflow-wrap: anywhere; background: var(--ink); color: var(--paper); padding: 12px 14px; border-radius: 10px; font-size: .95rem; }
.url button { font: inherit; font-weight: 700; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--wood); background: #fffdf8; color: var(--wood); cursor: pointer; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cols > div { background: #fffdf8; border: 1px solid rgba(107, 74, 43, .14); border-radius: var(--radius); padding: 16px 18px; }
.cols h3 { font-family: var(--display); font-weight: 600; font-size: 1.15rem; margin: 0 0 8px; }
.cols ol { margin: 0; padding-left: 20px; color: var(--ink-2); }
.cols li { margin: 4px 0; }
.cols pre + pre { margin-top: 8px; }
pre { max-width: 100%; background: var(--ink); color: var(--paper); padding: 10px 12px; border-radius: 10px; overflow: auto; font-size: .8rem; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

dialog { overscroll-behavior: contain; border: 0; border-radius: 18px; padding: 0; max-width: 760px; width: calc(100% - 32px); background: #fffdf8; color: var(--ink); box-shadow: 0 30px 80px rgba(43, 33, 26, .3); }
dialog::backdrop { background: rgba(43, 33, 26, .45); backdrop-filter: blur(2px); }
dialog article { padding: 28px 30px 30px; }
dialog .head { display: flex; align-items: baseline; gap: 12px; padding-right: 44px; }
dialog h2 { font-family: var(--display); font-weight: 700; font-size: 2rem; margin: 0; letter-spacing: -.01em; }
dialog .facts { color: var(--wood); font-size: .95rem; margin: 4px 0 0; }
.mm-card { max-width: 62ch; }
.mm-line { margin: 14px 0 0; color: var(--ink-2); }
.mm-line b { display: inline-block; min-width: 3.4em; margin-right: 6px; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--wood); }
.mm-steps { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: step; }
.mm-steps li { counter-increment: step; position: relative; padding: 0 0 0 38px; margin: 10px 0; font-size: 1.05rem; line-height: 1.45; }
.mm-steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: var(--ink); font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
.mm-more { margin-top: 18px; border-top: 1px dashed rgba(107, 74, 43, .2); padding-top: 12px; font-size: .92rem; color: var(--ink-2); }
.mm-more summary { cursor: pointer; font-weight: 700; color: var(--wood); }
.mm-more h4 { margin: 12px 0 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--wood); }
.mm-more ul { margin: 0; padding-left: 20px; }
.mm-more li { margin: 3px 0; }
.mm-more .safety li { color: #9a4a12; }
.mm-src { margin: 12px 0 0; font-size: .85rem; }
dialog .close { position: sticky; top: 12px; float: right; margin: -14px -16px 0 8px; z-index: 1; box-shadow: 0 1px 2px rgba(43, 33, 26, .15); border: 0; background: var(--paper); border-radius: 999px; width: 36px; height: 36px; font-size: 1.1rem; cursor: pointer; }
dialog .close:hover { background: var(--paper-2); }
dialog h2:focus { outline: none; }
.demo { margin: 16px 0 4px; position: relative; }
.demo canvas { width: 100%; height: auto; aspect-ratio: 2.2 / 1; max-height: 340px; border-radius: 12px; background: var(--paper-2); display: block; }
.demo .bar { position: absolute; inset: 10px 10px auto 10px; display: flex; gap: 8px; align-items: center; font-size: .78rem; color: var(--ink-2); pointer-events: none; }
.demo .bar span { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--wood); opacity: .75; }
.demo .bar :is(button, a) { pointer-events: auto; white-space: nowrap; flex: none; font: inherit; font-size: .8rem; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--wood-light); background: rgba(255, 253, 248, .85); color: var(--ink-2); cursor: pointer; text-decoration: none; }

footer { max-width: 1080px; width: calc(100% - 40px); margin: 40px auto 0; padding: 20px 0; color: #6f5b4a; font-size: .85rem; border-top: 1px solid rgba(107, 74, 43, .12); }
footer a { color: var(--wood); }

@media (max-width: 640px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .top nav a:not(.cta) { display: none; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile b { font-size: 1rem; }
  .tile small { display: none; }
  .chat { padding: 12px; border-radius: 16px; }
  .url code { font-size: .78rem; overflow-wrap: normal; white-space: nowrap; overflow-x: auto; }
  dialog { width: 100%; max-width: none; margin: auto 0 0; max-height: 92vh; border-radius: 18px 18px 0 0; }
  dialog article { padding: 20px 18px 28px; }
  dialog h2 { font-size: 1.6rem; }
  dialog .close { margin: -8px -6px 0 8px; }
  .mm-steps li { font-size: 1rem; }
}
