/* The 2026-11 agent era theme for every inner page (insights, articles, work,
   products, built, UGC, demos, privacy). Loaded after each page's own sheet,
   so the structure stays and the world changes: night sky, light type, one
   ember accent for what is live or tappable. Header and footer come from
   src/space-shell.js. */

:root {
  --paper: #05070b;
  --paper-2: #0b0f16;
  --ink: #e9edf3;
  --ink-2: #b9c1cd;
  --ink-3: #8f98a8;
  --line: rgba(233, 237, 243, 0.13);
  --line-soft: rgba(233, 237, 243, 0.07);
  --blue: #ff8a45;
  --ember: #ff7a2f;
  --panel: rgba(11, 15, 22, 0.82);
  --bg: #05070b;
  --shadow: none;
  --radius: 14px;
  --font: 'Schibsted Grotesk', 'Zen Kaku Gothic New', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
html[lang='ja'] { --font: 'Zen Kaku Gothic New', 'Schibsted Grotesk', -apple-system, 'Hiragino Kaku Gothic ProN', sans-serif; }
html { background: var(--bg); }
body { background: var(--bg) !important; color: var(--ink); font-family: var(--font); line-height: 1.6; }
::selection { background: var(--ember); color: #05070b; }
a { text-decoration-color: rgba(255, 122, 47, 0.6); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }

/* the sky sits behind everything */
#sky { position: fixed; inset: 0; width: 100vw; height: 100lvh; display: block; z-index: 0; pointer-events: none; }
.sky-anchor { height: 0; }
main, .s-foot, .s-top { position: relative; z-index: 1; }

/* ---------- header ---------- */
.s-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 32px;
  padding: 18px var(--gut, 24px);
  background: rgba(5, 7, 11, 0.84);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(233, 237, 243, 0.06);
}
.s-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 500 15px 'Schibsted Grotesk', sans-serif; letter-spacing: 0.02em; margin: 0; }
.s-brand b { font-weight: 700; }
.s-brand .mark { width: 22px; height: 22px; fill: currentColor; flex: none; }
.s-top nav { display: flex; gap: 24px; margin-left: auto; }
.s-top nav a { color: #9aa3b2; text-decoration: none; font-size: 14px; }
.s-top nav a:hover, .s-top nav a[aria-current='page'] { color: var(--ink); }
.s-top nav a[aria-current='page'] { text-decoration: underline; text-decoration-color: var(--ember); text-underline-offset: 6px; }
.s-cta { color: var(--ink); text-decoration: none; font-size: 14px; border: 1px solid var(--line); padding: 8px 14px; border-radius: 10px; white-space: nowrap; }
.s-cta:hover { border-color: rgba(233, 237, 243, 0.35); }
@media (max-width: 900px) {
  .s-top { gap: 16px; padding: 14px 16px; }
  .s-top nav { gap: 16px; overflow-x: auto; scrollbar-width: none; margin-left: 0; flex: 1; min-width: 0; }
  .s-top nav::-webkit-scrollbar { display: none; }
  .s-top nav a { white-space: nowrap; padding: 10px 0; }
  .s-brand span { display: none; }
  .s-cta { display: none; }
}

/* ---------- footer ---------- */
.s-foot { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 24px; padding: 48px var(--gut, 24px) 64px; margin-top: 120px; border-top: 1px solid var(--line); background: var(--bg); color: #9aa3b2; font-size: 13px; line-height: 1.7; }
.s-foot p { margin: 0; }
.s-foot .s-brand { align-self: start; }
.s-foot .s-brand .mark { width: 28px; height: 28px; }
.s-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: flex-end; align-items: baseline; }
.s-foot a, .s-foot .cc-open { color: #9aa3b2; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.s-foot a:hover, .s-foot .cc-open:hover { color: var(--ink); }
.nowrap { white-space: nowrap; }
@media (max-width: 900px) { .s-foot { grid-template-columns: 1fr; } .s-foot nav { justify-content: flex-start; } }

/* ---------- shared pieces from article.css ---------- */
.a-btn, .a-btn-lg { background: var(--ink) !important; color: #05070b !important; border-radius: 10px; font-weight: 700; }
.a-btn:hover { opacity: 0.9; }
.i-list, .a-toc, .a-sources, .a-body blockquote, .a-body code, .a-cta { background: var(--panel); border: 1px solid var(--line); box-shadow: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.a-cta, .a-cta h2, .a-cta p { color: var(--ink); }
.a-cta .a-btn:hover { background: var(--ink); color: #05070b; }
.a-body a, .a-sources a, .i-title a:hover { color: var(--ink); text-decoration-color: var(--ember); }
.a-body th { background: rgba(233, 237, 243, 0.05); }
.a-body hr { border-color: var(--line); }
.i-h1, .a-head h1, .a-cta h2, .p-head h1, .b-head h1, .u-head h1, .w-head h1, .d-head h1 { font-weight: 700; letter-spacing: -0.03em; line-height: 0.98; }
html[lang='ja'] .i-h1, html[lang='ja'] .a-head h1, html[lang='ja'] h1 { letter-spacing: -0.01em; line-height: 1.12; }
.i-title, .a-body h2, .a-body h3 { font-weight: 700; }
.a-tag, .i-tag, .i-num, .a-meta, .a-back { color: var(--ink-3); }
.a-tag, .i-tag { color: var(--ember); }

/* ---------- built ---------- */
.b-filters, .b-bar { background: linear-gradient(to bottom, var(--bg) 70%, rgba(5, 7, 11, 0)) !important; }
.b-chrome { background: #10151e !important; }
.b-chrome i { background: rgba(233, 237, 243, 0.2) !important; }
.b-card, .b-shot { box-shadow: none !important; border: 1px solid var(--line); }

/* ---------- products ---------- */
.p-dock, .p-dock-float { background: rgba(11, 15, 22, 0.82) !important; border-color: var(--line) !important; box-shadow: none !important; }
.p-store, .p-badge { color: #05070b !important; background: var(--ink) !important; border-color: var(--ink) !important; box-shadow: none !important; }

/* ---------- UGC ---------- */
.snd { background: rgba(11, 15, 22, 0.88) !important; color: var(--ink); }
.snd:hover { background: #151b26 !important; }
.snd[aria-pressed='true'] { background: var(--ember) !important; color: #05070b !important; }
.u-phone.is-sound { box-shadow: 0 0 0 2px var(--ember) !important; }
.u-bar span { background: rgba(233, 237, 243, 0.12) !important; }
.u-beat:hover { background: rgba(233, 237, 243, 0.04) !important; }

/* ---------- demos ---------- */
.d-card, .d-objects, .d-form { background: var(--panel) !important; border: 1px solid var(--line); box-shadow: none !important; }
.d-card-media, .w-stage { background: #10151e !important; }
.d-open { color: #05070b !important; background: var(--ink) !important; }
.w-seg, .w-text, .w-label, .w-panel, .w-log { background: rgba(11, 15, 22, 0.9) !important; color: var(--ink) !important; box-shadow: none !important; }
.w-seg button { color: var(--ink-2) !important; }
.w-seg button[aria-pressed='true'] { background: var(--ink) !important; color: #05070b !important; }
.w-label span, .w-log::before { color: var(--ember) !important; }
.w-log::before { background: var(--ember) !important; }
.d-plan .p-d, .d-plan .p-s { fill: var(--ink-2) !important; }
.d-field input, .d-field select, .d-field textarea { background: var(--bg) !important; color: var(--ink) !important; border-color: var(--line) !important; }
.d-field ::placeholder { color: #6f7889 !important; }
.d-form-note[data-tone='ok'] { color: #7fd6a6 !important; }
.d-form-note[data-tone='err'] { color: #ff9a8a !important; }

/* ---------- work ---------- */
.w-cover, .w-shot { box-shadow: none !important; border: 1px solid var(--line); }

/* ---------- consent banner ---------- */
.cc, .cc-banner { background: #0b0f16 !important; color: var(--ink) !important; border: 1px solid var(--line) !important; }


/* demos index card */
.d-card a { background: var(--panel) !important; border: 1px solid var(--line); box-shadow: none !important; }
.d-card-title { color: var(--ink); font-weight: 700; }
.d-card-line, .d-meta { color: var(--ink-2) !important; }
.d-card a:hover .d-open { background: var(--ink) !important; opacity: 0.9; }

/* Japanese breaks at phrase boundaries, never mid word */
:lang(ja) p, :lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) li, :lang(ja) dd { word-break: auto-phrase; }
.w-canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--ember) !important; }
.w-text:focus-visible { outline-color: var(--ember) !important; }
