/* Interfusion theme: the one style file every page (and the deck) loads. */
:root {
  --bg: #0d0f12;
  --surface: #161a20;
  --surface-2: #1d222a;
  --line: #2a313b;
  --text: #e9ecef;
  --muted: #a3acb6;
  --accent: #7cc9ab;
  --accent-ink: #08140f;
  --warn: #e6b85c;
  --bad: #ef8a80;
  --focus: #9fd8ff;
  --radius: 14px;
  --radius-s: 8px;
  --space: 1rem;
  --measure: 68ch;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --leave: 180ms;
  color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) { :root { --leave: 0ms; } *, *::before, *::after { transition: none !important; animation: none !important; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
img, svg, iframe { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 1.6em 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin-top: .4em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p, li { max-width: var(--measure); }
code, kbd, pre { font-family: var(--mono); font-size: .92em; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 .35em; background: var(--surface); }
code { background: var(--surface); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; top: .5rem; }

/* Header and footer */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding-block: .8rem; }
.brand { color: var(--text); font-weight: 700; text-decoration: none; letter-spacing: .01em; margin-right: auto; display: inline-flex; align-items: center; gap: .5rem; }
.brand-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--accent); display: inline-block; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin: 0; padding: 0; }
.site-nav a { color: var(--muted); text-decoration: none; padding: .3rem 0; display: inline-block; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.site-foot { border-top: 1px solid var(--line); margin-top: 4rem; color: var(--muted); font-size: .92rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.5rem 2.5rem; }
.site-foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; padding: 0; }
.site-foot a { color: var(--muted); }

/* Layout */
.wrap { width: min(1100px, 100% - 2.5rem); margin-inline: auto; }
main { display: block; padding-bottom: 2rem; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); }
.muted { color: var(--muted); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.notice { border-left: 3px solid var(--warn); background: var(--surface); padding: .8rem 1rem; border-radius: 0 var(--radius-s) var(--radius-s) 0; max-width: var(--measure); }
.disclosure { border-left: 3px solid var(--accent); background: var(--surface); padding: .8rem 1rem; border-radius: 0 var(--radius-s) var(--radius-s) 0; max-width: var(--measure); }
.blank { background: #3a2f12; color: #ffe2a3; border: 1px dashed var(--warn); border-radius: 4px; padding: 0 .3em; font-family: var(--mono); font-size: .9em; }
.draft-head { display: inline-block; background: var(--warn); color: #1b1404; font-weight: 700; padding: .25rem .7rem; border-radius: 999px; font-size: .9rem; }
.tag { display: inline-block; font-size: .82rem; padding: .1rem .55rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: normal; }
.tag.ok { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.tag.next { color: var(--focus); border-color: color-mix(in srgb, var(--focus) 45%, transparent); }
.tag.planned { color: var(--muted); }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .55rem 1.05rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--muted); color: var(--text); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn[hidden] { display: none; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
label { display: block; font-weight: 600; margin-bottom: .3rem; }
input[type="email"], input[type="text"], select { width: 100%; max-width: 26rem; min-height: 44px; padding: .5rem .75rem; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 0; }
legend { padding: 0 .4rem; font-weight: 600; }
.status { min-height: 1.6em; overflow-wrap: anywhere; white-space: normal; }
.status.ok { color: var(--accent); }
.status.bad { color: var(--bad); }

/* Install line */
.install { display: flex; flex-wrap: wrap; gap: .6rem; align-items: stretch; }
.install pre { flex: 1 1 20rem; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: .75rem 1rem; overflow-x: auto; white-space: pre; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 34rem; }
th, td { text-align: left; vertical-align: top; padding: .65rem .75rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: .92rem; }

/* Home hero */
.hero { padding-top: 2.5rem; }
.hero h1 { max-width: 20ch; }
.deck-frame { width: 100%; height: 640px; min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); display: block; }
.price { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 700; }

/* The card: shared by the deck and any page that shows one */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem 1.1rem; box-shadow: 0 10px 30px rgb(0 0 0 / .35); transition: transform var(--leave) ease-out, opacity var(--leave) ease-out; touch-action: pan-y; user-select: none; }
.card-kind { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.card-kind .tool { text-transform: none; letter-spacing: 0; }
.card h3 { margin: .35rem 0 .35rem; font-size: 1.2rem; }
.card p { margin: .3rem 0; color: var(--muted); }
.card.trouble { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); }
.proof { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
.thumb { width: 7.5rem; aspect-ratio: 4 / 3; border-radius: var(--radius-s); border: 1px solid var(--line); display: grid; place-items: end start; padding: .35rem .45rem; font-size: .75rem; }
.thumb.square { aspect-ratio: 1; width: 5.2rem; }
.thumb.dark { background: linear-gradient(160deg, #22262d 0 55%, #0b0c0f 55%); color: #e9ecef; }
.thumb.light { background: linear-gradient(160deg, #f4efe6 0 55%, #ddd5c8 55%); color: #1a1a1a; }
.thumb.cover-a { background: radial-gradient(circle at 30% 30%, #7cc9ab, #10322a); color: #fff; }
.thumb.cover-b { background: radial-gradient(circle at 70% 40%, #e6b85c, #3b2a07); color: #fff; }
.thumb.cover-c { background: radial-gradient(circle at 50% 70%, #9fd8ff, #102a3b); color: #fff; }
.thumb.big-title { background: linear-gradient(160deg, #22262d 0 55%, #0b0c0f 55%); color: #e9ecef; font-size: 1rem; font-weight: 700; }
.stat { font-family: var(--mono); font-size: .85rem; color: var(--muted); }

/* The deck (site/deck/, embedded on Home) */
.deck-body { display: flex; flex-direction: column; gap: .8rem; padding: 1rem; max-width: 720px; margin: 0 auto; }
.strip { display: flex; flex-direction: column; gap: .3rem; min-height: 1.6rem; }
.strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.strip li { display: block; font-size: .92rem; color: var(--muted); overflow-wrap: anywhere; }
.strip li > * + * { margin-left: .4rem; }
.strip strong { color: var(--text); font-weight: 600; }
.dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; background: var(--line); }
.dot.alive { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.dot.trouble { background: var(--warn); }
@keyframes pulse { 50% { opacity: .35; } }
.demo-note { margin: 0; font-size: .85rem; color: var(--muted); }
.stack { position: relative; min-height: 300px; display: grid; align-items: start; }
.stack .card { grid-area: 1 / 1; }
.stack .behind { grid-area: 1 / 1; height: 100%; min-height: 220px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.stack .behind.b1 { transform: translateY(10px) scale(.97); opacity: .6; }
.stack .behind.b2 { transform: translateY(20px) scale(.94); opacity: .35; }
.card.leave-right { transform: translateX(120%) rotate(8deg); opacity: 0; }
.card.leave-left { transform: translateX(-120%) rotate(-8deg); opacity: 0; }
.card.leave-down { transform: translateY(60%); opacity: 0; }
.card .options { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.card .choice { display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.card .why { margin-top: .7rem; display: grid; gap: .45rem; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty h2 { color: var(--text); margin-top: 0; }
.kept-list { list-style: none; padding: 0; margin: 1rem auto 0; max-width: 28rem; text-align: left; display: grid; gap: .4rem; }
.kept-list li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: .45rem .7rem; }
.hints { margin: 0; font-size: .85rem; color: var(--muted); text-align: center; }
.toast { position: sticky; bottom: .5rem; align-self: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: .35rem .5rem .35rem 1rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; max-width: 100%; }
.toast[hidden] { display: none; }
.ask { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-start; }
.ask input { flex: 1 1 14rem; max-width: none; }
.sheet { position: fixed; inset: 0; background: rgb(0 0 0 / .6); display: grid; place-items: end center; padding: 1rem; }
.sheet[hidden] { display: none; }
.sheet-body { width: min(680px, 100%); max-height: 90vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; padding: 1rem 1.2rem; }
.sheet pre { background: var(--bg); padding: .7rem; border-radius: var(--radius-s); overflow-x: auto; }
.chat { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: .8rem 1rem; display: grid; gap: .5rem; }
.chat[hidden] { display: none; }
.chat ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.chat .me { color: var(--text); }
.chat .tool { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ask-text { flex: 1 1 14rem; margin: 0; min-height: 44px; padding: .55rem .75rem; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--bg); overflow-wrap: anywhere; }
