/* Caledapt Agent Gateway — /agent-ready/
 *
 * Built ON TOP of the existing v11–v14 layers rather than beside them, so it
 * inherits the site's real design system instead of approximating it.
 * Only genuinely new components live here.
 */

:root {
  --gw-ok: #19E8DE;
  --gw-part: #ffc96a;
  --gw-fail: #ff6f85;
  --gw-na: #7b8798;
  --gw-line: rgba(255, 255, 255, .12);
  --gw-card: linear-gradient(145deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .008));
}

.gw-body .gw-main { padding-block: clamp(28px, 5vw, 56px) 40px; }

/* ------------------------------------------------------------------ hero */
.gw-hero { max-width: 900px; margin: 0 auto clamp(30px, 5vw, 54px); text-align: center; }
.gw-hero-sm { text-align: left; max-width: 760px; }
.gw-kicker {
  font-size: 11px; color: var(--mint); letter-spacing: .16em;
  text-transform: uppercase; margin-bottom: 12px;
}
.gw-hero h1 {
  font-size: clamp(30px, 6vw, 52px); line-height: 1.08; margin: 0 0 14px;
  letter-spacing: -.02em;
}
.gw-lede { color: var(--muted, #96a5be); font-size: clamp(15px, 2.2vw, 18px); line-height: 1.6; margin: 0 auto 26px; max-width: 62ch; }
.gw-hero-sm .gw-lede { margin-inline: 0; }

/* ------------------------------------------------------------------ form */
.gw-testform { max-width: 620px; margin: 0 auto; text-align: left; }
.gw-label { display: block; font-size: 12px; color: #96a5be; margin-bottom: 7px; letter-spacing: .04em; }
.gw-inputrow { display: flex; gap: 10px; flex-wrap: wrap; }
.gw-inputrow input {
  flex: 1 1 240px; min-width: 0;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--gw-line); border-radius: 11px;
  color: #e9eef7; padding: 13px 15px; font-size: 15px; font-family: inherit;
}
.gw-inputrow input::placeholder { color: #6c7a8f; }
.gw-inputrow input:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-color: transparent; }
.gw-submit {
  background: var(--mint); color: #04110c; border: 0; border-radius: 11px;
  padding: 13px 20px; font-weight: 700; font-size: 15px; cursor: pointer;
  font-family: inherit; min-height: 46px;
}
.gw-submit:hover { filter: brightness(1.08); }
.gw-submit:disabled { opacity: .55; cursor: progress; }
.gw-submit:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gw-help { font-size: 13px; color: #7f8da1; margin-top: 9px; }
.gw-error { font-size: 14px; color: var(--gw-fail); margin-top: 10px; }

.gw-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.gw-btn {
  display: inline-block; border: 1px solid var(--gw-line); border-radius: 11px;
  padding: 12px 18px; color: #e9eef7; text-decoration: none; font-size: 14px;
  font-family: inherit; background: transparent; cursor: pointer; min-height: 44px;
}
.gw-btn:hover { border-color: var(--mint); }
.gw-btn:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.gw-btn-primary { background: var(--mint); color: #04110c; border-color: transparent; font-weight: 700; }
.gw-btn-quiet { background: transparent; color: #96a5be; }

/* -------------------------------------------------------------- progress */
.gw-progress { max-width: 620px; margin: 24px auto 0; text-align: left; }
.gw-stages { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.gw-stages li {
  font-size: 13.5px; color: #6c7a8f; display: flex; align-items: center; gap: 9px;
  transition: color .2s;
}
.gw-stages li::before {
  content: ''; width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid #3a4457; flex: 0 0 auto;
}
.gw-stages li[data-state='active'] { color: var(--gw-part); }
.gw-stages li[data-state='active']::before { border-color: var(--gw-part); animation: gw-pulse 1s infinite; }
.gw-stages li[data-state='done'] { color: var(--gw-ok); }
.gw-stages li[data-state='done']::before { background: var(--gw-ok); border-color: var(--gw-ok); }
@keyframes gw-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .gw-stages li::before { animation: none !important; } }

/* ------------------------------------------------------------ journey strip */
.gw-journey-intro { max-width: 1040px; margin: 0 auto clamp(34px, 5vw, 54px); }
.gw-journey-intro h2 { text-align: center; font-size: clamp(19px, 3vw, 25px); margin: 0 0 18px; }
.gw-journey-strip {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 9px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.gw-journey-strip li {
  border: 1px solid var(--gw-line); border-radius: 12px; padding: 13px 14px;
  background: var(--gw-card);
}
.gw-journey-strip b { display: block; font-size: 14px; margin-bottom: 3px; }
.gw-journey-strip span { font-size: 12.5px; color: #7f8da1; }

/* ---------------------------------------------------------------- result */
.gw-result { max-width: 900px; margin: 0 auto 30px; }
.gw-scorecard {
  border: 1px solid var(--gw-line); border-radius: 20px; padding: clamp(22px, 4vw, 34px);
  background: var(--gw-card); text-align: center; margin-bottom: 22px;
}
.gw-score { font-size: clamp(56px, 13vw, 92px); line-height: 1; color: var(--gw-ok); font-weight: 800; letter-spacing: -.03em; }
.gw-score[data-band='developing'], .gw-score[data-band='early'] { color: var(--gw-part); }
.gw-score-max { font-size: 18px; color: #7f8da1; }
.gw-bandpill {
  display: inline-block; margin-top: 10px; padding: 4px 13px; border-radius: 20px;
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--gw-ok); color: var(--gw-ok);
}
.gw-headline { font-size: clamp(16px, 2.6vw, 20px); margin: 18px auto 8px; max-width: 46ch; line-height: 1.45; }
.gw-summary { color: #a9b6c9; font-size: 15px; max-width: 62ch; margin: 0 auto; line-height: 1.62; }

.gw-notice {
  font-size: 12.5px; color: #8b98ab; border-top: 1px solid var(--gw-line);
  padding-top: 14px; margin-top: 20px; text-align: left;
}

/* journey table -> cards on narrow screens */
.gw-jtable { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.gw-jtable th, .gw-jtable td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--gw-line); font-size: 14px; }
.gw-jtable th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: #7f8da1; }
.gw-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  border-radius: 20px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  white-space: nowrap;
}
.gw-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.gw-pill[data-r='pass'] { color: var(--gw-ok); background: rgba(25, 232, 222, .1); }
.gw-pill[data-r='partial'] { color: var(--gw-part); background: rgba(255, 201, 106, .1); }
.gw-pill[data-r='fail'] { color: var(--gw-fail); background: rgba(255, 111, 133, .1); }
.gw-pill[data-r='not_applicable'] { color: var(--gw-na); background: rgba(123, 135, 152, .1); }

@media (max-width: 640px) {
  .gw-jtable, .gw-jtable tbody, .gw-jtable tr, .gw-jtable td, .gw-jtable th { display: block; width: 100%; }
  .gw-jtable thead { display: none; }
  .gw-jtable tr {
    border: 1px solid var(--gw-line); border-radius: 12px;
    padding: 12px 14px; margin-bottom: 9px; background: var(--gw-card);
  }
  .gw-jtable td { border: 0; padding: 3px 0; }
  .gw-jtable td[data-l='stage'] { font-weight: 700; font-size: 15px; }
  .gw-jtable td[data-l='why'] { color: #8b98ab; font-size: 13px; }
}

/* categories */
.gw-cats { display: grid; gap: 9px; margin-bottom: 26px; }
.gw-cat { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.gw-catname { font-size: 14px; }
.gw-catscore { font-size: 14px; font-weight: 700; color: var(--gw-ok); }
.gw-catbar { grid-column: 1 / -1; height: 6px; background: rgba(255, 255, 255, .08); border-radius: 3px; overflow: hidden; }
.gw-catbar i { display: block; height: 100%; background: var(--gw-ok); border-radius: 3px; }
.gw-cat[data-w='warn'] .gw-catscore, .gw-cat[data-w='warn'] .gw-catbar i { color: var(--gw-part); background: var(--gw-part); }
.gw-cat[data-w='bad'] .gw-catscore { color: var(--gw-fail); }
.gw-cat[data-w='bad'] .gw-catbar i { background: var(--gw-fail); }

/* fixes */
.gw-fixes { display: grid; gap: 11px; margin-bottom: 26px; }
.gw-fix {
  border: 1px solid var(--gw-line); border-radius: 14px; padding: 16px 18px; background: var(--gw-card);
}
.gw-fix[data-i='critical'] { border-left: 3px solid var(--gw-fail); }
.gw-fix[data-i='high'] { border-left: 3px solid var(--gw-part); }
.gw-fix[data-i='medium'] { border-left: 3px solid var(--gw-violet, #99a7ff); }
.gw-fix[data-i='low'] { border-left: 3px solid var(--gw-na); }
.gw-fixhead { display: flex; gap: 9px; align-items: baseline; flex-wrap: wrap; margin-bottom: 7px; }
.gw-sev { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #8b98ab; }
.gw-fix h3 { font-size: 15.5px; margin: 0; }
.gw-why { color: #a9b6c9; font-size: 14px; margin: 0 0 9px; line-height: 1.55; }
.gw-how { color: #c8d3e2; font-size: 14px; margin: 0; line-height: 1.55; }
.gw-integ {
  display: inline-block; margin-top: 9px; font-size: 11.5px; padding: 3px 10px;
  border-radius: 20px; border: 1px solid var(--gw-part); color: var(--gw-part);
}

/* ---------------------------------------------------------------- plans */
.gw-plans { max-width: 1060px; margin: 0 auto; }
.gw-plans h2 { text-align: center; font-size: clamp(20px, 3.4vw, 27px); margin: 0 0 8px; }
.gw-plangrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 26px 0 18px; }
.gw-plan {
  border: 1px solid var(--gw-line); border-radius: 16px; padding: 20px;
  background: var(--gw-card); display: flex; flex-direction: column; gap: 10px;
}
.gw-plan[data-rec='1'] { border-color: var(--gw-ok); }
.gw-planh { font-size: 16px; margin: 0; }
.gw-planp { font-size: 26px; font-weight: 800; color: var(--gw-ok); }
.gw-planp small { font-size: 13px; color: #7f8da1; font-weight: 400; }
.gw-pland { font-size: 13.5px; color: #a9b6c9; line-height: 1.5; }
.gw-planlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; color: #c8d3e2; }
.gw-planlist li { display: flex; gap: 8px; align-items: flex-start; }
.gw-planlist li::before { content: '\2014'; color: var(--gw-ok); flex: 0 0 auto; }
.gw-recbadge { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--gw-ok); }
.gw-fine { font-size: 12.5px; color: #8b98ab; text-align: center; max-width: 72ch; margin: 18px auto 0; }

/* -------------------------------------------------------------- dashboard */
.gw-dash { max-width: 1040px; margin: 0 auto; }
.gw-muted { color: #7f8da1; }
.gw-bizcard {
  border: 1px solid var(--gw-line); border-radius: 18px; padding: clamp(18px, 3vw, 26px);
  background: var(--gw-card); margin-bottom: 16px;
}
.gw-bizhead { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 14px; }
.gw-bizname { font-size: 19px; margin: 0 0 3px; }
.gw-bizurl { font-size: 13px; color: #7f8da1; }
.gw-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 7px; }
.gw-tag { font-size: 11px; padding: 3px 10px; border-radius: 20px; border: 1px solid var(--gw-line); color: #a9b6c9; }
.gw-tag[data-t='active'] { border-color: var(--gw-ok); color: var(--gw-ok); }
.gw-tag[data-t='warn'] { border-color: var(--gw-part); color: var(--gw-part); }
.gw-tag[data-t='bad'] { border-color: var(--gw-fail); color: var(--gw-fail); }

.gw-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 14px; border-bottom: 1px solid var(--gw-line); padding-bottom: 10px; }
.gw-tab {
  background: transparent; border: 1px solid transparent; border-radius: 9px;
  padding: 8px 13px; color: #96a5be; font-size: 13.5px; cursor: pointer; font-family: inherit; min-height: 40px;
}
.gw-tab[aria-selected='true'] { background: rgba(25, 232, 222, .1); color: var(--gw-ok); border-color: var(--gw-ok); }
.gw-tab:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

.gw-htable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.gw-htable th, .gw-htable td { text-align: left; padding: 10px; border-bottom: 1px solid var(--gw-line); }
.gw-htable th { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: #7f8da1; }
.gw-dl { display: inline-block; font-size: 12px; color: var(--gw-ok); text-decoration: underline; }
.gw-dl:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

@media (max-width: 620px) {
  .gw-htable thead { display: none; }
  .gw-htable tr { border: 1px solid var(--gw-line); border-radius: 11px; padding: 10px 12px; margin-bottom: 8px; display: block; }
  .gw-htable td { display: block; border: 0; padding: 3px 0; }
  .gw-htable td::before { content: attr(data-l) ': '; color: #7f8da1; font-size: 11.5px; }
}

.gw-lead { border: 1px solid var(--gw-line); border-radius: 14px; padding: 15px 17px; margin-bottom: 10px; background: var(--gw-card); }
.gw-leadhead { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.gw-leaddl { display: grid; gap: 4px; font-size: 13.5px; }
.gw-leaddl div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; }
.gw-leaddl b { color: #7f8da1; font-weight: 500; }
.gw-leadnote { font-size: 12.5px; color: var(--gw-part); margin-top: 9px; }

.gw-danger { border: 1px solid rgba(255, 111, 133, .4); border-radius: 14px; padding: 18px; margin-top: 26px; }
.gw-danger h3 { margin: 0 0 8px; font-size: 16px; color: var(--gw-fail); }
.gw-status { font-size: 15px; color: var(--gw-part); }
.gw-signout { text-align: left; margin-top: 8px; }
.gw-inlineform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.gw-inlineform input {
  background: rgba(255,255,255,.04); border: 1px solid var(--gw-line); border-radius: 9px;
  color: #e9eef7; padding: 10px 12px; font-size: 14px; font-family: inherit; min-height: 42px;
}
.gw-instructions { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; word-break: break-all; color: #c8d3e2; }

/* ══════════════════════════════════════════════════════════════════
   Agent access + delegated purchase approvals.
   Reuses the existing --gw-* palette so these read as part of the
   same surface rather than a bolted-on panel.
   ══════════════════════════════════════════════════════════════════ */
.gw-panel {
  background: var(--gw-card, rgba(255,255,255,.03));
  border: 1px solid var(--gw-line, rgba(255,255,255,.12));
  border-radius: 16px;
  padding: 22px 22px 24px;
  margin: 26px 0;
}
.gw-panel__title { font-size: 19px; margin: 0 0 8px; letter-spacing: -.01em; }
.gw-panel h3 { font-size: 15px; margin: 20px 0 8px; color: #c8d3e2; }

.gw-orders { display: grid; gap: 10px; margin-top: 12px; }
.gw-order {
  border: 1px solid var(--gw-line, rgba(255,255,255,.12));
  border-radius: 12px;
  padding: 13px 15px;
  background: rgba(255,255,255,.022);
}
.gw-orderhead {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; flex-wrap: wrap;
}
.gw-orderhead strong { font-size: 15px; }
.gw-amount { font-variant-numeric: tabular-nums; color: var(--gw-ok, #19E8DE); font-weight: 600; }
.gw-ordermeta {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  margin-top: 7px; font-size: 12.5px; color: #9aa7b8;
}
.gw-order .gw-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

.gw-form { display: grid; gap: 14px; margin-top: 14px; max-width: 460px; }
.gw-field { display: grid; gap: 6px; }
.gw-field label { font-size: 13px; color: #c8d3e2; }
.gw-field input {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--gw-line, rgba(255,255,255,.12));
  border-radius: 9px;
  color: #e9eef7;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  min-height: 42px;   /* touch target */
  width: 100%;
}
.gw-field input:focus-visible { outline: 2px solid var(--gw-ok, #19E8DE); outline-offset: 2px; }
.gw-hint { margin: 2px 0 0; font-size: 12px; color: #8d99a9; }

.gw-msg { margin: 12px 0 0; font-size: 13.5px; min-height: 1.2em; }
.gw-msg--good { color: var(--gw-ok, #19E8DE); }
.gw-msg--bad  { color: var(--gw-fail, #ff6f85); }

.gw-once {
  margin-top: 14px; padding: 13px 15px;
  border: 1px solid rgba(255, 201, 106, .45);
  background: rgba(255, 201, 106, .07);
  border-radius: 12px;
}
.gw-once p { margin: 0 0 8px; font-size: 13.5px; }
.gw-code {
  display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; word-break: break-all; color: #ffe3ab;
  background: rgba(0,0,0,.34); padding: 9px 11px; border-radius: 8px;
}

/* Both button classes already exist; make sure the quiet variant is visible
   on this dark surface rather than inheriting an unstyled default. */
.gw-btn-quiet { background: transparent; border: 1px solid var(--gw-line, rgba(255,255,255,.18)); color: #c8d3e2; }
.gw-btn-quiet:hover { border-color: var(--gw-fail, #ff6f85); color: #ffb9c4; }

@media (max-width: 640px) {
  .gw-panel { padding: 18px 16px 20px; }
  .gw-orderhead { flex-direction: column; align-items: flex-start; gap: 4px; }
  .gw-form { max-width: none; }
}
