:root {
  --ink: #f7f8fc;
  --bg: #06070b;
  --panel: #0b0d14;
  --blue: #4384ff;
  --gold: #d7a94d;
  --muted: #8b91a3;
  --line: rgba(255,255,255,.115);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink);
  background: radial-gradient(circle at 72% 18%, rgba(31,71,166,.17), transparent 31%), radial-gradient(circle at 15% 70%, rgba(30,65,148,.1), transparent 28%), var(--bg);
  font-family: Inter, Manrope, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400; letter-spacing: -.02em;
}
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px); background-size: 64px 64px; }
button, textarea, input { font: inherit; }
button { color: inherit; }
.topbar { height: 92px; padding: 0 clamp(20px,4vw,64px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; background: rgba(6,7,11,.82); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 15px; color: inherit; text-decoration: none; font-weight: 750; letter-spacing: -.035em; }
.brand i { margin-left: 5px; font-weight: 450; color: var(--muted); font-style: normal; }
.brand-mark { width: 43px; height: 43px; display: grid; place-items: center; color: #85b1ff; font-size: 39px; line-height: 1; filter: drop-shadow(0 0 13px #347aff) drop-shadow(0 0 28px #347aff80); }
.status { display: flex; align-items: center; gap: 10px; color: #c6cada; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #747987; box-shadow: 0 0 0 6px #7479871d; }
.status.online .pulse { background: var(--blue); box-shadow: 0 0 0 6px #4384ff1d, 0 0 18px var(--blue); }
main { width: min(1500px,100%); margin: 0 auto; padding: 0 clamp(20px,4vw,64px) 72px; }
.hero { min-height: 680px; display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.55fr); gap: 70px; align-items: end; position: relative; overflow: hidden; padding: 105px 0 80px; border-bottom: 1px solid var(--line); }
.hero::after { content: "♥"; position: absolute; z-index: -1; right: 4%; top: 42%; color: #0d1732; font-size: clamp(360px,48vw,680px); line-height: .55; text-shadow: 0 0 80px rgba(48,103,230,.16); transform: translateY(-50%); }
.hero > div:first-child { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 35px; color: var(--gold); font-size: 12px; letter-spacing: .17em; font-weight: 650; }
h1 { margin: 0; max-width: 1000px; font-size: clamp(56px,7.4vw,112px); font-weight: 330; line-height: .98; letter-spacing: -.07em; }
h1 em { color: var(--gold); font-style: normal; font-weight: 700; letter-spacing: -.12em; }
h1 span { display: inline-block; margin-top: 13px; color: #dce6ff; }
.lead { max-width: 720px; margin: 43px 0 0; color: #b8bdca; font-size: clamp(17px,1.65vw,23px); font-weight: 360; line-height: 1.45; }
.hero-meta { position: relative; z-index: 1; overflow: hidden; padding: 10px 26px; border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(155deg,rgba(20,25,40,.84),rgba(7,9,14,.85)); box-shadow: 0 26px 80px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.04); backdrop-filter: blur(15px); }
.hero-meta::before { content: ""; position: absolute; width: 160px; height: 160px; right: -65px; top: -70px; border-radius: 50%; background: #3d7eff; filter: blur(70px); opacity: .25; }
.hero-meta > div { padding: 23px 0; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.hero-meta > div:last-child { border: 0; }
.hero-meta b { color: #fff; font-size: 32px; font-weight: 550; letter-spacing: -.05em; }
.hero-meta span { max-width: 135px; color: var(--muted); font-size: 11px; line-height: 1.35; text-transform: uppercase; letter-spacing: .05em; }
.panel { margin-top: 25px; padding: clamp(23px,3vw,42px); border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(145deg,rgba(16,19,29,.95),rgba(8,10,16,.97)); box-shadow: 0 28px 80px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.025); }
.section-head { min-height: 57px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.section-head > div { display: flex; gap: 15px; align-items: baseline; }
.number { color: var(--gold); font-size: 14px; font-weight: 700; }
h2 { margin: 0; font-size: clamp(26px,3vw,40px); font-weight: 420; letter-spacing: -.055em; }
.tag { display: inline-flex; padding: 10px 15px; border: 1px solid #6599ff; border-radius: 999px; background: linear-gradient(135deg,#2d6eea,#4e8cff); box-shadow: 0 0 24px #3d7eff54; font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.tag.ghost { color: #88b0ff; border-color: #4771bd; background: rgba(50,101,204,.11); box-shadow: none; }
.endpoint-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-top: 35px; padding: 23px 25px; border: 1px solid #263350; border-radius: 17px; background: #080b12; }
.endpoint-row > div { min-width: 0; }
.endpoint-row label { display: block; margin-bottom: 10px; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.endpoint-row code { color: #dfe8fb; font-family: "SFMono-Regular",Consolas,monospace; font-size: clamp(13px,1.5vw,19px); overflow-wrap: anywhere; }
.copy { flex: 0 0 auto; padding: 11px 16px; border: 1px solid #386fd2; border-radius: 999px; background: #122141; color: #a9c6ff; cursor: pointer; transition: .2s ease; }
.copy:hover { border-color: #74a4ff; background: #2c6ae1; color: #fff; box-shadow: 0 0 25px #347aff55; }
.top-actions { display: flex; align-items: center; gap: 20px; }
.top-tabs { display: flex; align-items: center; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: #080a10; }
.top-tabs a { padding: 8px 13px; border-radius: 999px; color: #7d8496; text-decoration: none; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.top-tabs a:hover { color: #c9d8f7; }
.top-tabs a.active { color: #fff; background: #235ec9; box-shadow: 0 0 20px #347aff42; }
.logout { border: 0; background: transparent; color: #757d91; cursor: pointer; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.logout:hover { color: #fff; }
.settings-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-top: 28px; }
.settings-form label,.login-form label { display: grid; gap: 9px; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.settings-form input,.login-form input { width: 100%; padding: 14px 15px; border: 1px solid #293857; border-radius: 12px; outline: none; background: #080b12; color: #eef3ff; }
.settings-form input:focus,.login-form input:focus { border-color: #5a91f8; box-shadow: 0 0 0 3px #347aff1f; }
.settings-actions { grid-column: 1/-1; display: flex; align-items: center; gap: 16px; }
.settings-note { margin: 0; color: var(--muted); font-size: 12px; }
.login-page { min-height: 100vh; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.login-card { width: min(560px,100%); padding: clamp(28px,6vw,58px); border: 1px solid #263350; border-radius: 30px; background: linear-gradient(145deg,rgba(16,19,29,.98),rgba(8,10,16,.99)); box-shadow: 0 34px 120px #0009,0 0 90px #2359bd1c; }
.login-card .brand { margin-bottom: 65px; }
.login-card h1 { font-size: clamp(58px,10vw,88px); }
.login-lead { margin: 25px 0 34px; color: #aeb5c6; font-size: 17px; line-height: 1.5; }
.login-form { display: grid; gap: 18px; }
.login-form button { display: flex; justify-content: space-between; padding: 16px 18px; border: 1px solid #6399ff; border-radius: 13px; background: linear-gradient(135deg,#2866dd,#4b8cff); color: #fff; cursor: pointer; font-weight: 650; }
.login-form button:disabled { opacity: .55; cursor: wait; }
.login-error { min-height: 20px; margin: 0; color: #ff9da5; font-size: 13px; }
.steps { margin: 33px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--line); }
.steps li { min-height: 112px; padding: 23px 20px 0 0; border-right: 1px solid var(--line); }
.steps li + li { padding-left: 20px; }
.steps li:last-child { border: 0; }
.steps b,.steps span { display: block; }
.steps b { margin-bottom: 8px; font-weight: 520; }
.steps span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.lab-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(320px,.65fr); gap: 25px; }
.lab-grid .panel { min-width: 0; }
.console { display: flex; min-height: 740px; flex-direction: column; border-color: #1f3155; box-shadow: 0 30px 90px rgba(0,0,0,.35),0 0 60px rgba(46,102,224,.08); }
.conversation { flex: 1; min-height: 320px; max-height: 520px; overflow-y: auto; padding: 22px 0; }
.conversation::-webkit-scrollbar { width: 5px; }
.conversation::-webkit-scrollbar-thumb { background: #273657; border-radius: 5px; }
.message { max-width: 90%; margin: 0 0 18px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.018); }
.message.user { margin-left: auto; border-color: #4b7fe0; background: linear-gradient(135deg,#2359bd,#3d7beb); box-shadow: 0 13px 35px rgba(41,99,222,.17); }
.message.error { border-color: #783f49; color: #ffabb0; background: rgba(125,41,51,.12); }
.message span { display: block; margin-bottom: 9px; color: #73809d; font-size: 9px; font-weight: 750; letter-spacing: .14em; }
.message.user span { color: #c7d9ff; }
.message p,.message pre { margin: 0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.message pre { color: #d9dfed; font-family: "SFMono-Regular",Consolas,monospace; }
.tool-call { margin-top: 13px !important; padding-top: 13px; border-top: 1px solid var(--line); color: #8eb3ff !important; }
.suggestions { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0; border-top: 1px solid var(--line); }
.suggestions button { flex: 0 0 auto; padding: 8px 12px; border: 1px solid #2a3958; border-radius: 999px; background: #0a101d; color: #8796b5; cursor: pointer; font-size: 11px; }
.suggestions button:hover { border-color: #4a82ef; color: #a9c8ff; }
#queryForm { display: grid; grid-template-columns: 1fr 62px; overflow: hidden; border: 1px solid #2d436c; border-radius: 15px; background: #080b12; }
#question { min-height: 78px; resize: vertical; padding: 17px; border: 0; outline: 0; color: #eef2fb; background: transparent; line-height: 1.45; }
#question::placeholder { color: #626b7e; }
#queryForm button { margin: 8px; border: 1px solid #6399ff; border-radius: 11px; background: linear-gradient(135deg,#2866dd,#4b8cff); cursor: pointer; font-size: 27px; box-shadow: 0 0 25px #347aff3d; }
#queryForm button:hover { background: #6a9fff; }
.privacy { margin: 12px 0 0; color: #6f7789; font-size: 11px; line-height: 1.45; }
.tools { min-height: 740px; }
.tool-list { margin-top: 20px; }
.tool-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.tool-item:last-child { border-bottom: 0; }
.tool-name { display: flex; align-items: center; gap: 10px; color: #e5eafa; font-family: "SFMono-Regular",Consolas,monospace; font-size: 12px; overflow-wrap: anywhere; }
.tool-name::before { content: "R"; flex: 0 0 22px; height: 22px; display: grid; place-items: center; border: 1px solid #4d83e9; border-radius: 50%; background: #172d58; color: #8cb5ff; box-shadow: 0 0 15px #347aff32; font: 800 9px Inter,sans-serif; }
.tool-item p { margin: 8px 0 0 32px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.limit-grid { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 28px; }
.limit-grid > div { min-height: 170px; padding: 12px 30px 0 0; border-right: 1px solid var(--line); }
.limit-grid > div + div { padding-left: 30px; }
.limit-grid > div:last-child { border: 0; }
.limit-grid span,.limit-grid b { display: block; }
.limit-grid span { margin-bottom: 24px; color: var(--gold); font-size: 11px; }
.limit-grid b { font-size: 20px; font-weight: 520; }
.limit-grid p { color: var(--muted); font-size: 14px; line-height: 1.5; }
footer { padding: 28px clamp(20px,4vw,64px); display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: #70778a; font-size: 10px; letter-spacing: .11em; }
footer b { color: #8db4ff; }
.catalog-main { padding-bottom: 80px; }
.catalog-hero { min-height: 560px; display: grid; grid-template-columns: minmax(0,1fr) 220px; align-content: center; column-gap: 50px; position: relative; border-bottom: 1px solid var(--line); }
.catalog-hero .eyebrow,.catalog-hero h1,.catalog-hero .lead { grid-column: 1; }
.catalog-stat { grid-column: 2; grid-row: 1/4; align-self: center; padding: 34px; border: 1px solid #2c477a; border-radius: 28px; background: linear-gradient(145deg,#101a30,#090c13); box-shadow: 0 26px 80px #0006,0 0 60px #347aff1a; }
.catalog-stat b,.catalog-stat span { display: block; }
.catalog-stat b { color: #fff; font-size: 78px; font-weight: 420; letter-spacing: -.08em; }
.catalog-stat span { margin-top: 10px; color: #8fa4cb; font-size: 12px; line-height: 1.5; text-transform: uppercase; letter-spacing: .08em; }
.catalog-panel { padding-top: 28px; }
.catalog-controls { display: grid; grid-template-columns: minmax(260px,.7fr) minmax(0,1.3fr); gap: 24px; align-items: end; }
.catalog-search { display: grid; gap: 9px; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.catalog-search input { width: 100%; padding: 15px 17px; border: 1px solid #2a3a59; border-radius: 13px; outline: 0; background: #070a10; color: #eef3ff; }
.catalog-search input:focus { border-color: #5a91f8; box-shadow: 0 0 0 3px #347aff1f; }
.category-filters { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 1px; }
.category-filters button { flex: 0 0 auto; padding: 10px 13px; border: 1px solid #293651; border-radius: 999px; background: #090d16; color: #8792aa; cursor: pointer; font-size: 11px; }
.category-filters button.active { border-color: #4d86f2; background: #17366e; color: #c8dbff; }
.catalog-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-top: 30px; }
.catalog-card { min-width: 0; min-height: 260px; display: flex; flex-direction: column; padding: 23px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg,#0d1019,#080a10); transition: .2s ease; }
.catalog-card:hover { transform: translateY(-2px); border-color: #3e67ad; box-shadow: 0 18px 46px #0005,0 0 30px #347aff12; }
.catalog-card-head { display: flex; justify-content: space-between; gap: 15px; color: #69738a; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.catalog-card-head b { color: var(--gold); font-weight: 600; }
.catalog-card h2 { margin-top: 25px; color: #e7edfb; font-family: "SFMono-Regular",Consolas,monospace; font-size: 17px; font-weight: 520; line-height: 1.3; overflow-wrap: anywhere; }
.catalog-card p { flex: 1; margin: 16px 0 22px; color: #929aab; font-size: 13px; line-height: 1.55; }
.catalog-card code { padding-top: 15px; border-top: 1px solid var(--line); color: #7fa8f7; font-family: "SFMono-Regular",Consolas,monospace; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.catalog-loading { grid-column: 1/-1; padding: 70px 0; color: #7f8799; text-align: center; }
.error-text { color: #ff9da5; }
@media (max-width:900px) {
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 75px; }
  .hero::after { right: -15%; top: 30%; opacity: .65; }
  .hero-meta { display: grid; grid-template-columns: repeat(3,1fr); }
  .hero-meta > div { display: block; }
  .hero-meta span { display: block; margin-top: 6px; }
  .steps { grid-template-columns: repeat(2,1fr); }
  .lab-grid { grid-template-columns: 1fr; }
  .tools { min-height: auto; }
  .settings-form { grid-template-columns: 1fr; }
  .catalog-hero { grid-template-columns: 1fr; padding: 80px 0; }
  .catalog-stat { grid-column: 1; grid-row: auto; width: min(260px,100%); margin-top: 38px; }
  .catalog-controls { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px) {
  .topbar { height: 72px; }
  .brand i,.status span:last-child { display: none; }
  .top-tabs { order: 3; position: absolute; left: 20px; top: 82px; }
  .hero { padding: 65px 0 52px; }
  h1 { font-size: clamp(49px,15vw,72px); }
  .hero-meta { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li,.steps li + li { min-height: auto; padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .endpoint-row { align-items: stretch; flex-direction: column; }
  .copy { align-self: flex-start; }
  .panel { padding: 20px; border-radius: 20px; }
  .limit-grid { grid-template-columns: 1fr; }
  .limit-grid > div,.limit-grid > div + div { min-height: 0; padding: 20px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  footer { gap: 10px; flex-direction: column; }
  .catalog-hero { padding-top: 125px; }
  .catalog-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } }
