/* System font, #f5f5f5 / #1c1c1e, Apple blue links */
:root {
  --bg: #f5f5f5;
  --text: #000;
  --secondary: #333;
  --muted: #6e6e73;
  --rule: #d2d2d7;
  --panel: #e8e8ed;
  --link: #0062c4;
  --link-hover: #004f9e;
  --link-wash: rgba(0, 98, 196, 0.1);
  --green: #1d7a35;
  --red: #d70015;
  --sans:
    -apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", Oxygen, Ubuntu,
    Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --mono:
    ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1e;
    --text: #fff;
    --secondary: #ccc;
    --muted: #98989d;
    --rule: #38383a;
    --panel: #2c2c2e;
    --link: #2997ff;
    --link-hover: #5aaeff;
    --link-wash: rgba(41, 151, 255, 0.12);
    --green: #30d158;
    --red: #ff453a;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  font-synthesis: none;
  font-feature-settings: "kern";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

a {
  color: var(--link);
  text-decoration: none;
  transition:
    color 0.3s ease,
    background-color 0.3s ease;
}

a:hover {
  background-color: var(--link-wash);
  color: var(--link-hover);
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 3px;
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.85em;
}

a code {
  color: inherit;
}

.site-header,
main,
.site-footer {
  max-width: 680px;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
}

.brand {
  color: var(--text);
  font-weight: 600;
}

.brand:hover {
  background: none;
  color: var(--text);
}

.site-header nav {
  display: flex;
  gap: 1.25rem;
  font-size: 16px;
}

/* Hero: centered title */
.hero {
  padding: 72px 0 0;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: 64px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.003em;
}

.tagline {
  margin: 8px auto 0;
  max-width: 34rem;
  font-size: 24px;
  color: var(--secondary);
}

.rib {
  margin: 48px 0 0;
  text-align: center;
}

.table-scroll {
  overflow: visible;
}

.rib table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.rib th {
  text-align: center;
  font-weight: 400;
  font-size: 15px;
  color: var(--muted);
  padding: 0 0.75rem 0.5rem;
  border-bottom: 1px solid var(--text);
}

.rib td {
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.rib code {
  font-size: 17px;
}

.valid {
  color: var(--green);
}

.invalid {
  color: var(--red);
}

.valid::before,
.invalid::before {
  content: "● ";
  font-size: 0.7em;
  vertical-align: 0.15em;
}

/* Sections */
main > section:not(.hero) {
  padding: 56px 0 0;
  text-align: center;
}

/* nothing adds extra space at the end of a section */
main > section > :last-child,
main > section > .table-scroll:last-child table {
  margin-bottom: 0;
}

h2 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  margin: 2.5rem 0 0.6rem;
}

p {
  margin: 0 0 1rem;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 2.5rem;
  margin: 1.5rem 0 0;
}

.facts dt {
  font-size: 15px;
  color: var(--muted);
}

.facts dd {
  margin: 0.1rem 0 0;
}

.plan {
  width: 100%;
  border-collapse: collapse;
}

.plan th {
  text-align: center;
  font-weight: 400;
  font-size: 15px;
  color: var(--muted);
  padding: 0 0.5rem 0.4rem;
  border-bottom: 1px solid var(--text);
}

.plan td {
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}

.plan td:first-child {
  white-space: nowrap;
}

.comm td:first-child,
.comm th:first-child {
  width: 25%;
}

.rib th,
.rib td {
  width: 50%;
}

.plan .af {
  text-align: center;
  width: 3.5rem;
}

.plan .via {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.ups td,
.ups th {
  white-space: nowrap;
  padding-left: 0.375rem;
  padding-right: 0.375rem;
}

.plan .via code {
  font-size: inherit;
  white-space: nowrap;
}

pre {
  margin: 1.25rem 0 0;
  padding: 1rem 1.25rem;
  background: var(--panel);
  border-radius: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  line-height: 1.55;
}

pre code {
  font-size: 12.5px;
}

.rpsl {
  text-align: left;
}

.rpsl .k {
  color: var(--link);
}

.site-footer {
  margin-top: 64px;
  padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
}

.site-footer p {
  text-align: center;
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

@media (max-width: 560px) {
  main > section:not(.hero) {
    padding-top: 44px;
  }

  .hero {
    padding: 48px 0 0;
  }

  .site-header,
  main,
  .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .tagline {
    font-size: 20px;
  }

  .rib th,
  .rib td {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
  }

  .rib code {
    font-size: 14px;
  }

  pre code {
    font-size: 13px;
  }
}

/* tablets and phones: wide tables scroll sideways inside their box */
@media (max-width: 720px) {
  .table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
  }
}
