/* Marketing site (logged-out). Deliberately standalone — it does NOT load
   app.css, so the console's .card/.btn/table rules can never collide with
   these. The token block below mirrors app.css's palette on purpose: the
   marketing site and the product are the same brand, and duplicating six
   values is cheaper than coupling this page to the console's stylesheet.
   Everything here is namespaced .mk-*. */

.mk-page {
  --ground: #F7F3E6;
  --raised: #FDFBF3;
  --inset: #F2EDDD;
  --ink: #1A2440;
  --ink-2: #5C6377;
  --ink-3: #8B8F9E;
  --rule: #E4DEC9;
  --rule-strong: #D3CCB2;
  --navy: #14295C;
  --navy-soft: #DFE4F0;
  --sage: #9EB897;
  --sage-deep: #52704C;
  --sage-tint: #E7EEE3;
  --amber: #8A6A15;

  /* The one dark surface. Fixed rather than tokenised: it is a deliberate
     ink panel in both themes, like a plate in a printed report. */
  --plate: #101728;
  --plate-2: #1B2540;
  --plate-ink: #EFEADA;
  --plate-ink-2: #A3ABC2;
  --plate-rule: #2A3554;

  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --shell: 1140px;
  --gutter: 28px;

  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  .mk-page {
    --ground: #0F1526;
    --raised: #18203A;
    --inset: #131A2E;
    --ink: #EBE8DC;
    --ink-2: #A6ABBD;
    --ink-3: #767C90;
    --rule: #28324F;
    --rule-strong: #37436A;
    --navy: #A9BCE8;
    --navy-soft: #232F52;
    --sage: #9EB897;
    --sage-deep: #AFC7A8;
    --sage-tint: #1D2A26;
    --amber: #D9B558;
    --plate: #080D1A;
    --plate-2: #131B31;
    --plate-rule: #232D49;
  }
}

.mk-page * { box-sizing: border-box; }
.mk-page img { max-width: 100%; }
.mk-page :focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 2px; }

/* ---------- type scale ---------- */
.mk-page h1, .mk-page h2, .mk-page h3 {
  font-family: var(--display);
  font-weight: 600;
  text-wrap: balance;
  margin: 0;
}
.mk-h1 { font-size: clamp(2.5rem, 5.6vw, 4.15rem); line-height: 1.04; letter-spacing: -0.018em; }
.mk-h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.14; letter-spacing: -0.012em; }
.mk-h3 { font-size: 1.14rem; line-height: 1.35; }
.mk-lede { font-size: clamp(1.02rem, 1.5vw, 1.19rem); color: var(--ink-2); line-height: 1.62; max-width: 60ch; }
.mk-page p { margin: 0; }
.mk-prose { max-width: 68ch; display: flex; flex-direction: column; gap: 14px; color: var(--ink-2); }
.mk-prose strong { color: var(--ink); font-weight: 600; }

/* Body-copy links. Without this they fall back to the UA's default blue,
   which is the one colour on the page that belongs to no palette. */
.mk-prose a, .mk-faq-body a, .mk-legal-doc a {
  color: var(--navy); font-weight: 500; text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--navy) 38%, transparent);
}
.mk-prose a:hover, .mk-faq-body a:hover, .mk-legal-doc a:hover { text-decoration-color: var(--navy); }
.mk-section--plate .mk-prose a { color: var(--plate-ink); text-decoration-color: rgba(239,234,218,.45); }

/* Hanging eyebrow — the tick mark on the meridian rule. */
.mk-eyebrow {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--ink-3);
  display: flex; align-items: center; gap: 9px;
}
.mk-eyebrow::before {
  content: ""; width: 6px; height: 6px; flex: none;
  background: var(--sage); border-radius: 1px;
}

.mk-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ---------- shell + the meridian rule ---------- */
.mk-shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding-inline: var(--gutter); }

.mk-section { padding-block: clamp(64px, 9vw, 116px); position: relative; }
/* The signature device: one continuous hairline down the page, at the
   inner edge of the content column. Hidden below the shell width, where
   there is no margin left to hang it in. */
.mk-section::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: calc(50% - (var(--shell) / 2) + var(--gutter) - 22px);
  width: 1px; background: var(--rule);
}
@media (max-width: 1240px) { .mk-section::before { display: none; } }
.mk-section--plate::before { background: var(--plate-rule); }

/* ---------- header ---------- */
.mk-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.mk-header-in { display: flex; align-items: center; gap: 26px; height: 68px; }
.mk-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; flex: none; }
.mk-brand-name { font-family: var(--display); font-size: 1.16rem; font-weight: 600; line-height: 1; }
.mk-brand-sub { font-size: 0.5875rem; letter-spacing: 0.17em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-top: 3px; }
.mk-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.mk-nav a { color: var(--ink-2); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.mk-nav a:hover { color: var(--ink); }
@media (max-width: 880px) { .mk-nav .mk-nav-link { display: none; } }

/* ---------- buttons ---------- */
.mk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 9px; font-size: 0.9375rem; font-weight: 600;
  text-decoration: none; border: 1px solid var(--rule-strong); background: var(--raised);
  color: var(--ink); cursor: pointer; transition: border-color .16s, transform .16s, filter .16s;
  white-space: nowrap;
}
.mk-btn:hover { border-color: var(--navy); }
.mk-btn--primary { background: var(--navy); border-color: var(--navy); color: var(--ground); }
.mk-btn--primary:hover { filter: brightness(1.14); border-color: var(--navy); }
.mk-btn--sm { padding: 8px 15px; font-size: 0.875rem; }
.mk-btn--plate { background: var(--plate-ink); border-color: var(--plate-ink); color: var(--plate); }
.mk-btn--plate:hover { filter: brightness(1.08); }
@media (prefers-reduced-motion: no-preference) {
  .mk-btn:active { transform: translateY(1px); }
}

/* ---------- hero ---------- */
.mk-hero { padding-top: clamp(52px, 7vw, 88px); padding-bottom: clamp(56px, 8vw, 100px); }
.mk-hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); gap: clamp(36px, 5vw, 72px); align-items: center; }
@media (max-width: 980px) { .mk-hero-grid { grid-template-columns: 1fr; gap: 44px; } }
.mk-hero-copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.mk-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.mk-hero-note { font-size: 0.8125rem; color: var(--ink-3); }

/* ---------- the consolidated-position plate (hero artifact) ---------- */
.mk-plate {
  background: var(--raised); border: 1px solid var(--rule);
  border-radius: 14px; padding: 22px 24px 20px;
  box-shadow: 0 1px 2px rgba(20,41,92,.06), 0 18px 44px rgba(20,41,92,.09);
}
@media (prefers-color-scheme: dark) { .mk-plate { box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 44px rgba(0,0,0,.34); } }
.mk-plate-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--rule-strong); }
.mk-plate-title { font-family: var(--display); font-size: 1.02rem; font-weight: 600; }
.mk-plate-period { font-size: 0.6875rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-left: auto; }
.mk-ledger { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mk-ledger th {
  font-size: 0.625rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
  font-weight: 700; text-align: left; padding: 12px 0 7px; border-bottom: 1px solid var(--rule);
}
.mk-ledger th.mk-r, .mk-ledger td.mk-r { text-align: right; }
.mk-ledger td { padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 0.875rem; }
.mk-ledger tr:last-child td { border-bottom: none; }
.mk-ledger .mk-src { color: var(--ink); font-weight: 500; }
.mk-ledger .mk-ccy { color: var(--ink-3); font-size: 0.75rem; letter-spacing: 0.06em; }
.mk-ledger .mk-total td { border-top: 2px solid var(--rule-strong); border-bottom: none; padding-top: 13px; font-weight: 700; font-size: 1rem; }
.mk-plate-foot { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--rule); }
.mk-tick {
  display: inline-flex; align-items: center; gap: 6px; background: var(--sage-tint); color: var(--sage-deep);
  border-radius: 999px; padding: 3px 11px; font-size: 0.75rem; font-weight: 700;
}
.mk-plate-foot-note { font-size: 0.75rem; color: var(--ink-3); }

/* ---------- section headers ---------- */
.mk-sec-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(32px, 4vw, 52px); max-width: 62ch; }

/* ---------- capability grid ---------- */
.mk-grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.mk-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 940px) { .mk-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .mk-grid--3 { grid-template-columns: 1fr; } }
.mk-cell { background: var(--raised); padding: 26px 24px; display: flex; flex-direction: column; gap: 9px; }
.mk-cell-icon { color: var(--navy); margin-bottom: 4px; }
.mk-cell p { color: var(--ink-2); font-size: 0.9125rem; }

/* ---------- sequence (how it works) ---------- */
.mk-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--plate-rule); border: 1px solid var(--plate-rule); border-radius: 14px; overflow: hidden; }
@media (max-width: 900px) { .mk-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mk-steps { grid-template-columns: 1fr; } }
.mk-step { background: var(--plate-2); padding: 26px 22px 28px; display: flex; flex-direction: column; gap: 10px; }
.mk-step-n {
  font-family: var(--display); font-size: 0.8125rem; font-weight: 700; color: var(--sage);
  font-variant-numeric: tabular-nums; letter-spacing: 0.06em;
}
.mk-step h3 { color: var(--plate-ink); }
.mk-step p { color: var(--plate-ink-2); font-size: 0.9rem; }

/* ---------- the ink plate section ---------- */
.mk-section--plate { background: var(--plate); color: var(--plate-ink); }
.mk-section--plate .mk-h2 { color: var(--plate-ink); }
.mk-section--plate .mk-lede, .mk-section--plate .mk-prose { color: var(--plate-ink-2); }
.mk-section--plate .mk-prose strong { color: var(--plate-ink); }
.mk-section--plate .mk-eyebrow { color: var(--plate-ink-2); }

.mk-recon { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 68px); align-items: center; }
@media (max-width: 940px) { .mk-recon { grid-template-columns: 1fr; } }
.mk-recon-card { background: var(--plate-2); border: 1px solid var(--plate-rule); border-radius: 13px; padding: 22px 24px; display: flex; flex-direction: column; gap: 0; }
.mk-recon-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--plate-rule); font-size: 0.875rem; }
.mk-recon-row:last-child { border-bottom: none; }
.mk-recon-label { color: var(--plate-ink-2); }
.mk-recon-val { margin-left: auto; color: var(--plate-ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.mk-flag { border-radius: 999px; padding: 3px 11px; font-size: 0.7125rem; font-weight: 700; white-space: nowrap; }
/* Chips sit in the same right-hand column as the figures above them, so the
   card reads as one ledger rather than two differently-aligned lists. */
.mk-recon-row .mk-flag { margin-left: auto; font-variant-numeric: tabular-nums; }
.mk-flag--ok { background: rgba(158,184,151,.16); color: #A8C4A0; }
.mk-flag--stop { background: rgba(222,133,112,.16); color: #E09077; }
.mk-recon-note { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--plate-rule); font-size: 0.8125rem; color: var(--plate-ink-2); }

/* ---------- split / portal ---------- */
.mk-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 68px); align-items: center; }
@media (max-width: 940px) { .mk-split { grid-template-columns: 1fr; } }
.mk-list { display: flex; flex-direction: column; gap: 13px; margin: 0; padding: 0; list-style: none; }
.mk-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink-2); font-size: 0.9375rem; }
.mk-list li::before {
  content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--sage);
  flex: none; margin-top: 8px;
}
.mk-section--plate .mk-list li { color: var(--plate-ink-2); }

/* ---------- security ---------- */
.mk-sec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
@media (max-width: 760px) { .mk-sec-grid { grid-template-columns: 1fr; } }
.mk-sec-item { background: var(--raised); padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; }
/* With an odd number of items the last grid slot would sit empty, showing the
   container's rule colour as a solid block. Let a lone final item run the full
   width instead, so the panel always closes cleanly whatever the item count. */
.mk-sec-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 760px) { .mk-sec-item:last-child:nth-child(odd) { grid-column: auto; } }
.mk-sec-item dt { font-weight: 600; font-size: 0.9375rem; }
.mk-sec-item dd { margin: 0; color: var(--ink-2); font-size: 0.875rem; }

/* ---------- pricing ---------- */
.mk-price {
  background: var(--raised); border: 1px solid var(--rule); border-radius: 16px;
  padding: clamp(30px, 4vw, 46px); display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 4vw, 52px); align-items: center;
}
@media (max-width: 860px) { .mk-price { grid-template-columns: 1fr; } }
.mk-price-tiers { display: flex; flex-direction: column; gap: 20px; }
.mk-tier { display: flex; gap: 16px; align-items: flex-start; }
.mk-tier-mark { font-family: var(--display); font-size: 0.75rem; font-weight: 700; color: var(--sage-deep); letter-spacing: 0.1em; text-transform: uppercase; padding-top: 3px; flex: none; width: 76px; }
.mk-tier-body h3 { margin-bottom: 3px; }
.mk-tier-body p { color: var(--ink-2); font-size: 0.9rem; }
.mk-price-cta { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; max-width: 260px; }

/* ---------- faq ---------- */
.mk-faq { border-top: 1px solid var(--rule); }
.mk-faq details { border-bottom: 1px solid var(--rule); }
.mk-faq summary {
  cursor: pointer; list-style: none; padding: 20px 44px 20px 0; position: relative;
  font-family: var(--display); font-size: 1.075rem; font-weight: 600;
}
.mk-faq summary::-webkit-details-marker { display: none; }
.mk-faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 9px; height: 9px;
  border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg); transition: transform .18s;
}
.mk-faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.mk-faq-body { padding: 0 8% 22px 0; color: var(--ink-2); max-width: 72ch; }

/* ---------- contact ---------- */
.mk-contact { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(36px, 5vw, 68px); }
@media (max-width: 940px) { .mk-contact { grid-template-columns: 1fr; } }
.mk-form { display: flex; flex-direction: column; gap: 16px; }
.mk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .mk-row { grid-template-columns: 1fr; } }
.mk-field { display: flex; flex-direction: column; gap: 6px; }
.mk-field label { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.mk-field input, .mk-field textarea, .mk-field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--rule-strong); border-radius: 9px;
  background: var(--raised); color: var(--ink); font: inherit; font-size: 0.9375rem;
}
.mk-field textarea { resize: vertical; min-height: 128px; }
.mk-field input::placeholder, .mk-field textarea::placeholder { color: var(--ink-3); }
/* Honeypot: off-screen rather than display:none — some bots skip hidden fields. */
.mk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mk-form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.mk-form-note { font-size: 0.8125rem; color: var(--ink-3); max-width: 40ch; }
.mk-flash {
  display: flex; gap: 11px; align-items: flex-start; padding: 15px 17px; border-radius: 11px;
  background: var(--sage-tint); color: var(--sage-deep); font-size: 0.9125rem; font-weight: 500;
}
.mk-flash--bad { background: color-mix(in srgb, #B0432F 12%, transparent); color: #B0432F; }
@media (prefers-color-scheme: dark) { .mk-flash--bad { color: #DE8570; } }

/* ---------- legal ---------- */
.mk-legal { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(36px, 5vw, 60px); align-items: start; }
@media (max-width: 940px) { .mk-legal { grid-template-columns: 1fr; } }
.mk-legal-doc { display: flex; flex-direction: column; gap: 16px; }
.mk-legal-doc h3 { font-size: 1.3rem; }
.mk-legal-updated { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.mk-legal-doc h4 { margin: 10px 0 0; font-family: var(--body); font-size: 0.875rem; font-weight: 700; color: var(--ink); }
.mk-legal-doc p, .mk-legal-doc li { color: var(--ink-2); font-size: 0.875rem; line-height: 1.62; }
.mk-legal-doc ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- footer ---------- */
.mk-footer { border-top: 1px solid var(--rule); padding-block: 44px 52px; }
.mk-footer-in { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.mk-footer-links { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; }
.mk-footer-links a { color: var(--ink-2); text-decoration: none; font-size: 0.875rem; }
.mk-footer-links a:hover { color: var(--ink); }
.mk-footer-legal { width: 100%; padding-top: 24px; margin-top: 4px; border-top: 1px solid var(--rule); font-size: 0.8125rem; color: var(--ink-3); max-width: 78ch; }

/* Skip link, for keyboard users landing on a long marketing page. */
.mk-skip {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  background: var(--navy); color: var(--ground); padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 600; font-size: 0.875rem;
}
.mk-skip:focus { left: 16px; }
