/* OmniForge decision panel, step 2.
   The look is the established OmniForge look (see LOOK_AND_FEEL.md): the login screen and workspace shell
   of pm6_desk_login_index.html, built to match the accepted Mission Pulse page. Dark navy only.
   Every colour, radius and type size below is taken from that reference. Do not add a palette here. */
:root {
  color-scheme: dark;
  --bg: #071323; --bg-mid: #09182c; --bg-glow: #193452;
  --text: #e2ecf8; --muted: #a5bdd1; --note: #9db5c9; --kicker: #9dc6e7; --crumb: #9fc1db;
  --accent: #86d4ff; --link: #b4e7ff;
  --card: #122840; --card-line: #385775;
  --panel-a: #16314e; --panel-b: #101f32; --panel-line: #35536f; --panel-text: #adc5d8;
  --tile: #112b44; --tile-line: #345873; --well: #0c1d31;
  --primary: #27618c; --primary-line: #6badd9;
  --secondary-line: #496a87; --secondary-text: #c5eaff;
  --quiet-line: #4a6580; --quiet-text: #d2e6f6; --rule: #35506a;
  --pill-line: #60819a; --pill-text: #b5d6ed; --stage: #2b435b; --stage-text: #c6d8e8;
  --amber: #eac185; --warn-line: #ac835a; --warn-text: #f0cfa5;
  /* The two answers: a calm green and a calm red, drawn like the primary button (fill, 1px lighter border). */
  --yes: #1f6b4c; --yes-line: #6fcf9f; --yes-text: #a5e6c3; --yes-soft: #12332f;
  --no: #8c3a3f; --no-line: #e39a9c; --no-text: #ffbdba; --no-soft: #33202c;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(ellipse at 80% -12%, var(--bg-glow), var(--bg-mid) 42%, var(--bg)); }
main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .56; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

/* Brand row, kicker, lead, note */
.brand { display: flex; align-items: center; gap: .7rem; letter-spacing: .15em; font-size: .82rem; font-weight: 700; }
.brand i { font-size: 1.6rem; font-style: normal; color: var(--accent); }
.kicker, .k { font-size: .68rem; color: var(--kicker); letter-spacing: .15em; font-weight: 750; text-transform: uppercase; }
.k { display: block; margin-bottom: 4px; }
.lead, .hint { color: var(--muted); line-height: 1.55; font-size: .91rem; }
.lead { margin: 1em 0; } /* the reference leaves the paragraph's own 1em margin under the headline */
.note { font-size: .75rem; line-height: 1.5; color: var(--note); margin-top: 1.2rem; }
/* Transient status: the reference's stage pill (fill, pill text), 12px radius because the text can wrap */
.status { align-self: center; margin: 1.3rem 1.3rem 0; padding: 5px 9px; border-radius: 12px; background: var(--stage);
  color: var(--stage-text); font-size: .77rem; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.status:empty { display: none; }

/* Sign in: the login card */
.frame { flex: 1; display: grid; place-items: center; padding: 1.3rem; }
.login { width: min(100%, 440px); background: var(--card); border: 1px solid var(--card-line); border-radius: 22px;
  padding: clamp(22px, 5vw, 40px); box-shadow: 0 24px 76px #0005; }
.login h1 { font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 540; margin: 2rem 0 .4rem; letter-spacing: -.05em; line-height: 1.08; }
.login form { margin-top: 1.2rem; }
label { display: block; font-size: .84rem; font-weight: 650; color: var(--text); margin: .8rem 0 .4rem; }
input, textarea { width: 100%; font: inherit; color: var(--text); background: var(--well); border: 1px solid var(--secondary-line);
  border-radius: 12px; padding: 13px 16px; }
textarea { resize: vertical; min-height: 72px; }
::placeholder { color: var(--note); opacity: 1; }
#code { font-size: 1.5rem; letter-spacing: .3em; text-align: center; }

/* Buttons: primary and secondary exactly as on the login card; quiet as in the topbar */
.btn { border-radius: 12px; padding: 13px 16px; min-height: 48px; font-weight: 650; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: var(--primary); color: #fff; border: 1px solid var(--primary-line); width: 100%; margin-top: 1.2rem; }
.btn.secondary, .btn.ghost { background: transparent; color: var(--secondary-text); border: 1px solid var(--secondary-line); font-weight: 400; }
.btn.secondary { width: 100%; margin-top: .8rem; padding: 11px 15px; }
.quiet { color: var(--quiet-text); background: transparent; border: 1px solid var(--quiet-line); padding: 8px 12px; border-radius: 8px;
  font-size: .77rem; min-height: 40px; }

/* Messages */
.msg { border-radius: 12px; padding: 11px 15px; font-size: .86rem; line-height: 1.5; margin: .8rem 0; border: 1px solid; }
.msg.bad { background: var(--no-soft); color: var(--no-text); border-color: var(--no); }
.msg.warn { background: transparent; color: var(--warn-text); border-color: var(--warn-line); }
.msg.good { background: var(--yes-soft); color: var(--yes-text); border-color: var(--yes); }

/* Signed in: the workspace shell */
.shell { padding: clamp(18px, 4vw, 40px); padding-bottom: calc(clamp(18px, 4vw, 40px) + env(safe-area-inset-bottom));
  min-width: 0; max-width: 1280px; width: 100%; margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid var(--rule); padding-bottom: 17px; }
.controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .77rem; color: #a6c4d9; min-width: 0; }
.who-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.breadcrumb { color: var(--crumb); text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; margin-top: 31px; }
.headline { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 540; letter-spacing: -.045em; margin: 8px 0 3px; }
.checked { min-height: 1px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 31px; }
#answered-h { margin-top: 31px; }
.stack { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 14px; align-items: start; }
.stack:not(:empty) { margin-top: 14px; }

/* Each decision is a panel */
.panel, .card, .done { background: linear-gradient(145deg, var(--panel-a), var(--panel-b)); background-color: var(--panel-b);
  border: 1px solid var(--panel-line); border-radius: 16px; padding: clamp(18px, 3vw, 27px); min-width: 0; }
.from { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; font-size: .77rem; color: var(--muted); margin-bottom: 12px; }
.chip { font-size: .71rem; border: 1px solid var(--pill-line); border-radius: 99px; color: var(--pill-text); padding: 5px 10px; }
.question { font-size: 1.18rem; font-weight: 580; line-height: 1.3; overflow-wrap: anywhere; }
.rec { background: var(--tile); border: 1px solid var(--tile-line); border-radius: 12px; padding: 17px; margin: 14px 0;
  font-size: .86rem; line-height: 1.6; overflow-wrap: anywhere; }
.means { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: .86rem; line-height: 1.6;
  color: var(--panel-text); overflow-wrap: anywhere; }
.means dt { font-weight: 650; white-space: nowrap; }
.means dd { margin: 0; min-width: 0; }
.means .y { color: var(--yes-text); } .means .n { color: var(--no-text); }
details { font-size: .78rem; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
details p { margin: 0 0 .5rem; }
summary { cursor: pointer; padding: 10px 0; min-height: 40px; color: var(--link); }
.count { font-size: .75rem; color: var(--note); text-align: right; margin-top: 4px; }

/* The two answers. Meaning is carried three ways: icon shape, word, and colour. */
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 1.2rem; }
.ans { border-radius: 12px; min-height: 88px; padding: 13px 8px; color: #fff; border: 1px solid;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.ans svg { width: 34px; height: 34px; }
.ans .word { font-size: 1.18rem; font-weight: 650; line-height: 1.2; }
.ans .sub { font-size: .78rem; }
.ans.yes { background: var(--yes); border-color: var(--yes-line); }
.ans.no { background: var(--no); border-color: var(--no-line); }

.confirm { border: 1px solid var(--tile-line); background: var(--tile); border-radius: 12px; padding: 17px; margin-top: 1.2rem; }
.confirm.yes { border-color: var(--yes-line); background: var(--yes-soft); }
.confirm.no { border-color: var(--no-line); background: var(--no-soft); }
.confirm h3 { font-size: 1.18rem; font-weight: 580; display: flex; align-items: center; gap: 10px; }
.confirm h3 svg { width: 28px; height: 28px; flex: none; }
.confirm.yes h3 { color: var(--yes-text); } .confirm.no h3 { color: var(--no-text); }
.confirm p { margin-top: 12px; font-size: .86rem; line-height: 1.6; overflow-wrap: anywhere; }
.confirm .sent { font-weight: 650; }
.confirm .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 1.2rem; }
.confirm .go { color: #fff; background: var(--yes); border: 1px solid var(--yes-line); }
.confirm.no .go { background: var(--no); border-color: var(--no-line); }

.done h3 { font-size: 1rem; font-weight: 650; display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.done h3 svg { width: 24px; height: 24px; flex: none; }
.done.yes h3 { color: var(--yes-text); } .done.no h3 { color: var(--no-text); }
.done p { margin-top: .5rem; font-size: .86rem; line-height: 1.6; color: var(--panel-text); overflow-wrap: anywhere; }
.done .small { font-size: .75rem; color: var(--note); }
.state { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--pill-line); border-radius: 99px;
  color: var(--pill-text); padding: 5px 10px; font-size: .71rem; margin-top: 12px; }
.state svg { width: 14px; height: 14px; }
.state.wait { border-color: var(--warn-line); color: var(--warn-text); }
.state.ok { border-color: var(--yes-line); color: var(--yes-text); }
.state.refused { border-color: var(--no-line); color: var(--no-text); }

.empty { text-align: center; margin-top: 14px; }
.empty svg { width: 48px; height: 48px; color: var(--accent); }
.empty-title { font-size: 1.18rem; font-weight: 580; margin-top: 12px; }
.empty-sub { font-size: .86rem; line-height: 1.6; color: var(--panel-text); margin-top: .5rem; }

@media (max-width: 850px) { .shell { padding: 19px 17px calc(28px + env(safe-area-inset-bottom)); } }
@media (max-width: 340px) { .answers, .confirm .row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
