/* Radiant Rise — interface styles.
 *
 * Design notes, so a later editor knows what is deliberate:
 *
 * - Clients are non-technical and often nervous about what an AI will say in
 *   their name. The interface is therefore calm rather than clever: generous
 *   whitespace, one decision per screen during intake, no jargon in any label
 *   a client sees.
 * - Role-aware, per the 2026 enterprise-UX pattern: a client never sees the
 *   approval queue, cost figures, or another client's name. That is enforced
 *   in the routes, not just hidden in the template.
 * - Progress is always visible during intake. A persistent step bar is the
 *   single highest-impact device for multi-step completion.
 * - Semantic colour is separate from the brand accent, so "needs attention"
 *   never competes with "this is a Radiant Rise page".
 */

:root {
  --paper:       #F3F5F5;
  --card:        #FFFFFF;
  --sunk:        #E9EEEE;
  --ink:         #10201F;
  --ink-soft:    #4E625F;
  --ink-faint:   #7C8F8C;
  --rule:        #DCE4E3;
  --rule-soft:   #EAEFEE;

  --accent:      #0E5F5C;
  --accent-deep: #0A4442;
  --accent-wash: #E2EEED;

  --pending:     #9A6410;
  --pending-bg:  #FBF0DD;
  --ok:          #2F6B44;
  --ok-bg:       #E3F0E7;
  --stop:        #8C3A2E;
  --stop-bg:     #F7E6E2;

  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(16,32,31,.06);
  --shadow: 0 2px 4px rgba(16,32,31,.05), 0 12px 28px -14px rgba(16,32,31,.18);

  --display: "Zilla Slab", Georgia, serif;
  --ui: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

/* ---------- chrome ---------- */

.topbar {
  background: var(--accent-deep);
  color: #EAF3F2;
  padding: .85rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.topbar .inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  color: #FFF;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .55rem;
}

.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #7FD4CE;
  box-shadow: 0 0 0 3px rgba(127,212,206,.22);
}

.topbar nav { display: flex; gap: 1.25rem; margin-left: auto; align-items: center; }
.topbar nav a { color: #B8D4D2; text-decoration: none; font-size: .92rem; }
.topbar nav a:hover, .topbar nav a.on { color: #FFF; }

.whoami {
  font-size: .8rem;
  color: #8FBAB7;
  border-left: 1px solid rgba(255,255,255,.15);
  padding-left: 1.25rem;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }
.narrow { max-width: 660px; }

/* ---------- headings ---------- */

h1 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0 0 .4rem;
  text-wrap: balance;
}

h2 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 .9rem;
  letter-spacing: -.01em;
}

.lede { color: var(--ink-soft); margin: 0 0 2rem; font-size: 1.04rem; max-width: 58ch; }

.eyebrow {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .6rem;
}

/* ---------- cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.grid { display: grid; gap: 1.25rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ---------- client list: a cockpit, not a report ---------- */

.client-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 1.5rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.client-row:hover { box-shadow: var(--shadow); transform: translateY(-1px); border-color: #C3D2D0; }

.client-name { font-size: 1.1rem; font-weight: 600; margin-bottom: .2rem; }

.client-meta {
  display: flex; flex-wrap: wrap; gap: .4rem 1.1rem;
  font-size: .86rem; color: var(--ink-soft);
}
.client-meta .k { color: var(--ink-faint); }

.needs {
  display: flex; flex-direction: column; align-items: flex-end; gap: .35rem;
}

/* ---------- chips ---------- */

.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 600;
  padding: .3rem .65rem;
  border-radius: 999px;
  white-space: nowrap;
}
.chip.pending { background: var(--pending-bg); color: var(--pending); }
.chip.ok      { background: var(--ok-bg);      color: var(--ok); }
.chip.stop    { background: var(--stop-bg);    color: var(--stop); }
.chip.quiet   { background: var(--sunk);       color: var(--ink-soft); }

/* ---------- progress ---------- */

.steps { display: flex; gap: .5rem; margin: 0 0 2.25rem; }

.step {
  flex: 1;
  border-top: 3px solid var(--rule);
  padding-top: .6rem;
  font-size: .78rem;
  color: var(--ink-faint);
  font-weight: 500;
}
.step.done { border-top-color: var(--ok); color: var(--ok); }
.step.now  { border-top-color: var(--accent); color: var(--accent); font-weight: 700; }

.meter { height: 7px; background: var(--sunk); border-radius: 999px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter.thin { height: 5px; }

.pct { font-family: var(--mono); font-size: .8rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ---------- forms ---------- */

.field { margin-bottom: 1.75rem; }

label.q {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: .3rem;
}

.hint { font-size: .88rem; color: var(--ink-soft); margin: 0 0 .6rem; }

input[type=text], textarea, select {
  width: 100%;
  font-family: var(--ui);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  padding: .7rem .85rem;
}
textarea { min-height: 5.5rem; resize: vertical; }

input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(14,95,92,.28);
  outline-offset: 2px;
  border-color: var(--accent);
}

.choice { display: grid; gap: .6rem; }

.choice label {
  display: flex; gap: .7rem; align-items: flex-start;
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  padding: .85rem 1rem;
  cursor: pointer;
  background: var(--card);
}
.choice label:hover { border-color: #B9CBC9; }
.choice input { margin-top: .28rem; accent-color: var(--accent); }
.choice .t { font-weight: 600; display: block; }
.choice .d { font-size: .87rem; color: var(--ink-soft); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--ui); font-size: .95rem; font-weight: 600;
  padding: .68rem 1.3rem;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.btn.primary { background: var(--accent); color: #FFF; }
.btn.primary:hover { background: var(--accent-deep); }
.btn.ghost { background: var(--card); border-color: var(--rule); color: var(--ink); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.danger { background: var(--card); border-color: #DFC0B9; color: var(--stop); }
.btn.danger:hover { background: var(--stop-bg); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: 2rem; }
.actions.right { justify-content: flex-end; }

/* ---------- notices ---------- */

.notice {
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  border: 1px solid;
  font-size: .95rem;
}
.notice.info { background: var(--accent-wash); border-color: #B9D6D4; color: var(--accent-deep); }
.notice.warn { background: var(--pending-bg); border-color: #E5CFA3; color: #6E480B; }
.notice.good { background: var(--ok-bg); border-color: #B7D6C1; color: #245536; }
.notice.stop { background: var(--stop-bg); border-color: #E0BDB5; color: var(--stop); }
.notice strong { display: block; margin-bottom: .2rem; }

/* ---------- approval item ---------- */

.artifact {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--pending);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.artifact.blocked { border-left-color: var(--stop); }

.artifact .draft {
  background: var(--sunk);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin: 1rem 0;
  white-space: pre-wrap;
  line-height: 1.65;
}

.cats { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }

.cat-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .6rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.cat-row:last-child { border-bottom: none; }
.cat-name { font-weight: 600; font-size: .92rem; }
.cat-why { font-size: .83rem; color: var(--ink-soft); }

/* ---------- stat ---------- */

.stat { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.15rem 1.25rem; }
.stat .n {
  font-family: var(--display); font-size: 1.85rem; font-weight: 700;
  line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  display: block;
}
.stat .l { font-size: .82rem; color: var(--ink-faint); margin-top: .15rem; }

/* ---------- section completeness ---------- */

.sect { display: grid; grid-template-columns: 10rem 1fr 3rem; gap: .7rem 1rem; align-items: center; font-size: .9rem; }
.sect .nm { color: var(--ink-soft); text-transform: capitalize; }

/* ---------- misc ---------- */

.muted { color: var(--ink-soft); }
.small { font-size: .87rem; }
.mono  { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: 1.25rem; }
.divider { height: 1px; background: var(--rule); margin: 2.5rem 0; border: 0; }
.empty { text-align: center; padding: 3.5rem 1.5rem; color: var(--ink-soft); }
.empty .big { font-family: var(--display); font-size: 1.25rem; color: var(--ink); margin-bottom: .4rem; }

table.plain { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.plain th {
  text-align: left; font-family: var(--mono); font-size: .68rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint);
  padding-bottom: .5rem; border-bottom: 1px solid var(--rule); font-weight: 600;
}
table.plain td { padding: .65rem 1rem .65rem 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }

.scroll-x { overflow-x: auto; }

@media (max-width: 620px) {
  .wrap { padding: 1.75rem 1.1rem 4rem; }
  .client-row { grid-template-columns: 1fr; }
  .needs { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .steps { gap: .3rem; }
  .step { font-size: .68rem; }
  .sect { grid-template-columns: 7rem 1fr 2.6rem; font-size: .84rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
