/* Policies, support, and the in-development app pages, on the same paper as
   the rest of the site. The markup and policy text are unchanged; only the
   presentation moved here from the retired dark styles. */

/* ——— Shared page frame ——— */
.legal-main,
.wrap {
  width: min(1200px, calc(100% - 96px));
  margin-inline: auto;
}
.legal-main {
  padding-block: 40px 40px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  font-size: 14px;
  text-decoration: none;
}
.back-link:hover {
  color: var(--pen);
}
.eyebrow,
.legal-label,
.card-status,
.support-list > article > span {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
main a {
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
main a:hover {
  color: var(--pen);
}
.legal-main h2,
.wrap h2 {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.legal-main p,
.legal-main li,
.wrap p {
  max-width: 68ch;
}

/* ——— Document heads ——— */
.legal-hero {
  max-width: 880px;
  margin: 28px 0 48px;
}
.legal-hero h1 {
  margin: 14px 0 22px;
  font: 600 clamp(38px, 5.4vw, 72px) / 1.06 var(--display);
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.legal-hero p {
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.6;
}
.legal-hero .post-byline {
  font-size: 14px;
}

/* ——— Policies: a sticky contents list beside the text ——— */
.policy-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.policy-contents {
  position: sticky;
  top: 24px;
  font-size: 14px;
}
.policy-contents summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.policy-contents summary::-webkit-details-marker {
  display: none;
}
.policy-contents summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--motion-disclosure) var(--ease);
}
.policy-contents[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}
.policy-contents nav {
  display: grid;
}
.policy-contents nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding-block: 6px;
  border-bottom: 1px solid var(--line);
  line-height: 1.4;
  text-decoration: none;
}
.policy-contents nav a:hover {
  color: var(--pen);
}
.policy-body {
  min-width: 0;
  font-size: 17px;
  line-height: 1.7;
}
.policy-body h2,
.legal-note h2 {
  margin: 0 0 14px;
  font-size: 23px;
  line-height: 1.35;
  scroll-margin-top: 24px;
}
.policy-body h3 {
  margin: 22px 0 10px;
  font-size: 18px;
  font-weight: 600;
}
.policy-body p,
.policy-body ul,
.policy-body ol {
  margin: 0 0 16px;
}
.policy-body ul,
.policy-body ol {
  padding-left: 22px;
}
.policy-body li {
  margin-bottom: 8px;
}
.legal-note {
  margin-bottom: 40px;
  padding: 24px 28px;
  border-left: 3px solid var(--pen);
  background: var(--porcelain);
}
.legal-note p:last-child {
  margin-bottom: 0;
}
.policy-grid,
.support-list {
  display: grid;
  gap: 0;
}
.policy-grid > article,
.support-list > article {
  padding-block: 28px;
  border-top: 1px solid var(--line);
}
.policy-grid > article:first-child,
.support-list > article:first-child {
  padding-top: 0;
  border-top: 0;
}
.support-list > article > span {
  margin-bottom: 8px;
}

/* ——— Support and privacy overview: one row per app ——— */
.legal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 40px;
  border-top: 1px solid var(--line);
}
.legal-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  align-content: start;
  gap: 10px;
  padding-block: 30px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.legal-card h2 {
  font-size: 24px;
}
.legal-card p {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
}
.support-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
}
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
  font-size: 14px;
}
.card-links a,
.detail-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.button-link,
.button,
.waitlist-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 3px;
  background: var(--ink);
  color: var(--porcelain);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.button-link,
.waitlist-submit,
.gallery-controls button {
  transition-property: color, background-color, border-color, transform;
  transition-duration: var(--motion-feedback);
  transition-timing-function: var(--ease);
}
.button-link:hover:not([aria-disabled="true"]),
.button:hover:not(:disabled):not([aria-disabled="true"]),
.waitlist-submit:hover:not(:disabled):not([aria-disabled="true"]) {
  color: var(--porcelain);
  background: var(--pen);
}
@media (prefers-reduced-motion: no-preference) {
  .button-link:active:not([aria-disabled="true"]),
  .waitlist-submit:active:not(:disabled):not([aria-disabled="true"]),
  .gallery-controls button:active:not(:disabled):not([aria-disabled="true"]) {
    transform: scale(var(--press-scale));
    transition-duration: var(--motion-feedback), var(--motion-feedback),
      var(--motion-feedback), var(--motion-press);
  }
}
.legal-hero .button-link {
  margin-top: 26px;
}
.support-faq {
  max-width: 820px;
  margin-top: 72px;
}
.support-faq h2 {
  margin: 8px 0 18px;
  font-size: 28px;
}
.support-faq details {
  border-top: 1px solid var(--line);
}
.support-faq details:last-of-type {
  border-bottom: 1px solid var(--line);
}
.support-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.support-faq summary::-webkit-details-marker {
  display: none;
}
.support-faq summary::after {
  content: "+";
  color: var(--pen);
  font-size: 22px;
  font-weight: 400;
}
.support-faq details[open] summary::after {
  content: "−";
}
.support-faq details p {
  padding-bottom: 20px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}

/* ——— The one guide that predates the reading pages ——— */
.post-body {
  max-width: 760px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 18px;
  line-height: 1.75;
}
.post-body h2 {
  margin: 44px 0 16px;
  font: 500 clamp(23px, 3vw, 30px) / 1.3 var(--display);
  letter-spacing: -0.035em;
}
.post-body p,
.post-body ul {
  margin: 0 0 20px;
}
.post-body code {
  font-family: var(--sans);
  background: var(--pen-wash);
  padding: 3px 7px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
.post-table {
  margin: 0 0 28px;
  overflow-x: auto;
  border-block: 1px solid var(--line);
}
.post-table table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.post-table th,
.post-table td {
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.post-table th {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
}
.post-table tr:last-child td {
  border-bottom: 0;
}

/* ——— In-development app pages ——— */
.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: center;
  padding-block: 32px 72px;
}
.detail-hero h1 {
  margin: 14px 0 10px;
  font: 600 clamp(56px, 8vw, 104px) / 1 var(--display);
  letter-spacing: -0.06em;
}
.detail-headline {
  margin-bottom: 18px;
  font: 500 clamp(24px, 2.6vw, 34px) / 1.2 var(--display);
  letter-spacing: -0.04em;
}
.detail-headline br {
  display: none;
}
.detail-description {
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.6;
}
.detail-note,
.gallery-note {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 13px;
}
.detail-visual {
  display: grid;
  place-items: center;
  padding: 76px 24px 52px;
  background: var(--porcelain);
  border: 1px solid var(--line);
  box-shadow: 6px 8px 0 -2px var(--chip), 6px 8px 0 -1px var(--line);
  border-radius: 2px;
  background-image: radial-gradient(#24251f1c 0.6px, transparent 0.8px);
  background-size: 19px 19px;
}
/* The hero phone uses the shared pencil-to-screen reveal (sketch.css). */
.detail-visual .chapter-phone {
  width: min(270px, 62%);
}
.detail-visual .chapter-note {
  bottom: calc(100% + 10px);
  right: -22%;
}
.screen-gallery img {
  width: 100%;
  height: auto;
  border: 5px solid #20211d;
  border-radius: 30px;
  background: #20211d;
  box-shadow: 4px 14px 22px -8px #24251f40;
}
.detail-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-block: 36px 64px;
  border-top: 1px solid var(--line);
}
.detail-features h2 {
  margin: 10px 0 10px;
  font-size: 22px;
  line-height: 1.3;
}
.detail-features p {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
}
.gallery-section {
  position: relative;
  padding-block: 40px 56px;
  border-top: 1px solid var(--line);
}
.gallery-section > h2,
.detail-close h2 {
  margin-top: 8px;
  font: 600 clamp(28px, 3.4vw, 44px) / 1.1 var(--display);
  letter-spacing: -0.05em;
}
.gallery-controls {
  position: absolute;
  top: 44px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gallery-controls[hidden] {
  display: none;
}
.gallery-controls span {
  display: none;
}
.gallery-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--porcelain);
  font-size: 17px;
  cursor: pointer;
}
.gallery-controls button:hover:not(:disabled):not([aria-disabled="true"]) {
  color: var(--pen);
  border-color: var(--pen);
}
.gallery-controls button:disabled {
  opacity: 0.35;
  cursor: default;
}
.screen-gallery {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  margin-top: 32px;
  padding: 4px 4px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-soft) transparent;
}
.screen-gallery figure {
  flex: 0 0 min(30%, 280px);
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
}
.screen-gallery figcaption {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}
.detail-close {
  padding-block: 40px 24px;
  border-top: 1px solid var(--line);
}
.detail-close > p {
  margin: 14px 0 24px;
  color: var(--ink-soft);
  font-size: 18px;
}
.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
  margin-top: 18px;
  font-size: 15px;
}

/* ——— Waitlist: one email row ——— */
.waitlist {
  display: grid;
  gap: 8px;
  width: min(100%, 26rem);
  margin-top: 28px;
}
.waitlist label {
  font-weight: 500;
  font-size: 15px;
}
.waitlist-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.waitlist-row > .waitlist-submit {
  flex: 0 0 auto;
}
.waitlist-row[hidden] { display: none; }
.waitlist-row input {
  flex: 1 1 11rem;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--porcelain);
  font-size: 16px;
}
.waitlist-submit:disabled {
  opacity: 0.6;
  cursor: progress;
}
.waitlist-status:empty {
  display: none;
}
.waitlist-status {
  color: var(--ink-soft);
  font-size: 14px;
}
.waitlist[data-state="invalid"] .waitlist-status,
.waitlist[data-state="error"] .waitlist-status {
  color: var(--error);
}
.waitlist[data-state="invalid"] input {
  border-color: var(--error);
}
.waitlist[data-state="success"] .waitlist-status {
  color: var(--ink);
}
.waitlist-privacy {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  font-size: 13px;
}

@media (max-width: 1000px) {
  .legal-main,
  .wrap {
    width: calc(100% - 64px);
  }
  .legal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .policy-layout {
    gap: 40px;
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .detail-hero {
    gap: 40px;
  }
}
@media (max-width: 760px) {
  .legal-main,
  .wrap {
    width: calc(100% - 40px);
  }
  .legal-main {
    padding-block: 20px 20px;
  }
  .legal-hero {
    margin: 16px 0 32px;
  }
  .legal-hero p {
    font-size: 17px;
  }
  .legal-grid {
    grid-template-columns: 1fr;
  }
  .policy-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 16px;
  }
  .policy-contents {
    position: static;
    border-bottom: 1px solid var(--line);
  }
  .policy-body {
    font-size: 16px;
  }
  .legal-note {
    padding: 18px 20px;
  }
  .detail-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-block: 16px 48px;
  }
  .detail-visual {
    padding: 64px 16px 36px;
  }
  .detail-visual .chapter-phone {
    width: min(220px, 60%);
  }
  .detail-visual .chapter-note {
    right: -12%;
  }
  .detail-features {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 44px;
  }
  .gallery-section {
    padding-block: 32px 40px;
  }
  .gallery-controls {
    top: 34px;
  }
  .screen-gallery {
    gap: 16px;
  }
  .screen-gallery figure {
    flex-basis: 64%;
  }
  .screen-gallery img {
    border-width: 4px;
    border-radius: 22px;
  }
  .post-body {
    font-size: 17px;
  }
}
