/*
 * The app's "Glass" look on a page (app/src/theme): white cards on a warm canvas,
 * separated by fill rather than by a line; pills for anything you press; headings
 * large and tight; the system's own font, which is the one the app is set in.
 * One palette, light, as in the app. Colours keep the names they have there.
 */
:root {
  --accent: #ff4f00;
  --accent-pressed: #e04600;
  --accent-tint: #fff6f2;
  --accent-wash: rgba(255, 79, 0, 0.1);
  --ink: #101010;
  --ink80: #3d3b38;
  --ink60: #5b5b57;
  --surface: #fefefe;
  --canvas: #f3f2f0;
  --hairline: #ebe9e5;
  --tag-gray: #efedea;
  --cream: #fdf6ee;
  --cream-edge: #f5e8d5;
  --glass: rgba(255, 255, 255, 0.64);
  --card-shadow: 0 1px 2px rgba(16, 16, 16, 0.04);
  --float-shadow: 0 4px 12px rgba(16, 16, 16, 0.08);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink80);
  font: 400 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 32px;
}

/* ---------- the top: logo, the sections as the app's tab bar, the languages as chips */

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 0 20px;
}

.brand img {
  display: block;
  width: auto;
  height: 36px;
}

.tabs {
  order: 3;
  display: flex;
  width: 100%;
  padding: 4px;
  border-radius: 999px;
  background: var(--glass);
  box-shadow: var(--float-shadow);
}

.tabs a {
  flex: 1;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink80);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  text-decoration: none;
}

.tabs a:hover {
  background: var(--accent-tint);
  color: var(--ink);
}

.tabs a[aria-current] {
  background: var(--accent-wash);
  color: var(--accent);
}

.langs {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  color: var(--ink80);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
}

.chip:hover {
  background: var(--accent-tint);
  color: var(--ink);
}

.chip.on,
.chip.on:hover {
  background: var(--ink);
  color: var(--surface);
}

/* Three languages beside the logo: on a phone they fit only a little closer together. */
@media (max-width: 400px) {
  .langs {
    gap: 4px;
  }

  .chip {
    padding: 6px 9px;
  }
}

@media (min-width: 720px) {
  .top {
    flex-wrap: nowrap;
  }

  .tabs {
    order: 0;
    width: auto;
    margin-left: auto;
  }

  .tabs a {
    flex: none;
    padding: 8px 14px;
  }

  .langs {
    margin-left: 0;
  }
}

/* ---------- type: the app's screen title, section title and subtitle */

h1 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.15;
}

h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.25;
}

p,
ul,
ol {
  margin: 0 0 12px;
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

ul,
ol {
  padding-left: 20px;
}

li {
  margin-bottom: 6px;
}

li:last-child {
  margin-bottom: 0;
}

li::marker {
  color: var(--accent);
}

strong {
  color: var(--ink);
  font-weight: 700;
}

/* Text set on the accent's own colour stays legible at any size only in the app's
   big buttons, so a link in a sentence is ink with an orange underline. */
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-pressed);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lead {
  color: var(--ink60);
  font-size: 17px;
  line-height: 1.5;
}

.meta {
  margin-top: 8px;
  color: var(--ink60);
  font-size: 13.5px;
}

.accent {
  color: var(--accent);
}

/* ---------- cards */

main {
  display: grid;
  gap: 12px;
}

.card {
  padding: 20px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.card.cream {
  background: var(--cream);
  box-shadow: inset 0 0 0 1px var(--cream-edge);
}

.head {
  padding: 8px 4px 12px;
}

.head .lead {
  margin-top: 12px;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}

.pill {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  text-decoration: none;
}

.pill.primary {
  background: var(--accent);
  color: var(--surface);
}

.pill.primary:hover {
  background: var(--accent-pressed);
  color: var(--surface);
}

.pill.plain {
  background: var(--surface);
  box-shadow: var(--card-shadow);
  color: var(--ink);
}

.pill.plain:hover {
  background: var(--accent-tint);
  color: var(--ink);
}

.pill.soon {
  background: var(--tag-gray);
  color: var(--ink80);
}

/* ---------- home */

.hero {
  padding: 28px 24px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.hero .tile {
  display: block;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 34px;
  letter-spacing: -1px;
}

.hero .lead {
  margin-top: 14px;
}

.hero .note {
  margin-top: 12px;
  color: var(--ink60);
  font-size: 14px;
}

.features {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.features li {
  margin: 0;
}

.features h2 {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.features p {
  color: var(--ink60);
  font-size: 15px;
  line-height: 1.45;
}

@media (min-width: 640px) {
  .hero {
    padding: 40px;
  }

  .hero h1 {
    font-size: 44px;
    letter-spacing: -1.4px;
  }

  .features {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- support: the rows of a grouped list, as in the app's profile */

.rows {
  padding: 4px 20px;
}

.row {
  margin: 0;
  padding: 16px 0;
  color: var(--ink60);
  font-size: 15px;
  line-height: 1.5;
}

.row + .row {
  border-top: 1px solid var(--hairline);
}

.row > strong:first-child {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

/* ---------- tables */

table {
  width: 100%;
  margin: 0 0 12px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}

table:last-child {
  margin-bottom: 0;
}

th {
  padding: 0 12px 8px 0;
  color: var(--ink60);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-align: left;
  text-transform: uppercase;
}

td {
  padding: 10px 12px 10px 0;
  border-top: 1px solid var(--hairline);
  vertical-align: top;
}

th:last-child,
td:last-child {
  padding-right: 0;
}

/* Three columns of sentences do not fit a phone: each row becomes a small stack,
   every value under the name of its column. */
@media (max-width: 639px) {
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tr {
    padding: 12px 0;
    border-top: 1px solid var(--hairline);
  }

  tbody tr:first-child {
    border-top: 0;
    padding-top: 0;
  }

  tbody tr:last-child {
    padding-bottom: 0;
  }

  td {
    padding: 0;
    border: 0;
  }

  td + td {
    margin-top: 8px;
  }

  td::before {
    content: attr(data-label);
    display: block;
    color: var(--ink60);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
  }
}

/* ---------- the legal notice */

.foot {
  margin-top: 24px;
  padding: 0 4px;
  color: var(--ink60);
  font-size: 13.5px;
  line-height: 1.5;
}

.foot h2 {
  margin-bottom: 4px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0;
}

.foot strong {
  color: var(--ink80);
  font-weight: 600;
}

.foot a {
  color: var(--ink80);
}

.foot .links {
  margin-top: 12px;
}

/* ---------- what only a preview shows */

.preview {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 8px 20px;
  background: var(--ink);
  color: var(--surface);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

mark.todo {
  padding: 0 3px;
  border-radius: 4px;
  background: #ffd60a;
  color: #111;
}

/* The terms tell people they can save or print them. */
@media print {
  body {
    background: #fff;
  }

  .tabs,
  .langs,
  .foot .links {
    display: none;
  }

  .card,
  .hero {
    padding: 0 0 12px;
    box-shadow: none;
    background: none;
  }
}
