body { background: #f7f9f8; }
.topbar { height: 76px; padding: 0 4%; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; background: #fff; }
.topbar-links { display: flex; gap: 30px; align-items: center; }
.generator-back { color: var(--ink); font-size: 12px; font-weight: 600; text-decoration: none; }
main { max-width: 1680px; margin: auto; padding: 28px 4% 24px; }
.eyebrow { font: 10px var(--mono); color: var(--teal-dark); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 12px; }
.page-shell { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 28px; align-items: start; }
.control-column { padding: 4px 0 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 15px; }
.section-heading h2 { font-size: 14px; margin: 0; font-weight: 700; }
.example-list { display: grid; gap: 8px; }
.example-card { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 9px 12px; background: white; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.example-card:hover { border-color: var(--teal); }
.example-card[aria-pressed="true"] { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); background: #f0f8f8; }
.example-card img { width: 100px; height: 44px; object-fit: contain; }
.example-card strong { display: block; font-size: 12px; font-weight: 700; }
.example-card small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.field-note { font-size: 11px; color: var(--muted); line-height: 1.6; margin: 10px 0 0; }
.prediction-form { margin-top: 22px; }
.prediction-form fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.prediction-form legend { font-size: 13px; font-weight: 700; margin: 0 0 12px; }
.field-heading, .component-row { display: grid; grid-template-columns: minmax(0, 1fr) 50px 24px; gap: 7px; align-items: center; }
.field-heading { font-size: 10px; color: var(--muted); margin-bottom: 5px; }
.text-button { padding: 0; border: none; background: transparent; color: var(--teal-dark); cursor: pointer; font-size: 16px; font-weight: 600; }
.component-list { display: grid; gap: 7px; }
.component-row input, .field input, .field select { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); padding: 0 10px; font-size: 12px; }
.component-row input[type="text"] { font: 11px var(--mono); }
.remove-component { border: 0; background: transparent; color: var(--muted); font-size: 19px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 12px; font-weight: 600; }
.field em { font-size: 10px; font-style: normal; color: var(--muted); font-weight: 400; }
.run-button { margin-top: 18px; width: 100%; min-height: 49px; border: 0; border-radius: 9px; padding: 12px 16px; color: white; background: var(--teal-dark); display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .2s; }
.run-button:hover { background: #1b5965; }
.run-arrow { font-size: 22px; font-weight: 400; }
button:disabled { opacity: .55; cursor: default; }
.ephemeral-note { margin: 9px 0 0; font-size: 10px; color: var(--muted); line-height: 1.6; text-align: center; }
.result-column { min-width: 0; }
.viewer-card { background: white; border: 1px solid #d5dfdd; border-radius: 16px; overflow: hidden; box-shadow: 0 12px 40px #243e3710; }
.viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 21px 24px 17px; }
.viewer-header .eyebrow { margin-bottom: 7px; font-size: 9px; }
.viewer-header h2 { font-size: 21px; letter-spacing: -.035em; margin: 0; font-weight: 600; }
.viewer-button { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; font-size: 11px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--ink); background: white; cursor: pointer; white-space: nowrap; }
.viewer-button-primary { color: var(--teal-dark); background: #eef7f6; border-color: #c6dfdb; font-weight: 700; }
.export-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.result-actions { padding: 0 24px 15px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.segmented { display: inline-flex; padding: 3px; background: #eef2f1; border-radius: 7px; }
.segmented button { border: 0; background: transparent; border-radius: 5px; padding: 7px 10px; color: var(--muted); font-size: 11px; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: white; color: var(--teal-dark); box-shadow: 0 1px 4px #233a321a; font-weight: 700; }
.viewer-tools { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.toggle-control, .color-control { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 10px; }
.color-control select { max-width: 98px; border: 0; background: transparent; color: var(--ink); font-size: 10px; cursor: pointer; }
.toggle-control input { accent-color: var(--teal-dark); }
.viewer-stage { position: relative; height: clamp(380px, 42vw, 510px); background: #f1f5f3; border-top: 1px solid var(--line-soft); }
.viewer { position: absolute; inset: 0; width: 100%; height: 100%; }
.viewer-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.stage-top, .stage-bottom { position: absolute; left: 20px; right: 20px; display: flex; justify-content: space-between; gap: 10px; align-items: center; pointer-events: none; color: #697c77; font-size: 10px; }
.stage-top { top: 16px; justify-content: flex-end; }
.stage-top button { pointer-events: auto; background: #ffffffbf; border: 1px solid #cbd8d4; border-radius: 6px; color: var(--teal-dark); padding: 6px 9px; font: 10px var(--font); cursor: pointer; }
.stage-bottom { bottom: 16px; }
.component-legend { display: flex; flex-wrap: wrap; gap: 10px; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.job-overlay { display: flex; align-items: center; gap: 14px; padding: 16px 24px; background: #eaf5f5; border-top: 1px solid #d6e8e4; }
.job-overlay p { margin: 0; color: var(--teal-dark); font-size: 13px; font-weight: 700; }
.loading-orbit { display: inline-block; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c0ded9; border-top-color: var(--teal-dark); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-panel { padding: 16px 24px; background: #fff3ef; color: #9b4139; font-size: 12px; }
.error-panel p { margin: 4px 0; line-height: 1.6; }
.error-panel .text-button { font-size: 12px; margin-top: 8px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-soft); }
.metric { padding: 14px 20px; border-right: 1px solid var(--line-soft); }
.metric:last-child { border: 0; }
.metric span { display: block; color: var(--muted); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.metric strong { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; }
.metadata-detail { border-top: 1px solid var(--line-soft); padding: 12px 20px; font-size: 11px; color: var(--muted); }
.metadata-detail summary { cursor: pointer; }
#cell-parameters { font: 11px/1.8 var(--mono); margin: 12px 0; }
.resolved-components { display: flex; flex-wrap: wrap; gap: 6px; }
.component-pill { background: #edf5f3; color: var(--teal-dark); font: 10px var(--mono); padding: 5px 8px; border-radius: 4px; overflow-wrap: anywhere; }
.result-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 4px; font-size: 9px; color: var(--muted); }
.license-notice { font-size: 11px; line-height: 1.6; }
.license-notice a { color: var(--teal-dark); text-underline-offset: 3px; }
.credit-separator { margin: 0 6px; }
#service-status i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; background: var(--orange); }
#service-status.is-ready i { background: var(--green); }
#service-status.is-error i { background: var(--rose); }
.viewer-card:fullscreen { border-radius: 0; display: flex; flex-direction: column; overflow: auto; }
.viewer-card:fullscreen .viewer-stage { flex: 1; min-height: 250px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.is-hidden { display: none !important; }
@media (max-width: 1100px) { .page-shell { grid-template-columns: 290px minmax(0, 1fr); gap: 20px; } .viewer-header, .result-actions { padding-left: 16px; padding-right: 16px; } .metric { padding: 13px 10px; } .stage-bottom { flex-wrap: wrap; } }
@media (max-width: 800px) { .page-shell { grid-template-columns: 1fr; gap: 24px; } .control-column { max-width: none; } .result-column { order: -1; } .example-list { grid-template-columns: repeat(3, minmax(0,1fr)); } .example-card { display: block; padding: 8px; } .example-card img { width: 100%; height: 45px; } .example-card strong { font-size: 10px; } .example-card small { font-size: 9px; } .prediction-form { margin-top: 16px; } .viewer-stage { height: 420px; } .viewer-header h2 { font-size: 18px; } .topbar { height: 64px; } .stage-bottom { font-size: 9px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; } }
