/* Isle of Maybe website (SHIP-9). The game's two materials: lagoon water for the frame, sun-bleached
   paper and ink for what you read. Fonts are bundled; nothing loads from anywhere else. */

@font-face {
  font-family: 'Fraunces';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/fraunces-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-weight: 900;
  font-display: swap;
  src: url('fonts/fraunces-900.woff2') format('woff2');
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/bricolage-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/bricolage-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-weight: 800;
  font-display: swap;
  src: url('fonts/bricolage-800.woff2') format('woff2');
}

:root {
  --paper: #fff4dc;
  --paper-2: #f3e1b8;
  --ink: #2b1d12;
  --ink-soft: #6a513a;
  --hibiscus: #b8233f;
  --palm: #1e5b3a;
  --lagoon: #0a6468;
  --lagoon-2: #08575c;
  --lagoon-3: #06474b;
  --foam: #fff7e8;
  --seafoam: #c8eee7;
  --sun: #ffcf6b;
  --mango: #ffb21e;
  --shallows: #4cc3b9;
  --sand: #f2d99b;
  --display: 'Fraunces', Georgia, serif;
  --body: 'Bricolage Grotesque', system-ui, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--lagoon);
  color: var(--foam);
  font: 400 1.0625rem/1.6 var(--body);
}
img,
video,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
  border-radius: 4px;
}
.paper :focus-visible {
  outline-color: var(--hibiscus);
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
h2 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
}
h3 {
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
p {
  margin: 0;
  text-wrap: pretty;
}
.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--mango);
  color: var(--ink);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  z-index: 10;
}
.skip:focus {
  left: 0.5rem;
}

/* Buttons: one mango action per view, everything else quiet. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  background: var(--mango);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 3px 0 #c98400;
  transition: transform 120ms ease-out;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #c98400;
}
.btn-quiet {
  font-weight: 600;
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
}
.top .brand img {
  height: 2.4rem;
  width: auto;
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.4vw, 1.75rem);
  font-weight: 600;
  font-size: 0.98rem;
}
.nav a:not(.btn) {
  text-decoration: none;
  color: var(--seafoam);
  padding-block: 0.6rem;
}
.nav a:not(.btn):hover,
.nav a[aria-current='page'] {
  color: var(--foam);
  text-decoration: underline;
}
.nav .btn {
  min-height: 2.6rem;
  padding: 0.5rem 1.1rem;
}
@media (max-width: 40rem) {
  .nav .hide-sm {
    display: none;
  }
}
.nav a {
  white-space: nowrap;
}
@media (max-width: 30rem) {
  .nav .hide-xs {
    display: none;
  }
  .top .brand img {
    height: 2rem;
  }
}

/* Hero: the promise on the left, today's real island on the right. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 7vw, 6rem) clamp(3.5rem, 8vw, 7rem);
}
.hero h1 {
  font-size: clamp(3rem, 8.4vw, 6.4rem);
  color: var(--foam);
}
.hero .lede {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--seafoam);
}
.hero .actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.6rem;
}
.hero .actions .btn-quiet {
  color: var(--foam);
}
@media (max-width: 52rem) {
  .hero {
    grid-template-columns: 1fr;
  }
}

/* Today's chart: parchment, tilted like a map laid on a table. */
.chart {
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  padding: 1.1rem 1.1rem 1rem;
  transform: rotate(-2deg);
  box-shadow:
    0 1px 0 var(--paper-2),
    0 24px 50px -18px rgb(0 0 0 / 0.55);
  max-width: 26rem;
  justify-self: center;
  width: 100%;
}
.chart svg {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0 9px,
      rgb(140 197 188 / 0.35) 9px 10px
    ),
    #e9f5f0;
  border: 1.5px solid var(--ink-soft);
  border-radius: 3px;
}
.chart .coast {
  fill: var(--sand);
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linejoin: round;
}
.chart .ring {
  fill: none;
  stroke: var(--shallows);
  stroke-width: 12;
  stroke-linejoin: round;
  opacity: 0.55;
}
.chart .dock {
  fill: var(--hibiscus);
}
.chart figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-top: 0.8rem;
  font-size: 0.95rem;
}
.chart figcaption strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
}
.chart [data-when] {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.chart .note {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
/* The one orchestrated moment: the coastline inks itself in when the page opens. */
@media (prefers-reduced-motion: no-preference) {
  [data-today][data-ready='true'] .coast {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    animation: ink 2.4s ease-out 0.2s forwards;
  }
  [data-today][data-ready='true'] .ring {
    opacity: 0;
    animation: wash 1s ease-out 1.8s forwards;
  }
}
@keyframes ink {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes wash {
  to {
    opacity: 0.55;
  }
}

/* Paper sections: everything you read sits on paper, like the game's cards. */
.paper {
  background: var(--paper);
  color: var(--ink);
}
.paper a {
  color: var(--ink);
}
/* The torn top of a sheet of paper laid on the lagoon. */
.edge {
  height: 18px;
  margin-top: -1px;
  background: var(--lagoon) url('img/edge.svg') center bottom / 100% 100%
    no-repeat;
}
.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.section-head {
  max-width: 40rem;
}
.section-head p {
  margin-top: 1rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
}
.lagoon .section-head p {
  color: var(--seafoam);
}

/* The day, in order: a real sequence, so it is numbered. */
.day {
  list-style: none;
  padding: 0;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.6vw, 2.25rem);
  counter-reset: step;
}
.day li {
  counter-increment: step;
  display: flex;
  flex-direction: column;
}
.day li::before {
  content: counter(step);
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--hibiscus);
  margin-bottom: 0.6rem;
}
.day h3 {
  margin-bottom: 0.45rem;
}
.day p {
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}
.day .phone {
  margin-top: auto;
  border-radius: 22px;
  border: 6px solid var(--ink);
  overflow: hidden;
  background: var(--lagoon);
  aspect-ratio: 276 / 568;
}
.day .phone video,
.day .phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 60rem) {
  .day {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 30rem) {
  .day {
    grid-template-columns: 1fr;
  }
  .day .phone {
    max-width: 17rem;
  }
}

/* The find: one wide clip of the real game. */
.find {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.find .clip {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.7);
  aspect-ratio: 3 / 2;
  background: var(--lagoon-3);
}
.find .clip video,
.find .clip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.find p {
  margin-top: 1rem;
  color: var(--seafoam);
  font-size: 1.1rem;
}
@media (max-width: 52rem) {
  .find {
    grid-template-columns: 1fr;
  }
}

/* Six biomes. */
.biomes {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.biomes figure {
  margin: 0;
}
.biomes img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
}
.biomes figcaption {
  margin-top: 0.55rem;
  font-size: 0.98rem;
  color: var(--seafoam);
}
.biomes figcaption b {
  color: var(--foam);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-right: 0.35rem;
}
@media (max-width: 48rem) {
  .biomes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Fair by design: three plain statements, not cards. */
.facts {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}
.facts h3 {
  margin-bottom: 0.5rem;
}
.facts p {
  color: var(--ink-soft);
}
@media (max-width: 48rem) {
  .facts {
    grid-template-columns: 1fr;
  }
}
.closer {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper-2);
}
.closer p {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 30rem;
}

/* Long-form pages: How to play, Press, Privacy, Terms. */
.doc {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem);
}
.doc .wrap {
  max-width: 46rem;
}
.doc h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin-bottom: 1.25rem;
}
.doc h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 2.8rem 0 0.9rem;
}
.doc h3 {
  margin: 1.8rem 0 0.5rem;
}
.doc p,
.doc ul,
.doc ol,
.doc table {
  margin: 0 0 1rem;
}
.doc ul,
.doc ol {
  padding-left: 1.35rem;
}
.doc li {
  margin-bottom: 0.45rem;
}
.doc li::marker {
  color: var(--hibiscus);
  font-weight: 800;
}
.doc .lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
}
.table {
  overflow-x: auto;
  margin: 0 0 1.2rem;
  border: 1.5px solid var(--paper-2);
  border-radius: 8px;
}
.doc table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  margin: 0;
}
.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--paper-2);
}
.doc th {
  background: var(--paper-2);
  font-weight: 800;
}
.doc tr:last-child td {
  border-bottom: 0;
}
.doc code,
.doc kbd {
  font:
    600 0.88em/1 ui-monospace,
    monospace;
  background: var(--paper-2);
  border-radius: 4px;
  padding: 0.12em 0.35em;
}
.doc kbd {
  border: 1px solid #d8c08e;
  border-bottom-width: 2px;
}
.press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}
.press-grid a {
  display: block;
  text-decoration: none;
  border: 1.5px solid var(--paper-2);
  border-radius: 10px;
  padding: 0.9rem;
  background: #fffaf0;
}
.press-grid a:hover {
  border-color: var(--ink-soft);
}
.press-grid img {
  height: 6rem;
  width: 100%;
  object-fit: contain;
  margin-bottom: 0.7rem;
}
.press-grid .dark img {
  background: var(--lagoon);
  border-radius: 6px;
}
.press-grid span {
  display: block;
  font-weight: 800;
}
.press-grid small {
  color: var(--ink-soft);
}

/* Footer */
.foot {
  background: var(--lagoon-3);
  color: var(--seafoam);
  padding-block: 2.5rem 3rem;
  font-size: 0.95rem;
}
.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.foot img {
  height: 2rem;
  width: auto;
  margin-bottom: 0.8rem;
}
.foot p {
  max-width: 26rem;
}
.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 0.35rem 2rem;
  align-content: start;
}
.foot a {
  color: var(--foam);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
.after-find {
  margin-top: clamp(4rem, 9vw, 7rem);
}

/* Privacy and Terms (SHIP-9.3, SHIP-9.5): the policy words laid out as components. */

/* A thin bar that fills as you read, where the browser supports scroll-driven animation. */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--mango);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 30;
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progress {
      animation: read-progress linear both;
      animation-timeline: scroll(root block);
    }
  }
}
@keyframes read-progress {
  to {
    transform: scaleX(1);
  }
}

/* Header */
.doc-hero {
  background: var(--lagoon);
  color: var(--foam);
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(1.8rem, 4vw, 2.6rem);
}
.eyebrow {
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sun);
  margin-bottom: 0.9rem;
}
.doc-hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  max-width: 22ch;
}
.doc-lede {
  margin-top: 1rem;
  max-width: 40rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--seafoam);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  background: rgba(255, 247, 232, 0.14);
  border: 1px solid rgba(255, 247, 232, 0.28);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Layout */
.doc.legal {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
}
.doc-grid {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
  display: grid;
  gap: 1.5rem 3.5rem;
  grid-template-columns: minmax(0, 1fr);
}
.doc-body {
  max-width: 46rem;
  min-width: 0;
}
.doc.legal h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: clamp(1.45rem, 3vw, 1.95rem);
}
.h-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: var(--paper-2);
  color: var(--lagoon);
}
.h-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}
.num {
  color: var(--ink-soft);
  font-weight: 700;
  margin-right: 0.3rem;
}
.doc-body > section {
  scroll-margin-top: 1.5rem;
}
.doc-body > section > h2 + * {
  margin-top: 1.1rem;
}
.doc-body > section + section {
  margin-top: 2.6rem;
  padding-top: 2.4rem;
  border-top: 1.5px solid var(--paper-2);
}
.doc-body > section.tldr + section,
.doc-body > section.tldr {
  border-top: 0;
}
.doc-body > section.tldr + section {
  padding-top: 0;
}

/* On this page: a swipeable row on a phone, a sticky list that follows you on a wide screen. */
.toc-title {
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0 0 0.4rem;
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
}
.toc li {
  flex: none;
}
.toc a {
  display: block;
  white-space: nowrap;
  border: 1.5px solid var(--paper-2);
  background: var(--foam);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.toc a:hover,
.toc a[aria-current='true'] {
  border-color: var(--lagoon);
  color: var(--lagoon);
}
@media (min-width: 62rem) {
  .doc-grid {
    grid-template-columns: 14rem minmax(0, 1fr);
    align-items: start;
  }
  .toc {
    position: sticky;
    top: 1.5rem;
  }
  .toc ol {
    display: block;
    overflow: visible;
    padding: 0;
    border-left: 2px solid var(--paper-2);
  }
  .toc li {
    margin: 0;
  }
  .toc a {
    white-space: normal;
    border: 0;
    background: none;
    border-radius: 0;
    padding: 0.35rem 0 0.35rem 0.9rem;
    margin-left: -2px;
    border-left: 2px solid transparent;
    font-size: 0.92rem;
    color: var(--ink-soft);
  }
  .toc a:hover,
  .toc a[aria-current='true'] {
    border-left-color: var(--lagoon);
    color: var(--lagoon);
  }
  .toc a[aria-current='true'] {
    font-weight: 800;
  }
}

/* At a glance */
.stats {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}
@media (min-width: 44rem) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.stats li {
  background: var(--lagoon);
  color: var(--foam);
  border-radius: 14px;
  padding: 0.95rem 1rem 1rem;
}
.stats b {
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--sun);
}
.stats span {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.84rem;
  line-height: 1.3;
  color: var(--seafoam);
}

/* The App, Developer and Contact lines */
.facts {
  display: grid;
  gap: 0.9rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin: 0 0 2rem;
  padding: 1.25rem 1.4rem;
  background: var(--foam);
  border: 1.5px solid var(--paper-2);
  border-left: 5px solid var(--lagoon);
  border-radius: 10px;
}
.facts dt {
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.facts dd {
  margin: 0.2rem 0 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

/* The short version: tiles */
.doc-body > section.tldr {
  background: #e4f3ee;
  border: 2px solid var(--lagoon);
  border-radius: 16px;
  padding: 1.4rem 1.4rem 1.5rem;
  margin-bottom: 2.6rem;
}
.doc-body > section.tldr h2 {
  color: var(--lagoon-3);
}
.doc-body > section.tldr .h-icon {
  background: var(--lagoon);
  color: var(--foam);
}
.doc.legal .tiles {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 40rem) {
  .doc.legal .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .doc.legal .tiles li:first-child {
    grid-column: 1 / -1;
  }
}
.doc.legal .tiles li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.95rem 1rem;
  background: var(--foam);
  border: 1.5px solid rgba(10, 100, 104, 0.25);
  border-radius: 12px;
}
.tile-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--lagoon);
}
.tile-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}
.doc.legal .tiles p {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.5;
}

/* Contact */
.doc-body > section.contact {
  background: var(--sand);
  border-radius: 16px;
  padding: 1.4rem 1.5rem 0.7rem;
  border-top: 0;
}
.to-top {
  margin-top: 2.5rem;
  font-weight: 600;
}

/* Tables and their pills */
.doc.legal .table {
  border: 1.5px solid var(--paper-2);
  border-radius: 12px;
  overflow: hidden;
}
.doc.legal table {
  font-size: 0.93rem;
}
.doc.legal th {
  background: var(--lagoon);
  color: var(--foam);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.doc.legal tbody tr:nth-child(even) {
  background: rgba(242, 225, 184, 0.3);
}
.doc.legal td:first-child {
  font-weight: 700;
}
.pill {
  display: inline-block;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.5;
  white-space: nowrap;
}
.pill-note {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.84rem;
  color: var(--ink-soft);
}
.pill-note:empty {
  display: none;
}
.k-live {
  background: #d6efdc;
  color: var(--palm);
}
.k-short,
.w-private {
  background: #d3ece8;
  color: var(--lagoon-3);
}
.k-mid,
.w-public {
  background: #fbe9bd;
  color: #6b4700;
}
.k-long {
  background: #f4d6d0;
  color: #85281c;
}

/* Wide tables become labelled cards on a phone, so nothing scrolls sideways. */
@media (max-width: 40rem) {
  .doc.legal .table {
    border: 0;
    overflow: visible;
  }
  .doc.legal table,
  .doc.legal tbody,
  .doc.legal tr,
  .doc.legal td {
    display: block;
  }
  .doc.legal thead {
    position: absolute;
    left: -9999px;
  }
  .doc.legal tr,
  .doc.legal tbody tr:nth-child(even) {
    margin-bottom: 0.9rem;
    border: 1.5px solid var(--paper-2);
    border-radius: 10px;
    background: var(--foam);
    overflow: hidden;
  }
  .doc.legal td {
    border-bottom: 1px solid var(--paper-2);
    padding: 0.55rem 0.9rem;
  }
  .doc.legal td:last-child {
    border-bottom: 0;
  }
  .doc.legal td:first-child {
    background: var(--paper-2);
  }
  .doc.legal td::before {
    content: attr(data-label);
    display: block;
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 0.15rem;
  }
  .doc.legal td:first-child::before {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media print {
  .top,
  .foot,
  .toc,
  .skip,
  .to-top,
  .progress,
  .edge {
    display: none;
  }
  .doc-hero {
    background: none;
    color: var(--ink);
    padding-block: 0 1rem;
  }
  .doc-hero .eyebrow,
  .doc-lede {
    color: var(--ink-soft);
  }
  .chips li {
    background: none;
    border-color: var(--ink-soft);
  }
  .stats li {
    background: none;
    color: var(--ink);
    border: 1.5px solid var(--ink-soft);
  }
  .stats b {
    color: var(--ink);
  }
  .stats span {
    color: var(--ink-soft);
  }
  .doc-body > section.tldr,
  .doc-body > section.contact {
    background: none;
    border: 1.5px solid var(--ink-soft);
  }
  .doc-grid {
    display: block;
  }
}
