/* ============================================================
   MedObras v5 — section blocks (Carbon / Orange / Ivory)
   ============================================================ */

/* ---------- Problem (ivory) ---------- */
.problem .grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(36px,6vw,80px); align-items: start; }
@media (max-width: 880px) { .problem .grid { grid-template-columns: 1fr; } }

/* ---------- Feature lead band (o "plus") ---------- */
.feat-lead { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 9px; padding: 24px clamp(22px,3vw,30px); border-radius: var(--radius-lg); border: 1px solid var(--orange-line); border-left: 3px solid var(--orange); background: var(--orange-tint); }
.feat-lead .feat-lead-kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange-deep); }
.feat-lead p { font-size: clamp(16px,1.5vw,19px); color: var(--ink); line-height: 1.5; max-width: 78ch; }
.feat-lead p strong { color: var(--orange-deep); font-weight: 700; }

.chaos { display: grid; gap: 13px; }
.chaos-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 16px 18px; background: var(--ivory); border: 1px solid var(--line-l); border-radius: var(--radius-lg); }
.chaos-row .ch-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--radius); background: var(--ivory-3); color: var(--muted); font-family: var(--mono); font-size: 11px; }
.chaos-row .ch-txt b { display: block; font-size: 15.5px; font-weight: 700; color: var(--ink); }
.chaos-row .ch-txt span { font-size: 13.5px; color: var(--muted); }
.chaos-row .ch-flag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.02em; color: var(--orange-deep); padding: 4px 9px; border-radius: var(--radius); border: 1px solid var(--orange-line); background: var(--orange-tint); white-space: nowrap; }
.chaos .verdict { margin-top: 6px; display: flex; gap: 10px; align-items: baseline; font-family: var(--mono); font-size: 13px; color: var(--ink-2); padding-left: 2px; }
.chaos .verdict b { color: var(--orange-deep); }

.problem .pitch { position: relative; display: flex; flex-direction: column; gap: 22px; }
.problem .pitch h2 { font-size: clamp(24px, 2.6vw, 36px); }
.problem .pitch .big { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); line-height: 1.55; }
.problem .pitch .big strong { color: var(--ink); font-weight: 700; }
.posline { font-family: var(--mono); font-size: 14px; line-height: 1.8; color: var(--ink-2); border-left: 3px solid var(--orange); padding: 4px 0 4px 18px; }
.posline b { color: var(--ink); font-weight: 600; }
.posline s { color: var(--muted); text-decoration-color: var(--orange); }

/* ---------- Flow divider ---------- */
.flowdivide { background: transparent; padding-block: 4px; }
.flowdivide .inner { max-width: 760px; margin: 0 auto; padding-inline: var(--gutter); display: flex; align-items: center; }
.flowdivide .flowline { display: flex; align-items: center; flex: 1; opacity: 0.6; }
.flowdivide .fl-node { width: 13px; height: 13px; border-radius: 50%; flex: none; border: 1.5px solid var(--orange); background: transparent; display: grid; place-items: center; color: var(--orange); }
.flowdivide .fl-node.fill { background: var(--orange); }
.flowdivide .fl-node.lock, .flowdivide .fl-node.check { width: 20px; height: 20px; }
.flowdivide .fl-node svg { width: 11px; height: 11px; }
.flowdivide .fl-seg { flex: 1; height: 1.5px; background: var(--orange); opacity: 0.5; }
.flowdivide .lbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; padding: 0 14px; }
.flowdivide.on-dark { background: var(--carbon); }
.flowdivide.on-dark .lbl { color: var(--gray); }
.flowdivide.on-light { background: var(--ivory-2); }
.flowdivide.on-light .lbl { color: var(--muted); }

/* ---------- Demo (carbon) ---------- */
.demo .sec-head h2 { color: var(--offwhite); }
.demo-stage { margin-top: 44px; background: var(--carbon-card); border: 1px solid var(--carbon-line-2); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 50px 100px -50px rgba(0,0,0,0.8); position: relative; z-index: 1; }
.demo-top { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--carbon-line); flex-wrap: wrap; }
.demo-top .bmid { font-family: var(--mono); font-size: 13px; color: var(--offwhite); font-weight: 500; }
.demo-top .bmid b { color: var(--orange); }
.demo-top .bmmeta { font-family: var(--mono); font-size: 12px; color: var(--gray); }
.demo-top .spacer { flex: 1; }

.track { display: grid; grid-template-columns: repeat(6, 1fr); padding: 30px 20px 8px; }
@media (max-width: 760px) { .track { grid-template-columns: repeat(3, 1fr); gap: 22px 0; } }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding-inline: 6px; }
.step .line { position: absolute; top: 17px; left: 50%; width: 100%; height: 2px; background: var(--carbon-line-2); z-index: 0; }
.step:last-child .line { display: none; }
@media (max-width: 760px){ .step:nth-child(3) .line { display: none; } }
.step .line .fill { display: block; height: 100%; width: 0; background: var(--orange); transition: width 0.5s var(--ease); }
.step .node { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--carbon-3); border: 2px solid var(--carbon-line-2); color: var(--gray); font-family: var(--mono); font-size: 13px; font-weight: 600; transition: all 0.4s var(--ease); }
.step .node svg { width: 17px; height: 17px; }
.step .slabel { font-family: var(--mono); font-size: 12px; color: var(--gray); transition: color 0.3s; line-height: 1.3; }
.step .ssub { font-family: var(--mono); font-size: 10.5px; color: var(--gray); opacity: 0.7; }
.step.done .node { background: var(--orange); border-color: var(--orange); color: var(--carbon); }
.step.done .line .fill { width: 100%; }
.step.current .node { background: var(--carbon-3); border-color: var(--orange); color: var(--orange); box-shadow: 0 0 0 5px rgba(74,158,255,0.14); }
.step.current .slabel { color: var(--offwhite); }
.step.locked .node { background: var(--orange); border-color: var(--orange); color: var(--carbon); }
.step.reopened .node { border-color: var(--alert); color: var(--alert); box-shadow: 0 0 0 5px rgba(229,72,63,0.14); background: var(--carbon-3); }
.step.reopened .slabel { color: var(--alert); }

.demo-detail { display: grid; grid-template-columns: 1.25fr 1fr; border-top: 1px solid var(--carbon-line); }
@media (max-width: 760px) { .demo-detail { grid-template-columns: 1fr; } }
.demo-state { padding: 24px 24px 26px; border-right: 1px solid var(--carbon-line); }
@media (max-width: 760px) { .demo-state { border-right: none; border-bottom: 1px solid var(--carbon-line); } }
.demo-state .state-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.demo-state h4 { font-size: 21px; color: var(--offwhite); }
.demo-state .state-desc { color: var(--gray-2); font-size: 15px; line-height: 1.55; min-height: 4.4em; }

.lockcard { margin-top: 18px; border: 1px solid var(--orange-line); background: var(--orange-tint); border-radius: var(--radius-lg); padding: 14px 16px; display: grid; gap: 10px; }
.lockcard.is-warn { border-color: var(--alert-line); background: var(--alert-tint); }
.lockcard .lc-top { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14px; color: var(--orange); }
.lockcard.is-warn .lc-top { color: var(--alert); }
.lockcard .lc-top svg { width: 16px; height: 16px; }
.lockcard .lc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.lockcard .lc-item { font-family: var(--mono); font-size: 12px; color: var(--gray-2); display: flex; gap: 8px; align-items: baseline; }
.lockcard .lc-item .k { color: var(--gray); min-width: 40px; }
.lockcard .lc-item .v { color: var(--offwhite); }

.demo-controls { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.demo-controls .btn { font-size: 13px; padding: 12px 18px; }
.demo-controls .btn-reopen { background: transparent; color: var(--alert); border: 1px solid var(--alert-line); }
.demo-controls .btn-reopen:hover { background: var(--alert-tint); border-color: var(--alert); color: var(--alert); }
.demo-controls .btn-reopen[disabled], .demo-controls .btn-next[disabled] { opacity: 0.32; pointer-events: none; }

.demo-audit { padding: 24px; background: rgba(0,0,0,0.5); }
.demo-audit .au-head { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.au-list { display: flex; flex-direction: column; }
.au-item { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding-bottom: 16px; animation: auIn 0.4s var(--ease); }
.au-item .au-rail { display: flex; flex-direction: column; align-items: center; }
.au-item .au-d { width: 9px; height: 9px; border-radius: 0; background: var(--orange); margin-top: 5px; flex: none; }
.au-item .au-d.warm { background: var(--alert); }
.au-item .au-bar { width: 1px; flex: 1; background: var(--carbon-line-2); margin-top: 4px; }
.au-item:last-child .au-bar { display: none; }
.au-item .au-body .au-t { font-size: 13.5px; color: var(--offwhite); font-weight: 600; }
.au-item .au-body .au-m { font-family: var(--mono); font-size: 11.5px; color: var(--gray); margin-top: 2px; }
.au-empty { font-family: var(--mono); font-size: 12px; color: var(--gray); }
@keyframes auIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Features (ivory) ---------- */
.feat-grid { margin-top: 52px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 880px) { .feat-grid { grid-template-columns: 1fr; } }
.feat { border: 1px solid var(--line-l); border-radius: var(--radius-lg); background: var(--ivory); padding: 30px 30px 28px; display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease); }
.feat:hover { border-color: var(--orange-line); box-shadow: 0 24px 50px -34px rgba(18,18,17,0.4); transform: translateY(-2px); }
.feat .feat-no { font-family: var(--mono); font-size: 12px; color: var(--orange-2); letter-spacing: 0.1em; }
.feat .feat-ico { width: 48px; height: 48px; border-radius: var(--radius); display: grid; place-items: center; background: var(--orange-tint); color: var(--orange-2); border: 1px solid var(--orange-line); }
.feat .feat-ico svg { width: 25px; height: 25px; }
.feat h3 { font-size: 20px; letter-spacing: -0.015em; }
.feat p { color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.feat p strong { color: var(--ink); }
.feat .feat-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-l); display: flex; flex-wrap: wrap; gap: 7px; }
.feat.wide { grid-column: 1 / -1; border-top: 3px solid var(--orange); }
.feat.wide .feat-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 760px) { .feat.wide .feat-inner { grid-template-columns: 1fr; } }
.feat.wide .feat-copy { display: flex; flex-direction: column; gap: 16px; }
.feat.wide h3 .star { color: var(--orange-2); }

/* Portal mini-mock (carbon inside ivory) */
.portal-mock { border: 1px solid var(--carbon-line-2); border-radius: var(--radius-lg); background: var(--carbon-card); overflow: hidden; }
.portal-mock .pm-top { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--carbon-line); font-family: var(--mono); font-size: 11.5px; color: var(--gray); }
.portal-mock .pm-top .who { margin-left: auto; color: var(--orange); }
.portal-mock .pm-body { padding: 16px; display: grid; gap: 11px; }
.pm-field { display: grid; gap: 5px; }
.pm-field label { font-family: var(--mono); font-size: 11px; color: var(--gray); letter-spacing: 0.02em; }
.pm-field .box { height: 32px; border-radius: var(--radius); border: 1px solid var(--carbon-line-2); background: rgba(255,255,255,0.03); display: flex; align-items: center; padding: 0 10px; font-size: 13px; color: var(--offwhite); }
.pm-field .box.accent { color: var(--orange); font-weight: 600; font-family: var(--mono); }
.pm-actions { display: flex; gap: 8px; margin-top: 4px; }
.pm-btn { font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; padding: 10px 14px; border-radius: var(--radius); border: none; cursor: pointer; }
.pm-btn.primary { background: var(--orange); color: var(--carbon); }
.pm-btn.ghost { background: transparent; border: 1px solid var(--carbon-line-2); color: var(--gray-2); }

/* ---------- Audience (carbon) ---------- */
.audience .sec-head h2 { color: var(--offwhite); }
.aud-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
@media (max-width: 860px) { .aud-grid { grid-template-columns: 1fr; } }
.aud { border: 1px solid var(--carbon-line-2); border-radius: var(--radius-lg); padding: 26px 26px 28px; background: var(--carbon-card); display: flex; flex-direction: column; gap: 14px; border-top: 3px solid var(--orange); }
.aud .aud-ico { width: 44px; height: 44px; border-radius: var(--radius); display: grid; place-items: center; background: var(--orange-tint); border: 1px solid var(--orange-line); color: var(--orange); }
.aud .aud-ico svg { width: 23px; height: 23px; }
.aud h3 { font-size: 18.5px; color: var(--offwhite); letter-spacing: -0.01em; }
.aud p { color: var(--gray-2); font-size: 15px; line-height: 1.5; }
.aud .aud-tag { font-family: var(--mono); font-size: 11.5px; color: var(--gray); margin-top: auto; padding-top: 10px; }

/* Legal seal band */
.seal { margin-top: 48px; border: 1px solid var(--carbon-line-2); border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(74,158,255,0.07), rgba(8,8,8,0.4)); padding: 30px clamp(24px,4vw,44px); display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; }
@media (max-width: 720px) { .seal { grid-template-columns: 1fr; } }
.seal .seal-badge { width: 86px; height: 86px; border-radius: var(--radius-lg); display: grid; place-items: center; border: 1.5px solid var(--orange); background: var(--orange-tint); color: var(--orange); position: relative; }
.seal .seal-badge svg { width: 40px; height: 40px; }
.seal .seal-badge .ring { position: absolute; inset: 8px; border: 1px dashed var(--orange-line); border-radius: 2px; }
.seal .seal-copy h3 { font-size: 20px; color: var(--offwhite); margin-bottom: 8px; }
.seal .seal-copy p { color: var(--gray-2); font-size: 15px; line-height: 1.5; max-width: 62ch; }
.seal .seal-copy .chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.seal .seal-copy .chip { font-family: var(--mono); font-size: 11.5px; color: var(--orange); border: 1px solid var(--orange-line); background: var(--orange-tint); padding: 4px 9px; border-radius: var(--radius); }

/* ---------- FINAL CTA — full Architect Orange band ---------- */
.final { background: var(--orange) !important; color: var(--carbon); }
.final .fx { display: none; }
.final-in { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); display: flex; flex-direction: column; gap: 26px; align-items: center; text-align: center; position: relative; z-index: 2; }
.final-in .eyebrow { color: var(--carbon); }
.final-in .eyebrow::before { background: var(--carbon); }
.final-in h2 { font-size: clamp(28px, 3.4vw, 48px); color: var(--carbon); max-width: 20ch; letter-spacing: -0.025em; line-height: 1.05; }
.final-in h2 .hivis { color: var(--ivory); }
.final-in .sub { color: rgba(8,8,8,0.78); font-size: 18px; max-width: 50ch; font-weight: 500; }
.final-in .urlline { font-family: var(--mono); font-size: 14px; color: rgba(8,8,8,0.7); display: inline-flex; align-items: center; gap: 10px; }
.final-in .urlline b { color: var(--carbon); font-weight: 600; }
.final .btn-primary { background: var(--carbon); color: var(--ivory); box-shadow: 0 1px 0 #000, 0 18px 36px -16px rgba(0,0,0,0.5); }
.final .btn-primary:hover { background: #1A1A19; color: var(--ivory); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--carbon-line-2); background: var(--carbon); }
.footer-top {
  display: grid; grid-template-columns: 1.3fr 1.7fr; gap: clamp(40px, 6vw, 96px);
  padding-block: clamp(56px, 7vw, 84px) clamp(36px, 4vw, 52px);
}
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr; gap: 44px; } }

.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.footer-brand .brand { font-size: 21px; }
.footer-tag { color: var(--gray-2); font-size: 15px; line-height: 1.55; max-width: 38ch; }
.footer-brand .btn { margin-top: 2px; }
.footer-legal-chip { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--gray); }
.footer-legal-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); flex: none; }

.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 520px) { .footer-cols { grid-template-columns: 1fr 1fr; gap: 28px; } }
.footer-col { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer-col-h { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange); margin-bottom: 4px; }
.footer-col a { font-size: 14.5px; color: var(--gray-2); transition: color 0.18s; white-space: nowrap; }
.footer-col a:hover { color: var(--offwhite); }

.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center;
  padding-block: 24px; border-top: 1px solid var(--carbon-line);
}
.footer-copy { font-family: var(--mono); font-size: 12px; color: var(--gray); }
.footer-bottom-meta { margin-left: auto; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--gray); }
.footer-top-link { display: inline-flex; align-items: center; gap: 7px; color: var(--gray-2); transition: color 0.18s; }
.footer-top-link:hover { color: var(--orange); }

.problem .pitch .sec-index { right: 0; top: -0.5em; }
