/* AgentUptime concept page
   Palette rule: the page is neutral. Colour appears only where a verdict exists. */

:root {
  --paper: #f5f5f2;
  --surface: #ffffff;
  --ink: #15181a;
  --ink-2: #3b4144;
  --muted: #62696a;
  --line: #e2e2dd;
  --line-2: #cdcec8;

  --verified: #1d6549;
  --verified-bg: #e7f0eb;
  --failed: #9e3729;
  --failed-bg: #f6eae7;
  --unknown: #756e63;
  --unknown-bg: #edeae4;

  --panel: #15181a;
  --panel-line: #32383a;
  --panel-text: #d6dad8;
  --panel-muted: #8d9694;

  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --radius: 10px;
  --gap-section: clamp(76px, 10vw, 118px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

h1, h2, h3, p, ul, ol, pre { margin: 0; }
code, pre { font-family: var(--mono); }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 3px;
}

.site-header, main, footer {
  width: min(1020px, calc(100% - 44px));
  margin-inline: auto;
}

/* ---------- shared type ---------- */

.label {
  margin-bottom: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  max-width: 15ch;
  font-size: clamp(38px, 6.2vw, 64px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.035em;
}

h1 em {
  font-style: normal;
  color: var(--ink-2);
  text-decoration: underline dotted var(--line-2);
  text-underline-offset: 10px;
  text-decoration-thickness: 2px;
}

h2 {
  max-width: 22ch;
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.028em;
}

.section-lede, .lede, .sub { max-width: 58ch; }
.lede { margin-top: 24px; font-size: clamp(19px, 2.1vw, 21px); line-height: 1.45; letter-spacing: -.012em; }
.sub { margin-top: 18px; color: var(--muted); font-size: 16px; }
.section-lede { margin-top: 18px; color: var(--muted); font-size: 16px; }

.note {
  max-width: 62ch;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.note strong { color: var(--ink-2); font-weight: 600; }

.footnote { color: var(--muted); font-size: 13.5px; }

/* ---------- verdict chips: the only coloured elements ---------- */

.chip {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip-verified { color: var(--verified); background: var(--verified-bg); }
.chip-failed   { color: var(--failed);   background: var(--failed-bg); }
.chip-unknown  { color: var(--unknown);  background: var(--unknown-bg); }

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 600;
  letter-spacing: -.015em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

/* ---------- layout rhythm ---------- */

main > section { padding-top: var(--gap-section); }
main > section:first-child { padding-top: 0; }

/* ---------- hero ---------- */

.hero { padding: clamp(64px, 9vw, 104px) 0 0; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 34px 0 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.button:hover { border-color: var(--ink); }
.button-solid { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.button-solid:hover { background: var(--ink-2); border-color: var(--ink-2); }

/* ---------- the gap ---------- */

.split-cards {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 20px;
  margin-top: 40px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.card .label { margin-bottom: 0; }
.card .chip { margin-top: auto; align-self: flex-start; }
.card-check { border-style: dashed; border-color: var(--line-2); background: transparent; }

.statement {
  font-size: clamp(20px, 2.6vw, 25px);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: -.022em;
}
.statement code { font-size: .82em; }

.split-arrow {
  align-self: center;
  color: var(--line-2);
  font-size: 22px;
}

.equation {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 16px;
  margin-top: 34px;
  font-family: var(--mono);
  font-size: clamp(13px, 1.8vw, 15px);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.equation b { color: var(--failed); font-size: 1.5em; font-weight: 500; }

/* ---------- how it works ---------- */

.panel {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1.2fr;
  align-items: center;
  gap: 22px;
  margin-top: 40px;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--panel-text);
}

.panel-label {
  color: var(--panel-muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.panel .panel-label { margin-bottom: 12px; }
.panel-value { font-size: 15px; font-weight: 500; }
.panel-value code { font-size: 13.5px; }

.agent-list { padding: 0; list-style: none; display: grid; gap: 7px; }
.agent-list li {
  padding: 8px 11px;
  border: 1px solid var(--panel-line);
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 12.5px;
}

.panel-arrow { color: #5c6567; font-size: 20px; }

.panel-verdicts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.panel-verdicts b {
  padding: 4px 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .08em;
}
.v-ok   { color: #86d3ac; background: rgba(134, 211, 172, .13); }
.v-fail { color: #e69f92; background: rgba(230, 159, 146, .13); }
.v-unk  { color: #b3ab9d; background: rgba(179, 171, 157, .13); }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 26px;
  margin-top: 46px;
  padding: 0;
  list-style: none;
}
.steps li { padding-top: 16px; border-top: 1px solid var(--line-2); }
.step-num {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
}
.steps h3 { margin-bottom: 6px; font-size: 16px; font-weight: 600; letter-spacing: -.012em; }
.steps p { color: var(--muted); font-size: 14.5px; line-height: 1.5; }

.how .footnote { margin-top: 26px; }

/* ---------- case table ---------- */

.case-table { margin-top: 38px; }

.case-head, .case-row {
  display: grid;
  grid-template-columns: .6fr 1fr 1.1fr 1.1fr;
  gap: 26px;
}

.case-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.case-row {
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.case-row p { font-size: 15.5px; line-height: 1.5; }
.case-row p:last-child { color: var(--muted); }

.case-where {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.case-label { display: none; }

/* ---------- where it runs ---------- */

.where {
  display: grid;
  grid-template-columns: 1fr .85fr;
  gap: clamp(40px, 6vw, 78px);
  align-items: center;
}

.where-copy p:not(.label):not(.note) { margin-top: 18px; color: var(--ink-2); font-size: 16px; }
.where-copy .note { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line-2); }

.flow-box {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.flow-box .panel-label { color: var(--muted); }

.flow-list { margin-top: 16px; padding: 0; list-style: none; }
.flow-list li {
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.flow-result {
  color: var(--verified);
  font-family: var(--mono);
  font-size: 12.5px !important;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.flow-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
}
.flow-link b { color: var(--line-2); font-size: 17px; font-weight: 400; }

.flow-box-quiet { background: transparent; border-style: dashed; border-color: var(--line-2); }
.flow-quiet-copy { margin-top: 12px; color: var(--muted); font-size: 14.5px; }

/* ---------- receipt ---------- */

.receipt {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(40px, 6vw, 78px);
  align-items: start;
}

.receipt-copy p:not(.label) { margin-top: 18px; color: var(--muted); font-size: 16px; }

.receipt-list { margin-top: 26px; padding: 0; list-style: none; border-top: 1px solid var(--line-2); }
.receipt-list li {
  display: flex;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.receipt-list b { flex: 0 0 88px; font-weight: 600; }
.receipt-list span { color: var(--muted); }

.receipt-code .panel-label { margin-bottom: 10px; color: var(--muted); }
.receipt-code pre {
  padding: clamp(20px, 3vw, 30px);
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--panel-text);
  font-size: 13px;
  line-height: 1.85;
  tab-size: 2;
}
.receipt-code i { color: #9aa4a2; font-style: normal; }
.receipt-code b { color: #cfd4d1; font-weight: 400; }
.receipt-code .footnote { margin-top: 14px; }

/* ---------- interest ---------- */

.interest {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 70px);
  align-items: start;
  margin-top: var(--gap-section);
  padding: clamp(30px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.interest-copy p:not(.label):not(.note) { margin-top: 18px; color: var(--muted); font-size: 16px; }
.interest-copy .note { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }

.response-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

.response-form textarea,
.response-form select {
  display: block;
  width: 100%;
  min-height: 76px;
  margin-bottom: 22px;
  padding: 12px;
  resize: vertical;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
}
.response-form select { min-height: 46px; }
.response-form textarea::placeholder { color: #9aa09e; }
.response-form small {
  display: block;
  margin: -16px 0 22px;
  color: var(--muted);
  font-size: 12.5px;
}

.response-form fieldset {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}
.response-form legend { margin-bottom: 10px; font-size: 14px; font-weight: 500; line-height: 1.45; }
.option-row { display: flex; gap: 10px; }
.option-row-wrap { flex-wrap: wrap; }
.response-form .option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 26px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-2);
  font-weight: 400;
}

.response-form button {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.response-form button:hover { background: var(--ink-2); }
.response-form button:disabled { cursor: wait; opacity: .65; }
.form-status { min-height: 24px; margin-top: 12px; font-size: 14px; }
.form-status-success { color: var(--verified); }
.form-status-error { color: var(--failed); }

/* ---------- footer ---------- */

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-top: var(--gap-section);
  padding: 24px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.footer-id { font-family: var(--mono); font-size: 12px; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .where, .receipt, .interest { grid-template-columns: 1fr; }
  .panel { grid-template-columns: 1fr; gap: 18px; }
  .panel-arrow { display: none; }
  .steps { grid-template-columns: 1fr 1fr; gap: 0 22px; }
  .steps li:nth-child(n+3) { margin-top: 26px; }
  .case-head { display: none; }
  .case-row { grid-template-columns: 1fr 1fr; gap: 16px 24px; }
  .case-where { grid-column: 1 / -1; }
  .case-label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
  }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .site-header, main, footer { width: min(100% - 32px, 1020px); }
  h1 { max-width: none; }
  h2 { max-width: none; }
  .split-cards { grid-template-columns: 1fr; }
  .split-arrow { justify-self: center; transform: rotate(90deg); }
  .steps { grid-template-columns: 1fr; }
  .steps li:nth-child(n+2) { margin-top: 26px; }
  .case-row { grid-template-columns: 1fr; }
  .equation { flex-direction: column; align-items: flex-start; gap: 6px; }
  .actions .button { flex: 1 1 100%; justify-content: center; }
  .option-row { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; }
}
