/*
 * The billing pages' one stylesheet (/billing.css), served by the billing service. Its values are the design system's,
 * as the console's app.css copies them (docs/provenance.md), with the console's faces (/fonts/*). No script on any
 * page: the period toggle and the phone's segmented control are radios that CSS follows.
 */

@font-face {
  font-family: "Source Sans 3 Variable";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3 Variable";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #fbfbfa;
  --raised: #ffffff;
  --sunken: #f3f3f0;
  --line: rgba(23, 23, 22, 0.07);
  --line2: rgba(23, 23, 22, 0.12);
  --ink: #151514;
  --ink2: #2a2a28;
  --muted: #5c5c58;
  --agent: #0063d1;
  --agent-soft: #e3eefd;
  --warn: #9a5b00;
  --warn-soft: #fbeed5;
  --on-ink: #ffffff;
  --e1: 0 1px 1px rgba(23, 23, 22, 0.04), 0 2px 4px -1px rgba(23, 23, 22, 0.05), 0 0 0 1px var(--line);
  --e2: 0 1px 1px rgba(23, 23, 22, 0.04), 0 6px 16px -4px rgba(23, 23, 22, 0.1), 0 0 0 1px var(--line2);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f0f0e;
    --raised: #1c1c1b;
    --sunken: #0a0a09;
    --line: rgba(255, 255, 255, 0.1);
    --line2: rgba(255, 255, 255, 0.15);
    --ink: #efefec;
    --ink2: #d6d6d2;
    --muted: #a3a39e;
    --agent: #5aa8ff;
    --agent-soft: #11253f;
    --warn: #e0a84a;
    --warn-soft: #33260e;
    --on-ink: #151514;
    --e1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--line);
    --e2: 0 8px 20px -6px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line2);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    16px / 1.5 "Source Sans 3 Variable",
    system-ui,
    sans-serif;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 8px;
}
h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 650;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 22px;
  font-weight: 650;
}
h3 {
  font-size: 18px;
  font-weight: 600;
}
p {
  margin: 0 0 12px;
}
.muted,
small {
  color: var(--muted);
}

.top {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 18px;
  text-decoration: none;
}
.brand__mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--ink);
}
.main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 16px 64px;
}
.hero {
  max-width: 760px;
  margin: 24px auto 32px;
  text-align: center;
}
.hero--small {
  margin: 8px 0 24px;
  text-align: left;
}
.lead {
  font-size: 20px;
  color: var(--ink2);
}

/* Buttons and forms. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--raised);
  color: var(--ink);
  box-shadow: var(--e1);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover {
  box-shadow: var(--e2);
}
.button--solid {
  background: var(--ink);
  color: var(--on-ink);
}
.button--quiet {
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
}
.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--agent);
  outline-offset: 2px;
}
.inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.stack {
  display: grid;
  gap: 12px;
  max-width: 420px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
}
.field {
  display: grid;
  gap: 4px;
  max-width: 320px;
  margin: 16px 0 0;
}
.label {
  display: block;
  margin: 16px 0 4px;
}
.label,
.field > span,
.people label > span {
  font-size: 14px;
  color: var(--muted);
}
select,
input[type="text"],
input[type="number"] {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: var(--raised);
  color: var(--ink);
  font: inherit;
}
.people label {
  display: inline-grid;
  gap: 2px;
}
.people input {
  width: 96px;
}
.people small {
  flex-basis: 100%;
}

/* The plans: radios that CSS follows. */
.radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.period,
.segments {
  display: flex;
  justify-content: center;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 20px;
  padding: 4px;
  border-radius: 12px;
  background: var(--sunken);
}
.period label,
.segments label {
  padding: 8px 14px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}
#period-year:checked ~ .period label[for="period-year"],
#period-month:checked ~ .period label[for="period-month"],
#show-business:checked ~ .segments label[for="show-business"],
#show-team:checked ~ .segments label[for="show-team"],
#show-personal:checked ~ .segments label[for="show-personal"] {
  background: var(--raised);
  color: var(--ink);
  box-shadow: var(--e1);
}
#period-year:focus-visible ~ .period label[for="period-year"],
#period-month:focus-visible ~ .period label[for="period-month"],
#show-business:focus-visible ~ .segments label[for="show-business"],
#show-team:focus-visible ~ .segments label[for="show-team"],
#show-personal:focus-visible ~ .segments label[for="show-personal"] {
  outline: 2px solid var(--agent);
}
#period-year:checked ~ * .m,
#period-month:checked ~ * .y {
  display: none;
}
.segments {
  display: none;
}
.segments label {
  display: grid;
  text-align: center;
  line-height: 1.25;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--raised);
  box-shadow: var(--e1);
}
.card--chosen {
  box-shadow:
    var(--e2),
    0 0 0 2px var(--ink);
}
.card__name {
  font-size: 24px;
  margin: 0;
}
.card__for {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}
.badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--agent-soft);
  color: var(--agent);
  font-size: 13px;
  font-weight: 600;
}
.card__price {
  margin: 12px 0 4px;
  color: var(--muted);
}
.card__price strong {
  color: var(--ink);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.card__line,
.card__value {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 4px;
}
.card .button {
  width: 100%;
  margin: 16px 0 4px;
}
.card__note {
  font-size: 14px;
  color: var(--warn);
}
.card__rows {
  list-style: none;
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.card__rows li {
  color: var(--muted);
}
.card__rows li.strong {
  color: var(--ink);
  font-weight: 600;
}
@media (max-width: 760px) {
  .segments {
    display: flex;
  }
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .card {
    display: none;
  }
  #show-business:checked ~ .cards .card--business,
  #show-team:checked ~ .cards .card--team,
  #show-personal:checked ~ .cards .card--personal {
    display: block;
  }
}

/* What the pages say around the plans. */
.notes {
  max-width: 760px;
  margin: 32px auto;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}
.compare,
.faq {
  max-width: 760px;
  margin: 48px auto 0;
}
.table {
  overflow-x: auto;
  margin: 12px 0 20px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
thead th {
  color: var(--muted);
  font-weight: 600;
}
.source {
  font-size: 14px;
  color: var(--muted);
}
details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
summary {
  font-weight: 600;
  cursor: pointer;
}
details p {
  margin: 8px 0 0;
  color: var(--ink2);
}
.lang {
  margin: 32px 0 0;
  text-align: center;
}

/* The billing page. */
.notice {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--agent-soft);
}
.notice--warn,
.state--warn {
  background: var(--warn-soft);
}
.state {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--sunken);
}
.plan,
.moment,
.others {
  margin: 0 0 24px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--raised);
  box-shadow: var(--e1);
}
.moment {
  box-shadow:
    var(--e2),
    0 0 0 2px var(--ink);
}
.facts {
  margin: 12px 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}
.smaller {
  margin: 20px 0 0;
}
.plans > h2 {
  margin: 24px 0 16px;
}
.others ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin: 32px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
