/* ==========================================================================
   Screen-specific styles
   ========================================================================== */

/* ---- Screen 1 — Home ----------------------------------------------------- */

.home-hero {
  background: var(--athera-navy);
  color: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  margin-top: var(--sp-5);
}
.home-hero-inner { padding: var(--sp-7) var(--sp-6); position: relative; z-index: 2; max-width: 820px; }
.home-hero .eyebrow { color: rgba(255, 255, 255, 0.5); display: block; margin-bottom: var(--sp-3); }
.home-hero h1 { color: #fff; }
.home-hero h1 .a { color: var(--athera-blue); }
.home-hero .blue-rule { margin: var(--sp-3) 0; }
.home-hero .lead { color: rgba(255, 255, 255, 0.78); margin-top: var(--sp-3); }
.home-hero .definition { color: rgba(255, 255, 255, 0.92); font-family: var(--athera-display); font-size: clamp(20px, 2.6vw, 28px); font-weight: 300; line-height: 1.35; margin-top: var(--sp-2); }
/* concentric-circle motif, very subtle */
.home-hero .motif {
  position: absolute; right: -120px; top: 50%; transform: translateY(-50%);
  width: 520px; height: 520px; z-index: 1; opacity: 0.5; pointer-events: none;
}
.home-hero .btn-row { margin-top: var(--sp-5); }

.home-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.home-step .step-no { font-family: var(--athera-mono); font-size: 12px; color: var(--athera-blue-deep); }
.home-step h3 { margin: var(--sp-2) 0 var(--sp-1); }

.dataset-banner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  margin-top: var(--sp-4); padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--athera-line); border-radius: var(--radius);
  background: var(--athera-white);
}
.dataset-banner .status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--athera-blue); }

.note-line {
  display: flex; gap: 10px; align-items: baseline; color: var(--athera-grey);
  font-size: 13px; line-height: 1.6;
}
.note-line .blue-rule { width: 18px; flex-shrink: 0; align-self: center; }

/* ---- Screen 2 — Input ---------------------------------------------------- */

.input-cols { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--sp-5); align-items: start; }
@media (max-width: 980px) { .input-cols { grid-template-columns: 1fr; } }

.scope-group { margin-bottom: var(--sp-4); }
.scope-group .label { display: block; margin-bottom: var(--sp-2); }
.radio-list label, .check-list label {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; cursor: pointer; font-size: 14px;
  border-bottom: 1px solid var(--athera-line-light);
}
.check-list { max-height: 340px; overflow-y: auto; }
.check-list .line-head {
  font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--athera-grey-light); padding: 14px 0 6px; border: none; cursor: default;
}
.scope-asset-meta { margin-left: auto; font-family: var(--athera-mono); font-size: 11px; color: var(--athera-grey-light); }
.radio-list input, .check-list input { accent-color: var(--athera-blue-deep); }

select.field, input.field {
  width: 100%; padding: 11px 13px; font-family: var(--athera-sans); font-size: 14px;
  color: var(--athera-charcoal); background: var(--athera-white);
  border: 1px solid var(--athera-line); border-radius: var(--radius-sm);
}

/* Upload dropzones */
.dropzones { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
@media (max-width: 600px) { .dropzones { grid-template-columns: 1fr; } }
.dropzone {
  border: 1px dashed var(--athera-line); border-radius: var(--radius);
  padding: var(--sp-3); background: var(--athera-white);
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: pointer; position: relative;
}
.dropzone:hover { border-color: var(--athera-grey-light); }
.dropzone.dragover { border-color: var(--athera-blue); background: rgba(95, 184, 214, 0.05); }
.dropzone.has-file { border-style: solid; border-color: var(--athera-blue-deep); }
.dropzone.has-error { border-style: solid; border-color: var(--risk-high-line); background: var(--risk-high-bg); }
.dropzone h4 { font-family: var(--athera-sans); font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.dropzone .dz-hint { font-size: 11px; color: var(--athera-grey-light); font-family: var(--athera-mono); }
.dropzone .dz-status { font-size: 12px; margin-top: 10px; line-height: 1.5; }
.dropzone .dz-status.ok { color: var(--athera-blue-deep); }
.dropzone .dz-status.err { color: var(--risk-high); }
.dropzone input[type=file] { display: none; }

.demo-alt {
  margin-top: var(--sp-3); padding: var(--sp-3);
  border: 1px solid var(--athera-line); border-left: 2px solid var(--athera-blue);
  border-radius: var(--radius); background: var(--athera-white);
}
.demo-alt.active { background: rgba(95, 184, 214, 0.05); }

.upload-feedback { margin-top: var(--sp-3); }
.file-summary { font-size: 12px; color: var(--athera-grey); padding: 8px 0; border-bottom: 1px solid var(--athera-line-light); }
.file-summary .num { font-family: var(--athera-mono); color: var(--athera-charcoal); }

.analyze-bar {
  position: sticky; bottom: 0; margin-top: var(--sp-5);
  background: rgba(248, 247, 244, 0.95); backdrop-filter: blur(6px);
  border-top: 1px solid var(--athera-line); padding: var(--sp-3) 0;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}

/* Progress overlay during analysis */
.analyze-progress { display: flex; align-items: center; gap: 14px; color: var(--athera-grey); font-size: 13px; }
.progress-steps { margin-top: var(--sp-3); }
.progress-steps li {
  display: flex; gap: 12px; align-items: center; padding: 7px 0; font-size: 13px; color: var(--athera-grey-light);
}
.progress-steps li.done { color: var(--athera-charcoal); }
.progress-steps li.active { color: var(--athera-charcoal); }
.progress-steps .tick { font-family: var(--athera-mono); width: 16px; color: var(--athera-blue-deep); }

/* ---- Screen 3 — Readiness ------------------------------------------------ */

.line-group { margin-bottom: var(--sp-4); }
.line-group > .label { display: block; margin-bottom: var(--sp-2); }
.baseline-table td .asset-name { font-weight: 500; color: var(--athera-charcoal); }
.expand-row td { background: var(--athera-surface); padding: 0; }
.expand-inner { padding: var(--sp-3) var(--sp-3) var(--sp-3) 48px; }
.expand-toggle { cursor: pointer; background: none; border: none; color: var(--athera-blue-deep); font-size: 11px; font-family: var(--athera-mono); padding: 0; }
.sensor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-2); }
.sensor-cell { font-size: 12px; }
.sensor-cell .s-name { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--athera-grey-light); }
.sensor-cell .s-val { font-family: var(--athera-mono); color: var(--athera-charcoal); font-size: 13px; }

.baseline-ok { color: var(--risk-low); }
.baseline-warn { color: var(--athera-amber); }

/* ---- Screen 4 — Dashboard ------------------------------------------------ */

.health-band {
  background: var(--athera-navy); color: #fff; border-radius: var(--radius);
  padding: var(--sp-5); margin-top: var(--sp-4);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--sp-5); align-items: center;
}
@media (max-width: 900px) { .health-band { grid-template-columns: 1fr; } }
.health-band .headline { font-family: var(--athera-display); font-size: clamp(22px, 2.8vw, 30px); font-weight: 300; line-height: 1.3; color: #fff; }
.health-band .eyebrow { color: rgba(255,255,255,0.5); display: block; margin-bottom: var(--sp-2); }
.health-band .blue-rule { margin: var(--sp-2) 0; }
.health-counts { display: flex; gap: var(--sp-4); }
.health-count .n { font-family: var(--athera-mono); font-size: 38px; line-height: 1; }
.health-count .l { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin-top: 8px; display: block; }
.health-count.high .n { color: #E29A92; }
.health-count.medium .n { color: #DBB683; }
.health-count.low .n { color: #9DBCAB; }

.dash-layout { display: grid; grid-template-columns: 1.55fr 1fr; gap: var(--sp-4); margin-top: var(--sp-5); align-items: start; }
@media (max-width: 1080px) { .dash-layout { grid-template-columns: 1fr; } }

/* Risk cards */
.risk-card {
  background: var(--athera-white); border: 1px solid var(--athera-line);
  border-left: 3px solid var(--athera-line); border-radius: var(--radius);
  padding: var(--sp-4); margin-bottom: var(--sp-3);
}
.risk-card.lvl-high { border-left-color: var(--risk-high); }
.risk-card.lvl-medium { border-left-color: var(--risk-medium); }
.risk-card.lvl-low { border-left-color: var(--risk-low); }
.risk-card.provisional { border-style: dashed; border-left-style: solid; background: var(--confidence-low-bg); }

.risk-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-3); }
.risk-rank { font-family: var(--athera-mono); font-size: 12px; color: var(--athera-grey-light); }
.risk-asset h3 { font-family: var(--athera-display); font-size: 26px; font-weight: 400; line-height: 1.1; }
.risk-asset .loc { font-size: 12px; color: var(--athera-grey); margin-top: 4px; }
.risk-score-box { text-align: right; flex-shrink: 0; }
.risk-score { font-family: var(--athera-mono); font-size: 46px; line-height: 0.9; font-weight: 400; letter-spacing: -0.02em; }
.risk-score-box .of { font-size: 12px; color: var(--athera-grey-light); font-family: var(--athera-mono); }
.lvl-high .risk-score { color: var(--risk-high); }
.lvl-medium .risk-score { color: var(--risk-medium); }
.lvl-low .risk-score { color: var(--risk-low); }

.risk-meta-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); align-items: center; }
.failure-mode { font-size: 14px; color: var(--athera-charcoal); }
.failure-mode b { font-weight: 500; }

.confidence-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px; border: 1px solid var(--athera-line); color: var(--athera-grey);
}
.confidence-tag.low { color: var(--confidence-low); border-style: dashed; border-color: var(--athera-grey-light); }
.provisional-note {
  margin-top: var(--sp-2); padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--confidence-low-bg); border: 1px dashed var(--athera-grey-light);
  font-size: 12px; color: var(--athera-charcoal-light); line-height: 1.55;
}

.signals { margin-top: var(--sp-3); }
.signal {
  display: grid; grid-template-columns: 1fr auto; gap: var(--sp-3); align-items: center;
  padding: var(--sp-2) 0; border-top: 1px solid var(--athera-line-light);
}
.signal .sig-text { font-size: 13px; line-height: 1.55; color: var(--athera-charcoal-light); }
.signal .sig-text .figure { font-family: var(--athera-mono); color: var(--athera-charcoal); }
.sparkline { width: 132px; height: 38px; flex-shrink: 0; }

.risk-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--athera-line-light); }
@media (max-width: 560px) { .risk-detail-grid { grid-template-columns: 1fr; } }
.detail-block .label { display: block; margin-bottom: 6px; }
.detail-block p, .detail-block li { font-size: 13px; line-height: 1.55; color: var(--athera-charcoal-light); }
.detail-block .timing { display: inline-flex; align-items: center; }
.parts-list li { padding: 3px 0; }
.parts-list li::before { content: "\2014"; color: var(--athera-grey-light); margin-right: 8px; }
.source-list li { font-family: var(--athera-mono); font-size: 11px; color: var(--athera-grey); padding: 2px 0; }

/* Review controls */
.review-bar {
  margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--athera-line);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap;
}
.review-actions { display: flex; gap: 8px; }
.review-btn {
  font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer;
  background: transparent; border: 1px solid var(--athera-line); color: var(--athera-grey);
  transition: all 0.2s ease;
}
.review-btn:hover { border-color: var(--athera-grey-light); color: var(--athera-charcoal); }
.review-btn.sel-confirmed { background: var(--risk-low-bg); border-color: var(--risk-low-line); color: var(--risk-low); }
.review-btn.sel-overridden { background: var(--risk-medium-bg); border-color: var(--risk-medium-line); color: var(--risk-medium); }
.review-btn.sel-dismissed { background: var(--confidence-low-bg); border-color: var(--athera-grey-light); color: var(--athera-grey); }
.review-status { font-size: 12px; color: var(--athera-grey); }
.review-status .st { font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }
.review-status .reason { color: var(--athera-grey-light); font-style: italic; }

.reason-form { margin-top: var(--sp-2); width: 100%; display: flex; gap: 8px; }
.reason-form input { flex: 1; padding: 9px 12px; border: 1px solid var(--athera-line); border-radius: var(--radius-sm); font-family: var(--athera-sans); font-size: 13px; }

/* Side panel */
.side-panel { position: sticky; top: 100px; display: flex; flex-direction: column; gap: var(--sp-3); }
.panel-card { background: var(--athera-white); border: 1px solid var(--athera-line); border-radius: var(--radius); padding: var(--sp-3); }
.panel-card > .label { display: block; margin-bottom: var(--sp-2); }
.plan-item { padding: 10px 0; border-bottom: 1px solid var(--athera-line-light); font-size: 13px; }
.plan-item:last-child { border-bottom: none; }
.plan-item .pi-name { font-weight: 500; }
.plan-item .pi-meta { font-size: 11px; color: var(--athera-grey); margin-top: 2px; }
.plan-item .pi-meta .num { font-family: var(--athera-mono); }

.gap-item { padding: var(--sp-2) 0; border-bottom: 1px solid var(--athera-line-light); }
.gap-item:last-child { border-bottom: none; }
.gap-item .gap-cat { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--athera-grey-light); }
.gap-item .gap-desc { font-size: 13px; color: var(--athera-charcoal); margin: 4px 0; line-height: 1.5; }
.gap-item .gap-why { font-size: 12px; color: var(--athera-grey); line-height: 1.5; }
.gap-item .gap-fix { font-size: 12px; color: var(--athera-charcoal-light); margin-top: 4px; line-height: 1.5; }
.gap-item .gap-fix b { font-weight: 500; color: var(--athera-blue-deep); }

/* ---- Screen 5 — Brief ---------------------------------------------------- */

.brief-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  margin: var(--sp-4) 0; flex-wrap: wrap;
}
.brief-doc {
  background: var(--athera-white); border: 1px solid var(--athera-line);
  border-radius: var(--radius); padding: var(--sp-6) var(--sp-7);
  max-width: 920px; margin: 0 auto;
}
.brief-doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--athera-line); }
.brief-doc-head .wordmark { font-size: 22px; }
.brief-doc-head .doc-meta { text-align: right; font-family: var(--athera-mono); font-size: 11px; color: var(--athera-grey); line-height: 1.6; }
.brief-title { margin-top: var(--sp-4); }
.brief-section { margin-top: var(--sp-5); }
.brief-section > .label { display: block; margin-bottom: var(--sp-2); }
.brief-section h2 { font-family: var(--athera-display); font-size: 26px; font-weight: 400; margin-bottom: var(--sp-2); }
.brief-section .blue-rule { margin-bottom: var(--sp-3); }
.brief-asset { padding: var(--sp-2) 0; border-bottom: 1px solid var(--athera-line-light); display: grid; grid-template-columns: auto 1fr auto; gap: var(--sp-3); align-items: baseline; }
.brief-asset .ba-score { font-family: var(--athera-mono); font-size: 20px; width: 48px; }
.brief-asset .ba-score.lvl-high { color: var(--risk-high); }
.brief-asset .ba-score.lvl-medium { color: var(--risk-medium); }
.brief-asset .ba-score.lvl-low { color: var(--risk-low); }
.brief-asset .ba-name { font-weight: 500; }
.brief-asset .ba-detail { font-size: 12px; color: var(--athera-grey); margin-top: 2px; }
.brief-asset .ba-timing { font-size: 11px; color: var(--athera-grey); text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }

.disclaimer {
  margin-top: var(--sp-6); padding-top: var(--sp-3); border-top: 1px solid var(--athera-line);
  font-size: 11px; line-height: 1.6; color: var(--athera-grey-light); font-style: italic;
}
.brief-doc-foot { display: none; }

.review-note-item { padding: var(--sp-2) 0; border-bottom: 1px solid var(--athera-line-light); font-size: 13px; }
.review-note-item .rn-status { font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; }
.review-note-item .rn-reason { color: var(--athera-grey); }
