:root {
  --ink: #17161b;
  --muted: #6d6a75;
  --soft: #918d9a;
  --line: #e8e4ed;
  --line-strong: #d9d4e0;
  --paper: #fbfaf8;
  --white: #ffffff;
  --panel: #f6f3fb;
  --violet: #6c4cf1;
  --violet-dark: #4c31c7;
  --violet-soft: #eee9ff;
  --electric: #39d7ff;
  --magenta: #ff4fce;
  --indigo: #7b61ff;
  --lime: #c9ff73;
  --mint: #d9f9e5;
  --amber: #fff1c7;
  --blue: #dbebff;
  --shadow: 0 24px 70px rgba(38, 25, 77, 0.1);
  --sidebar: 248px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); overflow-x: hidden; }
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
img, svg { display: block; }
::selection { background: #d8ceff; }

.app-shell { min-height: 100vh; }
.ambient-ai { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; opacity: .72; }
.ambient-ai span { position: absolute; width: 38vw; height: 38vw; border-radius: 50%; filter: blur(90px); animation: ambientDrift 18s ease-in-out infinite alternate; }
.ambient-ai span:nth-child(1) { left: 20%; top: -25%; background: rgba(117,80,255,.16); }
.ambient-ai span:nth-child(2) { right: -18%; top: 30%; background: rgba(255,79,206,.1); animation-delay: -6s; }
.ambient-ai span:nth-child(3) { left: 18%; bottom: -32%; background: rgba(57,215,255,.12); animation-delay: -12s; }
@keyframes ambientDrift { to { transform: translate3d(8vw, 6vh, 0) scale(1.18); } }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar);
  padding: 18px 14px; border-right: 1px solid var(--line); background: rgba(251,250,248,.95);
  backdrop-filter: blur(18px); overflow-y: auto; transition: transform .25s ease, width .25s ease;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-weight: 760; letter-spacing: -.03em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, var(--violet), var(--magenta)); color: white; box-shadow: 0 7px 22px rgba(108,76,241,.32), 0 0 24px rgba(255,79,206,.16); }
.brand-mark svg { width: 20px; height: 20px; }
.brand small { margin-left: auto; color: var(--violet); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.new-chat { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 11px; padding: 11px; background: var(--ink); color: white; cursor: pointer; font-weight: 650; transition: transform .2s, background .2s; }
.new-chat:hover { background: #302d37; transform: translateY(-1px); }
.side-label { margin: 22px 10px 8px; color: var(--soft); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; }
.side-nav { display: grid; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; color: #4d4955; border-radius: 9px; font-size: 13px; font-weight: 530; transition: background .18s, color .18s; }
.side-link svg { width: 17px; height: 17px; color: #777280; }
.side-link:hover { background: #f1eef5; color: var(--ink); }
.side-link.active { background: var(--violet-soft); color: var(--violet-dark); font-weight: 680; }
.side-link.active svg { color: var(--violet); }
.recent-list { display: grid; gap: 4px; }
.recent-empty { margin: 2px 10px; color: var(--soft); font-size: 10px; line-height: 1.5; }
.recent-item { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-item:hover { background: var(--violet-soft); color: var(--violet-dark); }
.recent-item span { flex: none; width: 5px; height: 5px; border-radius: 50%; background: linear-gradient(135deg,var(--electric),var(--violet)); box-shadow: 0 0 8px var(--electric); }
.sidebar-account { margin-top: 26px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.sidebar-account strong { display: block; font-size: 12px; }
.sidebar-account p { margin: 5px 0 10px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.sidebar-account .text-link { padding: 0; font-size: 11px; }

.main { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 30; height: 64px; padding: 0 30px; display: flex; align-items: center; border-bottom: 1px solid rgba(232,228,237,.8); background: rgba(251,250,248,.86); backdrop-filter: blur(18px); }
.mobile-toggle { display: none; border: 0; background: transparent; padding: 8px; cursor: pointer; }
.top-links { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.top-links > a { color: #504c57; font-size: 13px; font-weight: 560; }
.top-links > a:hover { color: var(--violet); }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: 24px; }
.ai-orb-button { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(108,76,241,.2); border-radius: 50%; color: white; background: conic-gradient(from 0deg,var(--violet),var(--electric),var(--magenta),var(--violet)); cursor: pointer; box-shadow: 0 0 22px rgba(108,76,241,.28); animation: orbPulse 3s ease-in-out infinite; }
.ai-orb-button::after { content: ""; position: absolute; inset: -4px; border: 1px solid rgba(108,76,241,.22); border-radius: inherit; animation: orbRing 2.4s ease-out infinite; }
.ai-orb-button svg { width: 17px; height: 17px; }
@keyframes orbPulse { 50% { transform: scale(1.06); box-shadow: 0 0 32px rgba(255,79,206,.32); } }
@keyframes orbRing { 70%,100% { opacity: 0; transform: scale(1.35); } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 670; font-size: 13px; transition: transform .18s, box-shadow .18s, background .18s, border .18s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--violet); color: white; box-shadow: 0 7px 20px rgba(108,76,241,.22); }
.btn-primary:hover { background: var(--violet-dark); box-shadow: 0 10px 26px rgba(108,76,241,.3); }
.btn-secondary { background: white; border-color: var(--line-strong); }
.btn-secondary:hover { border-color: #bdb5c7; }
.btn-dark { background: var(--ink); color: white; }
.btn-ghost { padding-inline: 10px; background: transparent; }
.text-link { display: inline-flex; align-items: center; gap: 5px; color: var(--violet-dark); font-weight: 680; }

.page { animation: pageIn .4s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
.container { width: min(1160px, calc(100% - 56px)); margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--violet-dark); font-size: 11px; font-weight: 780; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--violet); }
.display { margin: 0; font-size: clamp(40px, 5.5vw, 76px); line-height: .98; letter-spacing: -.06em; font-weight: 760; }
.title { margin: 0; font-size: clamp(34px, 4.4vw, 62px); line-height: 1.02; letter-spacing: -.055em; font-weight: 760; }
.lede { color: var(--muted); font-size: clamp(16px, 1.7vw, 20px); line-height: 1.65; }
.gradient-text { background: linear-gradient(110deg, var(--violet), var(--magenta), #ff9554, var(--electric), var(--violet)); background-size: 260% auto; background-clip: text; color: transparent; animation: spectrumFlow 7s linear infinite; }
@keyframes spectrumFlow { to { background-position: 260% center; } }

.home-hero { position: relative; min-height: calc(100vh - 64px); padding: 70px 0 38px; overflow: hidden; }
.home-hero::before { content: ""; position: absolute; width: 680px; height: 680px; left: 50%; top: -80px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle at 38% 35%, rgba(255,101,216,.24), transparent 32%), radial-gradient(circle at 65% 42%, rgba(66,220,255,.24), transparent 33%), radial-gradient(circle, rgba(135,101,255,.3), rgba(251,250,248,0) 68%); filter: blur(20px); pointer-events: none; animation: auroraBreath 8s ease-in-out infinite alternate; }
@keyframes auroraBreath { to { transform: translateX(-50%) scale(1.12) rotate(8deg); filter: blur(32px); } }
.ai-spark-field { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ai-spark-field i { position: absolute; left: calc(8% + var(--i) * 7.4%); top: calc(14% + var(--i) * 5%); width: 4px; height: 4px; border-radius: 50%; background: white; box-shadow: 0 0 8px var(--electric), 0 0 18px var(--violet); opacity: .2; animation: sparkFloat calc(5s + var(--i) * .28s) ease-in-out infinite alternate; }
.ai-spark-field i:nth-child(3n) { background: var(--magenta); width: 6px; height: 6px; }
.ai-spark-field i:nth-child(4n) { background: var(--electric); }
@keyframes sparkFloat { 50% { opacity: .8; } to { transform: translate3d(25px,-50px,0) scale(1.8); opacity: .12; } }
.home-copy { position: relative; text-align: center; max-width: 840px; margin: 0 auto; }
.home-copy .display { max-width: 760px; margin: 0 auto; }
.home-copy .lede { max-width: 650px; margin: 20px auto 0; }
.research-box { position: relative; max-width: 850px; margin: 38px auto 0; padding: 8px; background: linear-gradient(rgba(255,255,255,.94),rgba(255,255,255,.94)) padding-box, linear-gradient(115deg,rgba(108,76,241,.75),rgba(57,215,255,.62),rgba(255,79,206,.72),rgba(108,76,241,.75)) border-box; background-size: auto, 260% 260%; border: 1px solid transparent; border-radius: 20px; box-shadow: 0 28px 80px rgba(72,46,139,.14), 0 0 40px rgba(105,73,241,.08); text-align: left; animation: researchAura 8s linear infinite; }
.research-box::after { content: ""; position: absolute; inset: 8px 16%; bottom: -14px; top: auto; height: 22px; border-radius: 50%; background: linear-gradient(90deg,var(--violet),var(--electric),var(--magenta)); filter: blur(22px); opacity: .26; z-index: -1; }
@keyframes researchAura { to { background-position: 0 0, 260% 0; } }
.research-input { width: 100%; min-height: 118px; resize: vertical; padding: 18px 18px 48px; border: 0; outline: 0; background: transparent; color: var(--ink); line-height: 1.5; }
.research-input::placeholder { color: #9c97a4; }
.research-toolbar { display: flex; align-items: center; gap: 7px; padding: 0 7px 7px; }
.tool-select { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--paper); border-radius: 9px; padding: 9px 11px; font-size: 12px; font-weight: 650; }
.model-pill { padding: 7px 9px; border-radius: 8px; background: var(--violet-soft); color: var(--violet-dark); font-size: 11px; font-weight: 730; }
.send-btn { margin-left: auto; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--violet); color: white; cursor: pointer; }
.send-btn svg { width: 18px; }
.mode-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 18px auto 0; }
.mode-tab { display: flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.68); color: #5e5966; font-size: 12px; cursor: pointer; }
.mode-tab:hover, .mode-tab.active { border-color: #b9acf3; color: var(--violet-dark); background: var(--violet-soft); }
.prompt-suggestions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; max-width: 850px; margin: 13px auto 0; }
.prompt-suggestions > span { color: var(--soft); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; font-weight: 720; }
.prompt-suggestions button { border: 0; padding: 5px 8px; border-radius: 7px; background: rgba(255,255,255,.68); color: var(--muted); font-size: 10px; cursor: pointer; }
.prompt-suggestions button:hover { background: var(--violet-soft); color: var(--violet-dark); }
.mock-answer { display: none; max-width: 850px; margin: 16px auto 0; padding: 18px; border: 1px solid #d9d1fb; border-radius: 16px; background: rgba(248,246,255,.95); text-align: left; }
.mock-answer.visible { display: block; animation: pageIn .3s ease both; }
.answer-head { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 740; }
.answer-dot { width: 24px; height: 24px; border-radius: 8px; background: conic-gradient(var(--violet),var(--electric),var(--magenta),var(--violet)); box-shadow: 0 0 18px rgba(108,76,241,.26); animation: spinSoft 5s linear infinite; }
@keyframes spinSoft { to { transform: rotate(360deg); } }
.thinking-dots { display: none; gap: 4px; margin-left: auto; }
.thinking-dots.visible { display: flex; }
.thinking-dots i, .ai-thinking i { width: 5px; height: 5px; border-radius: 50%; background: var(--violet); animation: dotWave 1s ease-in-out infinite; }
.thinking-dots i:nth-child(2), .ai-thinking i:nth-child(2) { animation-delay: .15s; background: var(--magenta); }
.thinking-dots i:nth-child(3), .ai-thinking i:nth-child(3) { animation-delay: .3s; background: var(--electric); }
@keyframes dotWave { 50% { transform: translateY(-5px); opacity: .45; } }
.mock-answer p { margin: 12px 0 0; color: #5e5968; font-size: 13px; line-height: 1.65; }
.answer-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.answer-sources span { padding: 6px 9px; border: 1px solid #d8cff9; border-radius: 99px; background: white; color: var(--violet-dark); font-size: 9px; font-weight: 680; }
.answer-actions { display: flex; gap: 7px; margin-top: 14px; }
.answer-actions .btn { min-height: 34px; font-size: 10px; }
.trust-row { position: relative; margin-top: 54px; text-align: center; }
.trust-row > p { color: var(--soft); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 680; }
.logo-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 32px; margin-top: 18px; color: #75717a; }
.logo-word { font-family: Georgia, serif; font-size: 16px; font-weight: 700; }

.section { padding: 100px 0; }
.section-tight { padding: 70px 0; }
.section-alt { background: #f2eff7; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 38px; }
.section-head h2 { max-width: 650px; margin: 0; font-size: clamp(30px, 4vw, 50px); line-height: 1.06; letter-spacing: -.045em; }
.section-head p { max-width: 430px; margin: 0; color: var(--muted); line-height: 1.7; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-card { position: relative; min-height: 235px; padding: 24px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.9); overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.tool-card::before { content: ""; position: absolute; width: 130px; height: 130px; right: -70px; top: -70px; border-radius: 50%; background: radial-gradient(circle,rgba(108,76,241,.22),transparent 68%); transition: transform .35s, opacity .35s; opacity: .45; }
.tool-card:hover { transform: translateY(-6px); border-color: #bcaefa; box-shadow: 0 24px 55px rgba(64,39,126,.12), 0 0 35px rgba(57,215,255,.07); }
.tool-card:hover::before { transform: scale(1.6); opacity: .8; }
.card-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--violet-soft); color: var(--violet); }
.card-icon svg { width: 20px; height: 20px; }
.tool-card:nth-child(2n) .card-icon { background: var(--mint); color: #20794a; }
.tool-card:nth-child(3n) .card-icon { background: var(--amber); color: #92600d; }
.tool-card h3 { margin: 28px 0 8px; font-size: 19px; letter-spacing: -.025em; }
.tool-card p { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.tool-card .text-link { margin-top: auto; font-size: 12px; }
.workflow { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; align-items: center; }
.workflow-list { display: grid; gap: 10px; margin-top: 28px; }
.workflow-step { display: grid; grid-template-columns: 34px 1fr; gap: 13px; padding: 15px; border-radius: 13px; }
.workflow-step.active { background: white; box-shadow: 0 8px 30px rgba(45,33,78,.07); }
.step-number { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-size: 11px; font-weight: 750; }
.workflow-step strong { font-size: 14px; }
.workflow-step p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.product-window { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 20px; background: white; box-shadow: var(--shadow); transform: rotate(1.5deg); }
.window-bar { display: flex; align-items: center; gap: 6px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: #faf9fb; }
.window-dot { width: 8px; height: 8px; border-radius: 50%; background: #ddd7e4; }
.window-body { display: grid; grid-template-columns: 1fr 1fr; min-height: 365px; }
.paper-preview { padding: 25px; background: #fafafa; border-right: 1px solid var(--line); }
.paper-preview .paper-line { height: 7px; margin-bottom: 10px; border-radius: 4px; background: #dddde0; }
.paper-preview .paper-line.short { width: 68%; }
.paper-preview h4 { font-family: Georgia, serif; font-size: 17px; line-height: 1.25; }
.ai-panel { padding: 24px; }
.ai-panel .mini-label { color: var(--violet); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ai-panel h4 { margin: 12px 0; font-size: 17px; }
.ai-panel p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.source-chip { display: inline-flex; margin: 5px 4px 0 0; padding: 5px 8px; border-radius: 6px; background: var(--violet-soft); color: var(--violet-dark); font-size: 10px; }
.cta-band { padding: 58px; display: flex; justify-content: space-between; align-items: center; gap: 30px; border-radius: 26px; background: radial-gradient(circle at 78% 0,rgba(255,79,206,.42),transparent 31%), radial-gradient(circle at 12% 110%,rgba(57,215,255,.28),transparent 35%), linear-gradient(125deg,#15121d,#24164b 56%,#201529); color: white; overflow: hidden; position: relative; box-shadow: 0 28px 70px rgba(43,25,91,.18); }
.cta-band::after { content: ""; position: absolute; width: 240px; height: 240px; right: -50px; top: -70px; border-radius: 50%; background: conic-gradient(var(--violet),var(--magenta),var(--electric),var(--violet)); filter: blur(12px); opacity: .5; animation: spinSoft 14s linear infinite; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { max-width: 650px; margin: 0; font-size: clamp(30px, 4.3vw, 52px); letter-spacing: -.05em; line-height: 1.03; }
.cta-band .btn { flex: none; background: var(--lime); color: #1c2511; }

.detail-hero { padding: 92px 0 70px; border-bottom: 1px solid var(--line); overflow: hidden; }
.detail-hero-grid { display: grid; grid-template-columns: 1fr .92fr; align-items: center; gap: 70px; }
.detail-hero .lede { max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.feature-visual { position: relative; min-height: 420px; padding: 24px; border: 1px solid transparent; border-radius: 26px; background: linear-gradient(145deg,rgba(244,239,255,.96),rgba(255,255,255,.96)) padding-box, linear-gradient(135deg,var(--violet),var(--electric),var(--magenta)) border-box; box-shadow: var(--shadow), 0 0 45px rgba(108,76,241,.08); overflow: hidden; }
.feature-visual::before { content: ""; position: absolute; width: 260px; height: 260px; right: -100px; bottom: -120px; border-radius: 50%; background: conic-gradient(var(--violet),var(--electric),var(--magenta)); filter: blur(50px); opacity: .18; animation: spinSoft 12s linear infinite; }
.visual-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.visual-title { display: flex; gap: 9px; align-items: center; font-size: 12px; font-weight: 750; }
.status { padding: 5px 8px; border-radius: 99px; background: var(--mint); color: #28784d; font-size: 9px; font-weight: 760; text-transform: uppercase; letter-spacing: .08em; }
.visual-card { margin-top: 10px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 8px 24px rgba(46,31,87,.06); }
.visual-card.accent { width: 88%; margin-left: auto; background: linear-gradient(125deg,var(--violet-dark),var(--violet),#a54cf1); color: white; border-color: transparent; box-shadow: 0 14px 35px rgba(108,76,241,.25); }
.visual-card strong { display: block; font-size: 12px; }
.visual-card p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.visual-card.accent p { color: rgba(255,255,255,.74); }
.feature-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.feature-stat { padding: 38px; background: var(--paper); text-align: center; }
.feature-stat strong { display: block; font-size: 25px; letter-spacing: -.04em; }
.feature-stat span { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.feature-list-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature-item { padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.feature-item h3 { margin: 18px 0 8px; font-size: 19px; }
.feature-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.how-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; counter-reset: steps; }
.how-card { padding: 26px; border-top: 2px solid var(--ink); }
.how-card::before { counter-increment: steps; content: "0" counter(steps); color: var(--violet); font-size: 11px; font-weight: 780; letter-spacing: .12em; }
.how-card h3 { margin: 20px 0 9px; }
.how-card p { color: var(--muted); font-size: 13px; line-height: 1.6; }

.pricing-hero { padding: 85px 0 45px; text-align: center; }
.pricing-hero .lede { max-width: 650px; margin: 20px auto; }
.billing-toggle { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.billing-toggle button { border: 0; padding: 8px 13px; border-radius: 7px; background: transparent; font-size: 12px; cursor: pointer; }
.billing-toggle button.active { background: var(--ink); color: white; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 30px 0 100px; }
.price-card { padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.price-card.featured { border: 2px solid var(--violet); box-shadow: var(--shadow); transform: translateY(-8px); }
.plan-tag { display: inline-flex; padding: 5px 8px; border-radius: 99px; background: var(--violet-soft); color: var(--violet-dark); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.price-card h2 { margin: 18px 0 8px; }
.price { margin: 20px 0; font-size: 42px; font-weight: 760; letter-spacing: -.05em; }
.price span { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.price-card .btn { width: 100%; }
.check-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 9px; color: #504c57; font-size: 12px; line-height: 1.4; }
.check-list li::before { content: "✓"; color: var(--violet); font-weight: 800; }

.directory-hero, .content-hero { padding: 85px 0 55px; }
.directory-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; padding-bottom: 100px; }
.directory-card { padding: 25px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.directory-card { transition: transform .22s, box-shadow .22s, border-color .22s; }
.directory-card:hover { transform: translateY(-4px); border-color: #c8bbfa; box-shadow: 0 18px 42px rgba(58,36,118,.1); }
.card-icon-spaced { margin-top: 16px; }
.directory-card .tag { color: var(--violet); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.directory-card h3 { margin: 14px 0 8px; font-size: 18px; }
.directory-card p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.directory-card .meta { margin-top: 18px; color: var(--soft); font-size: 10px; }
.article { width: min(780px, calc(100% - 34px)); margin: 0 auto; padding: 70px 0 110px; }
.article h2 { margin: 45px 0 12px; font-size: 26px; letter-spacing: -.03em; }
.article h3 { margin: 28px 0 9px; font-size: 18px; }
.article p, .article li { color: #5f5b66; line-height: 1.8; font-size: 14px; }
.article ul { padding-left: 20px; }
.article-note { padding: 18px; border-left: 3px solid var(--violet); background: var(--violet-soft); border-radius: 0 10px 10px 0; }
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; padding-bottom: 100px; }
.contact-options { display: grid; gap: 12px; }
.contact-option { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.contact-option { transition: transform .2s, border-color .2s, box-shadow .2s; }
.contact-option:hover { transform: translateY(-3px); border-color: #bdadfb; box-shadow: 0 14px 34px rgba(64,40,126,.08); }
.contact-option strong { display: block; font-size: 14px; }
.contact-option span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.contact-option b { display: block; margin-top: 14px; color: var(--violet-dark); font-size: 11px; }
.form-card { padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { color: #5b5662; font-size: 11px; font-weight: 680; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px; outline: 0; background: white; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.form-notice { display: none; margin-top: 12px; color: #27724a; font-size: 12px; }
.form-notice.visible { display: block; }
.auth-container { max-width: 500px; }
.auth-card h1 { font-size: 34px; letter-spacing: -.04em; }
.auth-submit { width: 100%; }
.auth-switch { margin-top: 20px; color: var(--muted); text-align: center; font-size: 12px; }

.site-footer { padding: 64px 0 30px; border-top: 1px solid var(--line); background: white; }
.footer-grid { display: grid; grid-template-columns: 1.35fr repeat(4,1fr); gap: 36px; }
.footer-brand p { max-width: 250px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.footer-email { display: inline-flex; align-items: center; gap: 7px; color: var(--violet-dark); font-size: 12px; font-weight: 680; }
.footer-email svg { width: 15px; height: 15px; }
.footer-column strong { display: block; margin-bottom: 15px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.footer-column a { display: block; margin: 10px 0; color: var(--muted); font-size: 12px; }
.footer-column a:hover { color: var(--violet); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 50px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--soft); font-size: 10px; }
.scrim { display: none; position: fixed; inset: 0; z-index: 35; background: rgba(20,17,28,.35); backdrop-filter: blur(2px); }
.toast { position: fixed; z-index: 80; right: 24px; bottom: 24px; max-width: 340px; padding: 14px 16px; border-radius: 12px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: 12px; line-height: 1.5; animation: pageIn .25s ease both; }

.ai-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; visibility: hidden; opacity: 0; transition: opacity .25s, visibility .25s; }
.ai-modal.open { visibility: visible; opacity: 1; }
.ai-modal-scrim { position: absolute; inset: 0; background: rgba(17,12,30,.54); backdrop-filter: blur(12px); }
.ai-modal-card { position: relative; width: min(680px,100%); max-height: calc(100vh - 36px); overflow-y: auto; padding: 28px; border: 1px solid rgba(255,255,255,.5); border-radius: 24px; background: linear-gradient(rgba(255,255,255,.96),rgba(255,255,255,.96)) padding-box, linear-gradient(130deg,var(--electric),var(--violet),var(--magenta)) border-box; box-shadow: 0 35px 100px rgba(22,10,55,.32),0 0 70px rgba(108,76,241,.15); transform: translateY(18px) scale(.97); transition: transform .3s cubic-bezier(.2,.75,.2,1); }
.ai-modal.open .ai-modal-card { transform: translateY(0) scale(1); }
.ai-modal-card::before { content: ""; position: absolute; inset: -130px -150px auto auto; width: 330px; height: 330px; border-radius: 50%; background: conic-gradient(var(--violet),var(--electric),var(--magenta),var(--violet)); filter: blur(65px); opacity: .14; pointer-events: none; }
.ai-modal-head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.ai-modal-head .eyebrow { margin-bottom: 8px; }
.ai-modal-head h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.modal-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; font-size: 22px; line-height: 1; }
.workspace-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 720; }
#workspacePrompt { width: 100%; resize: vertical; min-height: 126px; padding: 15px; border: 1px solid var(--line-strong); border-radius: 13px; outline: none; background: rgba(255,255,255,.82); line-height: 1.55; }
#workspacePrompt:focus { border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft),0 0 35px rgba(108,76,241,.09); }
.workspace-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.workspace-options label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.workspace-options select { width: 100%; height: 43px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.upload-control { position: relative; }
.upload-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-control b { height: 43px; display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px dashed #c6b9ef; border-radius: 10px; background: var(--violet-soft); color: var(--violet-dark); cursor: pointer; font-size: 11px; }
.upload-control svg { width: 15px; height: 15px; }
.workspace-run { width: 100%; margin-top: 3px; }
.workspace-result { display: none; margin-top: 16px; padding: 18px; border: 1px solid #d9d0fc; border-radius: 14px; background: linear-gradient(135deg,#f9f7ff,#f3fcff); }
.workspace-result.visible { display: block; animation: pageIn .3s ease both; }
.ai-thinking { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.ai-thinking span { margin-left: 4px; }
.workspace-result.complete .ai-thinking { display: none; }
.workspace-result p { margin: 0; color: #55505e; font-size: 13px; line-height: 1.65; }
.result-actions { display: none; margin-top: 13px; }
.workspace-result.complete .result-actions { display: flex; }
.result-actions .btn { min-height: 34px; font-size: 10px; }

@media (max-width: 1050px) {
  :root { --sidebar: 218px; }
  .top-links { gap: 15px; }
  .detail-hero-grid { gap: 35px; }
  .tool-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1.3fr repeat(2,1fr); }
}

@media (max-width: 820px) {
  :root { --sidebar: 260px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .scrim.visible { display: block; }
  .main { margin-left: 0; }
  .mobile-toggle { display: block; }
  .topbar { padding: 0 16px; }
  .top-links { display: none; }
  .top-actions { margin-left: auto; }
  .container { width: min(100% - 34px, 680px); }
  .home-hero { padding-top: 52px; }
  .workflow, .detail-hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .workflow { gap: 36px; }
  .product-window { transform: none; }
  .feature-visual { min-height: 380px; }
  .price-grid { grid-template-columns: 1fr; max-width: 560px; margin: auto; }
  .price-card.featured { transform: none; }
  .directory-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: repeat(2,1fr); }
  .footer-brand { grid-column: 1/-1; }
}

@media (max-width: 560px) {
  .top-actions .btn-secondary { display: none; }
  .top-actions .btn { min-height: 36px; padding: 0 12px; }
  .display { font-size: 43px; }
  .title { font-size: 40px; }
  .home-hero { min-height: auto; padding-bottom: 65px; }
  .research-box { border-radius: 15px; }
  .research-toolbar { flex-wrap: wrap; }
  .prompt-suggestions { display: none; }
  .model-pill { display: none; }
  .send-btn { margin-left: auto; }
  .trust-row { margin-top: 38px; }
  .logo-row { gap: 18px 25px; }
  .section { padding: 72px 0; }
  .section-head { display: block; }
  .section-head p { margin-top: 16px; }
  .tool-grid, .feature-list-grid, .how-grid, .feature-strip, .directory-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 210px; }
  .window-body { grid-template-columns: 1fr; }
  .paper-preview { display: none; }
  .feature-stat { padding: 25px; }
  .cta-band { padding: 38px 28px; align-items: flex-start; flex-direction: column; }
  .detail-hero { padding-top: 62px; }
  .feature-visual { min-height: 350px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .ai-modal { padding: 10px; align-items: end; }
  .ai-modal-card { padding: 22px 18px; max-height: calc(100vh - 20px); border-radius: 22px 22px 14px 14px; }
  .workspace-options { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 18px; }
  .footer-bottom { display: block; }
  .footer-bottom span { display: block; margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
