/* Marketing pages: home and pricing.
 *
 * Kept apart from app.css on purpose. The dashboard is a dense monospace
 * interface, which is right for reading numbers and wrong for prose. These
 * pages use a proportional face and a much larger type scale, and mixing the
 * two in one stylesheet has produced unreadable forms before.
 */

:root {
  --m-bg: #08080a;
  --m-surface: #101014;
  --m-elevated: #17171c;
  --m-border: #26262c;
  --m-border-soft: #1e1e24;
  --m-text: #f5f5f7;
  --m-muted: #9a9aa4;
  --m-dim: #6e6e78;
  --m-accent: #c9c9d1;
  --m-accent-hover: #dcdcE3;
  --m-green: #30d158;
  --m-red: #ff453a;
  --m-amber: #ff9f0a;
  /* One typeface across the whole site. The marketing pages originally used
     Inter; the dashboard was always monospace, and the user preferred the
     monospace treatment on the reference site. */
  --m-font: "Berkeley Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular,
    Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --m-mono: var(--m-font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.m {
  /* Monospace is a wide face and tokens like an IPv6 address never break on
     their own, so long strings are allowed to wrap rather than scroll. */
  overflow-wrap: break-word;
  background: var(--m-bg);
  color: var(--m-text);
  font-family: var(--m-font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

/* ---------- wordmark ---------- */

/* An original mark: a bracket closing around a bar, reading as a stop.
   Deliberately not a copy of any existing logo. */
.m-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.m-logo svg { display: block; }
.m-logo em { font-style: normal; color: var(--m-accent); }

/* ---------- nav ---------- */

.m-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--m-border-soft);
  background: rgba(8, 8, 10, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
}
.m-nav-links { display: flex; align-items: center; gap: 32px; }
.m-nav-links a { color: var(--m-muted); font-size: 14px; font-weight: 500; }
.m-nav-links a:hover { color: var(--m-text); }
.m-nav-cta { display: flex; align-items: center; gap: 12px; }

/* ---------- buttons ---------- */

.m-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--m-font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
  white-space: nowrap;
}
.m-btn-primary { background: var(--m-text); color: #08080a; }
.m-btn-primary:hover { background: #dcdce0; }
.m-btn-ghost { border-color: var(--m-border); color: var(--m-text); }
.m-btn-ghost:hover { border-color: #3a3a42; background: var(--m-elevated); }
.m-btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 10px; }
.m-btn-block { width: 100%; }

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

.m-wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.m-section { padding: 96px 0; }
.m-section-alt { border-top: 1px solid var(--m-border-soft); }
.m-section-head { max-width: 640px; margin-bottom: 56px; }
.m-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--m-accent);
  margin-bottom: 16px;
}
.m-h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.m-lede { font-size: 18px; color: var(--m-muted); line-height: 1.6; }

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

.m-hero { padding: 104px 0 88px; }
.m-hero-inner { max-width: 780px; }
.m-hero h1 {
  font-size: clamp(38px, 6.2vw, 68px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin-bottom: 24px;
}
.m-hero h1 em {
  font-style: normal;
  background: linear-gradient(96deg, var(--m-accent), #e4e4ea 60%, #c9c9d1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.m-hero p {
  font-size: 19px;
  color: var(--m-muted);
  max-width: 620px;
  margin-bottom: 36px;
}
.m-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.m-hero-note { font-size: 14px; color: var(--m-dim); }

/* the live-rule card */
.m-hero-card {
  margin-top: 64px;
  background: var(--m-surface);
  border: 1px solid var(--m-border);
  border-radius: 14px;
  overflow: hidden;
  font-family: var(--m-mono);
  font-size: 13px;
}
.m-hero-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--m-border-soft);
  color: var(--m-muted);
  font-size: 12px;
}
.m-hero-card-body { padding: 20px; }
.m-rule-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--m-border-soft);
}
.m-rule-line:last-child { border-bottom: 0; }
.m-rule-line span { color: var(--m-muted); }
.m-rule-line b { font-weight: 500; }
.m-rule-hit b { color: var(--m-red); }
.m-rule-blocked {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 69, 58, 0.09);
  border: 1px solid rgba(255, 69, 58, 0.28);
  color: #ff8a80;
  font-family: var(--m-font);
  font-size: 14px;
}

/* ---------- feature grid ---------- */

.m-grid { display: grid; gap: 20px; }
.m-grid-3 { grid-template-columns: repeat(3, 1fr); }
.m-grid-2 { grid-template-columns: repeat(2, 1fr); }

.m-feature {
  background: var(--m-surface);
  border: 1px solid var(--m-border-soft);
  border-radius: 12px;
  padding: 26px;
}
.m-feature-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--m-elevated);
  border: 1px solid var(--m-border);
  margin-bottom: 16px;
  color: var(--m-accent);
}
.m-feature h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.m-feature p { font-size: 14.5px; color: var(--m-muted); line-height: 1.6; }

/* ---------- steps ---------- */

.m-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  /* minmax(0, ...) is required: the default 1fr minimum is the content size,
     so a long heading would otherwise widen the whole column. */
  min-width: 0;
}
.m-step { padding-top: 20px; border-top: 2px solid var(--m-border); }
.m-step-n {
  font-family: var(--m-mono);
  font-size: 12px;
  color: var(--m-accent);
  margin-bottom: 12px;
}
.m-step h3 { font-size: 15px; font-weight: 600; margin-bottom: 7px; }
.m-step p { font-size: 14px; color: var(--m-muted); line-height: 1.6; }

/* ---------- rules table ---------- */

.m-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.m-table th {
  text-align: left;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--m-dim);
  border-bottom: 1px solid var(--m-border);
}
.m-table td { padding: 16px; border-bottom: 1px solid var(--m-border-soft); color: var(--m-muted); }
.m-table td:first-child { color: var(--m-text); font-weight: 500; }
.m-table tr:last-child td { border-bottom: 0; }
.m-yes { color: var(--m-green); font-weight: 500; }

/* ---------- honesty panel ---------- */

.m-promise {
  background: var(--m-surface);
  border: 1px solid var(--m-border);
  border-left: 3px solid var(--m-accent);
  border-radius: 12px;
  padding: 32px;
}
.m-promise h3 { font-size: 18px; font-weight: 600; margin-bottom: 14px; }
.m-promise p { color: var(--m-muted); font-size: 15px; margin-bottom: 14px; }
.m-promise p:last-child { margin-bottom: 0; }
.m-promise b { color: var(--m-text); font-weight: 600; }

/* ---------- pricing ---------- */

.m-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.m-plan {
  background: var(--m-surface);
  border: 1px solid var(--m-border-soft);
  border-radius: 14px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.m-plan-featured {
  border-color: var(--m-accent);
  background: linear-gradient(180deg, rgba(201, 201, 209, 0.07), var(--m-surface) 42%);
  position: relative;
}
.m-plan-tag {
  position: absolute;
  top: -11px;
  left: 24px;
  background: var(--m-accent);
  color: #08080a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}
.m-plan-name { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.m-plan-for { font-size: 13px; color: var(--m-dim); margin-bottom: 20px; min-height: 38px; }
.m-plan-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.m-plan-price b { font-size: 38px; font-weight: 600; letter-spacing: -0.03em; }
.m-plan-price span { font-size: 14px; color: var(--m-dim); }
.m-plan-save {
  font-size: 12.5px;
  color: var(--m-green);
  font-weight: 500;
  margin-bottom: 22px;
  min-height: 19px;
}
.m-plan .m-btn { margin-bottom: 20px; }
.m-plan ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.m-plan li {
  font-size: 13.5px;
  color: var(--m-muted);
  display: flex;
  gap: 9px;
  align-items: flex-start;
  line-height: 1.5;
}
.m-plan li::before {
  content: "";
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 50%;
  background: rgba(48, 209, 88, 0.15);
  border: 1px solid rgba(48, 209, 88, 0.4);
}
.m-plan-note { margin-top: 28px; text-align: center; font-size: 14px; color: var(--m-dim); }

/* ---------- faq ---------- */

.m-faq { max-width: 720px; }
.m-faq-item { border-bottom: 1px solid var(--m-border-soft); padding: 22px 0; }
.m-faq-item:last-child { border-bottom: 0; }
.m-faq-item h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.m-faq-item p { font-size: 14.5px; color: var(--m-muted); line-height: 1.65; }

/* ---------- cta + footer ---------- */

.m-cta {
  text-align: center;
  padding: 96px 0;
  border-top: 1px solid var(--m-border-soft);
}
.m-cta h2 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.m-cta p { color: var(--m-muted); font-size: 17px; margin-bottom: 30px; }

.m-footer { border-top: 1px solid var(--m-border-soft); padding: 40px 0; }
.m-footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.m-footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.m-footer-links a { font-size: 13.5px; color: var(--m-muted); }
.m-footer-links a:hover { color: var(--m-text); }
.m-footer-note { font-size: 12.5px; color: var(--m-dim); margin-top: 24px; line-height: 1.6; }
.m-disclaimer {
  font-size: 12.5px;
  color: var(--m-dim);
  line-height: 1.65;
  padding: 20px 0 0;
  border-top: 1px solid var(--m-border-soft);
  margin-top: 24px;
}

@media (max-width: 900px) {
  .m-grid-3, .m-plans, .m-steps { grid-template-columns: repeat(2, 1fr); }
  .m-grid-2 { grid-template-columns: 1fr; }
}
/* ---------- responsive ---------- */

/* 900px: the three-column grids and the four pricing cards no longer fit
   comfortably in two columns, and the rules table starts to wrap badly. */
@media (max-width: 900px) {
  .m-grid-3, .m-plans, .m-steps { grid-template-columns: repeat(2, 1fr); }
  .m-grid-2 { grid-template-columns: 1fr; }
  .m-nav-links { gap: 20px; }
  .m-section { padding: 72px 0; }
}

/* 760px: the nav links go, because the logo plus two buttons plus three links
   cannot share a row. The buttons stay, since they are the only way to act. */
@media (max-width: 760px) {
  .m-nav-links { display: none; }
  .m-nav { padding: 14px 20px; }
  .m-wrap { padding: 0 20px; }
}

/* 640px: phones. Everything becomes one column and the type scale comes down,
   because a 40px monospace heading on a 375px screen overflows its container. */
@media (max-width: 640px) {
  .m-section { padding: 56px 0; }
  .m-hero { padding: 52px 0 48px; }
  .m-hero h1 { letter-spacing: -0.025em; }
  .m-hero p { font-size: 16px; }
  .m-hero-card { margin-top: 40px; font-size: 12px; }
  .m-hero-actions { gap: 10px; }
  .m-hero-actions .m-btn { flex: 1 1 100%; }
  .m-section-head { margin-bottom: 36px; }

  .m-grid-3, .m-plans, .m-steps, .m-grid-2 { grid-template-columns: 1fr; }

  .m-rule-line { flex-direction: column; gap: 2px; padding: 10px 0; }
  .m-rule-line b { font-size: 14px; }

  /* The three-column rules table cannot shrink to readable widths, so each
     row becomes a labelled block instead of a cramped grid. */
  .m-table thead { display: none; }
  .m-table, .m-table tbody, .m-table tr, .m-table td { display: block; width: 100%; }
  .m-table tr { padding: 14px 0; border-bottom: 1px solid var(--m-border-soft); }
  .m-table tr:last-child { border-bottom: 0; }
  .m-table td { border: 0; padding: 2px 0; }
  .m-table td:first-child { font-size: 15px; margin-bottom: 4px; }
  .m-table td:last-child { font-size: 12.5px; color: var(--m-dim); padding-top: 6px; }

  .m-plan { padding: 22px 20px; }
  .m-feature { padding: 22px 20px; }
  .m-promise { padding: 24px 20px; }
  .m-cta { padding: 64px 0; }

  .m-footer-inner { flex-direction: column; align-items: flex-start; }
  .m-footer-links { gap: 16px; }
}

/* Phones. The nav wraps to a full-width row of buttons, and heading tracking
   tightens.

   This was at max-width: 400px, which left a hole from 401px to 640px where the
   brand plus two nowrap buttons did not fit. A real browser measured it at 412px,
   which is a Pixel 7: content 455px against a 412px viewport, so the page scrolled
   sideways. The ladder stepped over the most common Android widths. */

@media (max-width: 640px) {
  .m-nav { flex-wrap: wrap; gap: 12px; }
  .m-nav-cta { width: 100%; }
  .m-nav-cta .m-btn { flex: 1; min-width: 0; }
  .m-hero h1 { font-size: 30px; }
  .m-plan-price b { font-size: 32px; }
  .m-footer-links a { font-size: 13px; }
}

/* 400px: the narrowest phones still in use. Nothing structural left to change,
   so this only tightens type further. */
@media (max-width: 400px) {
  .m-hero h1 { font-size: 27px; }
  .m-plan-price b { font-size: 28px; }
}

/* Landscape phones are short, not narrow, so the vertical padding is what
   needs to shrink. */
@media (max-height: 480px) and (orientation: landscape) {
  .m-hero { padding: 48px 0 40px; }
  .m-section { padding: 48px 0; }
  .m-cta { padding: 56px 0; }
}

/* ---- phone ergonomics ---------------------------------------------------
   The same measurement on the marketing pages: nav links 22 to 29px tall. Padded
   to the 44px target, and the plan and feature grids already collapse. */

@media (max-width: 640px) {
  nav a,
  .nav a,
  header a,
  .topnav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 2px;
  }

  a.btn,
  .btn,
  button {
    min-height: 44px;
  }
}

/* ---- tap targets, measured ---------------------------------------------
   A real browser at 375px and 1280px measured these at:

       .m-logo            29px
       .m-nav-links a     24px
       .m-footer-links a  22px

   44px is the smallest reliably tappable target. Padding rather than a fixed
   height, so the type size is untouched and only the hit area grows. An earlier
   attempt used selectors like `nav a`, which match nothing here, so it reported
   success and changed nothing; these classes came from the measurement. */

.m-logo,
.m-nav-links a,
.m-footer-links a,
.m-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.m-nav-links a,
.m-footer-links a {
  padding: 10px 2px;
}

/* The footer is stacked on a phone, so its links get the full width to land on
   rather than four 44px targets crowded into one row. */
@media (max-width: 640px) {
  .m-footer-links a { width: 100%; }
}
