/* llama.online site styles ("Andean warmth"). Tokens live in tokens.css; the chat app has its own CSS (assets/chat/**). */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 400 16.5px/1.65 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
html.sheet-open { overflow: hidden; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; color: var(--text); text-wrap: balance; }
p { margin: 0; }
::selection { background: var(--accent-soft); color: var(--text); }
[hidden] { display: none !important; }

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .i-dir { transform: scaleX(-1); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--text); color: var(--bg); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.wrap-narrow { max-width: 860px; }
.muted { color: var(--muted); }

/* ---------------------------------------------------------------- textile, grain */
.weave { height: 22px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='22' viewBox='0 0 28 22'%3E%3Cpath d='M0 4.5l3.5-3.5 3.5 3.5 3.5-3.5 3.5 3.5 3.5-3.5 3.5 3.5 3.5-3.5 3.5 3.5M0 17.5l3.5 3.5 3.5-3.5 3.5 3.5 3.5-3.5 3.5 3.5 3.5-3.5 3.5 3.5 3.5-3.5' fill='none' stroke='%230E6B66' stroke-width='1.4' opacity='.55'/%3E%3Cpath d='M2 10h1.5V8.5H5V7h4v1.5h1.5V10H12v2h-1.5v1.5H9V15H5v-1.5H3.5V12H2z' fill='%23F2A93B'/%3E%3Cpath d='M16 10h1.5V8.5H19V7h4v1.5h1.5V10H26v2h-1.5v1.5H23V15h-4v-1.5h-1.5V12H16z' fill='%23D45D3A' opacity='.85'/%3E%3Cpath d='M6 10h2v2H6zM20 10h2v2h-2z' fill='%23F7F2EA'/%3E%3C/svg%3E"); background-size: 28px 22px; background-repeat: repeat-x; opacity: .7; }
.weave-thin { height: 11px; background-size: 14px 11px; opacity: .55; }
[data-theme="dark"] .weave { opacity: .5; }
.grain, .hero-bg::after, .page-hero-bg::after, .cta-in::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .15 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------------------------------------------------------------- buttons, chips, badges, tiles */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 1px solid transparent; border-radius: var(--radius-pill); font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease); }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .i { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 6px 16px -6px rgba(214, 140, 30, .55); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-soft { background: var(--teal-soft); color: var(--accent-ink); }
.btn-soft:hover { background: color-mix(in srgb, var(--teal-soft) 70%, var(--accent-ink) 14%); color: var(--accent-ink); }
.btn-sm { min-height: 38px; padding: 7px 15px; font-size: 14px; }
.btn-xs { min-height: 32px; padding: 5px 12px; font-size: 13px; gap: 6px; }
.btn-xs .i { width: 16px; height: 16px; }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 16.5px; }
.btn-block { display: flex; width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 40px; height: 40px; padding: 0 9px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--text-soft); transition: background .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--text-soft); font-size: 14px; line-height: 1.3; text-decoration: none; transition: border-color .15s, background .15s, color .15s; }
.chip:hover { border-color: var(--accent-ink); color: var(--text); text-decoration: none; }
.chip .i { width: 17px; height: 17px; color: var(--accent-ink); }
.chip.is-on { border-color: var(--text); background: var(--text); color: var(--bg); }
.chip-sm { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 8px; border-radius: var(--radius-pill); background: var(--teal-soft); color: var(--accent-ink); font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.chip-sm .i { width: 14px; height: 14px; }
.chip-muted { background: var(--surface-2); color: var(--muted); }
.chip-ghost { border-style: dashed; color: var(--accent-ink); font-weight: 600; }
button.chip-sm, .tag-filter .chip { cursor: pointer; }

.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 28px; padding: 0 8px; border-radius: 8px; font: 800 11.5px/1 var(--font); letter-spacing: .06em; color: #1D1713; background: #F2A93B; }
.badge-mav { background: #F2A93B; color: #1D1713; }
.badge-sco { background: #0E6B66; color: #FFF8EC; }
.badge-l33 { background: #D45D3A; color: #FFF8EC; }
.badge-l31 { background: #E9DFCF; color: #1D1713; }
.badge-info, .badge-other { background: var(--surface-2); color: var(--text-soft); box-shadow: inset 0 0 0 1px var(--border-strong); }
[data-theme="dark"] .badge-l31 { background: #3A322B; color: #F3ECE2; }
.badge-lg { min-width: 58px; height: 40px; border-radius: 12px; font-size: 14px; }

.tile { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); color: #9A5A08; }
[data-theme="dark"] .tile { color: var(--accent); }
.tile .i { width: 22px; height: 22px; }
.tile-sm { width: 34px; height: 34px; border-radius: 10px; }
.tile-sm .i { width: 18px; height: 18px; }
.tile-lg { width: 56px; height: 56px; border-radius: 18px; }
.tile-lg .i { width: 28px; height: 28px; }
.tile-accent, .tile-grad { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 20px -10px rgba(214, 140, 30, .7); }

/* ---------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 6px 24px -18px rgba(74, 52, 30, .4); }
.header-in { display: flex; align-items: center; gap: 18px; height: 100%; }
.logo { display: inline-flex; align-items: center; gap: 9px; flex: none; color: var(--text); text-decoration: none; }
.logo:hover { text-decoration: none; }
.mark { width: 36px; height: 36px; }
.logo .mark { color: var(--text); }
.logo-word { font: 800 21px/1 var(--font-display); letter-spacing: -.03em; }
.logo-tld { color: var(--accent-ink); font-weight: 600; }
.main-nav { flex: 1; min-width: 0; }
.main-nav > ul { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-link { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border: 0; border-radius: var(--radius-pill); background: none; color: var(--text-soft); font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav-link:hover, .nav-link[aria-expanded="true"] { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link[aria-current], .nav-link[data-active] { color: var(--text); font-weight: 650; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.i-chev { width: 15px; height: 15px; opacity: .7; transition: transform .2s; }
[aria-expanded="true"] > .i-chev { transform: rotate(180deg); }
.header-tools { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.header-cta { margin-inline-start: 6px; }
.header-cta .i { width: 17px; height: 17px; }
.menu-btn { display: none; }
.lang-code { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; }
.theme-btn .i-moon { display: none; }
[data-theme="dark"] .theme-btn .i-sun { display: none; }
[data-theme="dark"] .theme-btn .i-moon { display: block; }

.pop { position: relative; }
.pop-panel { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60; min-width: 220px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); animation: pop-in .16s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .pop-panel { animation: none; } }
.theme-panel button, .model-panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 12px; background: none; text-align: start; font-size: 14.5px; }
.theme-panel button:hover, .model-panel button:hover, .theme-panel button:focus-visible, .model-panel button:focus-visible { background: var(--surface-2); }
.theme-panel [aria-checked="true"], .model-panel [aria-checked="true"] { background: var(--accent-soft); font-weight: 600; }
.lang-panel { width: 300px; padding: 0; overflow: hidden; }
.lang-search { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--muted); }
.lang-search input { flex: 1; min-width: 0; padding: 4px 0; border: 0; background: none; outline: none; color: var(--text); }
.lang-list { max-height: min(380px, 60vh); margin: 0; padding: 6px; overflow-y: auto; list-style: none; }
.lang-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; color: var(--text); font-size: 14.5px; text-decoration: none; }
.lang-list a:hover, .lang-list a:focus-visible { background: var(--surface-2); }
.lang-list a[aria-current] { background: var(--accent-soft); font-weight: 600; }
.lang-list small { color: var(--muted); font-size: 11.5px; letter-spacing: .05em; }
.lang-list .i { width: 16px; height: 16px; color: var(--accent-ink); }

.nav-drop { position: relative; }
.mega { inset-inline-start: 50%; inset-inline-end: auto; transform: translateX(-50%); width: max-content; max-width: min(720px, 92vw); padding: 12px; }
[dir="rtl"] .mega { transform: translateX(50%); }
.mega a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: var(--text); font-size: 14.5px; font-weight: 550; text-decoration: none; }
.mega a:hover, .mega a:focus-visible, .mega a[aria-current] { background: var(--surface-2); }
.mt { display: flex; flex-direction: column; min-width: 0; }
.mt small { color: var(--muted); font-size: 12.5px; font-weight: 400; line-height: 1.35; }
.mi { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--accent-ink); }
.mi .i { width: 18px; height: 18px; }
.badge.mi { width: auto; min-width: 42px; height: 30px; }
.mega-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 8px; }
.mega-col + .mega-col { padding-inline-start: 8px; border-inline-start: 1px solid var(--border); }
.mega-h { margin: 4px 12px 6px; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.mega-list { display: grid; min-width: 300px; }
.mega-grid { display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); }
.mega-all { justify-content: center; margin-top: 6px; border-top: 1px solid var(--border); border-radius: 0 0 12px 12px !important; color: var(--accent-ink) !important; font-size: 14px !important; }
.mega-all .i { width: 16px; height: 16px; }

/* mobile sheet */
.sheet { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: var(--bg); overflow-y: auto; animation: sheet-in .2s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(8px); } }
.sheet-top { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; height: var(--header-h); padding-inline: 20px; background: var(--bg); border-bottom: 1px solid var(--border); }
.sheet-body { display: grid; gap: 10px; padding: 18px 20px 40px; }
.sheet-group { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sheet-group > summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; font: 700 17px/1.2 var(--font-display); cursor: pointer; list-style: none; }
.sheet-group > summary::-webkit-details-marker { display: none; }
.sheet-group[open] > summary .i { transform: rotate(180deg); }
.sheet-links { display: grid; padding: 0 8px 10px; }
.sheet-links a { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 12px; color: var(--text); font-weight: 550; text-decoration: none; }
.sheet-links a:hover { background: var(--surface-2); }
.sheet-plain { padding: 6px 0 0; grid-template-columns: 1fr 1fr; }

/* ---------------------------------------------------------------- sections */
.section { padding-block: 72px; }
.section-tight { padding-block: 40px; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 17.5px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; }
.section-head-row > div { max-width: 720px; }
.section-title-sm { margin: 48px 0 18px; font-size: 22px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); font-weight: 650; font-size: 15px; text-decoration: none; white-space: nowrap; }
.link-more:hover { text-decoration: underline; }
.link-more .i { width: 17px; height: 17px; transition: transform .2s var(--ease); }
.link-more:hover .i { transform: translateX(3px); }
[dir="rtl"] .link-more:hover .i { transform: scaleX(-1) translateX(3px); }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 10px; border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--border)); border-radius: var(--radius-pill); background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--text-soft); font-size: 13.5px; font-weight: 600; }
.eyebrow-dot { width: 9px; height: 9px; transform: rotate(45deg); border-radius: 2px; background: var(--accent-2); box-shadow: 0 0 0 3px var(--coral-soft); }

/* ---------------------------------------------------------------- home hero */
.hero { position: relative; padding: 56px 0 0; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 85% 20%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%), radial-gradient(45% 55% at 0% 100%, color-mix(in srgb, var(--teal) 14%, transparent), transparent 70%), radial-gradient(40% 40% at 50% 0%, color-mix(in srgb, var(--terracotta) 9%, transparent), transparent 70%), var(--bg); }
.hero-bg::after, .page-hero-bg::after, .cta-in::after { content: ""; position: absolute; inset: 0; opacity: var(--grain-opacity); pointer-events: none; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: 56px; padding-bottom: 64px; }
.hero-title { margin-top: 20px; font-size: clamp(40px, 5.6vw, 68px); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; }
.hero-lead { max-width: 560px; margin-top: 18px; color: var(--text-soft); font-size: 19px; line-height: 1.55; }
.composer { display: block; position: relative; margin-top: 28px; padding: 10px; border: 1.5px solid var(--border-strong); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-lg); transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: var(--accent-ink); box-shadow: var(--shadow-lg), var(--ring); }
.composer textarea { display: block; width: 100%; min-height: 64px; max-height: 220px; padding: 10px 12px 6px; border: 0; background: none; outline: none; resize: none; font-size: 17px; line-height: 1.5; }
.composer textarea::placeholder { color: var(--muted); }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px 0; }
.composer-hint { color: var(--muted); font-size: 12.5px; }
.model-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px 4px 5px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface-2); font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.model-pill:hover { border-color: var(--border-strong); }
.model-pill .badge { min-width: 38px; height: 28px; border-radius: var(--radius-pill); font-size: 10.5px; }
.mp-badge { display: contents; }
.model-pop .pop-panel { inset-inline-start: 0; inset-inline-end: auto; top: auto; bottom: calc(100% + 10px); width: 340px; max-width: calc(100vw - 40px); }
.model-panel button { gap: 12px; }
.model-panel .badge { min-width: 44px; }
.model-panel .mt { flex: 1; }
.mm-img { display: inline-flex; color: var(--accent-ink); }
.mm-img .i { width: 17px; height: 17px; }
.send-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; min-width: 46px; padding: 0 18px; border: 0; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px; box-shadow: 0 6px 16px -6px rgba(214, 140, 30, .6); transition: background .15s, transform .15s; }
.send-btn:hover { background: var(--accent-hover); }
.send-btn:active { transform: scale(.97); }
.send-btn .i { width: 19px; height: 19px; stroke-width: 2.2; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.hero-chips .chip { background: color-mix(in srgb, var(--surface) 80%, transparent); }
.hero-note { display: flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.hero-note .i { width: 17px; height: 17px; color: var(--accent-ink); }
.hero-visual { position: relative; padding-bottom: 40px; }
.hero-art { overflow: hidden; border-radius: 32px; aspect-ratio: 16 / 13; background: var(--surface-2); box-shadow: var(--shadow-lg); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.mock { position: absolute; inset-inline-start: -36px; bottom: 0; width: min(330px, 80%); border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.mock-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.mock-dots { display: flex; gap: 5px; }
.mock-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.mock-model { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; color: var(--text-soft); }
.mock-model .badge { min-width: 32px; height: 20px; font-size: 9.5px; border-radius: 6px; }
.mock-body { display: grid; gap: 12px; padding: 14px; }
.mock-user { justify-self: end; max-width: 88%; padding: 9px 13px; border-radius: 16px 16px 4px 16px; background: var(--accent-soft); font-size: 13.5px; line-height: 1.45; }
[dir="rtl"] .mock-user { border-radius: 16px 16px 16px 4px; }
.mock-bot { display: flex; gap: 10px; }
.mock-avatar { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 10px; background: var(--text); color: var(--bg); }
.mock-avatar .mark { width: 24px; height: 24px; color: var(--bg); }
.mock-lines { display: grid; flex: 1; gap: 7px; padding-top: 4px; }
.mock-lines i { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: shimmer 2.4s linear infinite; }
.mock-lines i.short { width: 62%; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .mock-lines i { animation: none; } }
.weave-hero { position: absolute; inset-inline: 0; bottom: 0; }

/* ---------------------------------------------------------------- ads */
.ad-slot { display: flex; flex-direction: column; align-items: center; max-width: 980px; margin: 40px auto; }
.ad-label { margin-bottom: 6px; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.ad-slot > div { width: 100%; min-height: 250px; border-radius: var(--radius); background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.ad-slot--content { margin: 36px 0; max-width: none; }
.wrap > .ad-slot { margin-block: 48px; }

/* ---------------------------------------------------------------- home: models */
.model-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.model-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.model-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 5px; background: var(--tone, var(--accent)); }
.model-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tone-mav { --tone: #F2A93B; }
.tone-sco { --tone: #0E6B66; }
.tone-l33 { --tone: #D45D3A; }
.tone-l31 { --tone: #C9B79E; }
.model-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ctx { color: var(--muted); font-size: 12.5px; }
.ctx strong { color: var(--text); font-weight: 700; }
.model-card h3 { font-size: 21px; }
.model-card p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.chips-sm { display: flex; flex-wrap: wrap; gap: 6px; }
.model-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: auto; padding-top: 6px; }
.model-card-actions .btn { white-space: normal; text-align: center; }
.model-card-actions .link-more { font-size: 14px; }

/* features bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.bento-cell { display: flex; flex-direction: column; gap: 10px; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.bento-cell h3 { font-size: 20px; }
.bento-cell p { color: var(--muted); font-size: 15.5px; }
.bento-1, .bento-2 { grid-column: span 3; }
.bento-3, .bento-4, .bento-5, .bento-6 { grid-column: span 3; }
@media (min-width: 1000px) { .bento-1 { grid-column: span 4; } .bento-2 { grid-column: span 2; } .bento-3, .bento-4, .bento-5 { grid-column: span 2; } .bento-6 { grid-column: span 6; } }
.bento-1 { background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), var(--surface) 60%); }
.bento-2 .tile { background: var(--teal-soft); color: var(--accent-ink); }
.bento-6 { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 14px 20px; background: linear-gradient(90deg, var(--surface), color-mix(in srgb, var(--teal) 10%, var(--surface))); }
.bento-6 p { flex: 1 1 300px; }
.bento-5 .tile { background: var(--coral-soft); color: var(--coral); }

/* tools + assistants */
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tool-card { display: flex; align-items: flex-start; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, transform .2s var(--ease), box-shadow .2s; }
.tool-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.tool-card .card-text { -webkit-line-clamp: 2; }
.assist-row { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: center; gap: 28px; margin-top: 30px; padding: 26px; border-radius: var(--radius-lg); background: var(--teal-soft); }
.assist-head h3 { font-size: 21px; }
.assist-head p { margin-top: 6px; color: var(--text-soft); font-size: 15px; }
.assist-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.step { position: relative; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.step-n { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin-bottom: 18px; color: var(--bg); font: 800 18px/1 var(--font-display); isolation: isolate; }
.step-n::before { content: ""; position: absolute; inset: 7px; z-index: -1; transform: rotate(45deg); border-radius: 8px; background: var(--text); box-shadow: 4px 4px 0 var(--accent); }
.step h3 { font-size: 20px; }
.step p { margin-top: 8px; color: var(--muted); font-size: 15.5px; }

/* family timeline */
.family { --fam-bg: #1D1713; --fam-ink: #F7F2EA; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: 48px; padding: 44px; border-radius: 32px; background: var(--fam-bg); color: var(--fam-ink); position: relative; overflow: hidden; }
[data-theme="dark"] .family { --fam-bg: #2A231E; box-shadow: inset 0 0 0 1px var(--border); }
.family h2 { color: inherit; font-size: clamp(26px, 3vw, 36px); }
.family p { margin-top: 14px; color: color-mix(in srgb, var(--fam-ink) 80%, var(--fam-bg)); }
.family-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.family .btn-ghost { border-color: color-mix(in srgb, var(--fam-ink) 30%, transparent); background: transparent; color: var(--fam-ink); }
.family .btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.timeline { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; inset-inline: 10%; top: 41px; height: 2px; background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 14px); opacity: .7; }
.timeline li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.tl-year { font: 700 13px/1 var(--font); color: color-mix(in srgb, var(--fam-ink) 70%, var(--fam-bg)); letter-spacing: .06em; height: 20px; }
.tl-dot { width: 18px; height: 18px; transform: rotate(45deg); border-radius: 4px; background: var(--fam-bg); box-shadow: inset 0 0 0 2px var(--accent); }
.is-now .tl-dot { background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent); }
.tl-name { font: 700 14.5px/1.25 var(--font-display); }
.is-now .tl-name { color: var(--accent); }

/* comparisons strip */
.compare-strip { display: flex; gap: 12px; padding-bottom: 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.vs-card { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none; scroll-snap-align: start; white-space: nowrap; }
.vs-card:hover { border-color: var(--accent-ink); text-decoration: none; }
.vs-mark { display: inline-flex; color: var(--coral); }
.vs-card .card-title { font-size: 15px; }
.vs-card .card-arrow { color: var(--muted); }
.vs-card .card-arrow .i { width: 16px; height: 16px; }

/* run locally / api */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.duo-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 32px; border-radius: var(--radius-lg); color: var(--text); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s; }
.duo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.duo-card h2 { font-size: 26px; }
.duo-card p { color: var(--text-soft); }
.duo-card .link-more { margin-top: auto; padding-top: 6px; }
.duo-local { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.duo-api { background: color-mix(in srgb, var(--teal) 12%, var(--surface)); }
.duo-api .tile { background: var(--teal-soft); color: var(--accent-ink); }
.duo-local .tile { background: var(--surface); }

/* FAQ */
.faq-list { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.faq-item > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; font: 650 17px/1.35 var(--font-display); cursor: pointer; list-style: none; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-ic { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); transition: transform .2s var(--ease), background .2s; }
.faq-ic .i { width: 17px; height: 17px; }
.faq-item[open] .faq-ic { transform: rotate(45deg); background: var(--accent); color: var(--on-accent); }
.faq-a { padding: 0 22px 20px; color: var(--text-soft); }

/* home about */
.home-about { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); align-items: center; gap: 48px; }
.home-about-art { overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.home-about .prose p + p { margin-top: 14px; }

/* CTA band */
.cta-band { padding: 24px 0 80px; }
.cta-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 64px 28px 56px; border-radius: 32px; background: radial-gradient(70% 90% at 50% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%), var(--surface-2); text-align: center; overflow: hidden; isolation: isolate; }
.cta-in::after { z-index: -1; }
.cta-in h2 { max-width: 720px; font-size: clamp(28px, 3.6vw, 44px); }
.cta-in p { max-width: 600px; color: var(--text-soft); font-size: 17.5px; }
.cta-in .btn { margin-top: 8px; }
.cta-mark { display: inline-flex; padding: 12px; border-radius: 22px; background: var(--text); color: var(--bg); box-shadow: var(--shadow); }
.cta-mark .mark { width: 44px; height: 44px; }
.weave-cta { position: absolute; inset-inline: 0; top: 0; }

/* ---------------------------------------------------------------- cards */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, transform .2s var(--ease), box-shadow .2s; }
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.card-media { margin: -20px -20px 0; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; aspect-ratio: 16 / 9; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card-title { font: 700 17.5px/1.3 var(--font-display); letter-spacing: -.01em; }
.card-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.card-meta { color: var(--muted); font-size: 13px; font-weight: 600; }
.card-meta.is-in { color: var(--accent-ink); }
.card-arrow { position: absolute; inset-inline-end: 18px; bottom: 18px; color: var(--muted); opacity: 0; transition: opacity .2s, transform .2s; }
.card:hover .card-arrow { opacity: 1; transform: translateX(2px); }
.card-photo .card-media { aspect-ratio: 4 / 3; }
.card-model { flex-direction: row; align-items: flex-start; }
.card-compact { flex-direction: row; align-items: flex-start; }
.card-compact .card-text { -webkit-line-clamp: 2; }

/* ---------------------------------------------------------------- inner page hero */
.page-hero { position: relative; padding: 36px 0 48px; overflow: hidden; isolation: isolate; }
.page-hero-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 80% at 100% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%), radial-gradient(40% 70% at 0% 100%, color-mix(in srgb, var(--teal) 9%, transparent), transparent 70%), var(--bg); }
.weave-hero-edge { position: absolute; inset-inline: 0; bottom: 0; }
.page-hero-in { display: grid; gap: 40px; }
.page-hero.has-aside .page-hero-in, .page-hero-in.has-art { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); align-items: start; }
.page-hero-in.has-art { align-items: center; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); }
.page-hero-copy { max-width: 780px; }
.page-hero h1 { margin-top: 14px; font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; letter-spacing: -.03em; }
.page-hero .tile, .page-hero .badge-lg, .page-hero .vs { margin-top: 20px; }
.page-hero .lead { margin-top: 14px; color: var(--text-soft); font-size: 19px; line-height: 1.55; }
.page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; color: var(--muted); font-size: 14px; }
.dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 13.5px; }
.crumbs li { display: inline-flex; align-items: center; gap: 4px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs .i { width: 14px; height: 14px; opacity: .6; }
.crumbs [aria-current] { color: var(--text-soft); font-weight: 600; }
.hub-art { overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 16 / 10; }
.hub-art img { width: 100%; height: 100%; object-fit: cover; }
.cover { margin: 0 0 8px; overflow: hidden; border-radius: 28px; box-shadow: var(--shadow); aspect-ratio: 16 / 7; background: var(--surface-2); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.vs { display: inline-flex; align-items: center; gap: 12px; }
.vs-x { font: 800 15px/1 var(--font-display); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.facts-card { position: relative; display: grid; gap: 14px; padding: 26px 22px 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.facts-card .weave { position: absolute; inset-inline: 0; top: 0; }
.facts-title { display: flex; align-items: center; gap: 8px; font: 700 16px/1.2 var(--font-display); }
.facts-title .i { color: var(--accent-ink); }
.facts { width: 100%; border-collapse: collapse; font-size: 14px; }
.facts th, .facts td { padding: 8px 0; border-bottom: 1px solid var(--border); text-align: start; vertical-align: top; }
.facts th { width: 38%; padding-inline-end: 12px; color: var(--muted); font-weight: 500; }
.facts td { font-weight: 550; overflow-wrap: anywhere; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts-link { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.facts-link span { color: var(--text-soft); font-weight: 500; }
.facts-link .i { width: 15px; height: 15px; }
.facts-note { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--text-soft); font-size: 14px; font-weight: 600; }
.facts-note .i { width: 18px; height: 18px; color: var(--coral); }

/* ---------------------------------------------------------------- article */
.article-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 32px; }
.article-grid.no-toc { grid-template-columns: minmax(0, 1fr); }
.article-grid.no-toc .prose { margin-inline: auto; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
.toc-box > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; list-style: none; }
.toc-box > summary::-webkit-details-marker { display: none; }
.toc-box > summary .i { width: 16px; height: 16px; transition: transform .2s; }
.toc-box[open] > summary .i { transform: rotate(180deg); }
.toc ol { margin: 0; padding: 0; list-style: none; border-inline-start: 2px solid var(--border); }
.toc a { display: block; margin-inline-start: -2px; padding: 6px 12px; border-inline-start: 2px solid transparent; color: var(--muted); font-size: 14px; line-height: 1.4; text-decoration: none; }
.toc a:hover { color: var(--text); }
.toc a.is-active { border-inline-start-color: var(--accent); color: var(--text); font-weight: 600; }

.prose { max-width: 740px; color: var(--text-soft); font-size: 17.5px; line-height: 1.72; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; color: var(--text); font-size: clamp(24px, 2.6vw, 31px); }
.prose h3 { margin-top: 1.6em; color: var(--text); font-size: 21px; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose strong { color: var(--text); font-weight: 650; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose ul > li::marker { color: var(--accent-2); }
.prose ol > li::marker { color: var(--accent-ink); font-weight: 700; }
.prose blockquote { margin-inline: 0; padding: 16px 20px; border-inline-start: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; background: var(--accent-soft); color: var(--text); }
[dir="rtl"] .prose blockquote { border-radius: var(--radius) 0 0 var(--radius); }
.prose code { padding: .12em .4em; border-radius: 6px; background: var(--surface-2); font: .88em/1.4 var(--font-mono); color: var(--text); }
.prose pre { padding: 18px 20px; border-radius: var(--radius); background: #1D1713; color: #F3ECE2; overflow-x: auto; font: 14px/1.6 var(--font-mono); direction: ltr; text-align: left; }
.prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: top; }
.prose thead th { border-bottom: 2px solid var(--border-strong); color: var(--text); font-weight: 650; white-space: nowrap; }
.prose tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.prose hr { height: 11px; border: 0; background: inherit; }
.prose figure { margin-inline: 0; }
.prose img { border-radius: var(--radius); }
.prose a[target="_blank"]::after { content: "↗"; margin-inline-start: 2px; font-size: .8em; }
.prose details { padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.prose details summary { color: var(--text); font-weight: 650; cursor: pointer; }
.prose .ad-slot { max-width: none; }
.hub-intro { max-width: 780px; margin: 8px 0 0; }
.hub-cards { padding-top: 32px; }
.hub-cards .section-title-sm:first-child { margin-top: 0; }
.related { padding: 48px 0 24px; }

/* prompt categories */
.tag-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tag-filter .chip { min-height: 32px; padding: 4px 12px; font-size: 13.5px; }
.prompt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.prompt-card { display: flex; flex-direction: column; gap: 12px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.prompt-top { display: flex; align-items: baseline; gap: 12px; }
.prompt-n { color: var(--coral); font: 800 14px/1 var(--font-display); }
.prompt-card h2 { font-size: 18px; }
.prompt-text { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); color: var(--text-soft); font-size: 15px; line-height: 1.6; white-space: pre-line; }
.prompt-text mark { padding: 0 .2em; border-radius: 4px; background: var(--accent-soft); color: var(--text); font-weight: 600; }
.prompt-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.prompt-tags { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; }
.prompt-actions { display: flex; gap: 8px; }
.is-done { border-color: var(--success) !important; color: var(--success) !important; }

/* assistants hub */
.assist-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.assist-card h2 { font-size: 19px; }
.assist-card p { color: var(--muted); font-size: 14.5px; }
.starters { display: grid; gap: 6px; width: 100%; margin: 0; padding: 0; list-style: none; }
.starters a { display: block; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text-soft); font-size: 13.5px; line-height: 1.4; text-decoration: none; }
.starters a:hover { color: var(--text); background: var(--accent-soft); }
.assist-card .btn { margin-top: auto; }

/* tool pages */
.wrap-tool { max-width: 920px; }
.page-hero-tool { padding-bottom: 28px; }
.tool-preview { display: grid; gap: 12px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.tp-head { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 17px; }
.tp-label { color: var(--text-soft); font-size: 14px; font-weight: 600; }
.tool-preview textarea { width: 100%; padding: 14px 16px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--bg); resize: vertical; font-size: 16px; line-height: 1.55; }
.tool-preview textarea:focus { outline: none; border-color: var(--accent-ink); box-shadow: var(--ring); }
.tp-options { display: flex; flex-wrap: wrap; gap: 12px; }
.tp-select { display: grid; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.tp-select select { min-width: 160px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-2); }
.tp-foot { display: flex; justify-content: flex-end; }
.tp-result { display: flex; align-items: center; justify-content: center; min-height: 120px; padding: 18px; border: 1.5px dashed var(--border-strong); border-radius: 14px; color: var(--muted); font-size: 14.5px; text-align: center; }
.i-spark { width: 17px; height: 17px; }

/* contact */
.contact-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; padding-top: 8px; }
.contact-card { padding: 30px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.contact-card h2 { font-size: 24px; }
.contact-card > .muted { margin-top: 8px; font-size: 15.5px; }
.form { display: grid; gap: 16px; margin-top: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { color: var(--text-soft); font-size: 14px; font-weight: 600; }
.field input, .field textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--bg); font-size: 16px; }
.field textarea { resize: vertical; min-height: 150px; line-height: 1.55; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent-ink); box-shadow: var(--ring); }
.field-file label { display: inline-flex; align-items: center; gap: 8px; }
.field-file label .i { width: 18px; height: 18px; color: var(--accent-ink); }
.field-file input { padding: 9px 12px; border-style: dashed; font-size: 14px; }
.contact-card .fbf-file .fbf-btn { color: var(--accent-ink); }
.field-file input::file-selector-button { margin-inline-end: 12px; padding: 6px 14px; border: 0; border-radius: var(--radius-pill); background: var(--teal-soft); color: var(--accent-ink); font-weight: 600; cursor: pointer; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.form-status { color: var(--muted); font-size: 14.5px; }
[data-state="sent"] .form-status { color: var(--success); font-weight: 600; }
[data-state="error"] .form-status { color: var(--danger); font-weight: 600; }
.i-send { width: 17px; height: 17px; }
.contact-side { display: grid; gap: 14px; }
.contact-mail { display: flex; gap: 14px; padding: 20px; border-radius: var(--radius-lg); background: var(--teal-soft); color: var(--text-soft); font-size: 15px; }
.contact-mail .tile { background: var(--surface); color: var(--accent-ink); }
.contact-links { display: grid; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.contact-links a { display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: var(--text); font-weight: 600; text-decoration: none; }
.contact-links a + a { border-top: 1px solid var(--border); }
.contact-links a:hover { background: var(--surface-2); }
.contact-links a span { flex: 1; }
.contact-links .i { color: var(--accent-ink); }

/* share */
.share-page { position: relative; isolation: isolate; padding-top: 32px; }
.share-page > .page-hero-bg { height: 360px; }
.share-bar { padding: 8px 0 8px; }
.share-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--text-soft); font-size: 13.5px; font-weight: 600; }
.share-badge .i { width: 16px; height: 16px; }
.share-bar h1 { margin-top: 16px; font-size: clamp(26px, 3.4vw, 38px); }
.share-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.share-thread { display: grid; gap: 18px; padding: 8px 0 24px; }
.share-thread .cg-msg-user { justify-self: end; max-width: 85%; }
.share-thread .cg-bubble { padding: 12px 16px; border-radius: 20px 20px 6px 20px; background: var(--accent-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.share-thread .cg-md-raw { white-space: pre-wrap; overflow-wrap: anywhere; }
.share-thread .cg-msg-ai { padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.cg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.share-foot { margin-bottom: 24px; color: var(--muted); font-size: 13.5px; text-align: center; }

/* 404 */
.nf { position: relative; isolation: isolate; }
.nf > .page-hero-bg { height: 100%; }
.nf-in { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 56px 24px 80px; text-align: center; }
.nf-art { width: 220px; overflow: hidden; border-radius: 32px; box-shadow: var(--shadow); }
.nf h1 { font-size: clamp(30px, 4vw, 44px); }
.nf .lead { max-width: 560px; color: var(--text-soft); font-size: 18px; }
.nf .eyebrow { font-family: var(--font-display); font-weight: 800; }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.nf-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin: 18px 0 0; padding: 0; list-style: none; }
.nf-links a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.nf-links .i { width: 16px; height: 16px; }

/* chat placeholder (until assets/chat ships its own page) */
.chat-placeholder { overflow: hidden; }
.chat-ph { display: grid; grid-template-columns: 290px minmax(0, 1fr); height: 100vh; height: 100dvh; }
.chat-ph-side { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-inline-end: 1px solid var(--border); background: var(--surface); overflow-y: auto; }
.chat-ph-fill { flex: 1; }
.chat-ph-side .ad-slot { margin: 0; }
.chat-ph-main { display: flex; flex-direction: column; min-width: 0; }
.chat-ph-top { display: flex; justify-content: flex-end; gap: 4px; padding: 12px 16px; }
.chat-ph-welcome { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
.chat-ph-welcome p { max-width: 520px; color: var(--muted); }
.mark-xl { width: 72px; height: 72px; color: var(--text); }
.composer-dock { width: min(760px, calc(100% - 32px)); margin: 0 auto 20px; }

/* ---------------------------------------------------------------- footer */
.site-footer { position: relative; margin-top: 24px; padding: 56px 0 32px; background: var(--bg-soft); border-top: 1px solid var(--border); }
.weave-foot { position: absolute; inset-inline: 0; top: -11px; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 32px; }
.foot-brand p { margin-top: 14px; max-width: 320px; color: var(--muted); font-size: 14.5px; }
.built { display: inline-flex !important; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--text) !important; font-weight: 650; font-size: 13.5px !important; }
.built-mark { display: inline-flex; padding: 3px; border-radius: 50%; background: var(--text); }
.built-mark .mark { width: 20px; height: 20px; color: var(--bg); }
.foot-h { margin-bottom: 12px; color: var(--text); font: 700 14px/1.2 var(--font-display); letter-spacing: .02em; }
.foot-col ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.foot-col a { color: var(--muted); font-size: 14.5px; text-decoration: none; }
.foot-col a:hover { color: var(--text); text-decoration: underline; }
.foot-langs { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); }
.foot-langs > summary { display: inline-flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.foot-langs > summary::-webkit-details-marker { display: none; }
.foot-langs > summary .i { width: 17px; height: 17px; }
.foot-langs ul { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; padding: 0; list-style: none; }
.foot-langs a { color: var(--muted); font-size: 14px; text-decoration: none; }
.foot-langs a:hover, .foot-langs a[aria-current] { color: var(--text); text-decoration: underline; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: 24px; color: var(--muted); font-size: 13px; }
.foot-note { max-width: 780px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .main-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .model-grid, .tool-grid, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-top { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .hero { padding-top: 32px; }
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-bottom: 52px; }
  .hero-visual { max-width: 560px; }
  .mock { inset-inline-start: auto; inset-inline-end: 16px; }
  .page-hero.has-aside .page-hero-in, .page-hero-in.has-art { grid-template-columns: minmax(0, 1fr); }
  .hub-art { max-width: 560px; }
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .toc { position: static; max-height: none; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
  .toc-box > summary { margin-bottom: 0; }
  .toc-box[open] > summary { margin-bottom: 10px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .family { grid-template-columns: minmax(0, 1fr); padding: 32px 26px; gap: 32px; }
  .assist-row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .home-about { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .home-about-art { max-width: 420px; }
  .contact-wrap { grid-template-columns: minmax(0, 1fr); }
  .prompt-grid { grid-template-columns: minmax(0, 1fr); }
  .chat-ph { grid-template-columns: minmax(0, 1fr); }
  .chat-ph-side { display: none; }
}
@media (max-width: 720px) {
  :root { --header-h: 60px; }
  body { font-size: 16px; }
  .wrap { padding-inline: 18px; }
  .section { padding-block: 52px; }
  .section-head { margin-bottom: 26px; }
  .section-head p { font-size: 16px; }
  .section-head-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .header-in { gap: 8px; }
  .header-cta { display: none; }
  .logo-word { font-size: 19px; }
  .mark { width: 32px; height: 32px; }
  .lang-code { display: none; }
  .hero-title { font-size: clamp(36px, 10vw, 48px); }
  .hero-lead { font-size: 17px; }
  .composer { border-radius: 22px; }
  .send-label { display: none; }
  .send-btn { padding: 0; width: 46px; }
  .model-grid, .tool-grid, .grid-3, .grid-4, .duo { grid-template-columns: minmax(0, 1fr); }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento-cell { grid-column: auto !important; padding: 22px; }
  .bento-6 { flex-direction: column; align-items: flex-start; }
  .timeline { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .timeline::before { inset-inline-start: 68px; inset-inline-end: auto; top: 6px; bottom: 6px; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--accent) 0 8px, transparent 8px 14px); }
  .timeline li { flex-direction: row; gap: 18px; text-align: start; }
  .tl-year { width: 50px; height: auto; text-align: end; }
  .duo-card { padding: 24px; }
  .duo-card h2 { font-size: 22px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .contact-card { padding: 22px; }
  .cover { aspect-ratio: 16 / 9; border-radius: 20px; }
  .page-hero { padding: 24px 0 40px; }
  .page-hero .lead { font-size: 17px; }
  .prose { font-size: 16.5px; }
  .ad-slot > div { min-height: 280px; }
  .foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .mega-grid { grid-template-columns: minmax(0, 1fr); }
  .faq-item > summary { padding: 16px 18px; font-size: 16px; }
  .faq-a { padding: 0 18px 18px; }
  .cta-in { padding: 52px 20px 44px; border-radius: 24px; }
  .family { border-radius: 24px; }
  .mock { position: relative; inset: auto; width: auto; margin: -48px 16px 0; }
  .hero-visual { padding-bottom: 0; }
  .hero-art { border-radius: 24px; }
  .sheet-plain { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .wrap { padding-inline: 14px; }
  .lang-btn { padding: 0 6px; min-width: 36px; }
  .icon-btn { min-width: 36px; }
  .model-pill { padding-inline-end: 8px; font-size: 13.5px; }
  .model-pill .badge { display: none; }
  .hero-chips .chip { font-size: 13.5px; }
}

@media print {
  .site-header, .site-footer, .ad-slot, .cta-band, .related, .toc, .sheet, .weave { display: none !important; }
  .article-grid { display: block; }
}
