/* oldstreets site. One stylesheet for every page.
   The look: cool grey paper, near-black type, one fountain-pen blue used rarely.
   IBM Plex Mono for everything, Caveat only for small handwritten touches.
   Fonts are self-hosted from ios/Resources/Fonts (subset to woff2). */

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("fonts/Caveat.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #dddddd; /* cool grey paper */
  --raised: #ececeb; /* raised surfaces */
  --ink: #0f0f0f;
  --muted: #595959; /* 5.2:1 on the page */
  --hairline: rgba(15, 15, 15, 0.14);
  --rule: rgba(15, 15, 15, 0.7);
  --blue: #1a03c2; /* the one accent, 8.4:1 on the page */
  --blue-pressed: #140296;
  --on-blue: #ffffff;
  --live: #a11d16;
  --bezel: #0f0f0f;

  --font: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --hand: "Caveat", "Bradley Hand", cursive;
  --measure: 64ch;
  --gutter: 20px;
  --r-small: 8px;
  --r-field: 12px;
  --r-button: 14px;
  --r-card: 18px;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---------- links and focus ---------- */

a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

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

.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 50;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-small);
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* ---------- page frame ---------- */

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main {
  flex: 1;
}

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding-top: 20px;
  padding-bottom: 8px;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.mark:hover {
  color: var(--ink);
}

.flower {
  display: block;
  flex: none;
  width: 22px;
  height: 27px;
  color: var(--blue);
}

.head-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0 18px;
  font-size: 14px;
}

.head-nav li + li {
  margin-top: 0;
}

.head-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.head-nav a:hover,
.head-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

/* ---------- type ---------- */

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

h1 {
  font-size: clamp(26px, 3.6vw + 12px, 40px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

h2 {
  font-size: 19px;
  margin-top: 48px;
}

h3 {
  font-size: 16px;
  margin-top: 28px;
}

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

ul,
ol {
  padding-left: 1.4em;
}

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

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

strong {
  font-weight: 700;
}

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

.small {
  font-size: 14px;
}

.hand {
  font-family: var(--hand);
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0;
  line-height: 1;
}

/* ---------- document pages (rules, privacy, safety, support, takedown) ---------- */

.doc {
  padding-top: 28px;
  padding-bottom: 72px;
}

.doc .updated {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.doc .intro {
  margin-top: 20px;
}

/* A full hairline box for the one thing on a page that must not be missed. */
.callout {
  margin-top: 32px;
  padding: 20px 22px;
  background: var(--raised);
  border: 1.5px solid var(--rule);
  border-radius: var(--r-card);
}

.callout h2 {
  margin-top: 0;
}

.callout p:first-of-type {
  margin-top: 10px;
}

.toc {
  margin-top: 24px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.toc li + li {
  margin-top: 0;
}

.toc a {
  display: inline-block;
  padding: 10px 0;
}

/* Data table on the privacy page. */
.data-table {
  margin-top: 16px;
}

/* Phones: each row becomes a small block so nothing is cut off. */
@media (max-width: 520px) {
  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .data-table,
  .data-table caption,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
  }

  .data-table caption {
    padding: 12px 14px 0;
  }

  .data-table tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--hairline);
  }

  .data-table tbody tr:last-child {
    border-bottom: 0;
  }

  .data-table th,
  .data-table td {
    padding: 0;
    border: 0;
  }

  .data-table tbody th {
    font-weight: 700;
  }

  .data-table td::before {
    content: attr(data-label) ": ";
    color: var(--muted);
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
  background: var(--raised);
  border-radius: var(--r-field);
  overflow: hidden;
}

caption {
  text-align: left;
  color: var(--muted);
  padding-bottom: 8px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
}

thead th {
  font-weight: 700;
  border-bottom: 1px solid var(--rule);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

tbody th {
  font-weight: 400;
}

/* Crisis lines on the safety page: rows, not cards. */
.lines {
  list-style: none;
  padding: 0;
  margin-top: 16px;
  border-top: 1px solid var(--hairline);
}

.lines li {
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}

.lines .what {
  display: block;
  font-weight: 700;
}

.lines .who {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--r-button);
  background: var(--blue);
  color: var(--on-blue);
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease-out, transform 180ms ease-out;
}

.button:hover {
  background: var(--blue-pressed);
  color: var(--on-blue);
}

.button:active {
  transform: scale(0.98);
}

.button:disabled,
.button[aria-disabled="true"] {
  background: var(--muted);
  cursor: progress;
}

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

.home-hero {
  padding-top: 40px;
  text-align: center;
}

.home-hero .big-flower {
  width: 56px;
  height: 67px;
  margin: 0 auto 28px;
}

.home-hero .lead {
  margin: 20px auto 0;
  max-width: 44ch;
}

/* "coming to the app store": a quiet status line, not a button. */
.status {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 10px;
  margin-top: 28px;
  padding: 10px 18px;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 14px;
}

.status strong {
  font-weight: 700;
}

.status span {
  color: var(--muted);
}

/* A plain phone frame around a real app screenshot. */
.phone {
  margin: 0 auto;
  width: min(280px, 78vw);
  padding: 9px;
  background: var(--bezel);
  border-radius: 46px;
  box-shadow: 0 1px 1px rgba(15, 15, 15, 0.06), 0 12px 32px rgba(15, 15, 15, 0.12);
}

.phone img {
  width: 100%;
  border-radius: 37px;
  background: var(--bg);
}

.phone-cap {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.home-hero figure {
  margin: 48px 0 0;
}

.home-section {
  padding-top: 72px;
}

.home-section > h2 {
  margin-top: 0;
}

.home-section .lede {
  margin-top: 10px;
  color: var(--muted);
}

/* Feature and safety lists: rows with hairlines. */
.rows {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
}

.rows li {
  margin: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}

.rows h3 {
  margin: 0;
  font-size: 16px;
}

.rows p {
  margin-top: 4px;
}

.rows.plain li {
  padding: 13px 0;
}

.how-grid figure {
  margin: 40px 0 0;
}

.more-links {
  margin-top: 20px;
}

.more-links a {
  display: inline-block;
  padding: 10px 0;
  margin-right: 18px;
}

/* The letter's last lines. */
.get {
  padding-bottom: 88px;
  text-align: center;
}

.get .lede {
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}

.get .cta {
  margin-top: 28px;
}

.get .fine {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.signoff {
  margin-top: 56px;
}

.signoff .hand {
  display: block;
  margin-top: 6px;
  font-size: 34px;
}

/* ---------- takedown form ---------- */

form {
  margin-top: 28px;
}

.field {
  margin-top: 22px;
}

.field:first-child {
  margin-top: 0;
}

label,
legend {
  display: block;
  font-weight: 700;
}

.hint {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

input[type="email"],
input[type="text"],
textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  min-height: 48px;
  background: var(--raised);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--r-field);
  font: inherit;
  font-size: 16px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input[type="email"]:hover,
input[type="text"]:hover,
textarea:hover {
  border-color: var(--ink);
}

input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--ink);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--live);
}

fieldset {
  margin: 22px 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 6px;
  padding: 10px 0;
  min-height: 44px;
  font-weight: 400;
  cursor: pointer;
}

fieldset legend + .choice {
  margin-top: 8px;
}

.choice input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.statement {
  margin-top: 24px;
  padding: 12px 16px;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-field);
}

.statement .choice {
  margin-top: 0;
}

.form-actions {
  margin-top: 28px;
}

.field-error {
  display: block;
  margin-top: 6px;
  color: var(--live);
  font-size: 14px;
}

.field-error:empty {
  display: none;
}

.result {
  margin-top: 28px;
}

.result:empty {
  display: none;
}

.result .box {
  padding: 20px 22px;
  background: var(--raised);
  border: 1.5px solid var(--rule);
  border-radius: var(--r-card);
}

.result .box p:first-child {
  margin-top: 0;
}

.result .id {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--hairline);
  padding-top: 20px;
  padding-bottom: 40px;
  color: var(--muted);
}

.site-foot ul,
.site-foot p {
  font-size: 14px;
}

.site-foot ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
}

.site-foot li + li {
  margin-top: 0;
}

.site-foot a {
  display: inline-block;
  padding: 11px 0;
  color: var(--ink);
}

.site-foot p {
  margin-top: 10px;
}

/* ---------- 404 ---------- */

.lost {
  padding-top: 56px;
  padding-bottom: 96px;
}

@media (min-width: 768px) {
  :root {
    --gutter: 40px;
  }

  body {
    font-size: 17px;
  }

  .site-head {
    padding-top: 28px;
  }

  .doc {
    padding-top: 40px;
  }

  .home-hero {
    padding-top: 72px;
  }

  .home-section {
    padding-top: 104px;
  }

  .phone {
    width: 300px;
  }
}

/* Wide screens: the feature list sits beside its screenshot. */
@media (min-width: 1024px) {
  .home-wide {
    max-width: calc(1040px + 2 * var(--gutter));
  }

  .how-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 72px;
    align-items: start;
  }

  .how-grid figure {
    position: sticky;
    top: 32px;
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

@media print {
  .site-head,
  .site-foot,
  .skip,
  .toc {
    display: none;
  }

  body {
    background: #fff;
  }
}
