/* OSM's website (osm-os.com) and the relay domain's page (osm-relay.com): the one stylesheet of every page.
   Started from the mockups' reference stylesheet (docs/dev/specs/website-brief/mockups/site.css), which takes its look
   from OSM's own desktop (www/style.css): its blue, its greys, its 12px corners and soft shadows. The rules of
   website.md, 8.1, hold here: no web fonts (the system's own), no scripts, no inline styles (the
   Content-Security-Policy is style-src 'self'), nothing from another site. Light and dark follow the visitor's system
   (prefers-color-scheme). Every text colour has 4.5:1 or more against its background (WCAG 2.1 AA).
   site/build.py rewrites each url() of a picture in img/ below to the picture's hashed name in /assets/. */

:root {
  --blue: #0a6cf0;            /* buttons, accents: white text on it is 4.7:1 */
  --blue-dark: #0657c7;       /* links and blue text: 6.5:1 on white, 6.1:1 on --face */
  --blue-light: #e8f1ff;      /* a blue wash behind notes and the current page */
  --ring: rgba(10, 108, 240, 0.35);
  --text: #1b2633;
  --text-2: #56677a;          /* secondary text: 5.6:1 on white */
  --line: #e2e8ef;
  --face: #f5f7fb;            /* every other section's background */
  --card: #ffffff;
  --bg: #ffffff;
  --green: #12804a;           /* (darker than the desktop's #16a45e, so green text is 4.9:1) */
  --green-bg: #e6f6ee;
  --orange: #a35400;
  --orange-bg: #fff3e3;
  --red: #c42d23;
  --red-bg: #fdebea;
  --code: #f1f4f9;
  --field: #7b8794;           /* a field's border: 3.7:1, as WCAG asks of controls */
  --shadow-1: 0 1px 2px rgba(15, 30, 60, 0.06), 0 2px 8px rgba(15, 30, 60, 0.06);
  --shadow-2: 0 10px 30px rgba(6, 22, 52, 0.16), 0 2px 8px rgba(6, 22, 52, 0.1);
  --radius: 12px;
  --wide: 1120px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue-dark: #6cb0ff;     /* links on dark: 7.6:1 */
    --blue-light: #13243d;
    --ring: rgba(108, 176, 255, 0.45);
    --text: #e6ebf2;
    --text-2: #a9b4c3;
    --line: #29323e;
    --face: #131921;
    --card: #19202a;
    --bg: #0e1319;
    --green: #4fd08b;
    --green-bg: #12291d;
    --orange: #ffb35c;
    --orange-bg: #2c2112;
    --red: #ff8a80;
    --red-bg: #2e1615;
    --code: #1c242f;
    --field: #6b7684;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

/* ------------------------------------------------------------ base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--blue-dark); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: 44px; }
h2 { font-size: 32px; }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
code, kbd, pre, .mono { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--code); padding: 1px 6px; border-radius: 5px; }
pre { background: var(--code); padding: 14px 16px; border-radius: 10px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.center { text-align: center; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 20; background: var(--card); padding: 8px 12px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------ header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top .wrap { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700;
  font-size: 20px; letter-spacing: 0.02em; white-space: nowrap; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { color: var(--text); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current] { color: var(--blue-dark); }
.nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--blue); }
.top .end { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 14px; }
.langs { display: flex; gap: 10px; }
.langs a { color: var(--text-2); text-decoration: none; }
.langs a[aria-current] { color: var(--text); font-weight: 600; }
.phone-menu { display: none; }
/* on the home page the header lies on the picture */
.top.on-hero { position: absolute; left: 0; right: 0; top: 0; z-index: 5; background: transparent; border-color: rgba(255, 255, 255, 0.18); }
.top.on-hero .brand, .top.on-hero .nav a, .top.on-hero .langs a { color: #fff; }
.top.on-hero .langs a { opacity: 0.8; }
.top.on-hero .langs a[aria-current] { opacity: 1; }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
  border-radius: 10px; border: 1px solid transparent; font: inherit; font-size: 16px; font-weight: 600; text-decoration: none;
  cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(10, 108, 240, 0.28); }
.btn.primary:hover { background: #0a63db; }
.btn.secondary { background: var(--card); color: var(--blue-dark); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--blue); }
.btn.glass { background: rgba(255, 255, 255, 0.16); color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.btn.glass:hover { background: rgba(255, 255, 255, 0.26); }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn.wide { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.center .actions { justify-content: center; }

/* ------------------------------------------------------------ the home page's picture */
.hero { position: relative; color: #fff; padding: 140px 0 0; overflow: hidden;
  background: #0b3a8c url("horizon.746c43a7dc76e723.svg") center 30% / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4, 18, 48, 0.72) 0%, rgba(4, 18, 48, 0.45) 45%, rgba(4, 18, 48, 0.1) 100%); }
.hero .wrap { position: relative; }
.hero h1 { font-size: 56px; max-width: 760px; margin-bottom: 18px; }
.hero .lead { font-size: 20px; max-width: 680px; color: rgba(255, 255, 255, 0.92); margin-bottom: 28px; }
.hero .fine { font-size: 14px; color: rgba(255, 255, 255, 0.85); margin-top: 14px; }
.shot { margin: 56px auto 0; max-width: 1040px; border-radius: 14px 14px 0 0; overflow: hidden; background: #1d2633;
  box-shadow: var(--shadow-2); border: 1px solid rgba(255, 255, 255, 0.25); border-bottom: 0; }
.shot .bar { display: flex; gap: 7px; align-items: center; padding: 10px 14px; background: #e9eef5; }
.shot .bar i { width: 11px; height: 11px; border-radius: 50%; background: #c5cfdc; }
.shot .bar span { margin-left: 12px; flex: 1; max-width: 420px; background: #fff; color: #56677a; border-radius: 7px;
  font-size: 12px; padding: 3px 10px; }
.shot img { display: block; width: 100%; }

/* ------------------------------------------------------------ sections */
section { padding: 80px 0; }
section.face { background: var(--face); }
section.tight { padding-top: 8px; }
.intro { max-width: 720px; margin-bottom: 40px; }
.intro p { font-size: 19px; color: var(--text-2); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--blue-dark); margin-bottom: 10px; }
.page-head { padding: 56px 0 24px; }
.page-head h1 { font-size: 40px; }
.page-head .lead { font-size: 19px; color: var(--text-2); max-width: 760px; }
.page-head .center .lead { margin-left: auto; margin-right: auto; }
.page-head + section.pricing { padding-top: 24px; }
.crumbs { font-size: 14px; color: var(--text-2); margin-bottom: 14px; }
.crumbs a { color: var(--text-2); }

/* ------------------------------------------------------------ cards and features */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-1); }
.card h2 { font-size: 20px; margin-bottom: 6px; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--text-2); margin: 0; font-size: 16px; }
.card p.more { margin-top: 12px; font-weight: 600; }
.card .icon { width: 44px; height: 44px; border-radius: 11px; background: var(--blue-light); display: grid; place-items: center;
  margin-bottom: 14px; color: var(--blue-dark); font-weight: 700; }
.icon svg { width: 24px; height: 24px; }
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; margin: 0 0 72px; }
.feature:last-child { margin-bottom: 0; }
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip .text { order: 2; }
.feature ul { padding-left: 20px; margin: 0; color: var(--text-2); }
.feature li { margin: 6px 0; }
.feature .pic img { display: block; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.feature .pic.art img { margin: 0 auto; border: 0; border-radius: 0; box-shadow: none; }
p.actions { margin-top: 28px; }
p.footnote { margin-top: 24px; font-size: 15px; color: var(--text-2); }
img.not-found { width: 200px; }

/* the picture of OSM Connect on the home page */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 14px; margin: 8px 0 28px; }
.flow .node { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center;
  box-shadow: var(--shadow-1); }
.flow .node b { display: block; font-size: 17px; }
.flow .node span { font-size: 14px; color: var(--text-2); }
.flow .node.relay { border-style: dashed; border-color: var(--field); }
.flow .node.home { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-light); }
.flow .pipe { font-size: 13px; color: var(--green); font-weight: 600; text-align: center; min-width: 110px; }
.flow .pipe::before { content: ""; display: block; height: 3px; border-radius: 2px; margin-bottom: 6px;
  background: repeating-linear-gradient(90deg, var(--green) 0 10px, transparent 10px 16px); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
.checks li { padding-left: 30px; position: relative; color: var(--text-2); }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--green-bg); color: var(--green); font-size: 13px; font-weight: 700; display: grid; place-items: center; margin-top: 3px; }
.checks b { color: var(--text); }

/* ------------------------------------------------------------ plans: five in rows of three, the last row centred */
.plans { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.plan { flex: 0 1 320px; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px;
  box-shadow: var(--shadow-1); display: flex; flex-direction: column; }
.plan.best { border: 2px solid var(--blue); box-shadow: var(--shadow-2); }
.plan h2 { font-size: 24px; margin-bottom: 4px; }
.plan > p.muted { min-height: 3.2em; margin-bottom: 0; }
.plan .price { font-size: 40px; font-weight: 700; margin: 14px 0 0; }
.plan .price small { font-size: 16px; font-weight: 500; color: var(--text-2); }
.plan .per { font-size: 14px; color: var(--text-2); margin-bottom: 18px; }
.plan .plus { font-size: 14px; color: var(--text-2); margin: 0 0 6px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan li { padding: 7px 0 7px 28px; position: relative; border-top: 1px solid var(--line); font-size: 16px; }
.plan li::before { content: "✓"; position: absolute; left: 2px; color: var(--green); font-weight: 700; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--blue-light); color: var(--blue-dark); border-radius: 999px; padding: 3px 10px; }
.plan .tag { align-self: flex-start; margin-bottom: 10px; }
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 10px 0 0; color: var(--text-2); }
.narrow-table { max-width: 860px; margin: 0 auto; }

/* ------------------------------------------------------------ notes, badges, tables */
.note { border-radius: var(--radius); padding: 16px 18px; background: var(--blue-light); border-left: 4px solid var(--blue); }
.note.warn { background: var(--orange-bg); border-left-color: var(--orange); }
.note.bad { background: var(--red-bg); border-left-color: var(--red); }
.note.ok { background: var(--green-bg); border-left-color: var(--green); }
.note > b:first-child { display: block; margin-bottom: 2px; }
.note p:last-child { margin-bottom: 0; }
.note ul { margin: 6px 0 0; padding-left: 20px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; border-radius: 999px;
  padding: 2px 10px; background: var(--code); color: var(--text-2); white-space: nowrap; }
.badge.ok { background: var(--green-bg); color: var(--green); }
.badge.warn { background: var(--orange-bg); color: var(--orange); }
.badge.bad { background: var(--red-bg); color: var(--red); }
.badge.info { background: var(--blue-light); color: var(--blue-dark); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--face); }
tr:last-child td { border-bottom: 0; }
th.num, td.num { text-align: right; white-space: nowrap; }
td.num { color: var(--text-2); }
.table.files td:first-child { white-space: nowrap; }
.sum { display: block; margin-top: 4px; font-family: var(--mono); font-size: 12px; color: var(--text-2); white-space: normal;
  overflow-wrap: anywhere; }
.fp { font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: 0.02em; word-break: break-all;
  background: var(--code); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 8px 0 14px; }
.fp.small { font-size: 15px; padding: 10px 12px; margin: 4px 0 10px; }
.fp.none { font-family: inherit; font-size: 16px; font-weight: 400; letter-spacing: 0; word-break: normal; color: var(--text-2);
  border-style: dashed; }
.list code { overflow-wrap: anywhere; }
tbody th { font-size: 15px; color: var(--text); background: none; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.box h2, .box h3 { font-size: 18px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 0; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 22px; margin: 0; font-size: 15px; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }   /* (a long address breaks rather than widen the page) */
.prose { max-width: 760px; }
.prose h2 { font-size: 24px; margin-top: 36px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin-top: 24px; }
.prose ul { padding-left: 22px; }
.prose .list { padding-left: 0; }
.lead-p { font-size: 19px; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 15px; }
.spaced { margin-top: 28px; }
pre.fold { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }

/* the places a lawyer writes, and the company's details still to come: visible, so none is forgotten */
.tbd { border: 1px dashed var(--field); border-radius: 8px; padding: 8px 12px; color: var(--text-2); background: var(--face); }
.ph { border: 1px dashed var(--field); border-radius: 4px; padding: 0 4px; background: var(--face); }

/* ------------------------------------------------------------ footer */
.foot { background: var(--face); border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: 15px; margin-top: 0; }
.foot .grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 28px; }
.foot h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); margin-bottom: 12px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 7px 0; }
.foot a { color: var(--text); text-decoration: none; }
.foot a:hover { color: var(--blue-dark); text-decoration: underline; }
.foot .cancel { font-weight: 600; }
.foot .base { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; display: flex; gap: 20px; flex-wrap: wrap;
  color: var(--text-2); font-size: 14px; }
.foot .base .langs { margin-left: auto; }

/* ------------------------------------------------------------ the relay domain's page */
.relay-page { max-width: 680px; margin: 0 auto; padding: 64px 24px; }
.relay-page .lang { padding: 26px 0; border-top: 1px solid var(--line); }
.relay-page .lang:first-of-type { border-top: 0; }
.relay-page h1, .relay-page h2 { font-size: 24px; }

/* ------------------------------------------------------------ phones */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature, .feature.flip { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .feature.flip .text { order: 0; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .foot .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow .pipe { min-width: 0; }
  .flow .pipe::before { width: 3px; height: 26px; margin: 0 auto 6px;
    background: repeating-linear-gradient(180deg, var(--green) 0 8px, transparent 8px 13px); }
  .plan { flex-basis: 480px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  h1, .page-head h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  .hero { padding-top: 104px; }
  .hero h1 { font-size: 36px; }
  .hero .lead { font-size: 18px; }
  section { padding: 56px 0; }
  .nav, .top .end .langs { display: none; }
  .phone-menu { display: block; margin-left: auto; position: relative; }
  .phone-menu summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; padding: 7px 14px;
    font-size: 15px; font-weight: 600; }
  .on-hero .phone-menu summary { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
  .phone-menu summary::-webkit-details-marker { display: none; }
  .phone-menu nav { position: absolute; right: 0; top: 46px; z-index: 10; width: 240px; background: var(--card);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 8px; display: grid; }
  .phone-menu nav a { color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: 8px; }
  .top .end { margin-left: 0; }
  .top .end .btn { display: none; }
  .cards, .cards.two, .checks { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kv dd { margin-bottom: 10px; }
  .actions .btn { flex: 1 1 auto; }
  .foot .base .langs { margin-left: 0; }
  .relay-page { padding: 40px 16px; }
}
@media print {
  .top, .foot, .phone-menu, .skip { display: none; }
  .hero { background: none; color: inherit; padding-top: 0; }
  .hero::before { display: none; }
}
