/* Crestline Account page only: hero chip flow, maker/checker simulator, pillars, key facts. */

/* page-local spacing: a tinted or CTA section after a plain one keeps its top padding */
.section + .section--tint, .section + .cta-band { padding-top: clamp(64px, 9vw, 128px); }

/* ---------- hero ---------- */
.cl-tagline { color: var(--glow); font-weight: 600; font-size: var(--step--1); letter-spacing: .02em; margin-bottom: 14px; }
.cl-chip-flow { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; font: 600 1.02rem/1.2 var(--font-display); }
.cl-chip-flow span { white-space: nowrap; }
.cl-chip-flow span:last-child { color: var(--glow); }
.cl-chip-flow i { flex: 1; min-width: 18px; height: 1px; background: rgba(43, 196, 138, .6); position: relative; }
.cl-chip-flow i::after { content: ""; position: absolute; right: 0; top: -3px; border: 3.5px solid transparent; border-left: 6px solid rgba(43, 196, 138, .9); border-right: 0; }
.chip--ladder small, .chip--net small { display: block; }
.chip--net small { margin-top: 8px; }

/* ---------- simulator ---------- */
.mc .demo-head { align-items: flex-start; }
.mc-title { display: grid; gap: 4px; }
.mc-who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mc-who-label { font-size: .86rem; color: var(--fg-muted); }
.mc .seg button { line-height: 1.15; }
.mc .seg button small { font-size: .74rem; font-weight: 400; color: inherit; opacity: .75; margin-left: 2px; }
.mc .seg button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.mc-reset { background: none; border: 1px solid var(--line); color: var(--fg); border-radius: 999px; padding: 8px 14px; font: 500 .85rem/1 var(--font-body); cursor: pointer; }
.mc-reset:hover { border-color: var(--fg); }
.mc-hint { padding: 12px 22px; margin: 0; font-size: .92rem; color: var(--fg-muted); background: var(--accent-soft); border-bottom: 1px solid var(--line); }
.mc-hint b { color: var(--fg); font-weight: 600; }
.mc-body { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; }
@media (max-width: 860px) { .mc-body { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .mc .demo-head, .mc-hint { padding-inline: 16px; } .mc-body { padding: 16px; } .mc-panel { padding: 14px; } }
.mc-col { display: grid; gap: 18px; min-width: 0; align-content: start; }
.mc-panel { border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--bg); padding: 16px 18px; display: grid; gap: 14px; min-width: 0; }
.mc-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mc-panel-head h4 { font-size: 1rem; }
.mc-sub { color: var(--fg-muted); font-size: .82rem; }
.pill.bad { background: color-mix(in srgb, var(--signal-down) 14%, transparent); color: var(--signal-down); }

/* APX record */
.mc-fields { margin: 0; display: grid; }
.mc-row { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 4px 14px; padding: 10px 8px; margin-inline: -8px; border-top: 1px solid var(--line); border-radius: 8px; transition: background-color .6s ease; }
.mc-row:first-child { border-top: 0; }
.mc-row dt { color: var(--fg-muted); font-size: .9rem; }
.mc-row dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.mc-val { font-weight: 600; overflow-wrap: anywhere; }
.mc-row.is-updated { background: color-mix(in srgb, var(--signal) 16%, transparent); transition: none; }
.mc-foot { font-size: .84rem; color: var(--fg-muted); }
@media (max-width: 520px) { .mc-row { grid-template-columns: minmax(0, 1fr); } }

/* form */
.mc-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 14px; }
.mc-form fieldset:disabled { opacity: .55; }
.mc-form .field select, .mc-form .field input { padding: 10px 12px; min-height: 44px; }
.mc-form .field select:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.mc-opt { color: var(--fg-muted); font-weight: 400; }
.mc-submit { justify-self: start; min-height: 44px; font-size: .95rem; }
.mc-msg { font-size: .88rem; color: var(--fg-muted); min-height: 1.4em; }
.mc-msg:empty { display: none; }
.mc-msg.is-error { color: var(--signal-down); }
.mc-msg.is-ok { color: var(--signal); }

/* queue */
.mc-queue, .mc-audit { list-style: none; margin: 0; padding: 0; }
.mc-queue { display: grid; gap: 10px; }
.mc-queue:empty { display: none; }
.mc-req { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 14px; display: grid; gap: 8px; }
.mc-req--pending { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.mc-req--approved, .mc-req--rejected { background: transparent; }
.mc-req-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mc-req-top b { font-weight: 600; font-variant-numeric: lining-nums; }
.mc-change { font-size: .93rem; line-height: 1.45; overflow-wrap: anywhere; }
.mc-f { font-weight: 600; }
.mc-change del { color: var(--fg-muted); text-decoration-color: color-mix(in srgb, var(--signal-down) 70%, transparent); }
.mc-change ins { text-decoration: none; font-weight: 600; color: var(--fg); }
.mc-arrow { color: var(--accent); }
.mc-meta { font-size: .84rem; color: var(--fg-muted); }
.mc-meta time, .mc-foot time, .mc-ev time { font-variant-numeric: tabular-nums; }
.mc-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 2px; }
.mc-reason { font: 400 .92rem/1.3 var(--font-body); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; min-height: 40px; width: 100%; min-width: 0; }
.mc-reason:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.mc-btns { display: flex; gap: 8px; }
.mc-btn { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.mc-approve { background: var(--signal); color: #fff; }
.mc-approve:hover { background: color-mix(in srgb, var(--signal) 85%, #000); }
:root[data-theme="dark"] .mc-approve { color: #06231B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mc-approve { color: #06231B; } }
.mc-alert { font-size: .88rem; color: var(--signal-down); background: color-mix(in srgb, var(--signal-down) 10%, transparent); border-radius: 10px; padding: 10px 12px; line-height: 1.45; }
.mc-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--interactive); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.mc-empty { font-size: .9rem; color: var(--fg-muted); }
@media (max-width: 520px) {
  .mc-actions { grid-template-columns: minmax(0, 1fr); }
  .mc-btns .mc-btn { flex: 1; }
}

/* audit trail */
.mc-audit { max-height: 360px; overflow-y: auto; overscroll-behavior: contain; margin-inline: -4px; padding-inline: 4px; }
.mc-ev { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .88rem; line-height: 1.45; }
.mc-ev:first-child { border-top: 0; padding-top: 0; }
.mc-ev time { color: var(--fg-muted); padding-top: 1px; }
.mc-ev > div { display: grid; gap: 2px; min-width: 0; }
.mc-ev b { font-weight: 600; position: relative; padding-left: 14px; }
.mc-ev b::before { content: ""; position: absolute; left: 0; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--fg-muted); }
.mc-ev--pending b::before { background: var(--accent); }
.mc-ev--approved b::before { background: var(--signal); }
.mc-ev--rejected b::before, .mc-ev--refused b::before { background: var(--signal-down); }
.mc-by { color: var(--fg-muted); }
.mc-ev .mc-change { font-size: .86rem; }
.mc-note { color: var(--fg-muted); font-style: italic; }

/* ---------- pillars ---------- */
.pillars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.pillars li { padding: 28px 24px 28px 0; display: grid; gap: 10px; align-content: start; }
.pillars li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.pillars .glyph { width: 40px; height: 40px; color: var(--accent); }
.pillars h3 { font-size: 1.12rem; }
.pillars p { color: var(--fg-muted); font-size: .97rem; }
@media (max-width: 960px) {
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillars li, .pillars li + li { padding: 24px 20px 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .pillars li:nth-child(2n) { padding-left: 20px; border-left: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .pillars li, .pillars li + li, .pillars li:nth-child(2n) { padding: 22px 0; border-left: 0; }
}

/* ---------- key facts (subgrid keeps label, value and note on shared baselines) ---------- */
.facts-title { margin-top: clamp(48px, 7vw, 88px); margin-bottom: 18px; font-size: var(--step--1); color: var(--accent); font-weight: 600; letter-spacing: .02em; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 0; border-top: 1px solid var(--line); }
.fact { grid-row: span 3; display: grid; grid-template-rows: subgrid; row-gap: 6px; align-items: baseline; padding: 24px 24px 24px 0; border-bottom: 1px solid var(--line); }
.fact:not(:nth-child(3n+1)) { padding-left: 24px; border-left: 1px solid var(--line); }
.fact dt { font-size: .9rem; color: var(--fg-muted); }
.fact dd { margin: 0; }
.fact .v { font: 600 clamp(1.45rem, 1.1rem + 1.2vw, 2.15rem)/1.1 var(--font-display); letter-spacing: -.01em; }
.fact .s { font-size: .9rem; color: var(--fg-muted); }
@media (max-width: 760px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact, .fact:not(:nth-child(3n+1)) { padding: 20px 16px 20px 0; border-left: 0; }
  .fact:nth-child(2n) { padding-left: 16px; border-left: 1px solid var(--line); }
}

/* ---------- CTA side ---------- */
.cl-side { display: grid; gap: 28px; min-width: 0; }
.cl-side .contact-card { gap: 14px; }
.cl-side .contact-line .val { overflow-wrap: anywhere; }
.cl-side .textlink { justify-self: start; }
.cl-tm { margin-top: clamp(40px, 6vw, 64px); padding-top: 18px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--fg-muted); max-width: 90ch; }
