/* Page CSS for the marketing page: only what sits inside a visual (the product's own windows) and the
   app-frame recipe (sections-library.md, app-frame). Tokens come from the kit (system.css, ui/base.css). */

/* ---------------------------------------------------------------- status badges (the product's own states) */
.vb { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 4px;
      font: 500 12px/1 var(--font-text); letter-spacing: 0; white-space: nowrap;
      --vb: #9aa19a; color: color-mix(in oklab, var(--vb) 62%, var(--u-ink, var(--ink))); background: color-mix(in oklab, var(--vb) 16%, transparent);
      box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--vb) 30%, transparent); }
.vb::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--vb); flex: none; }
.vb[data-s="valid"] { --vb: #2e8b57; }
.vb[data-s="risky"] { --vb: #c98a1b; }
.vb[data-s="invalid"] { --vb: #c8434f; }
.vb[data-s="unknown"] { --vb: #8b8690; }

/* ---------------------------------------------------------------- hero: the checked list */
.hero__media--ui { display: flex; }
.hero__media--ui > .vw { flex: 1 1 auto; min-width: 0; }
.vw { display: flex; flex-direction: column; overflow: hidden; background: var(--u-bg); color: var(--u-ink);
      font: 400 13px/1.4 var(--font-text); container-type: inline-size; border: 1px solid var(--u-border); border-radius: inherit; }
.vw__bar { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--u-line); flex: none; }
.vw__crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--u-muted); white-space: nowrap; overflow: hidden; }
.vw__crumb .mark { width: 14px; height: 14px; color: var(--u-ink); }
.vw__crumb i { font-style: normal; opacity: .5; }
.vw__crumb b { color: var(--u-ink); font-weight: 500; }
.vw__credits { display: inline-flex; gap: 6px; align-items: center; height: 26px; padding: 0 10px; border-radius: 4px; background: var(--u-fill-2); color: var(--u-muted); white-space: nowrap; }
.vw__credits b { color: var(--u-ink); font: 500 13px/1 var(--font-mono); }
.vw__sum { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--u-line); flex: none; white-space: nowrap; }
.vw__done { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.vw__tick { width: 14px; height: 14px; border-radius: 50%; background: #2e8b57; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8'/%3E%3C/svg%3E"); }
.vw__muted { color: var(--u-muted); overflow: hidden; text-overflow: clip; }
.vw__dl { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 4px; border: 1px solid var(--u-line-2); font-weight: 500; }
.vw__counts { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 16px; border-bottom: 1px solid var(--u-line); flex: none; font: 500 13px/22px var(--font-mono); }
.vw__counts > span { display: inline-flex; align-items: center; gap: 8px; }
/* as many whole rows as the window holds; the rows past them take no height, so no row is ever cut */
.vw__table { flex: 1 1 0; min-height: 0; overflow: hidden; display: grid; grid-template-rows: repeat(auto-fill, minmax(40px, 1fr)); grid-auto-rows: 0; }
.vw__table > .vw__row { height: auto; min-height: 0; overflow: hidden; }
.vw__row { display: grid; grid-template-columns: minmax(0, 1.25fr) 92px minmax(0, 1fr); align-items: center; gap: 12px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--u-line); }
.vw__head { height: 34px; color: var(--u-muted); font-size: 12px; background: var(--u-fill); }
.vw__email { font: 400 13px/1 var(--font-mono); overflow: hidden; white-space: nowrap; text-overflow: clip; }
.vw__reason { color: var(--u-text-2); overflow: hidden; white-space: nowrap; }
@container (max-width: 520px) {
  .vw__row { grid-template-columns: minmax(0, 1fr) 84px; }
  .vw__row > :nth-child(3) { display: none; }
  .vw__muted, .vw__dl + .vw__dl { display: none; }
}
@container (max-width: 400px) {
  .vw .ui-dots, .vw__lists, .vw__sum { display: none; }
  .vw__dl { display: none; }
  .vw__counts { gap: 6px 14px; }
}

/* ---------------------------------------------------------------- app-frame (sections-library.md, the whole recipe) */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane > .ui-panel { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-bg)); pointer-events: none; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 252px; }
  .app > .app__pane--list::after { display: none; }
  .app .ui-win__side { display: none; }
  .app .ui-win__body { grid-template-columns: minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) {
  .app.ui { grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-top: 0; }
}
.ui-win__crumb .mark { width: 14px; height: 14px; }

/* the open list: the file being checked */
.jd { font: 400 13px/1.4 var(--font-text); }
.jd__head { padding: 0 20px; height: 52px; border-bottom: 1px solid var(--u-line); }
.jd__file { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.jd__body { display: grid; gap: 20px; padding: 20px; }
.jd__label { display: block; color: var(--u-muted); font-size: 12px; margin-bottom: 6px; }
.jd__select { display: flex; justify-content: space-between; align-items: center; height: 36px; padding: 0 12px; border-radius: 4px; border: 1px solid var(--u-line-2); background: var(--u-fill); }
.jd__change { color: var(--u-accent-text); font-weight: 500; }
.jd__facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.jd__facts > div { padding: 12px; border-radius: 4px; background: var(--u-fill); }
.jd__facts dt { color: var(--u-muted); font-size: 12px; }
.jd__facts dd { margin: 4px 0 0; font: 500 18px/1.2 var(--font-mono); }
.jd__facts small { display: block; font: 400 12px/1.3 var(--font-text); color: var(--u-muted); }
.jd__progress-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-family: var(--font-mono); }
.jd__bar { display: block; height: 6px; border-radius: 3px; background: var(--u-fill-3); overflow: hidden; }
.jd__bar i { display: block; height: 100%; background: var(--u-accent); }
.jd__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jd__chips code { font: 400 12px/22px var(--font-mono); padding: 0 8px; border-radius: 4px; background: var(--u-fill-2); }
.jd__out { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.jd__btn { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 4px; border: 1px solid var(--u-line-2); font-weight: 500; opacity: .6; }
.jd__note { color: var(--u-muted); font-size: 12px; }
@container (max-width: 560px) { .jd__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.app__pane--open { container-type: inline-size; }

/* ---------------------------------------------------------------- the lit (sage) frames: the product's window on a light
   fragment surface, as a light card would give it (cards.css .stage reads --card) */
.frame--lit > .stage { --card: var(--ground-surface); }
.cc, .lg, .jd, .menu-call { color: var(--u-ink); }

/* ---------------------------------------------------------------- results: one check */
.res-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.res-list li { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: baseline; gap: var(--s-3); }
.res-list .vb { justify-self: start; transform: translateY(-1px); }
.cc { font: 400 13px/1.45 var(--font-text); padding-bottom: 20px; }
.cc .ui-head { padding: 0 20px; height: 48px; border-bottom: 1px solid var(--u-line); }
.cc__cost { color: var(--u-muted); font-family: var(--font-mono); }
.cc__input { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 20px 20px 0; height: 40px; padding: 0 4px 0 12px; border-radius: 4px; border: 1px solid var(--u-line-2); font-family: var(--font-mono); }
.cc__go { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 3px; background: var(--u-accent); color: var(--u-accent-ink); font: 500 13px/1 var(--font-text); }
.cc__result { display: flex; align-items: center; gap: 10px; margin: 20px 20px 0; }
.cc__result .vb { height: 28px; font-size: 14px; padding: 0 10px; }
.cc__reason { font-size: 16px; font-weight: 500; }
.cc__why { margin: 10px 20px 0; color: var(--u-text-2); }
.cc__flags { margin: 16px 20px 0; display: grid; }
.cc__flags > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--u-line); font-family: var(--font-mono); font-size: 12px; }
.cc__flags dt { color: var(--u-muted); }
.cc__flags dd { margin: 0; }
.cc__flags dd[data-v="true"] { color: color-mix(in oklab, #3f9a75 70%, var(--u-ink)); font-weight: 500; }

/* ---------------------------------------------------------------- developers */
.dev-icons { display: flex; align-items: center; gap: var(--s-5); }
.menu-call { display: grid; gap: 8px; position: absolute; left: 20px; top: 24px; right: -40px; padding: 14px 16px; border-radius: 6px;
             background: var(--u-bg); border: 1px solid var(--u-border); font: 400 12px/1.3 var(--font-mono); }
.menu-call__req { color: var(--u-muted); }
.menu-call__res { display: flex; align-items: center; gap: 10px; white-space: nowrap; }

/* ---------------------------------------------------------------- pricing */
.plans { margin-top: var(--s-5); }
.plan__for { color: var(--ink); min-height: 3em; }
.plan__credits { font-weight: 500; }
.plan__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.plan__list li { padding-top: var(--s-2); border-top: 1px solid var(--line); }
.plans__topup { margin-top: var(--s-4); }

/* ---------------------------------------------------------------- credits ledger */
.lg { font: 400 13px/1.4 var(--font-text); }
.lg .ui-head { padding: 0 20px; height: 48px; border-bottom: 1px solid var(--u-line); }
.lg__bal { color: var(--u-muted); }
.lg__bal b { color: var(--u-ink); font: 500 15px/1 var(--font-mono); margin-left: 6px; }
.lg__rows { list-style: none; margin: 0; padding: 0; flex: 1 1 0; min-height: 0; overflow: hidden; display: grid; grid-template-rows: repeat(auto-fill, minmax(56px, 1fr)); grid-auto-rows: 0; }
.lg__rows > li { min-height: 0; overflow: hidden; }
.lg__rows li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--u-line); }
.lg__date { color: var(--u-muted); font-size: 12px; }
.lg__what { font-weight: 500; white-space: nowrap; overflow: hidden; }
.lg__what small { display: block; font-weight: 400; font-size: 12px; color: var(--u-muted); }
.lg__amt { font: 500 13px/1 var(--font-mono); }
.lg__amt[data-sign="plus"] { color: color-mix(in oklab, #3f9a75 70%, var(--u-ink)); }
.lg__amt[data-sign="zero"] { color: var(--u-muted); }
.facts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.facts-list li { padding-top: var(--s-3); border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- the statement's SMTP conversation */
.smtp__row { margin-top: var(--s-6); }
.smtp { padding: 16px 20px; font: 400 13px/1.5 var(--font-mono); color: var(--u-ink); }
.smtp__line { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; padding: 3px 0; }
.smtp__line[data-dir="in"] { color: var(--u-muted); }
.smtp__dir { color: var(--u-muted); }
.smtp__text { overflow-wrap: anywhere; }
.smtp__note { font-family: var(--font-text); color: var(--u-accent-text); white-space: nowrap; }
@media (max-width: 1023px) { .smtp { margin-top: var(--s-5); } }

/* ---------------------------------------------------------------- credits: the ledger window on the page ground */
.ledger { display: flex; min-height: 0; }
.ledger > .lg { flex: 1 1 auto; display: flex; flex-direction: column; border: 1px solid var(--u-border); border-radius: var(--u-r); background: var(--u-bg); box-shadow: var(--u-shadow); overflow: hidden; }
.plan-icons { display: flex; align-items: center; gap: var(--s-5); }
.faq__icons { display: inline-flex; align-items: center; gap: var(--s-2); margin-left: var(--s-3); vertical-align: -4px; }
#smtp .mo-la__sub { color: var(--ink); }
@media (max-width: 639px) {
  .hero__media--ui > .ly-float { display: none; }
  .nav__actions > .nav__link { display: none; }
  .ledger { height: 380px; flex: none; }
  #developers .ui-code { width: 100%; }
}

/* ---------------------------------------------------------------- screens at tablet and phone */
/* a tablet holds pricing and the questions in one screen each: the plan lists and the answer padding trimmed */
@media (min-width: 640px) and (max-width: 1023px) {
  .plan__list { display: none; }
  #faq { --h: 2; }
  .ledger { height: 440px; flex: none; }
}
/* a tall tablet (820x1180) holds the questions in one screen with their padding trimmed */
@media (min-width: 640px) and (max-width: 1023px) and (min-height: 1101px) {
  #faq { --h: 1; }
  #faq .faq > .faq__item { padding: var(--s-3) 0; gap: var(--s-1); }
  #faq .faq > .faq__item:first-child { padding-top: 0; }
}
@media (max-width: 359px) { #results, #developers { --hm: 2; } }
@media (max-width: 639px) {
  #pricing, #faq { --hm: 2; }
  .plan__list li:nth-child(n+3) { display: none; }
  #developers .split-col__end { display: none; }
  #faq .faq > .faq__item { padding: var(--s-7) 0; }
  #faq .faq > .faq__item:first-child { padding-top: 0; }
  #faq .faq > .faq__item { gap: var(--s-1); }
  #faq .faq:last-child > .faq__item:last-child { padding-bottom: var(--s-6); }
  #pricing .card--plan { gap: var(--s-3); }
  #developers .ui-code__ln:nth-child(n+10) { display: none; }
  .plan__for { min-height: 0; }
}
.dev-note { color: var(--muted); }
@media (max-width: 359px) { .nav__actions > .btn { display: none; } .closing__cta .btn--xl { font-size: 16px; } }
#developers .ui-code__pre code { line-height: 24px; }

/* Fig: the lit frames sit on a blush ground taken from the brand pink (#E86A8A). */
html[data-ground="sand"] { --ground-bg: #f4e1e5; --ground-surface: #faeef1; --ground-ink: #22171c; --ground-muted: #5f4f56; --ground-accent: #5b2a6e; }

/* Fig: the refund card rests on an empty footer strip at the foot of the results window, so it never covers a row. */
@media (min-width: 640px) {
  .hero__media--ui > .vw { position: relative; }
  .hero__media--ui > .vw::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: 1;
    background: var(--u-fill, var(--surface)); border-top: 1px solid var(--u-border, var(--line)); }
}
