:root {
  --bg: #fffdf5;
  --surface: #ffffff;
  --ink: #1f2419;
  --muted: #5b6350;
  --line: #e8e4d4;
  --banana: #f5c518;
  --banana-deep: #d9a400;
  --banana-soft: #fdf3c8;
  --green: #2e7d43;
  --red: #b3392e;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
a { color: #8a6d00; }
a:hover { color: #6b5500; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }

header.site {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { font-weight: 800; font-size: 17px; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, #ffe14d, var(--banana-deep)); display: inline-block; }
nav.top { display: flex; gap: 18px; font-size: 14px; flex-wrap: wrap; }
nav.top a { text-decoration: none; color: var(--muted); }
nav.top a:hover { color: var(--ink); }
@media (max-width: 640px) { nav.top { display: none; } }

.hero { padding: 44px 0 10px; text-align: center; }
.hero h1 { font-size: clamp(26px, 5vw, 42px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.5px; }
.hero h1 .hl { background: linear-gradient(transparent 62%, var(--banana) 62%); }
.hero p.sub { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 auto 8px; }
.badge-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 14px 0 0; }
.badge { font-size: 12.5px; background: var(--banana-soft); border: 1px solid #f0e3a0; color: #6b5500; padding: 3px 10px; border-radius: 999px; }

main { padding: 26px 0 60px; }
h2 { font-size: 24px; margin: 40px 0 10px; letter-spacing: -0.3px; }
h3 { font-size: 18px; margin: 26px 0 8px; }
p { margin: 8px 0; }
.lead { color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 14px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* Playground */
.pg { background: var(--surface); border: 2px solid var(--banana); border-radius: 18px; padding: 20px; box-shadow: 0 6px 24px rgba(217,164,0,0.10); }
.pg .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
textarea#prompt {
  width: 100%; min-height: 96px; padding: 12px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 10px; resize: vertical; background: #fffef9;
}
textarea#prompt:focus { outline: 2px solid var(--banana); }
label.fld { font-size: 13px; color: var(--muted); display: block; margin-bottom: 3px; }
select, input[type="password"], input[type="text"] {
  padding: 8px 10px; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-family: inherit;
}
.btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none; text-align: center;
  background: linear-gradient(135deg, #ffdf4d, var(--banana-deep)); color: #3d2f00;
  font-weight: 700; font-size: 15px; padding: 11px 22px; border-radius: 10px;
  box-shadow: 0 2px 0 #b8860b;
}
.btn:hover { filter: brightness(1.04); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.ghost { background: #fff; border: 1px solid var(--line); box-shadow: none; font-weight: 600; color: var(--ink); }
.btn.small { font-size: 13px; padding: 7px 12px; }

#keybox { background: #fbf7e6; border: 1px dashed #e3d28a; border-radius: 10px; padding: 12px 14px; margin: 12px 0; font-size: 14px; }
#keybox .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
#keybox input { flex: 1 1 260px; }
.hint { font-size: 12.5px; color: var(--muted); }

.drop {
  border: 2px dashed var(--line); border-radius: 10px; padding: 14px; text-align: center;
  color: var(--muted); font-size: 14px; background: #fffef9; margin-top: 10px;
}
.drop.has { border-color: var(--green); color: var(--green); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumbs .th { position: relative; }
.thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.thumbs button { position: absolute; top: -7px; right: -7px; border: none; background: var(--red); color: #fff; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; font-size: 11px; line-height: 1; }

.status { margin-top: 12px; font-size: 14px; }
.status.err { color: var(--red); }
.status.ok { color: var(--green); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--banana); border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

#results { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
#results figure { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
#results img { width: 100%; display: block; }
#results figcaption { padding: 8px 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }

/* Tables */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { background: var(--banana-soft); font-size: 13px; text-transform: uppercase; letter-spacing: 0.4px; }
.tbl tr:last-child td { border-bottom: none; }
.tbl code, code.inl { background: #f6f2df; border-radius: 5px; padding: 1px 6px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
pre.code { background: #22261b; color: #e8e4d0; padding: 16px; border-radius: 10px; overflow-x: auto; font-size: 13px; line-height: 1.55; }
pre.code code { background: none; padding: 0; color: inherit; }

/* Prompt cards */
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 10px 0; }
.pcard p { margin: 6px 0 10px; font-size: 14.5px; }
.pcard .meta { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.pcard .acts { display: flex; gap: 8px; }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 8px 0; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 15px; }
.faq details[open] summary { margin-bottom: 6px; }

.callout { background: var(--banana-soft); border: 1px solid #f0e3a0; border-radius: 12px; padding: 14px 16px; font-size: 14.5px; }
.pill-yes { color: var(--green); font-weight: 700; }
.pill-no { color: var(--red); font-weight: 700; }

footer.site { border-top: 1px solid var(--line); background: var(--surface); padding: 22px 0 34px; font-size: 13.5px; color: var(--muted); }
footer.site nav { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.foot-note { margin-top: 10px; font-size: 12.5px; }
