/* Brand tokens mirror wedance.world app/globals.css (light theme). */
@font-face { font-family: "Space Mono"; src: url("/assets/space-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("/assets/space-mono-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --wd-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --wd-mono: "Space Mono", ui-monospace, Menlo, Consolas, monospace;
  --wd-bg: #ffffff; --wd-surface: #fff; --wd-surface-2: #f7f7f9; --wd-surface-3: #eceef3;
  --wd-border: #d9d9de; --wd-border-soft: #ececec;
  --wd-text: #1a1a1a; --wd-text-2: #6b6b6b; --wd-text-3: #9a9a9a;
  --wd-brand: #1d7a4f; --wd-brand-dark: #16603d; --wd-brand-soft: rgba(29,122,79,.12); --wd-brand-ink: #fff;
  --wd-brand-grad: linear-gradient(100deg, #27915f 0%, #1d7a4f 55%, #16603d 100%);
  --wd-danger: #e0245e; --wd-success: #1a7f37;
  --wd-ink: #1a1a1a;
  --r: 14px;
  --wd-logo-box: 21px; --wd-logo-h: 70px; /* wedance.world header: 21px link, 70px icon */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--wd-font); color: var(--wd-text); background: var(--wd-bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--wd-brand); }
code, pre, .eyebrow, .pill, .kv span, .brand-tag, th { font-family: var(--wd-mono); }
code { font-size: .88em; background: var(--wd-surface-2); padding: .1em .35em; border-radius: 6px; word-break: break-word; }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 12px clamp(16px, 4vw, 40px); background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--wd-border-soft); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--wd-text); }
.brand { height: var(--wd-logo-box); }
.brand .logo { height: var(--wd-logo-h); width: auto; object-fit: contain; }
.brand-tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--wd-text-2); border-left: 1px solid var(--wd-border); padding-left: 10px; }
.nav { display: flex; gap: 18px; margin-left: auto; }
.nav a { color: var(--wd-text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--wd-brand); }
.pill { font-size: .7rem; letter-spacing: .12em; padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.pill-test { background: var(--wd-brand-soft); color: var(--wd-brand); }
@media (max-width: 720px) { .nav { display: none; } .pill-test { margin-left: auto; } .brand-tag { display: none; } }

main { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; padding: clamp(40px, 8vw, 96px) 0 48px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; color: var(--wd-brand); margin: 0 0 12px; }
.lede { font-size: 1.15rem; color: var(--wd-text-2); max-width: 46ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-card { background: var(--wd-ink); color: #f0f2f5; border-radius: 22px; padding: 24px; box-shadow: 0 20px 60px rgba(29,122,79,.18); }
.hero-card code { background: rgba(255,255,255,.08); color: #fff; }
.kv { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid rgba(240,242,245,.12); }
.kv:last-of-type { border-bottom: 0; }
.kv span { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: rgba(240,242,245,.6); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 700; font-size: .95rem; cursor: pointer; text-decoration: none; font-family: inherit; }
.btn-primary { background: var(--wd-brand-grad); color: var(--wd-brand-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled { opacity: .55; cursor: progress; }
.btn-ghost { background: transparent; color: var(--wd-text); border: 1.5px solid var(--wd-border); }
.btn-small { padding: 6px 14px; font-size: .8rem; background: var(--wd-surface-3); color: var(--wd-text); }

.section { padding: 56px 0; border-top: 1px solid var(--wd-border-soft); }
.sub { color: var(--wd-text-2); max-width: 75ch; }
.steps { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: s; }
.steps li { background: var(--wd-surface-2); border-radius: var(--r); padding: 20px; counter-increment: s; position: relative; }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--wd-mono); color: var(--wd-brand); font-weight: 700; display: block; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--wd-text-2); font-size: .95rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.panel { background: var(--wd-surface); border: 1px solid var(--wd-border-soft); border-radius: 18px; padding: clamp(16px, 3vw, 24px); margin: 20px 0; box-shadow: 0 1px 0 rgba(0,0,0,.02); min-width: 0; }
.grid-2 > .panel { margin: 0; }
.form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: .75rem; font-weight: 600; color: var(--wd-text-2); flex: 1 1 130px; text-transform: uppercase; letter-spacing: .06em; }
.form input, .form select { font: inherit; font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--wd-text); padding: 10px 12px; border: 1px solid var(--wd-border); border-radius: 10px; background: var(--wd-surface); min-width: 0; width: 100%; }
.form input[type=color] { padding: 2px; height: 44px; }
.form input:focus, .form select:focus { outline: 2px solid var(--wd-brand); outline-offset: 1px; }

.results { display: grid; gap: 10px; }
.ev { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; border: 1px solid var(--wd-border-soft); background: var(--wd-surface); cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.ev:hover, .ev:focus-visible { border-color: var(--wd-brand); background: var(--wd-brand-soft); }
.ev img, .ev .ph { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--wd-surface-3); display: grid; place-items: center; }
.ev .ph img { width: 32px; height: auto; }
.ev .t { font-weight: 700; text-transform: capitalize; }
.ev .m { font-size: .85rem; color: var(--wd-text-2); text-transform: capitalize; }
.tag { display: inline-block; font-family: var(--wd-mono); font-size: .68rem; padding: 2px 8px; border-radius: 999px; background: var(--wd-surface-3); margin: 2px 4px 2px 0; }
.tag-brand { background: var(--wd-brand-soft); color: var(--wd-brand); }
.muted { color: var(--wd-text-3); }
.err { color: var(--wd-danger); font-weight: 600; white-space: pre-wrap; }
.ok { color: var(--wd-success); font-weight: 600; }
.organizer .bio { color: var(--wd-text-2); }
.links { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }

.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.tier { border: 1.5px dashed var(--wd-border); border-radius: 14px; padding: 14px; }
.tier .price { font-family: var(--wd-mono); font-size: 1.4rem; font-weight: 700; color: var(--wd-brand); }

.card-el { padding: 14px; border: 1px solid var(--wd-border); border-radius: 10px; margin-bottom: 12px; background: #fff; }
.status { margin-top: 12px; }

.console-panel { background: #121212; color: #e9e9e9; border-color: #222; }
.console-head { display: flex; align-items: center; justify-content: space-between; }
.console-head h3 { color: #fff; }
.log { display: grid; gap: 12px; max-height: 560px; overflow: auto; }
.log:empty::before { content: "Calls appear here."; color: #777; font-family: var(--wd-mono); font-size: .85rem; }
.call { border: 1px solid #2a2a2a; border-radius: 12px; overflow: hidden; }
.call-head { display: flex; gap: 10px; align-items: center; padding: 8px 12px; background: #1c1c1c; font-family: var(--wd-mono); font-size: .8rem; flex-wrap: wrap; }
.status-code { padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.s2 { background: rgba(47,191,113,.18); color: #35d17f; }
.s4, .s5 { background: rgba(255,107,122,.16); color: #ff6b7a; }
.call pre { margin: 0; padding: 10px 12px; font-size: .78rem; max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.call pre + pre { border-top: 1px dashed #2a2a2a; }
.call .lbl { display: block; color: #8a8a8a; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 4px; }

.code-card { background: #121212; color: #e9e9e9; border-radius: 14px; overflow: hidden; min-width: 0; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: #1c1c1c; font-family: var(--wd-mono); font-size: .75rem; color: #aaa; }
.code-card pre { margin: 0; padding: 14px; overflow: auto; font-size: .8rem; }
.code-card code { background: none; color: inherit; padding: 0; }
.copy { font: inherit; background: #2a2a2a; color: #fff; border: 0; border-radius: 999px; padding: 4px 12px; cursor: pointer; }

.widget-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin: 20px 0; }
.wcard { border: 1px solid var(--wd-border-soft); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wcard h3 { margin: 0; }
.wcard .needs { font-size: .8rem; color: var(--wd-text-2); }
.widget-stage { background: var(--wd-surface-2); border-radius: 14px; padding: 12px; min-height: 120px; overflow: hidden; }
.table-wrap { overflow-x: auto; }
.attrs { border-collapse: collapse; width: 100%; font-size: .92rem; }
.attrs th, .attrs td { text-align: left; padding: 10px; border-bottom: 1px solid var(--wd-border-soft); vertical-align: top; }
.attrs th { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--wd-text-2); }
.attrs td:first-child { white-space: nowrap; }
@media (max-width: 720px) {
  .attrs thead { display: none; }
  .attrs, .attrs tbody, .attrs tr, .attrs td { display: block; width: 100%; }
  .attrs tr { padding: 10px 0; border-bottom: 1px solid var(--wd-border-soft); }
  .attrs td { padding: 2px 0; border-bottom: 0; }
  .attrs td:first-child { white-space: normal; overflow-wrap: anywhere; font-weight: 700; }
}
.doc { background: var(--wd-surface-2); border-radius: var(--r); padding: 20px; }
.doc p { margin: 0; color: var(--wd-text-2); font-size: .95rem; }

.footer { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 28px clamp(16px, 4vw, 40px); background: var(--wd-ink); color: rgba(240,242,245,.7); font-size: .85rem; margin-top: 40px; }
.footer img { height: 24px; width: auto; }
