/* CodePlate: a table set for your agent. Light blue china, navy ink, a gingham cloth. */
:root {
  --bg: #f5f8fc;
  --surface: #ffffff;
  --surface-2: #eef4fb;
  --line: #dbe5f0;
  --text: #14284b;
  --muted: #55657f;
  --blue: #7cb6e2;
  --blue-soft: #d9ebf8;
  --blue-deep: #2f74b5;
  --steel: #9aa5b3;
  --ok: #1f8a5b;
  --cloth: rgba(124, 182, 226, 0.11);
  --shadow: 0 1px 2px rgba(20, 40, 75, 0.05), 0 10px 30px rgba(20, 40, 75, 0.07);
  --radius: 18px;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1729;
    --surface: #13223b;
    --surface-2: #1a2c4a;
    --line: rgba(160, 200, 235, 0.14);
    --text: #eaf2fb;
    --muted: #9fb2cc;
    --blue: #8cc4ec;
    --blue-soft: rgba(124, 182, 226, 0.16);
    --blue-deep: #8cc4ec;
    --ok: #6be3a4;
    --cloth: rgba(124, 182, 226, 0.045);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--blue-soft); padding: 0.1em 0.4em; border-radius: 6px; }
pre { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow-x: auto; }
pre code { background: none; padding: 0; font-size: 0.85em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 56px 24px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); margin: 0.2em 0 0.35em; }
h1 em, h2 em { font-style: normal; color: var(--blue-deep); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 0.8em; }
h3 { font-size: 1.15rem; margin: 0 0 0.4em; }
.eyebrow { color: var(--blue-deep); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; margin: 0; }
.lede { color: var(--muted); font-size: 1.18rem; max-width: 40em; }
.fine { color: var(--muted); font-size: 0.9rem; }

/* Header and footer */
.top { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { transition: transform 0.5s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover img { transform: rotate(-8deg); }
.brand .plate { color: var(--blue); }
@media (prefers-color-scheme: light) { .brand .plate { color: #5ea6dc; } }
.top nav a, .foot nav a { color: var(--muted); margin-left: 22px; font-size: 0.95rem; }
.top nav a:hover, .foot nav a:hover { color: var(--text); text-decoration: none; }
.foot { border-top: 1px solid var(--line); margin-top: 40px; background: var(--surface); }
.foot-row { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; padding-bottom: 40px; color: var(--muted); font-size: 0.9rem; flex-wrap: wrap; gap: 12px; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot nav a:first-child { margin-left: 0; }

/* Place-setting divider: fork, plate, knife */
.setting { display: flex; align-items: center; gap: 16px; color: var(--steel); max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.setting::before, .setting::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.setting svg { width: 72px; height: 24px; }

/* Buttons */
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 10px; }
.button { display: inline-flex; flex-direction: column; align-items: flex-start; background: var(--blue); color: #0f2242; font-weight: 700; padding: 13px 24px; border-radius: 999px; box-shadow: inset 0 -3px 0 rgba(20, 60, 110, 0.18), 0 8px 24px rgba(94, 166, 220, 0.35); transition: transform 0.15s ease, filter 0.15s ease; }
.button:hover { text-decoration: none; filter: brightness(1.05); transform: translateY(-1px); }
.button .sub { font-weight: 500; font-size: 0.8rem; opacity: 0.75; }
.button.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow); }

/* Hero, on a gingham tablecloth */
.hero {
  padding: 72px 0 56px;
  background:
    repeating-linear-gradient(90deg, var(--cloth) 0 28px, transparent 28px 56px),
    repeating-linear-gradient(0deg, var(--cloth) 0 28px, transparent 28px 56px);
  border-bottom: 1px solid var(--line);
  -webkit-mask: linear-gradient(#000 85%, transparent);
  mask: linear-gradient(#000 85%, transparent);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }

/* The chat, printed on a kitchen order ticket */
.ticket-wrap { filter: drop-shadow(0 18px 30px rgba(20, 40, 75, 0.16)); transform: rotate(1.2deg); }
.chat {
  background: var(--surface);
  padding: 22px 22px 34px;
  display: flex; flex-direction: column; gap: 12px;
  border-radius: 6px 6px 0 0;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 18px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 18px 100%;
}
.ticket-head { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 2px dashed var(--line); padding-bottom: 10px; margin-bottom: 4px; }
.ticket-head strong { color: var(--text); }
.msg { border-radius: 14px; padding: 11px 14px; font-size: 0.95rem; line-height: 1.5; }
.msg .who { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.msg.user { background: var(--blue-soft); align-self: flex-end; max-width: 92%; }
.msg.agent { background: var(--surface-2); max-width: 92%; }
.ticket-foot { font-family: var(--mono); font-size: 0.78rem; color: var(--ok); text-transform: uppercase; letter-spacing: 0.08em; text-align: center; border-top: 2px dashed var(--line); padding-top: 10px; margin-top: 4px; }

/* Features and steps */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feature p { color: var(--muted); margin: 0; font-size: 0.96rem; }
.feature .icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 5px var(--line); color: var(--blue-deep); margin-bottom: 12px; }
.feature .icon svg { width: 20px; height: 20px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.steps p { color: var(--muted); margin: 0; font-size: 0.96rem; }
/* Step numbers sit on little plates */
.steps .n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle, var(--blue) 0 54%, #5a98cf 55% 58%, #a9d3f2 59%); color: #0f2242; font-weight: 800; margin-bottom: 12px; box-shadow: 0 4px 10px rgba(47, 116, 181, 0.25); }
.course { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 700; display: block; margin-bottom: 2px; }

/* Cards: each template served on a plate */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; color: var(--text); box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(47, 116, 181, 0.18); text-decoration: none; }
.cover { padding: 14px 14px 0; }
.cover .rim { aspect-ratio: 16 / 10; overflow: hidden; border-radius: 16px; background: var(--surface-2); box-shadow: 0 0 0 5px var(--blue-soft), 0 0 0 6px var(--line); margin: 6px; }
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 0.4s ease; }
.card:hover .cover img { transform: scale(1.04); }
.card-body { padding: 16px 20px 22px; }
.card-body p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.card-meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 0.82rem; margin-bottom: 8px; flex-wrap: wrap; }
.pill { background: var(--blue-soft); color: var(--blue-deep); padding: 2px 10px; border-radius: 999px; text-transform: capitalize; font-weight: 600; }
.free { color: var(--ok); font-weight: 700; margin-left: auto; }
.coming { border: 2px dashed var(--line); border-radius: 24px; padding: 28px; color: var(--muted); display: flex; gap: 18px; align-items: center; }
.coming svg { width: 64px; height: 64px; flex: none; }
.coming h3 { color: var(--text); }
.coming p { margin: 0; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 10px; max-width: 820px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

/* Template page */
.page-head { padding-bottom: 0; }
.tpl-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gallery figure { margin: 0; border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 5px var(--surface), 0 0 0 6px var(--line), var(--shadow); }
.start { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.start h2 { font-size: 1.25rem; margin-bottom: 0.4em; }
.start ol { color: var(--muted); padding-left: 1.2em; margin: 0 0 14px; }
.prompt { position: relative; background: var(--surface-2); border-radius: 12px; padding: 14px 16px; padding-right: 84px; }
.prompt p { margin: 0; font-size: 0.95rem; }
.copy { position: absolute; top: 10px; right: 10px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.82rem; cursor: pointer; }
.copy:hover { border-color: var(--blue); }
.hash { font-size: 0.78rem; }
.tested { margin-top: 16px; border-left: 3px solid var(--ok); padding: 6px 14px; color: var(--muted); font-size: 0.95rem; }
.tested strong { color: var(--ok); }
.readme { max-width: 820px; }
.readme h2 { margin-top: 1.4em; }
.readme li { margin: 0.3em 0; }
.readme blockquote { margin: 1em 0; padding: 12px 18px; background: var(--surface); border-left: 3px solid var(--blue); border-radius: 0 12px 12px 0; color: var(--muted); }
.readme blockquote p { margin: 0; }
.agent-box { max-width: 820px; color: var(--muted); }
.agent-box code { word-break: break-all; }
.narrow { max-width: 760px; }

/* Empty plate (404) */
.empty { text-align: center; padding: 80px 24px; }
.empty svg { width: min(320px, 80vw); height: auto; margin: 0 auto 12px; }
.empty .lede { margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@media (max-width: 860px) {
  .hero-grid, .tpl-head { grid-template-columns: 1fr; }
  .features, .steps { grid-template-columns: 1fr; }
  .top nav a { margin-left: 14px; }
  .hero { padding-top: 40px; }
  .section { padding: 40px 16px; }
  .wrap, .setting { padding: 0 16px; }
  .ticket-wrap { transform: none; }
}
@media (max-width: 420px) {
  .top nav a:nth-child(3) { display: none; }
  .brand span { font-size: 1.05rem; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .coming { flex-direction: column; align-items: flex-start; }
}
