/* ═══════════════════════════════════════════════════════════════════
   PlateDiary — the hand-written pages' extras, loaded after css/pages.css:
   /ai, /restaurant-journal, /whats-new, /contact, /privacy, /thanks, the
   404 and the invite page (/i/). Everything shared (tokens, type, header,
   courses, cards, FAQ, footer) is pages.css; this file holds only what
   those pages have and generated pages don't. Flat fills, no outlines,
   springs only.

   On these pages <main> is also the wrap (`pd-main pd-wrap`), so every
   course stays `main > section[id]` — analytics.js's section_view reads
   exactly that.
   ═══════════════════════════════════════════════════════════════════ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.i--sm {
  width: 16px;
  height: 16px;
}

button.pill {
  border: 0;
  cursor: pointer;
}

.pd-note .i {
  display: inline-block;
  margin-right: 6px;
  vertical-align: -3px;
  color: var(--accent-text);
}

/* a card that is not a link: no lift on hover */
.pd-card--still:hover {
  rotate: var(--tilt, 0deg);
  translate: none;
  box-shadow: var(--shadow-float);
}

.pd-sec__main > .pd-pile {
  margin-top: 26px;
}

/* ── /ai: what leaves your phone, feature by feature ── */

.leaves {
  display: grid;
  gap: 8px;
  max-width: 760px;
  font-size: 15px;
}

.leaves__row {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 4px 18px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--sheet);
  color: var(--ink-muted);
}

.leaves__row b {
  font: 500 17px/1.3 var(--font-display);
  color: var(--ink);
}

.leaves__row--head {
  padding-block: 0 2px;
  background: none;
  font: 600 12px/1.3 var(--font-ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pd-sec__main > .leaves__never {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 16px;
  font-weight: 600;
}

/* ── /whats-new: release notes, each version a course ── */

.pd-sec__no--version {
  font-size: 22px;
}

.pd-notes {
  display: grid;
  gap: 10px;
  max-width: 46em;
  padding: 0;
  list-style: none;
}

.pd-notes li {
  padding: 16px 20px;
  border-radius: 18px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
  color: var(--ink-muted);
}

.pd-notes b {
  display: block;
  margin-bottom: 2px;
  font: 500 19px/1.3 var(--font-display);
  color: var(--ink);
}

/* the tier: Free, Premium, Members */
.pd-notes em {
  display: inline-block;
  margin-left: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: 600 12px/1.2 var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.pd-notes a {
  font-weight: 600;
}

/* ── a short page: thanks, the 404 ── */

.pd-hero--short {
  min-height: 42vh;
  align-content: center;
}

/* ── /privacy: the policy on a sheet, its contents beside it ── */

.pd-promises {
  display: grid;
  gap: 12px;
  max-width: 44em;
  padding: 8px 0 0;
  list-style: none;
}

.pd-promises li {
  display: grid;
  grid-template-columns: 4.6em minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  font: 500 clamp(18px, 2vw, 22px)/1.38 var(--font-display);
}

.pd-promises li > span:first-child {
  font: 400 21px/1 var(--font-hand);
  opacity: 0.85;
}

.pd-legal {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin-top: 40px;
}

.pd-legal__toc {
  position: sticky;
  top: 96px;
  font-size: 15px;
}

.pd-legal__toc p {
  font: 400 19px/1.2 var(--font-hand);
  color: var(--accent-text);
}

.pd-legal__toc ol {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  padding: 0;
  list-style: none;
}

.pd-legal__toc a {
  display: block;
  padding: 6px 12px;
  border-radius: 10px;
  color: var(--ink-muted);
  text-decoration: none;
}

.pd-legal__toc a:hover {
  background: var(--sunken);
  color: var(--ink);
}

.pd-legal__body {
  min-width: 0;
  padding: clamp(22px, 4vw, 52px);
  border-radius: 28px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
}

.pd-legal__body > section + section {
  margin-top: 48px;
}

.pd-legal__body h2 {
  margin: 4px 0 14px;
  font: 500 clamp(24px, 2.6vw, 32px)/1.15 var(--font-display);
  letter-spacing: -0.01em;
}

.pd-legal__body h3 {
  margin: 26px 0 6px;
  font: 500 19px/1.3 var(--font-display);
}

.pd-legal__body :is(p, li) {
  max-width: 44em;
  color: var(--ink-muted);
}

.pd-legal__body p + p,
.pd-legal__body :is(p, h3) + ul {
  margin-top: 12px;
}

.pd-legal__body ul {
  display: grid;
  gap: 8px;
  padding-left: 1.2em;
}

.pd-legal__body li::marker {
  color: var(--accent-text);
}

.pd-legal__body strong {
  color: var(--ink);
}

/* ── /contact: the form on a sheet, a note beside it ── */

.pd-contact {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 8px;
}

.pd-contact__card {
  padding: clamp(22px, 4vw, 40px);
  border-radius: 28px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
}

.pd-contact__card > p {
  margin-top: 4px;
  color: var(--ink-muted);
}

.pd-contact .pd-h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.contact-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.contact-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-form__field {
  display: grid;
  gap: 6px;
}

.contact-form label {
  font: 600 15px/1.3 var(--font-ui);
}

.contact-form__optional {
  font-weight: 400;
  color: var(--ink-muted);
}

/* 16px text so iOS never zooms the page on focus */
.contact-form :is(input, select, textarea) {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 0;
  border-radius: 14px;
  background: var(--sunken);
  color: var(--ink);
  font: 400 16px/1.4 var(--font-ui);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-form ::placeholder {
  color: var(--ink-faint);
}

.contact-form button {
  justify-self: start;
}

.contact-form__small {
  font-size: 14px;
  color: var(--ink-muted);
}

.pd-contact__aside {
  padding: clamp(22px, 3vw, 32px);
  border-radius: 28px;
  background: var(--accent-soft);
}

.pd-contact__aside h2 {
  font: 500 24px/1.2 var(--font-display);
}

.pd-contact__aside p {
  margin: 8px 0 18px;
  color: var(--ink-muted);
}

.pd-contact__aside .pd-contact__flourish {
  margin: 22px 0 0;
  font: 400 21px/1.2 var(--font-hand);
  color: var(--accent-text);
  rotate: -2deg;
}

/* ── /i/: the invite. A focused page: no site nav, one job ── */

.invite-code-panel {
  display: grid;
  justify-items: start;
  gap: 14px;
  max-width: 640px;
  margin: 8px 0 24px;
}

.invite-code-panel[hidden] {
  display: none;
}

/* the code rides on the "In short" ticket */
.invite-code-panel.pd-short {
  padding-bottom: 30px;
}

.invite-code {
  font: 600 clamp(40px, 10vw, 68px)/1 var(--font-display);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  -webkit-user-select: all;
  user-select: all;
}

.invite-code-panel__note {
  max-width: 34em;
  font-size: 16px;
}

.invite-code-panel--empty {
  padding: 26px clamp(22px, 4vw, 40px);
  border-radius: 28px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
}

.invite-code-panel--empty .invite-code-panel__note {
  color: var(--ink-muted);
}

.invite-code-panel__label {
  font: 400 21px/1.2 var(--font-hand);
}

.invite-steps {
  display: grid;
  gap: 12px;
  max-width: 44em;
  padding: 0;
  list-style: none;
}

.invite-steps > li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 14px;
  padding: 18px 20px 18px 16px;
  border-radius: 20px;
  background: var(--sheet);
  box-shadow: var(--shadow-float);
}

.invite-steps__num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font: 400 24px/1 var(--font-hand);
}

.invite-steps h3 {
  font: 500 19px/1.3 var(--font-display);
}

.invite-steps p {
  color: var(--ink-muted);
}

.invite-steps .store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.invite-steps .store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 18px 0 14px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
  transition: translate var(--t-snap) var(--snap);
}

.invite-steps .store-btn:hover {
  translate: 0 -2px;
}

.invite-steps .store-btn__label {
  display: grid;
  text-align: left;
}

.invite-steps .store-btn__kicker {
  font-size: 11px;
  line-height: 1.2;
  opacity: 0.8;
}

.invite-steps .store-btn__name {
  font: 600 17px/1.15 var(--font-display);
}

.pd-sec__main > .invite-fineprint {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 16px;
}

.pd-sec__main > .pd-cta {
  margin-top: 22px;
}

/* the invite page's own quiet footer (the shared one would hand the
   visitor every link on the site; this page has one job) */
.pd-focus-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  width: min(1120px, 100% - 2 * clamp(16px, 4vw, 48px));
  margin: 40px auto 0;
  padding: 24px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 14px;
  color: var(--ink-muted);
}

.pd-focus-foot nav {
  display: flex;
  gap: 18px;
}

.pd-focus-foot a {
  color: inherit;
}

/* ═══ phones ═══ */

@media (max-width: 899px) {
  /* the code is the point: no saves pushing it below the fold */
  .pd-hero--invite .pd-scatter {
    display: none;
  }

  .pd-hero--invite {
    padding-bottom: 20px;
  }

  .pd-legal,
  .pd-contact {
    grid-template-columns: minmax(0, 1fr);
  }

  .pd-legal {
    gap: 24px;
  }

  .pd-legal__toc {
    position: static;
  }

  .pd-legal__toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .pd-legal__toc a {
    padding: 7px 12px;
    background: var(--sheet);
  }
}

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

  .leaves__row--head {
    display: none;
  }

  .leaves__row > :last-child {
    font-size: 14px;
    color: var(--accent-text);
  }

  .contact-form__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .pd-promises li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

.pd-sec__main > .pd-note {
  margin-top: 16px;
  font-size: 15px;
}
