/*
  Quick Bookmarks - Pro subscription page.
  Shares the tokens and the voice of css/landing.css so the upgrade page does
  not look like a different product.
*/

:root {
  --ink: #172033;
  --muted: #5e687b;
  --brand: #5551a1;
  --brand-dark: #3e3a83;
  --brand-soft: #efeffb;
  --line: #dfe3eb;
  --surface: #ffffff;
  --page: #f7f8fc;
  --gold: #dfbd4b;
  --yes: #1f7a4d;
}

* { box-sizing: border-box; }

/* Overrides the white form background the shared service page stylesheet sets. */
body.subscribe-page,
body.subscribe-page #form1 {
  background: var(--page);
}

/* Lines the shared header up with this page's narrower content column. */
@media (min-width: 701px) {
  body.subscribe-page {
    --header-gutter: max(20px, calc((100% - 980px) / 2));
  }
}

.subscribe-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 64px;
  color: var(--ink);
  font: 16px/1.55 "Segoe UI", Inter, Arial, sans-serif;
}

.subscribe-hero {
  padding: 40px 0 8px;
  text-align: center;
}

.subscribe-hero .eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.subscribe-hero h1 {
  max-width: 18ch;
  margin: 0 auto;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.08;
  letter-spacing: -.03em;
}

/* Excludes the eyebrow: 60ch is measured against the element's own font size,
   so at 13px it produced a 420px box that pinned the eyebrow left of centre. */
.subscribe-hero p:not(.eyebrow) {
  max-width: 60ch;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 18px;
}

/* ---------- What Pro changes ---------- */

.plan-compare {
  width: 100%;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: var(--surface);
  text-align: left;
}

/* This line used to be a <caption>. A caption is a child of the table, so the
   table's rounded corners and overflow:hidden clipped its first letter. */
.plan-intro {
  margin: 36px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.plan-compare th,
.plan-compare td {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.plan-compare thead th {
  border-top: 0;
  background: #fbfbfe;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.plan-compare thead .col-pro {
  color: var(--brand);
}

.plan-compare tbody th {
  font-weight: 700;
}

.plan-compare tbody th span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

/* Only while the three columns exist. Below 701px the table becomes one block
   per feature and the value cells run the full width; this rule has to be out
   of the way by then, because ".plan-compare .col-pro" outranks the
   ".plan-compare tbody td" reset in the narrow block and a media query adds no
   specificity of its own. A 21% column there resolves to about 72px, which
   breaks "As many as the feed offers" into one word per line. */
@media (min-width: 701px) {
  .plan-compare .col-free,
  .plan-compare .col-pro {
    width: 21%;
  }
}

.plan-compare .col-pro {
  background: var(--brand-soft);
  font-weight: 700;
}

.tick {
  display: inline-block;
  margin-right: 6px;
  color: var(--yes);
  font-weight: 800;
}

/* ---------- Checkout ---------- */

.checkout {
  margin: 36px 0 0;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(41, 48, 78, .09);
  text-align: center;
}

.checkout h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.02em;
}

.checkout .checkout-lead {
  margin: 8px 0 22px;
  color: var(--muted);
}

.checkout label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}

.checkout select {
  width: min(340px, 100%);
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cbd1dc;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.checkout select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.checkout-submit {
  margin: 18px 0 0;
}

.checkout-submit input[type=image] {
  max-width: 100%;
  height: auto;
}

.checkout-note {
  margin: 16px auto 0;
  max-width: 52ch;
  color: var(--muted);
  font-size: 13px;
}

.subscribe-back {
  margin: 28px 0 0;
  text-align: center;
}

.subscribe-back a {
  display: inline-block;
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 700px) {
  .subscribe-hero { padding-top: 26px; }

  /* The comparison becomes one block per feature: a three column table is
     unreadable at this width. */
  .plan-compare,
  .plan-compare tbody,
  .plan-compare tr,
  .plan-compare tbody th,
  .plan-compare tbody td {
    display: block;
    width: 100%;
  }

  .plan-compare thead { display: none; }

  .plan-compare tbody tr {
    border-top: 1px solid var(--line);
  }

  .plan-compare tbody tr:first-child { border-top: 0; }

  .plan-compare tbody th,
  .plan-compare tbody td {
    border-top: 0;
    padding: 4px 16px;
  }

  .plan-compare tbody th { padding-top: 16px; }
  .plan-compare tbody td:last-child { padding-bottom: 16px; }

  .plan-compare .col-free::before,
  .plan-compare .col-pro::before {
    display: inline-block;
    min-width: 46px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .plan-compare .col-free::before { content: "Free"; }
  .plan-compare .col-pro::before { content: "Pro"; color: var(--brand); }

  .plan-compare .col-pro { background: transparent; }
}
