@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root { color-scheme: dark; font-family: 'DM Sans', sans-serif; color: #f0f1e9; background: #10120f; --accent: #d5fa62; --muted: #a1a899; --line: #30362a; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(ellipse at 78% 15%, #26301a55, transparent 42%); }
::selection { background: var(--accent); color: #10120f; }
button, textarea { font: inherit; }
button, a, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.container { width: min(1240px, calc(100% - 80px)); margin: auto; }
.topbar { min-height: 106px; display: flex; justify-content: space-between; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font: 700 32px 'Space Grotesk', sans-serif; letter-spacing: -2px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--accent); color: #151a0d; font-size: 29px; border-radius: 9px; }
.brand-caption { margin-left: 15px; font: 10px 'DM Sans', sans-serif; letter-spacing: 2px; color: var(--muted); }
.account, #signed-out { display: flex; align-items: center; gap: 14px; }
.account .status { font-size: 11px; max-width: 180px; line-height: 1.5; margin: 0; }
button { border: 1px solid transparent; padding: 13px 21px; border-radius: 8px; background: var(--accent); color: #19200c; font-weight: 700; cursor: pointer; transition: transform .18s, background .18s, box-shadow .18s; }
button:hover:not(:disabled) { background: #e3ff8d; transform: translateY(-2px); box-shadow: 0 6px 24px #d5fa6219; }
button:active:not(:disabled) { transform: translateY(0); }
button:disabled { opacity: .55; cursor: wait; }
.quiet-button { background: transparent; color: #e5e8dc; border-color: var(--line); }
.quiet-button:hover:not(:disabled) { background: #293020; color: white; }
.hero { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 50px; padding: 70px 0 64px; }
.eyebrow, .micro-label { font-size: 10px; font-weight: 500; letter-spacing: 1.8px; color: var(--muted); }
.eyebrow { display: flex; gap: 9px; align-items: center; margin: 0 0 22px; }
.signal-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px #d5fa6270; flex-shrink: 0; }
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; }
h1 { font-size: clamp(48px, 5.5vw, 76px); line-height: 1.02; font-weight: 500; letter-spacing: -4px; margin: 0 0 26px; }
h1 em { color: var(--accent); font-style: normal; }
.intro { color: var(--muted); font-size: 15px; line-height: 1.8; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 24px; color: #c1c8b7; font-size: 10px; letter-spacing: .7px; margin-top: 30px; }
.signal-art { height: 320px; position: relative; overflow: hidden; background: radial-gradient(ellipse at center, #d5fa6217, transparent 66%); border: 1px solid #38422a; border-radius: 160px 160px 18px 18px; }
.art-label, .art-footer { position: absolute; left: 28px; right: 28px; font-size: 8px; letter-spacing: 1.5px; color: #a8b790; }
.art-label { top: 42px; display: flex; justify-content: space-between; }
.art-footer { bottom: 22px; display: flex; align-items: center; gap: 10px; }
.signal-core { position: absolute; inset: 0; display: grid; place-content: center; font: 500 125px 'Space Grotesk', sans-serif; letter-spacing: -15px; color: var(--accent); transform: rotate(-12deg); }
.signal-core span { position: absolute; left: 56%; top: 28%; }
.orbit { position: absolute; width: 220px; height: 220px; top: 42px; left: calc(50% - 110px); border: 1px solid #d5fa6245; border-radius: 50%; transform: rotateX(58deg) rotate(-25deg); }
.orbit-two { transform: rotateY(60deg) rotate(30deg); width: 250px; height: 250px; left: calc(50% - 125px); top: 28px; border-style: dashed; animation: orbit 24s linear infinite; }
.orbit-point { position: absolute; width: 9px; height: 9px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 22px #d5fa62; }
.point-one { top: 100px; left: 24%; animation: drift 5s ease-in-out infinite alternate; }
.point-two { bottom: 91px; right: 23%; width: 5px; height: 5px; animation: drift 6s ease-in-out infinite alternate-reverse; }
.workspace { display: grid; grid-template-columns: 1.05fr 1fr; border: 1px solid var(--line); border-radius: 16px; background: #191c16; overflow: hidden; }
.editor-panel, .output-panel { padding: 26px; min-width: 0; }
.output-panel { border-left: 1px solid var(--line); background: #151811; }
.panel-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 30px; }
.panel-heading h2 { font-size: 16px; font-weight: 500; margin: 0; }
.section-number { color: #89917e; font-size: 11px; margin-right: 12px; }
.panel-heading .micro-label { font-size: 8px; }
label { display: block; margin-bottom: 14px; }
textarea { background: #10130e; color: #edf0e7; width: 100%; padding: 18px; border: 1px solid #343c2b; border-radius: 9px; resize: vertical; min-height: 200px; line-height: 1.8; font-size: 14px; transition: border-color .2s, box-shadow .2s; }
textarea::placeholder { color: #828c76; }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #d5fa6210; }
.editor-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
#analyze-button { min-width: 145px; }
#analyze-button:not(:disabled)::after { content: ' ↗'; margin-left: 18px; }
.status { color: var(--muted); font-size: 12px; line-height: 1.6; }
.error { color: #ffb3a7; }
.analysis-feedback { min-height: 37px; }
.analysis-pulse { height: 2px; overflow: hidden; background: #303c23; border-radius: 4px; }
.analysis-pulse span { display: block; width: 35%; height: 100%; background: var(--accent); animation: scan 1.2s ease-in-out infinite; }
.locked-preview, .result-placeholder { min-height: 285px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.locked-preview { border: 1px dashed #39432e; border-radius: 9px; background: #10130e66; }
.preview-symbol { color: var(--accent); font-size: 34px; }
h3 { font-size: 18px; font-weight: 500; margin: 16px 0 8px; }
.locked-preview p, .result-placeholder p { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0; }
.preview-lines { width: 120px; margin-top: 24px; }
.preview-lines i { display: block; height: 3px; background: #35412a; margin: 7px auto; border-radius: 5px; }
.preview-lines i:nth-child(2) { width: 70%; }.preview-lines i:nth-child(3) { width: 40%; }
.waveform { height: 48px; display: flex; align-items: center; gap: 5px; margin-bottom: 16px; }
.waveform i { width: 4px; height: 12px; background: #637846; border-radius: 3px; }
.waveform i:nth-child(2n) { height: 24px; }.waveform i:nth-child(3n) { height: 40px; }.waveform i:nth-child(5) { height: 48px; background: var(--accent); }
.workspace:has(#analyze-button:disabled):has(#analyze-form:not([hidden])) .waveform i { animation: wave .65s ease-in-out infinite alternate; }
.waveform i:nth-child(2n) { animation-delay: .2s !important; }
.result-summary { display: flex; align-items: center; gap: 8px; font-size: 9px; letter-spacing: 1px; color: var(--accent); margin-bottom: 18px; }
#analysis-time { margin-left: auto; color: var(--muted); letter-spacing: 0; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.metric { padding: 16px; background: #1f2419; border: 1px solid #35402a; border-radius: 9px; animation: reveal .4s ease-out both; }
.metric:nth-child(2) { animation-delay: .06s; }.metric:nth-child(3) { animation-delay: .12s; }.metric:nth-child(4) { animation-delay: .18s; }
.metric dt { color: #b3bca6; font-size: 11px; margin-bottom: 14px; }.metric dt span { color: var(--accent); margin-right: 5px; }
.metric dd { margin: 0; font: 500 14px/1.6 'Space Grotesk', sans-serif; overflow-wrap: anywhere; }
.metric-note { font-size: 10px; color: var(--muted); margin-bottom: 0; }
progress { display: block; width: 100%; height: 4px; margin-top: 15px; border: 0; border-radius: 4px; overflow: hidden; background: #39422f; accent-color: var(--accent); }
progress::-webkit-progress-bar { background: #39422f; }progress::-webkit-progress-value { background: var(--accent); transition: width .5s; }progress::-moz-progress-bar { background: var(--accent); }
.output-note { font-size: 10px; color: var(--muted); margin: 20px 0 0; }
.history-section { margin-top: 58px; }
.history-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.history-heading .eyebrow { font-size: 9px; margin-bottom: 12px; }
.history-heading h2 { font-size: 32px; font-weight: 500; letter-spacing: -1px; margin: 0; }
.accent { color: var(--accent); }
.history-list { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.history-list > li { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: #191d15; overflow-wrap: anywhere; animation: reveal .35s ease-out both; transition: border-color .2s, transform .2s; }
.history-list > li:hover { border-color: #657b40; transform: translateY(-2px); }
.history-text { margin: 0 0 22px; white-space: pre-wrap; font-size: 14px; line-height: 1.8; max-height: 180px; overflow-y: auto; }
.history-list dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; margin: 0; border-top: 1px solid var(--line); padding-top: 18px; }
.result-row dt { color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.result-row dd { margin: 0; font-size: 12px; line-height: 1.6; }
.footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 60px; padding: 26px 0; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); letter-spacing: .6px; }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(390%); } }
@keyframes wave { to { transform: scaleY(.4); opacity: .5; } }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes drift { to { transform: translate(12px, -15px); opacity: .4; } }
@keyframes orbit { to { transform: rotateY(60deg) rotate(390deg); } }
@media (max-width: 900px) { .container { width: calc(100% - 40px); }.brand-caption { display: none; }.account .status { display: none; }.hero { gap: 24px; }.signal-art { height: 280px; }h1 { letter-spacing: -2.5px; }.workspace { grid-template-columns: 1fr; }.output-panel { border-left: 0; border-top: 1px solid var(--line); }.result-placeholder { min-height: 210px; } }
@media (max-width: 560px) { .container { width: calc(100% - 32px); }.topbar { min-height: 84px; gap: 12px; }.brand { font-size: 27px; }.brand-mark { width: 30px; height: 30px; }.account, #signed-out { gap: 8px; }.account button { padding: 10px 12px; font-size: 11px; }.hero { grid-template-columns: 1fr; padding: 42px 0 34px; }.signal-art { display: none; }h1 { font-size: 56px; }.intro { font-size: 13px; }.hero-tags { gap: 18px; }.editor-panel, .output-panel { padding: 20px; }.metrics { gap: 8px; }.metric { padding: 12px; }.history-list { grid-template-columns: 1fr; }.history-heading { align-items: flex-start; flex-direction: column; }.history-heading h2 { font-size: 28px; }.footer { font-size: 9px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.account .status.error { display: block; color: #ffb3a7; }

.upgrade-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 24px; }
.upgrade-panel .status { margin: 0; }
