/* AI Pal Hub. Light by default, night mode on request. Each Pal brings its colour via --pal / --on-pal. */
:root {
  color-scheme: light;
  --ink: #0B1026; --blue: #2B4BFF; --violet: #6A3CFF;
  --bg: #F6F7FC; --surface: #FFFFFF; --surface-2: #ECEFF8; --text: #0B1026; --muted: #566080; --border: #DDE1EE; --input-border: #C5CCE0;
  --link: #2B4BFF; --danger: #C0281F;
  --sky: radial-gradient(56rem 32rem at 86% 4%, rgba(106,60,255,.20), transparent 62%), radial-gradient(44rem 28rem at 4% 96%, rgba(43,75,255,.16), transparent 60%),
         radial-gradient(40rem 24rem at 62% 104%, rgba(240,138,0,.15), transparent 60%), radial-gradient(34rem 22rem at 28% -4%, rgba(14,143,126,.13), transparent 60%), #FCFCFF;
  --sky-text: #0B1026; --sky-muted: #49537A; --h1: linear-gradient(180deg, #0B1026 35%, #3141B8);
  --head-bg: rgba(255,255,255,.78); --head-solid: #FFFFFF; --head-text: #0B1026; --head-line: rgba(11,16,38,.08);
  --foot-bg: #ECEFF8; --foot-text: #566080; --foot-link: #0B1026;
  --panel: rgba(255,255,255,.72); --panel-line: rgba(11,16,38,.09); --stroke: rgba(11,16,38,.4);
  --notice-bg: #E9EDFF; --notice-text: #1B2460; --error-bg: #FDECEA; --error-text: #7A1B15;
  --shadow: 0 1px 2px rgba(11,16,38,.05), 0 24px 48px -28px rgba(11,16,38,.26); --pop: 0 40px 80px -44px rgba(43,60,160,.55);
  --display: 'Unbounded', 'Avenir Next', system-ui, sans-serif;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 20px;
}
:root[data-theme=night] {
  color-scheme: dark;
  --bg: #070A1C; --surface: #121735; --surface-2: #1B2147; --text: #F2F4FF; --muted: #A3ACCF; --border: #262D58; --input-border: #39417A;
  --link: #9DB0FF; --danger: #FF9C94;
  --sky: radial-gradient(60rem 34rem at 82% 8%, rgba(106,60,255,.36), transparent 62%), radial-gradient(46rem 30rem at 6% 96%, rgba(43,75,255,.3), transparent 60%), #070A1C;
  --sky-text: #FFFFFF; --sky-muted: rgba(255,255,255,.78); --h1: linear-gradient(180deg, #FFFFFF 30%, #B9C4FF);
  --head-bg: rgba(7,10,28,.8); --head-solid: #070A1C; --head-text: #FFFFFF; --head-line: rgba(255,255,255,.09);
  --foot-bg: #04061A; --foot-text: rgba(255,255,255,.6); --foot-link: rgba(255,255,255,.85);
  --panel: rgba(255,255,255,.055); --panel-line: rgba(255,255,255,.12); --stroke: rgba(255,255,255,.5);
  --notice-bg: #1A2260; --notice-text: #DDE3FF; --error-bg: #4A1512; --error-text: #FFD2CE;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 24px 48px -28px rgba(0,0,0,.8); --pop: 0 40px 80px -40px rgba(0,0,0,.9);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.6 var(--body); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; transition: background-color .25s, color .25s; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #7C93FF; outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.04; margin: 0 0 .5em; letter-spacing: -0.035em; font-weight: 800; }
h1 { font-size: clamp(2.3rem, 6vw, 5.4rem); font-weight: 900; }
h1.page { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 1.4rem; }
h2 { font-size: 1.2rem; letter-spacing: -0.02em; }
h3 { font-size: .95rem; margin-top: 1.8rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
code { font-size: .88em; background: var(--surface-2); padding: .12em .4em; border-radius: 6px; }
code.wrap { word-break: break-all; display: inline-block; margin-top: .4rem; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; background: #fff; color: #0B1026; padding: .5rem 1rem; z-index: 50; border-radius: 8px; }
.fine { font-size: .875rem; color: var(--muted); }
.serif { font: italic 400 clamp(1.35rem, 2.3vw, 1.85rem)/1.3 var(--serif); letter-spacing: 0; }
.wrap { width: 100%; max-width: 80rem; margin: 0 auto; padding-inline: clamp(1.1rem, 4vw, 3rem); }
.sky { background: var(--sky); color: var(--sky-text); }

/* Header: follows the theme on the hub, wears the Pal's colour on a Pal domain */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .8rem clamp(1.1rem, 4vw, 3rem); background: var(--head-bg); color: var(--head-text); backdrop-filter: saturate(170%) blur(16px); -webkit-backdrop-filter: saturate(170%) blur(16px); border-bottom: 1px solid var(--head-line); }
.is-pal .top { --head-solid: var(--pal); background: color-mix(in srgb, var(--pal) 92%, transparent); color: var(--on-pal); border-bottom-color: color-mix(in srgb, var(--on-pal) 14%, transparent); }
.brand { font: 800 1.02rem var(--display); letter-spacing: -0.03em; color: inherit; text-decoration: none; display: flex; align-items: center; gap: .6rem; }
.dot { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: conic-gradient(from 210deg, #2B4BFF, #C2379A, #F08A00, #5E9B1F, #0E8F7E, #2B4BFF); box-shadow: inset 0 0 0 .36rem var(--head-solid); }
.is-pal .dot { background: var(--on-pal); box-shadow: inset 0 0 0 .42rem var(--pal); }
.top nav { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 1.5rem); flex-wrap: wrap; font-weight: 500; font-size: .98rem; }
.top nav a:not(.btn) { color: inherit; text-decoration: none; opacity: .8; }
.top nav a:not(.btn):hover { opacity: 1; }
.top form { margin: 0; }
.top .linkish { color: inherit; opacity: .8; text-decoration: none; }
.top .linkish:hover { opacity: 1; }
.is-pal .top .btn { background: var(--on-pal); color: var(--pal) !important; box-shadow: none; }
#theme { width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 0; cursor: pointer; background: color-mix(in srgb, currentColor 10%, transparent); color: inherit; font-size: 1.05rem; line-height: 1; display: grid; place-items: center; transition: background .15s, transform .3s; }
#theme:hover { background: color-mix(in srgb, currentColor 20%, transparent); transform: rotate(20deg); }
#theme::before { content: '☾'; } :root[data-theme=night] #theme::before { content: '☀'; }

main { width: 100%; max-width: 64rem; margin: 0 auto; padding: clamp(1.75rem, 4vw, 3.25rem) clamp(1.1rem, 4vw, 3rem); flex: 1; }
main.wide { max-width: 80rem; }
main.full { max-width: none; padding: 0; }
.foot { background: var(--foot-bg); color: var(--foot-text); padding: 1.6rem clamp(1.1rem, 4vw, 3rem); font-size: .875rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot p { margin: 0; } .foot p:last-child a { margin-left: 1.25rem; } .foot a { color: var(--foot-link); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 700 1rem var(--body); border: 0; border-radius: 999px; padding: .8rem 1.6rem; text-decoration: none; cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--violet)); color: #fff !important; box-shadow: 0 10px 26px -10px rgba(63,70,255,.7), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .15s ease, filter .15s ease; }
.is-pal .btn { background: var(--pal); color: var(--on-pal) !important; box-shadow: 0 10px 26px -12px var(--pal), inset 0 1px 0 rgba(255,255,255,.22); }
.btn:hover { transform: translateY(-1px); filter: brightness(1.07); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: inherit !important; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.white { background: #fff; color: var(--ink) !important; box-shadow: 0 12px 30px -14px rgba(0,0,0,.5); }
.btn.small { padding: .5rem 1.1rem; font-size: .9375rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish.danger { color: var(--danger); }
.actions { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; margin-top: 1.4rem; }

/* ---------- Hub home ---------- */
.h-hero { position: relative; overflow: hidden; min-height: min(46rem, 92vh); display: flex; align-items: center; }
.h-hero canvas { position: absolute; inset: 0 0 0 auto; width: 62%; height: 100%; }
.h-hero-in { position: relative; padding-block: clamp(3.5rem, 9vw, 7rem); pointer-events: none; }
.h-hero-in > * { pointer-events: auto; }
.h-hero h1 { white-space: nowrap; margin-bottom: .35em; padding-bottom: .08em; background: var(--h1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-hero .serif { max-width: 25ch; color: var(--sky-muted); margin-bottom: 0; }
.h-hero .fine { color: var(--sky-muted); opacity: .85; margin-top: 1.1rem; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.h-hero-in > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.h-hero-in > :nth-child(2) { animation-delay: .08s; } .h-hero-in > :nth-child(3) { animation-delay: .16s; } .h-hero-in > :nth-child(4) { animation-delay: .24s; }

.marquee { background: var(--surface); color: var(--text); overflow: hidden; border-block: 1px solid var(--border); padding: 1.05rem 0; }
.marquee div { display: flex; gap: 2.6rem; width: max-content; animation: slide 46s linear infinite; }
.marquee span { font: 800 clamp(1.15rem, 2.2vw, 1.7rem) var(--display); letter-spacing: -0.03em; display: flex; align-items: center; gap: 2.6rem; white-space: nowrap; }
.marquee span::after { content: ''; width: .75rem; height: .75rem; border-radius: 50%; background: var(--pal); box-shadow: 0 0 16px 1px color-mix(in srgb, var(--pal) 70%, transparent); }
@keyframes slide { to { transform: translateX(-50%); } }

.verts { padding-block: clamp(2.5rem, 6vw, 5rem) 1rem; }
.vert { display: grid; grid-template-columns: minmax(12rem, 17rem) 1fr; gap: 1.5rem 3rem; padding: clamp(2rem, 4vw, 3.25rem) 0; border-top: 1px solid var(--border); }
.vert:first-child { border-top: 0; padding-top: 0; }
.vert-head { position: sticky; top: 5.5rem; align-self: start; }
.vert-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: .4em; }
.vert-head p { font: italic 1.3rem/1.3 var(--serif); color: var(--muted); margin: 0; }
.tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.25rem; }
.tag { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--text) !important;
  box-shadow: 0 0 0 1px var(--border), 0 26px 44px -30px color-mix(in srgb, var(--pal) 75%, transparent); transition: transform .22s cubic-bezier(.2,.7,.2,1), box-shadow .22s ease; }
.tag:hover, .tag:focus-visible { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 0 0 2px var(--pal), 0 34px 50px -26px color-mix(in srgb, var(--pal) 85%, transparent); }
.tag-top { background: linear-gradient(120deg, var(--pal), color-mix(in srgb, var(--pal) 72%, #000)); color: var(--on-pal); font: 700 .78rem var(--display); letter-spacing: -0.01em; padding: .7rem 1.2rem .62rem; display: flex; justify-content: space-between; align-items: center; }
.tag-top::after { content: ''; width: .55rem; height: .55rem; border-radius: 50%; background: var(--on-pal); opacity: .85; }
.tag-name { font: 800 1.75rem/1 var(--display); padding: 1.35rem 1.2rem .5rem; letter-spacing: -0.045em; }
.tag-line { padding: 0 1.2rem; color: var(--muted); font-size: .97rem; line-height: 1.45; flex: 1; }
.tag-domain { padding: 1.1rem 1.2rem 1.15rem; font-size: .82rem; font-weight: 600; color: color-mix(in srgb, var(--pal) 62%, var(--text)); display: flex; justify-content: space-between; align-items: center; }
.tag-domain::after { content: '↗'; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: color-mix(in srgb, var(--pal) 16%, var(--surface)); font-size: 1rem; transition: background .2s, color .2s; }
.tag:hover .tag-domain::after { background: var(--pal); color: var(--on-pal); }

.h-how { padding-block: clamp(3rem, 7vw, 6rem); margin-top: 3rem; }
.h-how h2 { font-size: clamp(1.7rem, 3.6vw, 3rem); max-width: 16ch; margin-bottom: 1.2em; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem; list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--r); padding: 1.6rem 1.5rem 1.5rem; backdrop-filter: blur(8px); }
.steps li::before { content: counter(s); display: block; font: 900 3.4rem/1 var(--display); color: transparent; -webkit-text-stroke: 1.5px var(--stroke); margin-bottom: 1rem; }
.steps b { display: block; font: 700 1.02rem var(--display); letter-spacing: -0.02em; margin-bottom: .5rem; }
.steps p { color: var(--sky-muted); margin: 0; }
.h-cta { padding-block: clamp(2.5rem, 6vw, 5rem); }
.h-cta div { border-radius: 32px; padding: clamp(2rem, 6vw, 4.5rem); color: #fff; background: radial-gradient(40rem 22rem at 90% 0%, #C2379A, transparent 60%), radial-gradient(34rem 22rem at 0% 100%, #0E8F7E, transparent 60%), linear-gradient(135deg, var(--blue), var(--violet)); box-shadow: 0 40px 70px -40px rgba(74,60,255,.8); }
.h-cta h2 { font-size: clamp(1.8rem, 4.4vw, 3.6rem); max-width: 14ch; margin-bottom: .5em; }
.h-cta p { font: italic 1.45rem/1.3 var(--serif); opacity: .92; max-width: 30ch; }

/* ---------- Cards, forms, tables ---------- */
.card { background: var(--surface); border-radius: var(--r); padding: clamp(1.25rem, 3vw, 2rem); margin-bottom: 1.25rem; overflow-x: auto; box-shadow: 0 0 0 1px var(--border), var(--shadow); }
.card.narrow { max-width: 29rem; margin: clamp(1rem, 5vh, 3.5rem) auto; padding: clamp(1.6rem, 4vw, 2.5rem); border-radius: 28px; box-shadow: 0 0 0 1px var(--border), var(--pop); }
.card.narrow h1 { font-size: 1.7rem; margin-bottom: 1.1rem; }
body.backdrop { background: var(--sky); background-attachment: fixed; }
body.backdrop .foot { background: transparent; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.grid2 .card { margin: 0; } .span2 { grid-column: 1 / -1; }
.stack { display: grid; gap: 1rem; } .stack .btn { justify-self: start; }
.card.narrow .stack .btn { justify-self: stretch; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; } .row input { flex: 1; min-width: 12rem; }
label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
label small { font-weight: 400; color: var(--muted); }
label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
label.check input { margin-top: .3rem; accent-color: var(--blue); }
input:not([type=checkbox]), select, textarea { font: inherit; padding: .72rem .9rem; border: 1.5px solid var(--input-border); border-radius: 12px; background: var(--surface); color: var(--text); width: 100%; transition: border-color .15s, box-shadow .15s; }
input:not([type=checkbox]):focus, select:focus, textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(80,105,255,.2); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:disabled { background: var(--surface-2); color: var(--muted); }
.row select { width: auto; }
.error { background: var(--error-bg); color: var(--error-text); border-left: 4px solid var(--danger); padding: .75rem 1rem; border-radius: 10px; }
.error a { color: inherit; }
.notice { background: var(--notice-bg); color: var(--notice-text); border-left: 4px solid var(--blue); padding: .75rem 1rem; border-radius: 10px; }
[hidden] { display: none !important; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8125rem; }
th, td { padding: .65rem .7rem .65rem 0; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
table.dense td { font-size: .8125rem; } td form { margin: 0; }
ul.plain, ul.mem { list-style: none; padding: 0; margin: 0 0 1rem; }
ul.mem li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
ul.mem b { margin-right: .5rem; }
.summary { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.5rem; margin: 0 0 1.25rem; } .summary dt { color: var(--muted); } .summary dd { margin: 0; font-weight: 600; }
.meter { height: .65rem; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: .85rem 0 .4rem; }
.meter span { display: block; height: 100%; min-width: .65rem; background: linear-gradient(90deg, var(--blue), var(--violet)); border-radius: 99px; }

/* ---------- Plans ---------- */
.band { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(7rem, 12vw, 10rem); }
.band h1 { max-width: 13ch; padding-bottom: .08em; font-size: clamp(2.1rem, 5.2vw, 4.4rem); background: var(--h1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.band .serif { color: var(--sky-muted); max-width: 32ch; }
.band .notice { display: inline-block; margin-top: .5rem; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.25rem; align-items: stretch; margin-top: clamp(-7rem, -9vw, -5rem); padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.plan { position: relative; background: var(--surface); border-radius: 24px; padding: 1.7rem 1.6rem; display: flex; flex-direction: column; gap: .7rem; box-shadow: 0 0 0 1px var(--border), var(--shadow); }
.plan h2 { margin: 0; font-size: 1.05rem; }
.plan p { margin: 0; } .plan .price { color: var(--muted); } .plan .price { white-space: nowrap; font-size: .95rem; } .plan .price b { font: 900 2.1rem/1 var(--display); letter-spacing: -0.05em; color: var(--text); }
.plan ul { list-style: none; padding: 0; margin: .5rem 0; flex: 1; font-size: .95rem; }
.plan li { padding-left: 1.6rem; margin-bottom: .5rem; position: relative; }
.plan li::before { content: ''; position: absolute; left: 0; top: .42em; width: .95rem; height: .55rem; border-left: 2.5px solid var(--link); border-bottom: 2.5px solid var(--link); transform: rotate(-45deg) scale(.7); transform-origin: left; }
.plan .btn { margin-top: .5rem; }
.plan.featured { background: radial-gradient(22rem 14rem at 100% 0%, rgba(194,55,154,.75), transparent 65%), linear-gradient(150deg, var(--blue), var(--violet)); color: #fff; box-shadow: 0 40px 70px -34px rgba(74,60,255,.85); }
.plan.featured .price, .plan.featured .fine { color: rgba(255,255,255,.8); } .plan.featured .price b { color: #fff; }
.plan.featured li::before { border-color: #fff; }
.plan.featured select { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.4); } .plan.featured option { color: #0B1026; background: #fff; }
.plan.featured .btn { background: #fff; color: var(--ink) !important; box-shadow: 0 14px 30px -14px rgba(0,0,0,.5); }
.plan.featured::before { content: 'Every Pal'; position: absolute; top: -.8rem; right: 1.4rem; background: #fff; color: var(--blue); font: 700 .7rem var(--display); padding: .45rem .85rem; border-radius: 99px; box-shadow: 0 8px 18px -8px rgba(11,16,38,.5); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.stats div { background: var(--surface); border-radius: var(--r); padding: 1.4rem 1.5rem; box-shadow: 0 0 0 1px var(--border), var(--shadow); border-top: 4px solid var(--blue); }
.stats div:nth-child(2) { border-top-color: #C2379A; } .stats div:nth-child(3) { border-top-color: #0E8F7E; } .stats div:nth-child(4) { border-top-color: #F08A00; }
.stats b { display: block; font: 900 2rem/1.15 var(--display); letter-spacing: -0.05em; } .stats span { font-size: .875rem; color: var(--muted); }

/* ---------- Pal domain landing (drenched in the Pal's colour in both modes) ---------- */
.p-hero { position: relative; overflow: hidden; color: var(--on-pal);
  background: radial-gradient(48rem 30rem at 88% 0%, color-mix(in srgb, var(--pal) 55%, #fff), transparent 62%), radial-gradient(44rem 30rem at 0% 100%, color-mix(in srgb, var(--pal) 80%, #000), transparent 65%), var(--pal); }
.p-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(3rem, 8vw, 6.5rem); }
.bigtag { display: inline-block; background: #fff; color: var(--ink); border-radius: 28px; overflow: hidden; transform: rotate(-2.5deg); margin-bottom: 2.2rem; box-shadow: 0 50px 70px -36px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.05); animation: stick .8s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes stick { from { opacity: 0; transform: rotate(6deg) translateY(-30px) scale(.94); } to { opacity: 1; transform: rotate(-2.5deg); } }
.bigtag .tag-top { display: block; background: var(--ink); color: #fff; font-size: clamp(.95rem, 1.8vw, 1.25rem); padding: .85rem 1.9rem .75rem; }
.bigtag .tag-top::after { display: none; }
.bigtag h1 { font-size: clamp(3rem, 9.5vw, 7.2rem); padding: .16em .3em .22em; margin: 0; letter-spacing: -0.065em; }
.p-hero .serif { max-width: 22ch; margin-bottom: 0; }
.ask { display: flex; gap: .5rem; margin: 1.9rem 0 1.1rem; max-width: 40rem; background: #fff; border-radius: 999px; padding: .45rem; box-shadow: 0 30px 50px -28px rgba(0,0,0,.55); }
.ask input { font-size: 1.12rem; padding: .7rem 1.2rem; border: 0 !important; border-radius: 999px; background: transparent; box-shadow: none !important; color: var(--ink); }
.ask input::placeholder { color: #566080; }
.ask .btn { background: var(--ink); color: #fff !important; box-shadow: none; padding-inline: 1.9rem; }
.starters { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: .55rem; }
.starters a, .starters button { display: inline-block; font: 500 .9375rem var(--body); background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px; padding: .5rem 1rem; color: var(--text); text-decoration: none; cursor: pointer; text-align: left; transition: transform .15s, border-color .15s; }
.starters a:hover, .starters button:hover { border-color: var(--pal); transform: translateY(-1px); }
.p-hero .starters a { background: color-mix(in srgb, var(--on-pal) 13%, transparent); color: var(--on-pal); border-color: color-mix(in srgb, var(--on-pal) 30%, transparent); backdrop-filter: blur(6px); }
.p-hero .starters a:hover { background: color-mix(in srgb, var(--on-pal) 24%, transparent); border-color: var(--on-pal); }
.p-hero .fine { color: var(--on-pal); opacity: .8; max-width: 56ch; } .p-hero .fine + .fine { margin-top: -.5rem; }
.preview { background: #fff; color: var(--ink); border-radius: 28px; padding: 1.4rem; transform: rotate(2deg); box-shadow: 0 60px 80px -40px rgba(0,0,0,.55); display: grid; gap: .8rem; animation: rise .8s .15s cubic-bezier(.2,.7,.2,1) both; }
.preview .who { display: flex; align-items: center; gap: .65rem; font: 700 .88rem var(--display); letter-spacing: -0.02em; padding-bottom: .9rem; border-bottom: 1px solid #DDE1EE; }
.preview .bubble { max-width: 88%; font-size: .95rem; box-shadow: none; }
.preview .u { justify-self: end; background: var(--pal); color: var(--on-pal); border-radius: 18px 18px 5px 18px; padding: .65rem 1rem; }
.preview .a { justify-self: start; background: #F1F3FA; border-radius: 18px 18px 18px 5px; padding: .8rem 1rem; }
.preview .box { margin-top: .4rem; border: 1.5px solid #DDE1EE; border-radius: 999px; padding: .65rem 1.1rem; color: #566080; font-size: .92rem; }
.avatar { flex: none; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--pal); color: var(--on-pal); font: 800 .82rem var(--display); }
img.avatar { object-fit: cover; }
.dots { display: inline-flex; gap: .3rem; } .dots i { width: .5rem; height: .5rem; border-radius: 50%; background: #566080; animation: blink 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.p-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; padding-block: clamp(2.5rem, 6vw, 5rem); }
.p-more > div { background: var(--surface); border-radius: var(--r); padding: 1.8rem 1.7rem; box-shadow: 0 0 0 1px var(--border), var(--shadow); border-top: 5px solid var(--pal); }
.p-more h2 { font-size: 1.1rem; } .p-more p { color: var(--muted); } .p-more a { font-weight: 700; color: var(--text); }

/* ---------- Chat ---------- */
body.bare { height: 100vh; height: 100dvh; } body.bare main { padding: 0; max-width: none; min-height: 0; display: flex; }
.chat { display: grid; grid-template-columns: 17.5rem 1fr; flex: 1; min-height: 0; width: 100%; }
.convs { background: var(--surface); border-right: 1px solid var(--border); padding: 1.2rem 1rem; overflow-y: auto; display: flex; flex-direction: column; }
.convs .btn { align-self: stretch; }
.convs ul { list-style: none; padding: 0; margin: 1.2rem 0; flex: 1; }
.convs li a { display: block; padding: .55rem .75rem; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convs li a:hover { background: var(--surface-2); color: var(--text); }
.convs li.on a { background: var(--surface-2); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--pal); }
.convs .linkish { font-size: .875rem; }
.thread-wrap { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: radial-gradient(50rem 26rem at 100% 0%, color-mix(in srgb, var(--pal) 14%, transparent), transparent 70%), var(--bg); }
.thread-wrap > * { width: 100%; max-width: 50rem; margin-inline: auto; padding-inline: clamp(.9rem, 3vw, 1.5rem); }
.thread { flex: 1; overflow-y: auto; padding-block: 2rem 1rem; scroll-behavior: smooth; }
.empty { padding-top: 10vh; } .empty h1 { font-size: clamp(1.7rem, 3.6vw, 2.7rem); max-width: 14ch; margin-bottom: .8em; }
.empty .starters { flex-direction: column; align-items: flex-start; } .empty .starters button { border-radius: 16px; padding: .85rem 1.15rem; font-size: 1rem; box-shadow: var(--shadow); }
.msg { display: flex; gap: .7rem; margin-bottom: 1.15rem; align-items: flex-end; animation: rise .3s ease both; } .msg.user { justify-content: flex-end; }
.msg.user .avatar { display: none; }
.bubble { max-width: min(84%, 38rem); padding: .85rem 1.15rem; border-radius: 22px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.msg.user .bubble { background: var(--pal); color: var(--on-pal); border-bottom-right-radius: 6px; box-shadow: 0 14px 26px -16px var(--pal), 0 0 0 1px color-mix(in srgb, var(--on-pal) 12%, transparent); }
.msg.assistant .bubble { background: var(--surface); border-bottom-left-radius: 6px; box-shadow: 0 0 0 1px var(--border), var(--shadow); }
.bubble.typing:empty { display: inline-flex; gap: .3rem; padding-block: 1.1rem; }
.bubble.typing:empty::before, .bubble.typing:empty::after { content: ''; width: .5rem; height: .5rem; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.bubble.typing:empty::after { animation-delay: .2s; }
.composer { display: flex; gap: .5rem; align-items: flex-end; margin-block: .4rem .5rem; }
.thread-wrap > .composer { padding: .45rem .45rem .45rem 0; background: var(--surface); border-radius: 28px; box-shadow: 0 0 0 1.5px var(--border), var(--shadow); width: calc(100% - 2 * clamp(.9rem, 3vw, 1.5rem)); max-width: calc(50rem - 3rem); transition: box-shadow .15s; }
.thread-wrap > .composer:focus-within { box-shadow: 0 0 0 2px var(--pal), 0 24px 40px -22px color-mix(in srgb, var(--pal) 60%, transparent); }
.composer textarea { resize: none; border: 0 !important; box-shadow: none !important; background: transparent; padding: .7rem 1.3rem; max-height: 200px; }
.composer .btn { padding: .75rem 1.5rem; }
.quota { padding-bottom: .8rem; margin: 0; text-align: center; }
.thread-wrap > .error { width: auto; margin-bottom: .6rem; }

@media (max-width: 860px) {
  .vert { grid-template-columns: 1fr; } .vert-head { position: static; } .grid2 { grid-template-columns: 1fr; }
  .chat { grid-template-columns: 1fr; } .convs { display: none; }
  .h-hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .h-hero canvas { position: relative; inset: auto; width: 100%; height: 19rem; order: 2; margin-bottom: 1.5rem; }
  .h-hero-in { padding-block: 2.75rem 1rem; }
  .h-hero h1 { white-space: normal; }
  .p-hero-grid { grid-template-columns: 1fr; } .preview { display: none; }
  .ask .btn { padding-inline: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
