/* The plain page under the Mac (and all a phone gets): paper ground, ink text, cream cards with a
   hairline, the Solved list on an ink card. Reads without JavaScript. */

.page {
  --pg-ink-2: #3A3A3F;
  --pg-ink-3: #55555B;
  --pg-cream: #FFFDF7;
  --pg-line: rgba(20, 20, 22, 0.1);
  --pg-line-2: rgba(20, 20, 22, 0.13);
  position: relative; color: var(--ink); outline: none; color-scheme: light;
  background-color: var(--paper);
  /* A whisper of paper grain, drawn here (no image request). */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .07 0 0 0 0 .05 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  font-family: var(--font-body);
  -webkit-user-select: text; user-select: text;
}
.page :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.page a { color: var(--ink); }
.page a:hover { color: #5C4A12; }

.pg {
  max-width: 1080px; margin: 0 auto; box-sizing: border-box;
  padding: 0 32px 64px; display: flex; flex-direction: column; gap: 88px;
}

/* ---------------------------------------------------------------- header */
.pg-head { padding-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.pg-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; border-radius: 12px; }
.pg-u { display: block; flex: none; filter: drop-shadow(0 3px 6px rgba(20, 20, 22, 0.18)); }
.pg-word { font: 800 22px/1 var(--font-round); letter-spacing: -0.01em; }
.pg-nav { display: flex; gap: 4px 22px; }
.pg-nav a { min-height: 44px; display: flex; align-items: center; font-size: 15px; font-weight: 600; text-decoration: none; }
.pg-nav a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }

/* ---------------------------------------------------------------- buttons */
.pg-btn {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-height: 44px; padding: 0 20px; border-radius: 22px; text-decoration: none; white-space: nowrap;
  font: 800 15px/1 var(--font-round); letter-spacing: 0.005em;
  transition: translate 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, filter 0.15s ease;
}
.page .pg-btn-ink { background: var(--ink); color: var(--yellow); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 16px -6px rgba(20, 20, 22, 0.5); }
.page .pg-btn-ink:hover { color: var(--yellow-hi); translate: 0 -1px; }
.page .pg-btn-big {
  min-height: 60px; padding: 0 34px; border-radius: 30px; font-size: 21px; color: var(--ink);
  background: linear-gradient(180deg, var(--yellow-hi) 0%, var(--yellow) 55%, var(--yellow-lo) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -2px 0 rgba(150, 95, 0, 0.2), 0 10px 26px rgba(255, 200, 61, 0.45), 0 2px 5px rgba(120, 80, 0, 0.18);
}
.page .pg-btn-big:hover { color: var(--ink); translate: 0 -2px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -2px 0 rgba(150, 95, 0, 0.2), 0 16px 34px rgba(255, 200, 61, 0.55), 0 3px 7px rgba(120, 80, 0, 0.2); }
.pg-btn:active { translate: 0 1px; filter: brightness(0.97); transition-duration: 0.06s; }

/* ------------------------------------------------------------------ hero */
.pg-hero { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.pg-hero-h {
  margin: 0; max-width: 860px; font: 800 60px/1.04 var(--font-round); letter-spacing: -0.8px; text-wrap: balance;
}
.pg-lede { margin: 0; max-width: 700px; font-size: 19px; line-height: 1.55; color: var(--pg-ink-2); text-wrap: pretty; }
.pg-lede b { color: var(--ink); }
.pg-cta { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 4px; }
.pg-req { font-size: 14px; color: var(--pg-ink-3); }
.pg-hero-shot { margin: 14px 0 0; width: 100%; }
.pg-hero-shot img {
  display: block; width: 100%; height: auto; border-radius: 16px; background: #1B1B1F;
  box-shadow: 0 0 0 1px rgba(20, 20, 22, 0.08), 0 30px 70px rgba(20, 20, 22, 0.28), 0 6px 16px rgba(20, 20, 22, 0.12);
}

/* Phone-only: the Mac app on a phone needs a Mac. */
.pg-phone { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.pg-phone-card {
  box-sizing: border-box; padding: 14px 16px; border-radius: 14px; background: var(--ink); color: var(--paper);
  text-align: left; display: flex; flex-direction: column; gap: 4px;
}
.pg-phone-k { margin: 0; font: 800 16px/1.3 var(--font-round); color: var(--yellow); }
.pg-phone-p { margin: 0; font-size: 14.5px; line-height: 1.45; }
.page .pg-send { width: 100%; min-height: 56px; font-size: 19px; }
.pg-send-status { margin: -4px 0 0; min-height: 0; font-size: 14px; line-height: 1.4; color: var(--pg-ink-2); }
.pg-send-status:empty { display: none; }
.page .pg-quiet {
  align-self: center; min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px;
  font-size: 14.5px; font-weight: 600; color: var(--pg-ink-2);
  text-decoration: underline; text-decoration-color: rgba(20, 20, 22, 0.3); text-underline-offset: 4px;
}

/* -------------------------------------------------------------- sections */
.pg-sec { display: flex; flex-direction: column; gap: 26px; }
.pg-h { margin: 0; font: 800 38px/1.1 var(--font-round); letter-spacing: -0.4px; text-wrap: balance; }
.pg-intro { margin: -8px 0 0; max-width: 720px; font-size: 17px; line-height: 1.55; color: var(--pg-ink-2); text-wrap: pretty; }

/* Tools: four with pictures, four in words. */
.pg-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.pg-card, .pg-mini {
  box-sizing: border-box; border-radius: 18px; background: var(--pg-cream); border: 1px solid var(--pg-line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 1px 2px rgba(20, 20, 22, 0.04);
}
.pg-card { padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.pg-card h3, .pg-mini h3 { margin: 6px 4px 0; font: 800 21px/1.2 var(--font-round); }
.pg-card p, .pg-mini p { margin: 0 4px; font-size: 15.5px; line-height: 1.55; color: var(--pg-ink-2); text-wrap: pretty; }
.pg-shot {
  position: relative; margin: 0; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; background: #1B1B1F;
  box-shadow: inset 0 0 0 1px rgba(20, 20, 22, 0.08);
}
.pg-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
/* The shelf picture is a wide strip: float it over a soft, blurred copy of itself. */
.pg-shot-wide { display: grid; place-items: center; }
.pg-shot-wide::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.4px); background-size: 18px 18px;
}
.pg-shot-wide::before {
  /* The wallpaper the strip was taken on, continued. */
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(90% 80% at 85% 100%, rgba(150, 70, 80, 0.55), rgba(150, 70, 80, 0) 70%),
    linear-gradient(105deg, #33467E 0%, #3B3F72 45%, #5A3E64 75%, #7B4752 100%);
}
.pg-shot-wide img {
  position: relative; z-index: 1; width: 90%; height: auto; border-radius: 9px; object-fit: contain;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), 0 0 0 0.5px rgba(255, 255, 255, 0.2);
}
.pg-minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.pg-mini { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.pg-mini h3 { margin: 0; font-size: 19px; }
.pg-mini p { margin: 0; font-size: 15px; line-height: 1.5; }

/* The problem list: Solved on ink, Next on cream. */
.pg-lists { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px; align-items: stretch; }
.pg-solved, .pg-next { box-sizing: border-box; padding: 24px; border-radius: 18px; display: flex; flex-direction: column; gap: 14px; }
.pg-solved {
  background: var(--ink); color: var(--paper);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 50px -18px rgba(20, 20, 22, 0.55);
}
.pg-next { background: var(--pg-cream); border: 1px solid var(--pg-line); }
.pg-solved h3, .pg-next h3 { margin: 0; display: flex; align-items: center; gap: 10px; font: 800 20px/1.2 var(--font-round); }
.pg-solved h3 { color: var(--yellow); }
.pg-count { padding: 3px 8px; border-radius: var(--r-pill); font: 700 12px/1.2 var(--font-mono); }
.pg-solved .pg-count { background: rgba(255, 200, 61, 0.16); color: var(--yellow); }
.pg-next .pg-count { background: rgba(20, 20, 22, 0.07); color: var(--pg-ink-3); }
.pg-tickets { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.pg-ticket { display: flex; align-items: baseline; gap: 14px; }
.pg-id { flex: none; font: 700 12.5px/1 var(--font-mono); letter-spacing: 0.02em; }
.pg-solved .pg-id { color: var(--yellow); }
.pg-next .pg-id { color: var(--pg-ink-3); }
.pg-tt { font-size: 16px; line-height: 1.4; text-wrap: pretty; }
.pg-next-foot {
  margin: auto 0 0; padding-top: 16px; border-top: 1px dashed var(--pg-line-2);
  font-size: 14px; line-height: 1.5; color: var(--pg-ink-3);
}
.pg-next-foot b { color: var(--ink); font-weight: 700; }

/* Facts */
.pg-facts ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pg-facts li {
  min-height: 44px; box-sizing: border-box; padding: 0 16px 0 12px; display: flex; align-items: center; gap: 8px;
  border-radius: 22px; background: var(--pg-cream); border: 1px solid var(--pg-line-2); font-size: 14.5px; font-weight: 600;
}
.pg-facts li::before {
  content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; background: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.2l2 2 4-4.2' fill='none' stroke='%23FFC83D' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Thanks */
.pg-credits { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 14px; }
.pg-credits li {
  flex: 1 1 300px; min-width: 0;
  box-sizing: border-box; padding: 18px 20px; border-radius: 16px; background: var(--pg-cream); border: 1px solid var(--pg-line);
  display: flex; flex-direction: column; gap: 5px;
}
.pg-credits a { align-self: flex-start; font: 800 18px/1.3 var(--font-round); text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: rgba(20, 20, 22, 0.35); }
.pg-credits a::after { content: " ↗"; font-weight: 600; font-size: 0.8em; color: var(--pg-ink-3); }
.pg-credits span { font-size: 15px; line-height: 1.5; color: var(--pg-ink-2); }

/* Footer */
.pg-foot {
  padding-top: 26px; border-top: 1px solid rgba(20, 20, 22, 0.14);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 14px; color: var(--pg-ink-3);
}

/* ------------------------------------------------------------ wide/narrow */
@media (min-width: 820px) { .only-narrow { display: none !important; } }
@media (max-width: 819.98px) {
  .only-wide { display: none !important; }
  .page { min-height: 100vh; min-height: 100svh; }
  .pg { padding: 0 20px 40px; gap: 64px; }
  .pg-head { padding-top: 18px; }
  .pg-nav { display: none; }
  .pg-u { width: 34px; height: 34px; }
  .pg-word { font-size: 20px; }
  .pg-hero { align-items: stretch; text-align: left; gap: 18px; margin-top: -40px; }
  .pg-hero-h { font-size: 36px; line-height: 1.06; letter-spacing: -0.4px; }
  .pg-lede { font-size: 16px; line-height: 1.5; }
  .pg-hero-shot { margin: 0; }
  .pg-hero-shot img { border-radius: 12px; box-shadow: 0 16px 36px rgba(20, 20, 22, 0.25); }
  .pg-h { font-size: 30px; }
  .pg-cards { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pg-minis { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
  .pg-lists { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pg-solved, .pg-next { padding: 20px; }
  .pg-facts ul { gap: 8px; }
  .pg-facts li { min-height: 36px; padding: 0 13px 0 11px; font-size: 13.5px; border-radius: 18px; }
  .pg-credits li { flex-basis: 100%; }
  .pg-facts ul { justify-content: flex-start; }
}
@media (min-width: 820px) and (max-width: 1000px) {
  .pg-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-hero-h { font-size: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-btn { transition: none; }
}
