/*
 * Styles for the Terms and Privacy Policy site. `just legal-site`
 * publishes this file as /style.css.
 *
 * Colours come from the app's Welcome screen: navy #0F3B68, yellow
 * #F3D35E, and the light blue #C9D6E6/#9FB2C8 it uses for secondary text.
 */

@font-face {
  font-family: "Grandstander";
  src: url("/fonts/Grandstander-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --navy: #0f3b68;
  --yellow: #f3d35e;
  --page: #ffffff;
  --hero: #f1f5fa;
  --line: #dce5ef;
  --text: #1b2836;
  --heading: #0f2236;
  --muted: #536477;
  --link: var(--navy);
  --wordmark: var(--navy);
  --notice: #fdf6d8;
  --badge: #fbefc0;
  --badge-text: #5c4600;
  --shadow:
    0 1px 2px rgb(15 59 104 / 0.06), 0 6px 16px rgb(15 59 104 / 0.08),
    0 24px 48px rgb(15 59 104 / 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0b1e33;
    --hero: #0f2a47;
    --line: #1f3b5c;
    --text: #dfe7f0;
    --heading: #ffffff;
    --muted: #9fb2c8;
    --link: var(--yellow);
    --wordmark: #ffffff;
    --notice: #3a3214;
    --badge: #3a3214;
    --badge-text: var(--yellow);
    --shadow:
      0 1px 2px rgb(0 0 0 / 0.3), 0 6px 16px rgb(0 0 0 / 0.3),
      0 24px 48px rgb(0 0 0 / 0.35);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font:
    16px/1.65 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    sans-serif;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 2px;
}

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
}

.brand img {
  border-radius: 9px;
  box-shadow: 0 2px 6px rgb(15 59 104 / 0.25);
}

.wordmark {
  font-family: "Grandstander", -apple-system, sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.01em;
  color: var(--wordmark);
}

nav {
  display: flex;
  gap: 24px;
  font-size: 15px;
  font-weight: 500;
}

nav a {
  color: var(--text);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

nav a:hover,
nav a[aria-current="page"] {
  border-bottom-color: var(--yellow);
}

/* Hero */

.hero {
  background: var(--hero);
  border-bottom: 1px solid var(--line);
  padding: 40px 0 36px;
}

.back {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

h1 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Content */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 80px;
  padding-top: 40px;
  padding-bottom: 72px;
}

main {
  max-width: 42rem;
  overflow-wrap: break-word;
}

main > :first-child {
  margin-top: 0;
}

h2 {
  margin: 2.25rem 0 0.5rem;
  color: var(--heading);
  font-size: 18px;
  line-height: 1.35;
  scroll-margin-top: 24px;
}

h3 {
  margin: 1.5rem 0 0.25rem;
  color: var(--heading);
  font-size: 16px;
  line-height: 1.4;
}

main p,
main li {
  margin: 0.5rem 0;
}

main ul,
main ol {
  padding-left: 1.4rem;
}

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

strong {
  color: var(--heading);
}

.notice {
  margin-bottom: 1.5rem;
  padding: 14px 18px;
  border-left: 4px solid var(--yellow);
  border-radius: 8px;
  background: var(--notice);
}

/* The app icon, set on its own navy like the app's Welcome screen. */
.art {
  position: sticky;
  top: 32px;
  align-self: start;
}

.art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

/* The home page's list of documents */

.link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-list li {
  margin: 0 0 1rem;
}

.link-list a {
  font-size: 18px;
  font-weight: 600;
}

.detail {
  display: block;
  color: var(--muted);
  font-size: 15px;
}

/* The past-versions page's list for each document */

main > section:first-child h2 {
  margin-top: 0;
}

.versions {
  margin: 0;
  padding: 0;
  list-style: none;
}

.versions li {
  margin: 0 0 0.5rem;
}

.badge {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--badge);
  color: var(--badge-text);
  font-size: 12px;
  font-weight: 600;
  vertical-align: 1px;
}

/* Narrower screens: drop the illustration, then tighten everything. */

@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .art {
    display: none;
  }
}

/* The header row can't hold the logo and links side by side, and the
   links wrap rather than scroll so none is hidden off the edge. */
@media (max-width: 600px) {
  nav {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    gap: 4px 20px;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    padding: 28px 0 24px;
  }

  h1 {
    font-size: 28px;
  }

  .layout {
    padding-top: 28px;
    padding-bottom: 48px;
  }
}
