/* =========================================================
   KeceLabs — secondary pages (privacy, terms, thanks, 404)
   Loaded after styles.css. Shares the homepage's tokens, type and
   engineering details (seam ticks, the vermilion piece) in a quieter form.
   ========================================================= */
body.pg { background: var(--paper); }
.pg h1, .pg h2, .pg h3 { letter-spacing: -0.035em; }

/* ---------- Header ---------- */
.pg-top {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  min-height: 4.5rem;
  padding: 0.75rem var(--gutter);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.pg-nav { display: flex; justify-content: center; gap: 2rem; }
.pg-nav a { color: var(--stone); font-size: 0.9375rem; text-decoration: none; transition: color 0.25s var(--ease); }
.pg-nav a:hover { color: var(--ink); }

/* Primary action: the same ink button with the vermilion corner square */
.pg-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.25rem;
  padding: 0.9rem 1.5rem 0.9rem 1.35rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 0.25s var(--ease), transform 0.15s var(--ease);
}
.pg-cta:hover { background: #000; }
.pg-cta:active { transform: translateY(1px); }
.pg-cta:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; }
.pg-cta-arrow { transition: transform 0.35s var(--ease); }
.pg-cta:hover .pg-cta-arrow { transform: translateX(4px); }
.pg-cta-sq {
  position: absolute;
  right: 0; bottom: 0;
  width: 0.85rem; height: 0.85rem;
  background: var(--signal);
  transform: translate(40%, 40%);
  transition: transform 0.45s var(--ease);
}
.pg-cta:hover .pg-cta-sq { transform: translate(40%, 40%) rotate(45deg) scale(0.85); }
.pg-cta-sm { min-height: 2.6rem; padding: 0.6rem 1.1rem; font-size: 0.875rem; }
.pg-cta-sm .pg-cta-sq { width: 0.65rem; height: 0.65rem; }

/* ---------- Footer ---------- */
.pg-foot { background: var(--ink); color: var(--stone-light); }
.pg-foot::before {
  content: "";
  display: block;
  height: 9px;
  background:
    linear-gradient(var(--line-dark), var(--line-dark)) top / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, rgba(138, 134, 125, 0.55) 0 1px, transparent 1px 1.75rem) top / 100% 9px no-repeat;
}
.pg-foot-inner { max-width: var(--max); margin-inline: auto; padding: 2.25rem var(--gutter) 1.75rem; }
.pg-foot-nav { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--line-dark); }
.pg-foot-nav a { color: var(--paper); font-weight: 500; text-decoration: none; }
.pg-foot-nav a:hover { color: var(--signal); }
.pg-foot-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 1.5rem; padding-top: 1.25rem; font-size: 0.8125rem; }
.pg-foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.pg-foot a { text-decoration: none; }
.pg-foot-links a { color: var(--stone-light); }
.pg-foot-links a:hover { color: var(--paper); }

/* ---------- Legal pages ---------- */
.pg .page-hero { position: relative; padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2.5rem, 5vw, 3.5rem); border-bottom: 0; }
.pg .page-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 9px;
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) bottom / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, rgba(102, 99, 92, 0.6) 0 1px, transparent 1px 1.75rem) bottom / 100% 9px no-repeat;
}
.pg .page-hero .section-index { border-top: 0; padding-top: 0; margin-bottom: 1.5rem; gap: 0.6rem; }
.pg .page-hero .section-index span:first-child { display: inline-flex; align-items: center; gap: 0.6rem; border-right: 0; padding-right: 0; color: var(--signal-ink); }
.pg .page-hero .section-index span:first-child::before { content: ""; width: 0.5rem; height: 0.5rem; background: var(--signal); }
.pg .page-hero .section-index span + span::before { content: "/"; margin-right: 0.6rem; color: var(--line-strong); }
.pg .page-hero h1 { font-weight: 500; letter-spacing: -0.05em; font-size: clamp(2.6rem, 7vw, 5.5rem); line-height: 0.95; }
.pg .page-hero p { max-width: 36rem; }
.pg .page-meta { font-size: 0.6875rem; }
.pg .page-meta a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--signal); }

.pg .legal-body h2 { font-weight: 500; letter-spacing: -0.03em; }
.pg .legal-body h2 .mono { font-size: 0.6875rem; padding-top: 0.2rem; }
.pg .legal-body h3 { font-weight: 600; }
.pg .legal-note { border-style: solid; border-color: var(--line); background: var(--paper-2); }
.pg .legal-toc a:hover { border-left-color: var(--signal); }
.pg .legal-toc p { font-size: 0.6875rem; }

/* ---------- Thanks and 404 ---------- */
.pg-simple {
  min-height: calc(100vh - 4.5rem);
  min-height: calc(100svh - 4.5rem);
  display: grid;
  align-items: center;
  padding: clamp(3rem, 10vh, 6rem) var(--gutter);
}
.pg-simple-inner { width: 100%; max-width: var(--max); margin-inline: auto; }
.pg-kicker { display: flex; align-items: center; gap: 0.75rem; color: var(--stone); margin-bottom: 1.25rem; }
.pg-kicker span { color: var(--signal-ink); padding-right: 0.75rem; border-right: 1px solid var(--line); }
.pg-simple h1 {
  max-width: 13ch;
  font-weight: 500;
  letter-spacing: -0.05em;
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  line-height: 0.95;
  text-wrap: balance;
}
.pg-stop { display: inline-block; width: 0.14em; height: 0.14em; margin-left: 0.06em; background: var(--signal); }
.pg-lede { margin-top: 1.5rem; max-width: 34rem; color: var(--stone); font-size: 1.125rem; line-height: 1.6; }
.pg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; margin-top: 2.25rem; }
.pg-link { font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--signal); padding-bottom: 2px; color: var(--ink); }
.pg-note { margin-top: 2rem; color: var(--stone); font-size: 0.9375rem; }
.pg-note a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--signal); }

/* The missing piece, in miniature: seated in its slot (received) or out of it (404) */
.pg-mark { position: relative; width: 9rem; height: 4.5rem; margin-bottom: 2.25rem; }
.pg-seam {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 9px;
  transform: translateY(-50%);
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) center / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, rgba(102, 99, 92, 0.6) 0 1px, transparent 1px 0.9rem) center / 100% 9px no-repeat;
}
.pg-slot, .pg-piece { position: absolute; left: 50%; top: 50%; width: 1.6rem; height: 1.6rem; transform: translate(-50%, -50%); }
.pg-slot { outline: 1px dashed var(--line-strong); }
.pg-piece { background: var(--signal); }
.pg-mark:not(.is-missing) .pg-slot { opacity: 0; }
.pg-mark.is-missing .pg-piece { transform: translate(110%, -150%) rotate(14deg); }

/* ---------- Phones ---------- */
@media (max-width: 47.99rem) {
  .pg-top { grid-template-columns: auto auto; justify-content: space-between; gap: 1rem; }
  .pg-nav { display: none; }
  .pg-simple { align-items: start; }
  .pg-actions .pg-cta { width: calc(100% - 0.4rem); justify-content: center; }
  .pg-foot-meta { flex-direction: column; }
}
@media (max-width: 22.5rem) {
  .pg-cta-sm { padding: 0.55rem 0.8rem; font-size: 0.8125rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-cta, .pg-cta-arrow, .pg-cta-sq, .pg-nav a { transition: none; }
}
@media (max-width: 47.99rem) { .pg-simple { min-height: 0; padding-top: 2.5rem; } .pg-mark { margin-bottom: 1.5rem; } }
