/*
 * Pinkie Promise wiki — "a party flyer gone wrong".
 * Sugary frosting-pink paper, one bold motif: the cherry header that drips onto the page
 * (frosting or something worse). Everything else stays quiet.
 */

@font-face {
  font-family: "Bagel Fat One";
  src: url("/assets/fonts/BagelFatOne-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/AtkinsonHyperlegible-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* palette */
  --frosting: #fbe3ec;
  --frosting-deep: #f5cfdd;
  --paper: #fff6f9;
  --cherry: #8e0b2e;
  --cherry-dark: #6b0722;
  --ink: #2a0f1a;
  --ink-soft: #6b4656;
  --bubblegum: #ff5fa2;
  --mint: #3fae8c;
  --mint-soft: #ddf5ec;
  --mint-ink: #1f6f56;
  --lemon: #e0a526;
  --lemon-soft: #fdf1d3;
  --lemon-ink: #7a5500;
  --line: rgba(142, 11, 46, 0.16);
  --line-strong: rgba(142, 11, 46, 0.32);

  /* type */
  --font-display: "Bagel Fat One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* shape: radius grows with the size of the thing */
  --r-sm: 8px;
  --r-md: 14px;
  --max-w: 1120px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  background: var(--frosting);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--bubblegum);
  color: #fff;
}

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

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

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

strong {
  font-weight: 700;
}

code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 0.08em 0.4em;
  border-radius: 5px;
  color: var(--cherry);
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header: the one loud element ---------- */

.site-header {
  position: relative;
  z-index: 40;
  background: var(--cherry);
  color: var(--paper);
  margin-bottom: 58px;
}

/* The drip. Irregular drops so it reads as poured, not patterned. */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 46px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='46' viewBox='0 0 720 46'%3E%3Cg fill='%238e0b2e'%3E%3Crect width='720' height='8'/%3E%3Crect x='34' y='-10' width='16' height='34' rx='8'/%3E%3Crect x='96' y='-10' width='10' height='22' rx='5'/%3E%3Crect x='171' y='-10' width='22' height='54' rx='11'/%3E%3Crect x='252' y='-10' width='12' height='26' rx='6'/%3E%3Crect x='318' y='-10' width='18' height='40' rx='9'/%3E%3Crect x='404' y='-10' width='9' height='18' rx='4.5'/%3E%3Crect x='461' y='-10' width='20' height='48' rx='10'/%3E%3Crect x='547' y='-10' width='13' height='28' rx='6.5'/%3E%3Crect x='612' y='-10' width='17' height='36' rx='8.5'/%3E%3Crect x='683' y='-10' width='10' height='20' rx='5'/%3E%3C/g%3E%3C/svg%3E")
    repeat-x center top / 720px 46px;
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1.05;
}

.brand:hover {
  color: #fff;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--paper);
}

.brand > span {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.01em;
}

.brand-sub {
  display: block;
  margin-top: 3px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0;
  color: rgba(255, 246, 249, 0.78);
}

.nav-toggle {
  display: none;
  background: transparent;
  color: var(--paper);
  border: 2px solid rgba(255, 246, 249, 0.6);
  border-radius: var(--r-sm);
  padding: 6px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px 0;
  /* Cancel the last link's padding so its text lines up with the content edge below. */
  margin-right: -11px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: var(--r-sm);
  color: rgba(255, 246, 249, 0.86);
  font-size: 0.94rem;
  white-space: nowrap;
  font-weight: 700;
  text-decoration: none;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.nav-link.active {
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--bubblegum);
  border-radius: 0;
}

.nav-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--cherry);
}

.nav-badge.cyan {
  background: var(--bubblegum);
  color: #fff;
}

/* ---------- Page ---------- */

main {
  padding: 8px 0 72px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.breadcrumbs a {
  color: var(--ink-soft);
}

.hero {
  margin-bottom: 36px;
  max-width: 62rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cherry);
  margin-bottom: 8px;
}

.hero h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.6vw, 3.35rem);
  line-height: 1.04;
  letter-spacing: 0.005em;
  color: var(--cherry);
  text-wrap: balance;
}

.hero h1 .h1-alt {
  display: block;
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink-soft);
}

.hero-lead {
  margin: 0 0 18px;
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: 62ch;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* Facts. Color carries meaning: mint = confirmed/live, pink = key info, lemon = caution. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  color: var(--ink);
  white-space: nowrap;
}

.pill.ok {
  background: var(--mint-soft);
  border-color: var(--mint);
  color: var(--mint-ink);
}

.pill.cyan {
  background: var(--paper);
  border-color: var(--bubblegum);
  color: var(--cherry);
}

.pill.warn {
  background: var(--lemon-soft);
  border-color: var(--lemon);
  color: var(--lemon-ink);
}

.tag-unconfirmed {
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1.5px dashed var(--lemon);
  background: var(--lemon-soft);
  color: var(--lemon-ink);
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: 0.1em;
  white-space: nowrap;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid var(--cherry);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--cherry);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--cherry-dark);
  border-color: var(--cherry-dark);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--cherry);
}

.btn-secondary:hover {
  background: var(--paper);
  color: var(--cherry-dark);
}

/* ---------- Home guide list: Pinkie's clipboard, not a card grid ---------- */

.grid {
  display: grid;
  gap: 18px;
}

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

.grid-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
  row-gap: 0;
}

.grid-3 > .card {
  background: none;
  border: 0;
  border-top: 2px dashed var(--line-strong);
  border-radius: 0;
  padding: 16px 0 18px;
}

.grid-3 > .card h3 {
  font-size: 1.2rem;
}

.grid-3 > .card p {
  color: var(--ink-soft);
  margin: 0;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
}

.card h2,
.card h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: var(--ink);
}

.card h3 a {
  text-decoration: none;
}

.card h3 a:hover {
  text-decoration: underline;
}

.card p:last-child {
  margin-bottom: 0;
}

.card .cta-row {
  margin-top: 14px;
}

.card .btn {
  padding: 7px 16px;
  font-size: 0.92rem;
}

/* ---------- Callouts ---------- */

.callout {
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin: 24px 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 6px solid var(--cherry);
}

.callout.quick {
  border-left-color: var(--cherry);
}

.callout.tip {
  border-left-color: var(--mint);
}

.callout.warn {
  border-left-color: var(--lemon);
  background: #fffbf0;
}

.callout-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.callout p {
  margin: 0;
}

.callout ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.callout li + li {
  margin-top: 6px;
}

/* ---------- Article ---------- */

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 48px;
  align-items: start;
}

.article-body > p,
.article-body > ul,
.article-body > ol,
section > p,
section > ul,
section > ol {
  max-width: 68ch;
}

.article-body h2,
main > section > h2,
#faq h2 {
  margin: 44px 0 12px;
  font-size: 1.65rem;
  line-height: 1.2;
  color: var(--cherry);
  scroll-margin-top: 24px;
  text-wrap: balance;
}

.article-body h3 {
  margin: 26px 0 8px;
  font-size: 1.2rem;
  color: var(--ink);
  scroll-margin-top: 24px;
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body li::marker {
  color: var(--cherry);
  font-weight: 700;
}

.sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toc-box {
  padding: 2px 0 2px 16px;
  border-left: 2px dashed var(--line-strong);
}

.toc-title {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
}

.toc-list a {
  color: var(--ink-soft);
  text-decoration: none;
}

.toc-list a:hover {
  color: var(--cherry);
  text-decoration: underline;
}

/* ---------- Screenshots ---------- */

.shot {
  margin: 22px 0 26px;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--frosting-deep);
}

.shot figcaption {
  margin-top: 8px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.shot-wide {
  max-width: 760px;
}

/* Home hero: text left, picture right. */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  max-width: none;
}

.shot-hero {
  margin: 0;
}

.shot-hero img {
  border-radius: 22px;
  border: 0;
  box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px var(--line-strong);
}

@media (max-width: 920px) {
  .hero-split {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Low-res sources: shown at native size, never stretched. */
.shot-small {
  max-width: 320px;
}

.shot-small img {
  border-radius: var(--r-sm);
}

.shot-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 22px 0 26px;
}

.shot-pair .shot {
  margin: 0;
  flex: 0 1 320px;
}

.card .shot {
  margin: 4px 0 14px;
}

.card .shot figcaption {
  display: none;
}

/* ---------- Tables ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin: 18px 0;
  background: var(--paper);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}

th,
td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--frosting-deep);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

tbody tr:hover {
  background: #fff0f5;
}

tr:last-child td {
  border-bottom: none;
}

/* ---------- Codes: a tear-off coupon ---------- */

.code-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--r-md);
  background: var(--paper);
  border: 2px dashed var(--cherry);
  margin-bottom: 12px;
}

.code-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--cherry);
  letter-spacing: 0.06em;
}

.copy-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid var(--cherry);
  background: var(--cherry);
  color: var(--paper);
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.copy-btn:hover {
  background: var(--cherry-dark);
  border-color: var(--cherry-dark);
}

.copy-btn.copied {
  background: var(--mint);
  border-color: var(--mint);
  color: #fff;
}

/* ---------- Checklists ---------- */

.checklist-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 14px;
}

.checklist-toolbar > div {
  flex: 1 1 220px;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: var(--frosting-deep);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--cherry);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.check-item:hover {
  border-color: var(--line-strong);
}

.check-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--mint);
  flex-shrink: 0;
  cursor: pointer;
}

.check-item.done {
  background: var(--mint-soft);
  border-color: var(--mint);
}

.check-item.done .check-title {
  text-decoration: line-through;
  text-decoration-color: var(--mint);
  color: var(--mint-ink);
}

.check-title {
  display: block;
  font-weight: 700;
  color: var(--ink);
}

.check-desc {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ---------- Filter ---------- */

.filter-bar {
  width: 100%;
  margin: 6px 0 14px;
  padding: 11px 16px;
  border-radius: var(--r-sm);
  border: 2px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.filter-bar::placeholder {
  color: var(--ink-soft);
}

.filter-bar:focus {
  outline: none;
  border-color: var(--cherry);
  box-shadow: 0 0 0 3px rgba(255, 95, 162, 0.35);
}

label.eyebrow {
  display: block;
}

/* ---------- FAQ ---------- */

#faq {
  max-width: 820px;
}

details.faq-item {
  border-top: 2px dashed var(--line-strong);
  padding: 14px 0;
}

details.faq-item:last-child {
  border-bottom: 2px dashed var(--line-strong);
}

details.faq-item summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  list-style: none;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--cherry);
  transition: transform 0.2s ease;
}

details.faq-item[open] summary::after {
  transform: rotate(45deg);
}

details.faq-item p {
  margin: 8px 0 0;
  max-width: 68ch;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--frosting-deep);
  padding: 40px 0 44px;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 24px;
}

.footer-title {
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 10px;
}

.footer-grid p {
  margin: 0;
  max-width: 44ch;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links a {
  color: var(--ink-soft);
}

.footer-links a:hover {
  color: var(--cherry);
}

.disclaimer {
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }
  .main-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 920px) {
  .content-layout {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .sidebar {
    position: static;
    margin-top: 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 1rem;
  }
  .header-inner {
    flex-wrap: nowrap;
    min-height: 64px;
    padding: 0;
  }
  .brand > span {
    font-size: 1.2rem;
  }
  .brand-sub {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .main-nav {
    display: none;
    margin-right: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 2;
    background: var(--cherry);
    padding: 4px 20px 18px;
    flex-direction: column;
    align-items: stretch;
  }
  .main-nav.open {
    display: flex;
  }
  .nav-link {
    padding: 10px 4px;
    border-bottom: 1px solid rgba(255, 246, 249, 0.15);
    border-radius: 0;
  }
  .nav-link.active {
    box-shadow: inset 4px 0 0 var(--bubblegum);
    padding-left: 12px;
  }
  .site-header {
    margin-bottom: 56px;
  }
  .pill {
    white-space: normal;
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .code-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-lead {
    font-size: 1.05rem;
  }
}

.nowrap {
  white-space: nowrap;
}

/* Ad slots: reserve space so ads loading late do not shift the page. */
.ad-slot {
  display: flex;
  justify-content: center;
  margin: 28px auto;
  max-width: 100%;
  overflow: hidden;
}

.ad-rect {
  min-height: 250px;
}

.sidebar .ad-rect {
  margin: 0;
}

.ad-native {
  flex-direction: column;
  align-items: center;
}

.ad-leaderboard:empty,
.ad-leaderboard:not(:has(iframe)) {
  margin: 0;
}
