:root {
  color-scheme: dark;
  --bg: #090c14;
  --bg-raised: #101522;
  --panel: rgba(17, 22, 35, .94);
  --panel-inner: rgba(9, 13, 23, .78);
  --panel-hover: rgba(28, 35, 53, .9);
  --border: rgba(174, 188, 222, .12);
  --border-strong: rgba(168, 150, 255, .38);
  --text: #f5f6fb;
  --muted: #a3acc0;
  --muted-soft: #747f96;
  --muted-dim: #58647c;
  --accent: #a995ff;
  --accent-light: #c9bdff;
  --accent-blue: #93b7ff;
  --green: #84e1bd;
  --red: #ff9ca8;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
  --radius-lg: 20px;
  --radius-md: 14px;
  --ease: cubic-bezier(.2, .7, .25, 1);
}
* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: radial-gradient(1000px 520px at 12% -14%, rgba(118, 95, 213, .18), transparent 66%), radial-gradient(900px 520px at 100% 22%, rgba(68, 112, 189, .13), transparent 67%), linear-gradient(180deg, #090c14, #0a0e18 65%, #090c14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, textarea, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, textarea:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; }
::selection { background: rgba(169, 149, 255, .34); color: #fff; }
.ambient { position: absolute; z-index: -1; pointer-events: none; filter: blur(1px); }
.ambient-one { width: 380px; height: 380px; top: 420px; left: -260px; border: 1px solid rgba(158, 142, 255, .07); border-radius: 50%; box-shadow: 0 0 0 45px rgba(158, 142, 255, .018), 0 0 0 90px rgba(158, 142, 255, .012); }
.ambient-two { width: 260px; height: 260px; top: 120px; right: -215px; border: 1px solid rgba(133, 177, 255, .08); border-radius: 50%; box-shadow: 0 0 0 35px rgba(133, 177, 255, .018), 0 0 0 70px rgba(133, 177, 255, .012); }
svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.page-shell { width: min(1320px, calc(100% - 72px)); margin: 0 auto; }
.topbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(190, 202, 231, .09); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(180, 164, 255, .32); border-radius: 12px; color: #e2dcff; background: linear-gradient(145deg, rgba(167, 139, 250, .2), rgba(105, 130, 230, .12)); box-shadow: inset 0 1px rgba(255,255,255,.09), 0 7px 24px rgba(126, 104, 224, .14); }
.brand-mark svg { width: 21px; height: 21px; }
.brand-name { font-size: 18px; font-weight: 760; letter-spacing: -.55px; }
.topbar-meta { display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 12px; }
.secure-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid rgba(132, 225, 189, .17); border-radius: 999px; color: #c0e8d7; background: rgba(132, 225, 189, .055); }
.secure-pill svg { width: 15px; height: 15px; color: var(--green); }
.topbar-divider { width: 1px; height: 17px; background: var(--border); }
.topbar-caption { color: var(--muted-soft); }
.hero { max-width: 790px; margin: 0 auto; padding: 64px 0 43px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 8px 13px; border: 1px solid rgba(169, 149, 255, .22); border-radius: 999px; color: #d0c5ff; background: rgba(143, 119, 230, .075); font-size: 10px; font-weight: 760; letter-spacing: 1.6px; }
.eyebrow svg { width: 16px; height: 16px; color: #d2c6ff; }
.hero h1 { margin: 22px 0 15px; font-size: clamp(42px, 5.8vw, 70px); line-height: 1.04; letter-spacing: -3.8px; font-weight: 790; }
.gradient-text { color: #c2b4ff; background: linear-gradient(96deg, #c8baff 4%, #a9b5ff 58%, #8fd3e6 100%); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-copy { max-width: 610px; margin: 0 auto; color: #a9b2c5; font-size: 15px; line-height: 1.75; }
.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 23px; }
.hero-tags span { padding: 7px 11px; border: 1px solid rgba(168, 178, 211, .12); border-radius: 8px; color: #b2bad0; background: rgba(255, 255, 255, .026); font-size: 11px; font-weight: 540; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); align-items: stretch; gap: 19px; }
.panel { min-width: 0; padding: clamp(19px, 2vw, 27px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(155deg, rgba(23, 29, 45, .96), rgba(14, 19, 31, .97)); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 19px; }
.heading-group { min-width: 0; }
.section-kicker { margin-bottom: 8px; color: #8792aa; font-size: 9px; line-height: 1; letter-spacing: 1.65px; font-weight: 770; }
.panel-heading h2 { margin: 0; color: #f3f4fa; font-size: 19px; font-weight: 740; letter-spacing: -.55px; }
.panel-description { margin: 6px 0 0; color: var(--muted-soft); font-size: 11px; line-height: 1.55; }
.panel-status, .result-badge { display: inline-flex; flex: none; align-items: center; gap: 8px; margin-top: 4px; padding: 7px 10px; border: 1px solid rgba(132, 225, 189, .16); border-radius: 999px; color: #b8e5d1; background: rgba(132, 225, 189, .055); font-size: 10px; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(116, 223, 176, .48); }
.result-badge { border-color: var(--border); color: #a7b0c5; background: rgba(255, 255, 255, .03); }
.prompt-input { width: 100%; min-height: 260px; display: block; resize: vertical; padding: 18px; border: 1px solid rgba(171, 181, 217, .15); border-radius: 14px; outline: none; color: #eef0f8; background: var(--panel-inner); font-size: 13px; line-height: 1.8; transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease); }
.prompt-input::placeholder { color: #69748c; }
.prompt-input:focus, .context-notes:focus { border-color: rgba(169, 149, 255, .58); background: rgba(9, 13, 23, .92); box-shadow: 0 0 0 4px rgba(169, 149, 255, .085); }
.editor-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 2px 0; color: var(--muted-soft); font-size: 10px; }
.editor-hint { display: inline-flex; align-items: center; gap: 6px; }
kbd { padding: 3px 6px; border: 1px solid rgba(171, 181, 217, .18); border-radius: 5px; color: #b5bed2; background: rgba(255,255,255,.04); font-family: inherit; font-size: 9px; }
.character-count { color: #8590a7; font-variant-numeric: tabular-nums; }
.mode-section { margin-top: 23px; }
.mode-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mode-heading h3 { margin: 0; color: #e9ebf5; font-size: 12px; font-weight: 720; letter-spacing: -.1px; }
.mode-heading p { margin: 5px 0 0; color: var(--muted-soft); font-size: 10px; line-height: 1.5; }
.mode-selected-label { flex: none; padding: 5px 8px; border: 1px solid rgba(169, 149, 255, .2); border-radius: 999px; color: #d0c4ff; background: rgba(169, 149, 255, .075); font-size: 9px; font-weight: 680; }
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mode-option { min-width: 0; min-height: 93px; display: flex; flex-direction: column; align-items: flex-start; gap: 11px; padding: 13px 12px; border: 1px solid rgba(171, 181, 217, .13); border-radius: 12px; color: #b9c1d4; background: rgba(255,255,255,.023); text-align: left; cursor: pointer; transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease); }
.mode-option:hover { border-color: rgba(171, 181, 217, .27); background: rgba(255,255,255,.045); transform: translateY(-1px); }
.mode-option.is-active { border-color: rgba(169, 149, 255, .56); color: #f4f1ff; background: linear-gradient(145deg, rgba(151, 126, 244, .15), rgba(117, 142, 227, .07)); box-shadow: inset 0 0 0 1px rgba(169,149,255,.1), 0 7px 20px rgba(0,0,0,.08); }
.mode-icon { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid rgba(190, 198, 230, .16); border-radius: 9px; color: #e3e8f6; background: rgba(255,255,255,.045); }
.mode-option.is-active .mode-icon { border-color: rgba(194, 180, 255, .26); color: #e8e0ff; background: rgba(169, 149, 255, .14); }
.mode-icon svg { width: 17px; height: 17px; }
.mode-copy { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.mode-copy strong { color: inherit; font-size: 10px; line-height: 1.3; font-weight: 710; }
.mode-copy span { color: var(--muted-soft); font-size: 9px; line-height: 1.35; }
.mode-option.is-active .mode-copy span { color: #aeb4cc; }
.mode-note { min-height: 16px; margin: 9px 1px 0; color: #7d89a2; font-size: 9px; line-height: 1.5; }
.context-card { margin-top: 19px; overflow: hidden; border: 1px solid rgba(171, 181, 217, .12); border-radius: 13px; background: rgba(255,255,255,.025); }
.context-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; }
.context-title-wrap { display: flex; min-width: 0; align-items: center; gap: 10px; }
.context-icon { width: 34px; height: 34px; display: grid; flex: none; place-items: center; border: 1px solid rgba(169,149,255,.19); border-radius: 10px; color: #d4caff; background: rgba(169,149,255,.08); }
.context-icon svg { width: 18px; height: 18px; }
.context-title-wrap div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.context-title-wrap strong { color: #e1e5f0; font-size: 11px; font-weight: 690; }
.context-title-wrap div span { overflow: hidden; color: var(--muted-soft); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.toggle-wrap { position: relative; display: inline-flex; flex: none; align-items: center; gap: 9px; color: #9da7bd; font-size: 9px; cursor: pointer; }
.toggle-wrap input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-track { position: relative; width: 33px; height: 19px; border: 1px solid rgba(171,181,217,.2); border-radius: 999px; background: #252c3c; transition: background .18s ease, border-color .18s ease; }
.toggle-track::after { position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #929bb0; content: ""; transition: transform .18s var(--ease), background .18s ease; }
.toggle-wrap input:checked + .toggle-track { border-color: rgba(169,149,255,.65); background: #7666c6; }
.toggle-wrap input:checked + .toggle-track::after { background: #fff; transform: translateX(14px); }
.toggle-wrap input:focus-visible + .toggle-track { outline: 2px solid var(--accent-light); outline-offset: 3px; }
.context-details { border-top: 1px solid rgba(171,181,217,.08); }
.context-details summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; color: #a7b0c4; font-size: 10px; cursor: pointer; list-style: none; transition: color .16s ease, background .16s ease; }
.context-details summary::-webkit-details-marker { display: none; }
.context-details summary:hover { color: #e4e7f2; background: rgba(255,255,255,.025); }
.context-details summary svg { width: 16px; height: 16px; color: #8d98ae; transition: transform .18s var(--ease); }
.context-details[open] summary svg { transform: rotate(180deg); }
.context-body { padding: 0 14px 14px; }
.context-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 0 0 9px; color: #b1bad0; font-size: 9px; }
.context-meta span:last-child { color: var(--muted-soft); }
.context-preview { max-height: 170px; overflow: auto; margin: 0; padding: 12px; border: 1px solid rgba(171,181,217,.1); border-radius: 9px; color: #a7b1c8; background: rgba(6,8,14,.55); font: 10px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.field-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 13px 0 8px; color: #bbc3d5; font-size: 10px; }
.field-label span { color: var(--muted-soft); }
.context-notes { width: 100%; min-height: 88px; resize: vertical; padding: 11px 12px; border: 1px solid rgba(171,181,217,.13); border-radius: 9px; outline: none; color: #e5e8f2; background: rgba(6,8,14,.55); font-size: 10px; line-height: 1.65; transition: border-color .18s ease, box-shadow .18s ease; }
.context-notes::placeholder { color: #69748b; }
.primary-actions { display: flex; align-items: center; gap: 9px; margin-top: 19px; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 15px; border: 1px solid transparent; border-radius: 11px; color: #e7eaf3; background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; transition: transform .18s var(--ease), border-color .18s ease, background .18s ease, box-shadow .18s ease, opacity .18s ease; }
.button svg { width: 17px; height: 17px; flex: none; }
.button:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }
.button:not(:disabled):active { transform: translateY(1px); }
.button-primary { min-width: 0; flex: 1; border-color: rgba(203,191,255,.34); color: #fff; background: linear-gradient(105deg, #785fe4, #8e7cf0 55%, #718fe9); box-shadow: 0 9px 25px rgba(105, 91, 205, .23), inset 0 1px rgba(255,255,255,.2); }
.button-primary:not(:disabled):hover { border-color: rgba(225,216,255,.55); background: linear-gradient(105deg, #8269ed, #9b89f5 55%, #7c9bf2); box-shadow: 0 12px 30px rgba(105,91,205,.3), inset 0 1px rgba(255,255,255,.22); transform: translateY(-1px); }
.button-trailing-icon { display: inline-flex; margin-left: auto; opacity: .9; }
.button-trailing-icon svg { width: 17px; height: 17px; }
.button-quiet { border-color: rgba(171,181,217,.15); color: #aeb7ca; background: rgba(255,255,255,.025); }
.button-quiet:not(:disabled):hover, .button-secondary:not(:disabled):hover { border-color: rgba(190,200,230,.3); color: #fff; background: rgba(255,255,255,.065); transform: translateY(-1px); }
.transparency-note { display: flex; align-items: flex-start; gap: 8px; margin: 13px 2px 0; color: #8490a7; }
.transparency-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: #a9b5cb; }
.transparency-note p { margin: 0; font-size: 9px; line-height: 1.65; }
.result-panel { display: flex; min-height: 720px; flex-direction: column; }
.result-panel .panel-heading { margin-bottom: 13px; }
.empty-state { flex: 1; min-height: 540px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 20px 42px; text-align: center; }
.empty-art { position: relative; width: 148px; height: 148px; display: grid; place-items: center; margin-bottom: 20px; }
.art-orbit { position: absolute; inset: 11px; border: 1px solid rgba(169,149,255,.17); border-radius: 50%; transform: rotate(-25deg) scaleX(.73); }
.orbit-two { inset: 0 22px; border-color: rgba(133,200,233,.16); transform: rotate(45deg) scaleX(.77); }
.art-core { width: 62px; height: 62px; display: grid; place-items: center; border: 1px solid rgba(177,161,255,.35); border-radius: 19px; color: #e2d9ff; background: linear-gradient(145deg, rgba(167,139,250,.22), rgba(109,139,222,.16)); box-shadow: 0 0 48px rgba(135,112,231,.2), inset 0 1px rgba(255,255,255,.13); }
.art-core svg { width: 32px; height: 32px; stroke-width: 1.4; }
.empty-state h3 { margin: 0; color: #edf0f8; font-size: 15px; font-weight: 720; letter-spacing: -.3px; }
.empty-state p { max-width: 330px; margin: 10px 0 18px; color: #8d98af; font-size: 11px; line-height: 1.75; }
.empty-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.empty-checks span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid rgba(171,181,217,.11); border-radius: 8px; color: #a1abc0; background: rgba(255,255,255,.025); font-size: 9px; }
.empty-checks svg { width: 13px; height: 13px; color: var(--green); stroke-width: 2; }
.loading-state { flex: 1; min-height: 540px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 11px; }
.loading-state strong { color: #edf0f8; font-size: 14px; font-weight: 710; }
.loading-state > span { color: #8b96ac; font-size: 10px; }
.loader-orb { width: 86px; height: 70px; display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 7px; }
.loader-orb span { width: 7px; height: 7px; border-radius: 50%; background: #c7b8ff; box-shadow: 0 0 15px rgba(167,139,250,.4); animation: loader-pulse 1.1s ease-in-out infinite; }
.loader-orb span:nth-child(2) { animation-delay: .14s; background: #aebfff; }
.loader-orb span:nth-child(3) { animation-delay: .28s; background: #95d6e6; }
@keyframes loader-pulse { 0%, 80%, 100% { opacity: .35; transform: translateY(0) scale(.76); } 40% { opacity: 1; transform: translateY(-8px) scale(1); } }
.result-content { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.result-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 8px 2px 12px; color: #8c97ac; font-size: 10px; }
.result-text { flex: 1; min-height: 470px; max-height: 680px; overflow: auto; padding: 18px; border: 1px solid rgba(171,181,217,.14); border-radius: 13px; color: #e9ecf5; background: rgba(6,9,16,.72); font: 12px/1.85 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; scrollbar-color: rgba(169,149,255,.32) transparent; }
.result-text.is-streaming::after { display: inline-block; width: 6px; height: 14px; margin-left: 3px; border-radius: 1px; background: #c3b6ff; content: ""; vertical-align: -2px; animation: caret-blink 1s steps(2, start) infinite; }
@keyframes caret-blink { to { visibility: hidden; } }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.button-secondary { min-height: 40px; padding: 0 12px; border-color: rgba(171,181,217,.15); color: #bbc4d7; background: rgba(255,255,255,.025); }
.button-secondary svg { width: 16px; height: 16px; }
.button-refine { min-height: 40px; flex: 1; padding: 0 13px; }
.error-state { display: flex; align-items: flex-start; gap: 12px; margin-top: 15px; padding: 15px; border: 1px solid rgba(255,156,168,.22); border-radius: 12px; background: rgba(255,156,168,.06); }
.error-icon { width: 27px; height: 27px; display: grid; flex: none; place-items: center; border: 1px solid rgba(255,156,168,.2); border-radius: 9px; color: var(--red); background: rgba(255,156,168,.09); }
.error-icon svg { width: 17px; height: 17px; }
.error-state strong { color: #ffc2c9; font-size: 12px; }
.error-state p { margin: 6px 0 10px; color: #c99ba4; font-size: 10px; line-height: 1.65; overflow-wrap: anywhere; }
.text-button { padding: 0; border: 0; color: #d5caff; background: transparent; font-size: 10px; font-weight: 720; cursor: pointer; }
.text-button:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.bottom-note { display: flex; align-items: center; justify-content: center; gap: 11px; max-width: 760px; margin: 27px auto 0; color: #8994aa; text-align: center; }
.bottom-note svg { width: 21px; height: 21px; flex: none; color: #b9aaff; }
.bottom-note p { margin: 0; font-size: 10px; line-height: 1.7; }
.bottom-note strong { color: #d0d5e3; font-weight: 680; }
.footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 31px; padding: 18px 0 23px; border-top: 1px solid rgba(190,198,230,.085); color: #758097; font-size: 10px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; max-width: calc(100% - 32px); padding: 11px 16px; border: 1px solid rgba(169,149,255,.28); border-radius: 11px; color: #f0ebff; background: rgba(26,29,44,.96); box-shadow: 0 14px 38px rgba(0,0,0,.34); font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .2s ease, transform .2s var(--ease); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 1050px) {
  .page-shell { width: min(830px, calc(100% - 48px)); }
  .hero { padding-top: 52px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .result-panel { min-height: 620px; }
  .empty-state, .loading-state { min-height: 430px; }
  .result-text { min-height: 390px; }
}
@media (max-width: 600px) {
  .page-shell { width: calc(100% - 28px); }
  .topbar { min-height: 68px; }
  .brand { gap: 9px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 16px; }
  .topbar-meta { gap: 8px; font-size: 10px; }
  .topbar-caption, .topbar-divider { display: none; }
  .secure-pill { padding: 7px 9px; font-size: 9px; }
  .hero { padding: 43px 0 27px; }
  .hero h1 { margin-top: 19px; font-size: clamp(38px, 11.4vw, 54px); letter-spacing: -2.8px; }
  .hero-copy { max-width: 360px; font-size: 12px; }
  .hero-tags { gap: 6px; margin-top: 17px; }
  .hero-tags span { padding: 6px 8px; font-size: 9px; }
  .panel { padding: 16px; border-radius: 16px; }
  .panel-heading { gap: 8px; margin-bottom: 15px; }
  .panel-heading h2 { font-size: 17px; }
  .panel-description { max-width: 260px; font-size: 10px; }
  .panel-status, .result-badge { padding: 6px 8px; font-size: 9px; }
  .prompt-input { min-height: 225px; padding: 14px; font-size: 12px; }
  .editor-footer { font-size: 9px; }
  .editor-hint { gap: 4px; }
  kbd { padding: 3px 5px; }
  .mode-section { margin-top: 21px; }
  .mode-grid { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .mode-option { min-height: 57px; flex-direction: row; align-items: center; gap: 10px; padding: 9px 11px; }
  .mode-icon { width: 32px; height: 32px; }
  .mode-copy { gap: 3px; }
  .mode-copy strong { font-size: 10px; }
  .mode-copy span { font-size: 9px; }
  .context-topline { align-items: flex-start; gap: 8px; padding: 11px; }
  .context-icon { width: 31px; height: 31px; }
  .context-title-wrap { gap: 8px; }
  .toggle-wrap { gap: 6px; padding-top: 6px; font-size: 8px; }
  .primary-actions { gap: 7px; }
  .button { min-height: 42px; padding: 0 11px; font-size: 10px; }
  .button svg { width: 16px; height: 16px; }
  .button-quiet { padding: 0 12px; }
  .transparency-note p { font-size: 9px; }
  .result-panel { min-height: 545px; }
  .empty-state, .loading-state { min-height: 390px; padding: 24px 5px 30px; }
  .empty-art { width: 122px; height: 122px; margin-bottom: 15px; }
  .art-core { width: 55px; height: 55px; }
  .empty-state h3 { font-size: 13px; }
  .empty-state p { max-width: 300px; font-size: 10px; }
  .empty-checks { gap: 5px; }
  .empty-checks span { padding: 6px 7px; font-size: 8px; }
  .result-text { min-height: 340px; max-height: 540px; padding: 13px; font-size: 10px; line-height: 1.8; }
  .result-actions { gap: 6px; }
  .button-secondary { min-height: 39px; padding: 0 9px; font-size: 9px; }
  .button-secondary svg { width: 14px; height: 14px; }
  .button-refine { min-width: 100%; margin-top: 2px; }
  .bottom-note { align-items: flex-start; justify-content: flex-start; text-align: left; }
  .footer { margin-top: 23px; font-size: 9px; }
}
@media (max-width: 365px) {
  .topbar-meta { max-width: 144px; }
  .secure-pill { gap: 6px; font-size: 8px; }
  .hero h1 { font-size: 37px; }
  .panel-status { gap: 5px; font-size: 8px; }
  .button-secondary { padding: 0 7px; }
  .editor-hint { gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


body { font-size: 14px; }
.page-shell { width: min(1320px, calc(100% - 64px)); }
.hero h1 { letter-spacing: -3px; text-wrap: balance; }
.panel-description { font-size: 12px; }
.section-kicker { font-size: 10px; }
.editor-footer { font-size: 11px; }
.mode-heading h3 { font-size: 14px; }
.mode-heading p { font-size: 11px; }
.mode-selected-label { font-size: 10px; }
.mode-copy strong { font-size: 11.5px; }
.mode-copy span { font-size: 10.5px; }
.mode-note { font-size: 10px; }
.context-title-wrap strong { font-size: 12px; }
.context-title-wrap div span { font-size: 10px; }
.context-preview { font-size: 11px; }
.field-label { font-size: 11px; }
.context-notes { font-size: 12px; }
.button { min-height: 46px; font-size: 13px; }
.transparency-note p { font-size: 11px; }
.empty-state p { font-size: 12px; }
.empty-checks span { font-size: 10px; }
.result-toolbar { font-size: 11px; }
.result-text { font-size: 13px; line-height: 1.8; }
.button-secondary { font-size: 12px; }
.error-state p, .text-button { font-size: 11px; }
.bottom-note p { font-size: 11px; }
.footer { font-size: 11px; }
.toast { font-size: 12px; }

.mode-option { min-height: 98px; }
.mode-option:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; }
.context-details summary { min-height: 44px; font-size: 11px; }
.toggle-wrap { min-height: 38px; font-size: 10px; }
.button-secondary, .button-quiet { min-height: 44px; }
.result-text { overflow-wrap: anywhere; word-break: normal; }

@media (max-width: 1050px) {
  .page-shell { width: min(830px, calc(100% - 48px)); }
  .workspace { gap: 16px; }
  .result-panel { min-height: 590px; }
}

@media (max-width: 600px) {
  .page-shell { width: calc(100% - 28px); }
  .topbar { min-height: 68px; gap: 10px; }
  .topbar-meta { flex: none; }
  .hero { padding: 38px 0 25px; }
  .hero h1 { max-width: 100%; margin: 18px auto 13px; font-size: clamp(30px, 9.1vw, 36px); line-height: 1.13; letter-spacing: -1.7px; text-wrap: balance; }
  .hero-copy { font-size: 13px; line-height: 1.7; }
  .hero-tags { gap: 6px; }
  .hero-tags span { font-size: 10px; }
  .panel { padding: 16px; }
  .panel-heading { flex-wrap: wrap; align-items: center; gap: 9px; }
  .panel-heading h2 { font-size: 18px; }
  .panel-description { max-width: 100%; font-size: 11px; }
  .panel-status, .result-badge { font-size: 10px; white-space: normal; }
  .prompt-input { min-height: 230px; padding: 15px; font-size: 13px; line-height: 1.75; }
  .editor-footer { font-size: 10px; }
  .editor-hint { gap: 4px; }
  .mode-section { margin-top: 20px; }
  .mode-heading h3 { font-size: 13px; }
  .mode-heading p { font-size: 10.5px; }
  .mode-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .mode-option { min-height: 62px; flex-direction: row; align-items: center; gap: 11px; padding: 10px 12px; }
  .mode-icon { width: 34px; height: 34px; }
  .mode-copy { gap: 4px; }
  .mode-copy strong { font-size: 12px; }
  .mode-copy span { font-size: 10.5px; }
  .mode-note { min-height: 0; font-size: 10px; }
  .context-topline { align-items: center; gap: 8px; padding: 11px; }
  .context-title-wrap { gap: 8px; }
  .context-title-wrap strong { font-size: 11.5px; }
  .context-title-wrap div span { font-size: 9.5px; }
  .toggle-wrap { gap: 7px; padding-top: 0; font-size: 9.5px; }
  .context-preview { font-size: 10.5px; }
  .field-label { font-size: 10.5px; }
  .context-notes { min-height: 92px; font-size: 12px; }
  .primary-actions { gap: 8px; }
  .button { min-height: 46px; padding: 0 12px; font-size: 12px; }
  .button svg { width: 17px; height: 17px; }
  .transparency-note p { font-size: 10.5px; }
  .result-panel { min-height: 500px; }
  .empty-state, .loading-state { min-height: 350px; padding: 22px 6px 28px; }
  .empty-art { width: 116px; height: 116px; margin-bottom: 14px; }
  .art-core { width: 54px; height: 54px; }
  .empty-state h3 { font-size: 14px; }
  .empty-state p { max-width: 310px; font-size: 11.5px; }
  .empty-checks { gap: 6px; }
  .empty-checks span { padding: 7px 8px; font-size: 9.5px; }
  .result-toolbar { font-size: 10px; }
  .result-text { min-height: 320px; max-height: 540px; padding: 14px; font-size: 11.5px; line-height: 1.8; }
  .result-actions { gap: 7px; }
  .button-secondary { min-height: 42px; padding: 0 10px; font-size: 10.5px; }
  .button-secondary svg { width: 15px; height: 15px; }
  .button-refine { min-width: 100%; margin-top: 2px; }
  .bottom-note { align-items: flex-start; justify-content: flex-start; text-align: left; }
  .bottom-note p { font-size: 10.5px; }
  .footer { flex-wrap: wrap; justify-content: center; text-align: center; font-size: 10px; }
}

@media (max-width: 365px) {
  .topbar-meta { max-width: 132px; }
  .secure-pill { gap: 6px; padding: 7px 8px; font-size: 8.5px; }
  .hero h1 { font-size: clamp(29px, 9.4vw, 32px); letter-spacing: -1.55px; }
  .panel-status, .result-badge { gap: 5px; font-size: 9px; }
  .panel-description { font-size: 10.5px; }
  .button { font-size: 11px; }
  .button-secondary { padding: 0 8px; font-size: 10px; }
  .editor-hint { gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient { display: none; }
  .mode-option:hover, .button-primary:not(:disabled):hover { transform: none; }
}
