/* Peal setup page. Night desk tokens, from device/app/Theme.swift.
   Grammar: ink and underlined = navigates; an ink slab or a bordered word = acts;
   graphite = quiet text (size and place carry secondary-ness, never a lighter ink);
   red = the point in "Peal." and the focus mark. Three hands, as in the app:
   printed (Newsreader roman) is what Peal states, written (Newsreader italic) is
   what a person asks for, typed (Courier Prime) is what you copy to an assistant. */

@font-face {
  font-family: "Newsreader";
  src: url("/site/fonts/newsreader-roman.woff2?v=8af74330b21e") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/site/fonts/newsreader-italic.woff2?v=da19f003ae37") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/site/fonts/courierprime-regular.woff2?v=c3fc2a589677") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F3EEE4;
  --sheet: #FBF8F2;
  --ink: #221D17;
  --graphite: #5C5448;
  --line: #857A69;
  --hair: #D9D0BF;
  --red: #A8291D;
  --printed: "Newsreader", "Iowan Old Style", Georgia, serif;
  --typed: "Courier Prime", "Courier New", ui-monospace, monospace;
  --gutter: 16px;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15120E;
    --sheet: #211C17;
    --ink: #EEE6D5;
    --graphite: #B4A893;
    --line: #857A69;
    --hair: #3A3329;
    --red: #EE7461;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.55 var(--printed);
  font-variant-numeric: lining-nums;
  overflow-wrap: break-word;
}

/* The house focus mark: a red ring set off from the thing it marks. */
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }
/* Links inside running text: a small visible mark with a 44px invisible hit area.
   Vertical padding on an inline box grows the target without moving the lines. */
main p a, main dd a, main li a, .foot a {
  padding-top: 13px;
  padding-bottom: 13px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 10px 14px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  z-index: 10;
}
.skip:focus-visible { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Layout */
.top, main, .foot {
  width: 100%;
  max-width: 52rem;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.top {
  padding-top: 20px;
  border-bottom: 1px solid var(--hair);
}
.wordmark {
  margin: 0;
  font-size: 2.5rem;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.point { color: var(--red); }

.toc {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
}
.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1rem;
}

h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}
h1 {
  font-size: 1.875rem;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
h2 {
  font-size: 1.625rem;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hair);
}
h3 { font-size: 1.375rem; margin-bottom: 10px; }
h4 { font-size: 1.125rem; font-weight: 600; margin: 24px 0 8px; }

p { margin: 0 0 14px; }
q { quotes: "\201C" "\201D"; }

section { padding: 32px 0 8px; }

.lede { font-size: 1.1875rem; }
.note { font-size: 1rem; color: var(--graphite); }
.small { font-size: 0.9375rem; color: var(--graphite); }

/* A UI label quoted from the app or the assistant. */
.ui { font-weight: 600; }

/* A person's words: the written hand. */
.said { font-style: italic; }

ul.plain, ol.sub {
  margin: 0 0 14px;
  padding-left: 1.4em;
}
ul.plain li, ol.sub li { margin-bottom: 8px; }
ol.sub li::marker { color: var(--graphite); }
ol.sub { list-style-type: lower-alpha; }

/* Intro */
.intro {
  display: grid;
  gap: 24px;
  padding-top: 28px;
}

/* Screenshots */
.shot {
  margin: 8px 0 16px;
  max-width: 260px;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--hair);
  border-radius: 18px;
  background: var(--sheet);
}
.shot figcaption {
  margin-top: 8px;
  font-size: 0.9375rem;
  color: var(--graphite);
}
.shot-hero { max-width: 280px; }

/* Steps: the big numbers sit in their own column, as on the Connect screen. */
ol.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step {
  counter-increment: step;
  position: relative;
  padding: 20px 0 12px 2.6rem;
  border-top: 1px solid var(--hair);
}
.step:first-child { border-top: 0; padding-top: 4px; }
.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 14px;
  font-size: 2rem;
  line-height: 1.2;
  color: var(--graphite);
}
.step:first-child::before { top: -2px; }
.step h3 { padding-top: 4px; }

/* What you copy: the typed hand on a sheet, with a bordered Copy word beside it. */
.copyable {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin: 4px 0 16px;
}
code.typed {
  font-family: var(--typed);
  font-size: 1rem;
}
.copyable code.typed {
  flex: 1 1 14rem;
  min-width: 0;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 14px;
  background: var(--sheet);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}
code.inline {
  padding: 1px 6px;
  background: var(--sheet);
  border: 1px solid var(--hair);
  border-radius: 6px;
}

button.copy {
  flex: 0 0 auto;
  min-width: 88px;
  min-height: 48px;
  padding: 8px 18px;
  font: 500 1.0625rem/1 var(--printed);
  color: var(--ink);
  background: var(--sheet);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
button.copy:hover { border-color: var(--ink); }
button.copy[hidden] { display: none; }

/* The one act on the page: an ink slab with sheet type. */
.act-row { margin: 18px 0 10px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 24px;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--sheet);
  background: var(--ink);
  border-radius: var(--radius);
  text-decoration: none;
}
.button:hover { text-decoration: underline; text-underline-offset: 0.18em; }

#testflight-pending:target {
  color: var(--ink);
  background: var(--sheet);
  border-left: 3px solid var(--red);
  padding: 8px 12px;
  border-radius: 4px;
}

/* Example requests, as slips in the written hand. */
ul.said-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}
ul.said-list li {
  font-style: italic;
  font-size: 1.1875rem;
  padding: 4px 0 4px 14px;
  background: none;
  border: 0;
  border-left: 3px solid var(--line);
  border-radius: 0;
}

/* Good to know, and troubleshooting */
dl { margin: 0; }
dt {
  font-weight: 600;
  margin: 18px 0 4px;
}
dt:first-child { margin-top: 0; }
dd { margin: 0 0 8px; }

/* Footer */
.foot {
  margin-top: 32px;
  padding-top: 20px;
  padding-bottom: 40px;
  border-top: 1px solid var(--hair);
}
.byline { font-size: 1.125rem; }
.byline em { color: var(--graphite); }

/* Wider screens: screenshots sit beside their step. */
@media (min-width: 760px) {
  :root { --gutter: 32px; }
  h1 { font-size: 2.5rem; }
  .intro {
    grid-template-columns: 1fr 280px;
    align-items: start;
    gap: 48px;
  }
  .step-body {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 40px;
    align-items: start;
  }
  .step-body .shot { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* The license links are set small, so their invisible padding is larger. */
.foot .small a {
  padding-top: 15px;
  padding-bottom: 15px;
}

/* The home page: one sentence and three steps, centred in a narrow column. */
body.simple {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter);
}
.simple-main {
  flex: 1;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  padding-block: 12vh 32px;
}
.simple-icon { display: block; border-radius: 16px; margin-bottom: 28px; }
.simple-title {
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0 0 36px;
}
.simple-steps { margin: 0; padding-left: 1.4em; display: grid; gap: 22px; }
.simple-steps li::marker { font-family: var(--typed); color: var(--graphite); }
.simple-steps .copyable { margin: 10px 0 0; }
.simple-steps .note { display: block; margin-top: 4px; }
.simple-steps .button { margin-top: 10px; }
.simple-foot {
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  padding-block: 16px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  color: var(--graphite);
  font-size: 1rem;
}
.simple-foot a { padding-block: 12px; }
.simple-foot span { padding-block: 12px; }
.simple-main { padding-inline: 0; }
.simple-steps .copyable code.typed { font-size: 0.9rem; padding-inline: 12px; }
.simple-steps .copyable code.typed { flex-basis: 100%; }
