:root {
  color-scheme: light;
  --app-bg: #f4f6fa;
  --sidebar: #101a2b;
  --sidebar-2: #17253a;
  --ink: #152238;
  --muted: #657386;
  --subtle: #8a97a8;
  --line: #dde4ed;
  --card: #ffffff;
  --accent: #38dfc2;
  --accent-strong: #0f9d8c;
  --warm: #f3b875;
  --danger: #bf4b52;
  --shadow: 0 18px 45px rgb(21 34 56 / 8%);
  --shadow-soft: 0 8px 24px rgb(21 34 56 / 6%);
  --radius: 20px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { background: var(--app-bg); scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--app-bg); color: var(--ink); font-size: 15px; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid rgb(56 223 194 / 42%);
  outline-offset: 3px;
}
a { color: var(--accent-strong); }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex: 0 0 220px;
  flex-direction: column;
  align-self: flex-start;
  min-height: 100vh;
  padding: 28px 18px 22px;
  overflow: hidden;
  background: var(--sidebar);
  color: #fff;
}
.brand-lockup { display: flex; align-items: center; gap: 11px; margin: 0 10px 52px; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: var(--accent); color: var(--sidebar); font-weight: 900; box-shadow: 0 0 26px rgb(56 223 194 / 35%); }
.brand-name { font-size: 11px; font-weight: 850; letter-spacing: .12em; line-height: 1.35; text-transform: uppercase; }
.brand-name span { display: block; margin-top: 3px; color: #aec0cf; font-size: 12px; font-weight: 650; letter-spacing: 0; text-transform: none; }
.sidebar-nav { display: grid; gap: 8px; }
.nav-button { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 0 12px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #aebdcb; font-weight: 700; text-align: left; transition: background 180ms ease, color 180ms ease, transform 180ms ease; }
.nav-button > span:last-child { white-space: nowrap; }
.nav-label .nav-label-short { display: none; }
.nav-button:hover { background: rgb(255 255 255 / 8%); color: #fff; transform: translateX(2px); }
.nav-button[aria-current="page"] { background: var(--sidebar-2); border-color: rgb(56 223 194 / 22%); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav-index { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid currentColor; border-radius: 8px; font-family: var(--mono); font-size: 11px; }
.sidebar-foot { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid rgb(255 255 255 / 12%); color: #8da0b2; font-size: 12px; }
.sidebar-foot strong { display: block; color: #d2dde6; font-size: 13px; }

.main-shell { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; padding: 16px 32px; border-bottom: 1px solid var(--line); background: rgb(244 246 250 / 88%); backdrop-filter: blur(16px); }
.top-context { min-width: 0; }
.top-label { display: block; margin-bottom: 2px; color: var(--subtle); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.top-company { display: block; overflow: hidden; max-width: 360px; color: var(--ink); font-size: 16px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.top-controls { display: flex; align-items: center; gap: 10px; }
.top-market { display: grid; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 800; }
.top-market select { min-width: 132px; }
.main-content { width: min(1440px, 100%); margin: 0 auto; padding: 40px 32px 70px; }
.page-panel { display: none; }
.page-panel.is-active { display: block; animation: page-in 220ms ease both; }
.page-heading { margin: 0; color: var(--ink); font-size: clamp(30px, 4vw, 52px); letter-spacing: -.055em; line-height: 1.06; }
.page-lede { max-width: 700px; margin: 12px 0 0; color: var(--muted); font-size: 16px; }
.eyebrow { margin: 0 0 10px; color: var(--accent-strong); font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.inverse { color: var(--accent); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.04em; line-height: 1.15; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.section-heading > div { min-width: 0; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 45fr) minmax(400px, 55fr); align-items: stretch; gap: 28px; }
.hero-copy-card { display: flex; min-height: 460px; flex-direction: column; justify-content: center; padding: 40px 8px 40px 0; }
.hero-copy-card h1 { max-width: 630px; margin: 0; color: var(--ink); font-size: clamp(38px, 4.5vw, 52px); letter-spacing: -.07em; line-height: 1.02; }
.title-line { display: block; }
.keep-together { white-space: nowrap; }
.hero-copy-card h1 em { color: var(--accent-strong); font-style: normal; }
.hero-copy-card .lede { max-width: 590px; margin: 22px 0 0; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.hero-note { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--subtle); font-size: 12px; }
.hero-note::before { width: 7px; height: 7px; border-radius: 99px; background: var(--accent); content: ""; box-shadow: 0 0 0 5px rgb(56 223 194 / 15%); }
.preview-card { position: relative; min-height: 460px; padding: 18px; overflow: hidden; border: 1px solid rgb(21 34 56 / 10%); border-radius: 26px; background: linear-gradient(145deg, #dce9eb 0%, #aabec8 46%, #748d9d 100%); box-shadow: var(--shadow); }
.preview-card::after { position: absolute; right: -8%; bottom: -38%; width: 62%; height: 70%; border-radius: 50%; background: rgb(56 223 194 / 22%); filter: blur(55px); content: ""; pointer-events: none; }
.preview-topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 14px; color: #203849; font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.preview-badge { padding: 4px 8px; border: 1px solid rgb(32 56 73 / 20%); border-radius: 999px; background: rgb(255 255 255 / 38%); font-size: 10px; letter-spacing: .04em; }
.preview-frame { position: relative; z-index: 1; display: block; width: 100%; height: 386px; border: 0; border-radius: 18px; background: #0d1724; box-shadow: 0 18px 35px rgb(21 34 56 / 19%); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 11px; font-weight: 800; transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button.primary { background: var(--accent); color: #0e2530; box-shadow: 0 10px 22px rgb(56 223 194 / 18%); }
.button.primary:hover:not(:disabled) { box-shadow: 0 12px 26px rgb(56 223 194 / 30%); }
.button.secondary { border-color: var(--line); background: var(--card); color: var(--ink); }
.button.ghost { border-color: transparent; background: transparent; color: var(--accent-strong); }
.button.dark { background: var(--sidebar); color: #fff; }
.button.small { min-height: 35px; padding: 0 12px; font-size: 13px; }
.button.linkish { padding: 0; color: var(--accent-strong); }

.value-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 32px 0 54px; }
.value-card { position: relative; padding: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-soft); }
.value-card::after { position: absolute; right: -28px; bottom: -30px; width: 100px; height: 100px; border-radius: 50%; background: rgb(56 223 194 / 9%); content: ""; }
.value-number { display: block; margin-bottom: 17px; color: var(--accent-strong); font-family: var(--mono); font-size: 13px; font-weight: 900; }
.value-card h3 { margin: 0 0 5px; font-size: 17px; letter-spacing: -.02em; }
.value-card p { margin: 0; color: var(--muted); font-size: 13px; }

.market-section { padding-top: 4px; }
.market-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 18px; }
.market-card { min-height: 126px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); text-align: left; box-shadow: var(--shadow-soft); transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
.market-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.market-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(56 223 194 / 13%), var(--shadow-soft); }
.market-card.is-missing { color: var(--muted); }
.market-name { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; font-weight: 850; }
.market-name small { color: var(--subtle); font-size: 10px; font-weight: 800; }
.market-value { display: block; font-family: var(--mono); font-size: 23px; font-variant-numeric: tabular-nums; letter-spacing: -.06em; }
.market-value small { margin-left: 5px; color: var(--muted); font-family: inherit; font-size: 11px; letter-spacing: 0; }
.market-growth { color: var(--accent-strong); font-size: 12px; font-weight: 800; }
.market-growth.down { color: var(--danger); }
.market-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 18px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-soft); }
.chart-card { min-width: 0; padding: 22px; }
.chart-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.chart-header h3, .research-card h3 { margin: 0; font-size: 18px; letter-spacing: -.03em; }
.chart-header p, .research-card p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.legend { display: flex; gap: 13px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.legend span::before { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 2px; background: var(--subtle); content: ""; }
.legend .current::before { background: var(--accent-strong); }
.bar-chart { display: grid; gap: 19px; }
.bar-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 80px; align-items: center; gap: 10px; }
.bar-label { font-weight: 800; }
.bar-track { display: grid; gap: 5px; }
.bar-line { position: relative; height: 18px; overflow: hidden; border-radius: 5px; background: #edf1f5; }
.bar-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--subtle); transition: width 450ms cubic-bezier(.22, 1, .36, 1), background 180ms ease; }
.bar-fill.current { background: var(--accent-strong); }
.bar-fill.prev { opacity: .62; }
.bar-row:not(.is-selected) .bar-fill.current { background: #769c98; }
.bar-row.is-selected .bar-label { color: var(--accent-strong); }
.bar-row.is-selected { border-left: 3px solid var(--accent); padding-left: 7px; }
.page-panel h1 { scroll-margin-top: 80px; }
.bar-number { color: var(--muted); font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; }
.research-card { display: flex; min-height: 260px; flex-direction: column; padding: 24px; background: linear-gradient(150deg, var(--sidebar), #20344b); color: #fff; }
.research-card h3 { color: #fff; }
.research-card p { color: #b5c3cf; }
.research-fact { margin: 20px 0; padding: 16px; border: 1px solid rgb(255 255 255 / 13%); border-radius: 14px; background: rgb(255 255 255 / 5%); }
.research-fact strong { display: block; color: var(--accent); font-family: var(--mono); font-size: 22px; font-variant-numeric: tabular-nums; }
.research-fact strong .research-number { display: inline; color: inherit; font: inherit; font-variant-numeric: tabular-nums; }
.research-fact strong .research-unit { display: inline; margin-left: 4px; color: #c1ccd6; font-family: inherit; font-size: 11px; font-weight: 750; }
.research-fact span { display: block; color: #c1ccd6; font-size: 12px; }
.research-next { margin-top: auto !important; padding-top: 14px; border-top: 1px solid rgb(255 255 255 / 12%); }
.research-card .button { align-self: flex-start; margin-top: 18px; }
.research-error { padding: 14px; border: 1px solid rgb(243 184 117 / 42%); border-radius: 12px; background: rgb(243 184 117 / 10%); color: #f8d7ae; font-size: 13px; }
.research-error .button { margin-top: 11px; }
.loading-copy { color: var(--muted); font-size: 13px; }

.workflow-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin: 26px 0 25px; }
.workflow-step { display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); color: var(--muted); }
.workflow-step.is-current { border-color: rgb(56 223 194 / 65%); background: rgb(56 223 194 / 7%); color: var(--ink); }
.workflow-step.is-done { color: var(--accent-strong); }
.workflow-step-number { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; border-radius: 10px; background: #e9eef3; color: var(--muted); font-family: var(--mono); font-size: 12px; font-weight: 900; }
.workflow-step.is-current .workflow-step-number, .workflow-step.is-done .workflow-step-number { background: var(--accent); color: var(--sidebar); }
.workflow-step strong { display: block; font-size: 13px; }
.workflow-step span { display: block; font-size: 11px; }

.import-panel { margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-soft); }
.import-panel summary { display: flex; align-items: center; justify-content: space-between; padding: 19px 22px; cursor: pointer; list-style: none; font-weight: 850; }
.import-panel summary::-webkit-details-marker { display: none; }
.import-panel summary::after { color: var(--accent-strong); content: "+"; font-size: 22px; font-weight: 500; }
.import-panel[open] summary::after { content: "−"; }
.import-content { padding: 0 22px 22px; border-top: 1px solid var(--line); }
.import-content p { color: var(--muted); font-size: 13px; }
.import-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.import-content textarea { min-height: 170px; }
.parse-note { min-height: 23px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.parse-note.success { color: var(--accent-strong); }
.parse-note.error { color: var(--danger); }

.facts-card { padding: 25px; }
.facts-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--ink); font-size: 13px; font-weight: 850; }
.field label span { margin-left: 5px; color: var(--subtle); font-size: 11px; font-weight: 600; }
.field input, .field textarea, .top-market select { width: 100%; min-height: 43px; padding: 9px 12px; border: 1px solid #ced8e3; border-radius: 11px; background: #fbfcfd; color: var(--ink); }
.field textarea { min-height: 102px; resize: vertical; }
.field input.is-invalid, .field textarea.is-invalid { border-color: var(--danger); background: #fff9f9; }
.field-hint { min-height: 18px; color: var(--subtle); font-size: 11px; }
.field-error { min-height: 18px; color: var(--danger); font-size: 11px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-feedback { min-height: 23px; color: var(--muted); font-size: 13px; }
.form-feedback.success { color: var(--accent-strong); font-weight: 750; }
.form-feedback.error { color: var(--danger); font-weight: 700; }
.confirmation-card { display: none; margin-top: 18px; padding: 18px; border: 1px solid rgb(56 223 194 / 38%); border-radius: 15px; background: rgb(56 223 194 / 7%); }
.confirmation-card.is-visible { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.confirmation-card strong { display: block; color: var(--accent-strong); }
.confirmation-card p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

.studio-status { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 26px 0 18px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.status-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 850; }
.status-badge::before { width: 8px; height: 8px; border-radius: 99px; background: var(--subtle); content: ""; }
.status-badge.latest { color: var(--accent-strong); }
.status-badge.latest::before { background: var(--accent-strong); box-shadow: 0 0 0 4px rgb(56 223 194 / 15%); }
.status-badge.waiting { color: #aa6c27; }
.status-badge.waiting::before { background: var(--warm); }
.status-badge.stale { color: var(--danger); }
.status-badge.stale::before { background: var(--danger); }
.version-label { color: var(--subtle); font-family: var(--mono); font-size: 11px; }
.studio-grid { display: grid; grid-template-columns: 214px minmax(0, 1fr); gap: 20px; align-items: start; }
.studio-settings { display: grid; gap: 17px; }
.setting-card { padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: var(--card); box-shadow: var(--shadow-soft); }
.setting-card h3 { margin: 0 0 11px; font-size: 13px; letter-spacing: -.01em; }
.setting-card p { margin: -3px 0 11px; color: var(--muted); font-size: 11px; }
.template-list, .artifact-tabs { display: grid; gap: 7px; }
.template-button, .artifact-tab { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 37px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; color: var(--muted); font-size: 12px; font-weight: 750; text-align: left; }
.template-button:hover, .artifact-tab:hover { border-color: rgb(56 223 194 / 65%); color: var(--ink); }
.template-button.is-selected, .artifact-tab.is-selected { border-color: var(--accent); background: rgb(56 223 194 / 10%); color: var(--ink); }
.template-button::after { width: 10px; height: 10px; border-radius: 50%; background: var(--sidebar); content: ""; }
.template-button[data-template="editorial"]::after { background: #e9eee9; border: 1px solid #b1bbb4; }
.studio-settings .button { width: 100%; }
.return-link { margin-top: 1px; color: var(--accent-strong); font-size: 12px; font-weight: 800; text-align: center; text-decoration: none; }
.studio-main { min-width: 0; }
.artifact-preview-shell { position: relative; min-height: 620px; padding: 15px; overflow: hidden; border: 1px solid #c5d0db; border-radius: 24px; background: #dae4e8; box-shadow: var(--shadow); }
.artifact-preview-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 3px 12px; color: #365060; font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.artifact-preview-top span:last-child { color: #657e8c; font-size: 10px; letter-spacing: .04em; text-transform: none; }
.artifact-frame { display: block; width: 100%; height: 575px; border: 0; border-radius: 16px; background: #0d1724; box-shadow: 0 12px 28px rgb(21 34 56 / 16%); }
.artifact-frame.is-refreshing { animation: artifact-refresh 340ms ease both; }
.stale-overlay { position: absolute; top: 58px; right: 28px; left: 28px; display: none; padding: 9px 13px; border: 1px solid rgb(191 75 82 / 35%); border-radius: 10px; background: rgb(255 247 247 / 94%); color: var(--danger); font-size: 12px; font-weight: 750; pointer-events: none; }
.stale-overlay.is-visible { display: block; }
.export-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
.export-actions p { margin: 0; color: var(--muted); font-size: 11px; }
.export-buttons { display: flex; flex-wrap: wrap; gap: 9px; }
.spec-compare { margin-top: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
.spec-compare summary { padding: 15px 17px; cursor: pointer; font-size: 13px; font-weight: 850; }
.compare-body { padding: 0 17px 17px; border-top: 1px solid var(--line); }
.compare-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf1f4; font-size: 12px; }
.compare-row:last-child { border-bottom: 0; }
.compare-label { color: var(--muted); font-weight: 800; }
.compare-cell { min-width: 0; word-break: break-word; }
.compare-cell small { display: block; margin-bottom: 2px; color: var(--subtle); font-size: 10px; text-transform: uppercase; }

.inline-feedback { min-height: 23px; margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.inline-feedback.success { color: var(--accent-strong); }
.inline-feedback.error { color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

dialog { width: min(720px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 22px; box-shadow: 0 30px 80px rgb(21 34 56 / 24%); color: var(--ink); }
dialog::backdrop { background: rgb(16 26 43 / 55%); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 23px 25px 16px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 21px; }
.dialog-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.dialog-close { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); font-size: 18px; }
.dialog-body { padding: 20px 25px 25px; }
.source-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 19px; }
.source-meta div { padding: 12px; border-radius: 12px; background: #f2f6f8; }
.source-meta span { display: block; color: var(--muted); font-size: 11px; }
.source-meta strong { display: block; margin-top: 3px; font-size: 13px; }
.source-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.source-list li { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfd; }
.source-list strong { display: block; font-size: 13px; }
.source-list span { display: block; color: var(--muted); font-size: 11px; }
.source-limits { margin: 19px 0 0; padding: 14px 17px; border-left: 3px solid var(--warm); border-radius: 0 11px 11px 0; background: #fff9ef; color: #785b36; font-size: 12px; }
.source-limits ul { margin: 7px 0 0; padding-left: 17px; }
.source-empty { color: var(--muted); font-size: 13px; }

@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes reveal-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes artifact-refresh { from { opacity: .45; transform: scale(.99); } to { opacity: 1; transform: scale(1); } }
@keyframes artifact-refresh { from { opacity: .45; transform: scale(.99); } to { opacity: 1; transform: scale(1); } }
.reveal { animation: reveal-up 520ms ease both; }
.reveal-delay-1 { animation-delay: 60ms; }
.reveal-delay-2 { animation-delay: 120ms; }
.reveal-delay-3 { animation-delay: 180ms; }
.spec-highlight { animation: spec-flash 800ms ease both; }
@keyframes spec-flash { 0% { box-shadow: 0 0 0 0 rgb(56 223 194 / 0%); } 25% { box-shadow: 0 0 0 4px rgb(56 223 194 / 28%); } 100% { box-shadow: 0 0 0 0 rgb(56 223 194 / 0%); } }

@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, .95fr); }
  .studio-grid { grid-template-columns: 190px minmax(0, 1fr); }
  .topbar, .main-content { padding-right: 24px; padding-left: 24px; }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; z-index: 10; top: 0; display: block; min-height: auto; padding: 10px 16px; border-bottom: 1px solid rgb(255 255 255 / 10%); }
  .brand-lockup { display: inline-flex; margin: 0 22px 0 0; vertical-align: middle; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 10px; }
  .brand-name span { display: none; }
  .sidebar-nav { display: inline-flex; gap: 5px; vertical-align: middle; }
  .nav-button { min-height: 36px; padding: 0 10px; font-size: 12px; }
  .nav-index { width: 20px; height: 20px; border-radius: 6px; font-size: 10px; }
  .sidebar-foot { display: none; }
  .topbar { min-height: 68px; }
  .main-content { padding-top: 29px; }
  .market-body { grid-template-columns: 1fr; }
  .research-card { min-height: auto; }
  .research-next { margin-top: 20px !important; }
}
@media (max-width: 700px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .top-controls { width: 100%; justify-content: space-between; }
  .top-market { flex: 1; }
  .top-market select { min-width: 0; }
  .main-content { padding: 25px 16px 52px; }
  .hero-grid { display: flex; flex-direction: column; gap: 16px; }
  .hero-copy-card { min-height: auto; padding: 15px 0 24px; }
  .hero-copy-card h1 { font-size: clamp(39px, 12vw, 58px); }
  .preview-card { min-height: 340px; padding: 12px; }
  .preview-frame { height: 282px; }
  .value-cards, .market-cards, .workflow-steps { grid-template-columns: 1fr; }
  .value-cards { margin-bottom: 40px; }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .chart-header { align-items: start; flex-direction: column; }
  .bar-row { grid-template-columns: 42px minmax(0, 1fr) 70px; gap: 7px; }
  .facts-form { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .import-grid { grid-template-columns: 1fr; }
  .form-foot, .studio-status, .export-actions { align-items: stretch; flex-direction: column; }
  .studio-grid { grid-template-columns: 1fr; }
  .studio-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setting-card:last-child { grid-column: 1 / -1; }
  .artifact-preview-shell { min-height: 420px; padding: 10px; }
  .artifact-frame { height: 390px; }
  .stale-overlay { top: 48px; right: 20px; left: 20px; }
  .export-buttons { display: grid; grid-template-columns: 1fr; }
  .export-buttons .button { width: 100%; }
  .compare-row { grid-template-columns: 1fr; gap: 5px; }
  .source-meta { grid-template-columns: 1fr; }
  .dialog-head, .dialog-body { padding-right: 18px; padding-left: 18px; }
}
@media (max-width: 480px) {
  .hero-copy-card h1 { font-size: clamp(28px, 7.4vw, 34px); line-height: 1.2; }
  .hero-line, .title-line { display: block; }
  .hero-line:last-child, .title-line:last-child { white-space: nowrap; }
  .hero-keep, .keep-together { white-space: nowrap; }
  .brand-lockup { margin-right: 8px; }
  .brand-name { display: none; }
  .sidebar-nav { width: calc(100% - 43px); justify-content: space-between; }
  .nav-button { flex: 1; justify-content: center; padding: 0 5px; }
  .nav-button .nav-label-full { display: none; }
  .nav-button .nav-label .nav-label-short { display: inline; }
  .nav-button .nav-index { display: none; }
  .nav-index { margin: 0; }
  .hero-actions .button { width: 100%; }
  .facts-card { padding: 18px 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
