/* Page-specific terms layout. Shared shell styles remain in the seeded files. */
html body[data-helper-page] {
  background-color: var(--terms-ink, #4c0200);
  color: var(--terms-ink, #4c0200);
  font-family: "Special Gothic", Arial, sans-serif;
}
:root {
  --terms-ink: #4c0200;
  --terms-wine: #6d1713;
  --terms-paper: #fffdf7;
  --terms-cream: #fff8dd;
  --terms-pink: #f8b4d2;
  --terms-yellow: #fff963;
  --terms-line: rgba(76, 2, 0, 0.2);
}

body[data-helper-page] > header {
  position: relative;
  z-index: 1;
  background-color: var(--terms-ink);
}

body[data-helper-page] > header .header-layer {
  position: relative;
  inset: auto;
  z-index: 2;
  min-height: 7rem;
  background-color: var(--terms-yellow);
  box-shadow: 0 5px 0 var(--terms-ink);
}

.terms-page {
  width: min(100% - 3rem, 1120px);
  margin-inline: auto;
  padding: clamp(3rem, 7vw, 7rem) 0 clamp(4rem, 8vw, 8rem);
  color: var(--terms-ink);
  font-family: "Special Gothic", Arial, sans-serif;
}

.terms-page section { min-width: 0; }
.terms-page p { margin: 0; }

.terms-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(230px, 0.72fr);
  align-items: end;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 3px solid var(--terms-ink);
  border-radius: 2.5rem;
  background-color: var(--terms-cream);
  box-shadow: 12px 12px 0 var(--terms-pink);
}

.terms-hero__copy { max-width: 690px; }
.terms-kicker, .terms-eyebrow {
  color: var(--terms-wine);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}
.terms-kicker { margin-bottom: 1rem !important; }
.terms-hero h1 {
  max-width: 11ch;
  margin: 0 0 1.25rem;
  color: var(--terms-ink);
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.98;
}
.terms-lead {
  max-width: 56ch;
  font-size: clamp(1.05rem, 1.45vw, 1.3rem);
  line-height: 1.55;
}
.terms-updated { margin-top: 1.5rem !important; color: #66403d; font-size: 0.9rem; font-weight: 700; }
.terms-hero__note {
  display: grid;
  grid-template-columns: 2.8rem minmax(0, 1fr);
  align-items: start;
  gap: 0.9rem;
  padding: 1.4rem;
  border-radius: 1.35rem;
  background-color: var(--terms-ink);
  color: #fffaf3;
}
.terms-hero__note p { font-size: 0.98rem; line-height: 1.55; }
.terms-hero__note-mark {
  display: grid;
  width: 2.55rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background-color: var(--terms-yellow);
  color: var(--terms-ink);
  font-size: 1.4rem;
  font-weight: 800;
}

.terms-section {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 3rem);
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(0.25rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--terms-line);
}
.terms-section--intro { margin-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--terms-line); }
.terms-section__index {
  display: grid;
  width: 3.35rem;
  height: 3.35rem;
  place-items: center;
  border: 2px solid var(--terms-ink);
  border-radius: 50%;
  background-color: var(--terms-pink);
  color: var(--terms-ink);
  font-size: 0.88rem;
  font-weight: 800;
}
.terms-section__body { max-width: 760px; }
.terms-eyebrow { margin-bottom: 0.7rem !important; }
.terms-section h2, .terms-policy h2, .terms-contact h2 {
  margin: 0 0 1rem;
  color: var(--terms-ink);
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.terms-section__body > p:not(.terms-eyebrow), .terms-policy__content > p:not(.terms-eyebrow), .terms-contact__body > p:not(.terms-eyebrow) {
  max-width: 74ch;
  margin-top: 0.85rem;
  color: #3f302e;
  font-size: 1.04rem;
  line-height: 1.72;
}
.terms-callout {
  display: grid;
  gap: 0.45rem;
  margin-top: 1.5rem;
  padding: 1.15rem 1.35rem;
  border-left: 5px solid var(--terms-wine);
  border-radius: 0 1rem 1rem 0;
  background-color: var(--terms-cream);
  line-height: 1.55;
}
.terms-callout strong { color: var(--terms-ink); }
.terms-callout span { color: #3f302e; }
.terms-section--criteria .terms-section__index { background-color: var(--terms-yellow); }
.terms-section--third-party .terms-section__index { background-color: #e9d8ff; }
.terms-section--reader .terms-section__index { background-color: #cce8d7; }

.terms-policy {
  display: grid;
  grid-template-columns: minmax(150px, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  margin: clamp(3rem, 6vw, 5rem) 0;
  padding: clamp(2rem, 4vw, 3.5rem);
  border-radius: 2rem;
  background-color: var(--terms-ink);
  color: #fffaf3;
}
.terms-policy__label {
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  width: fit-content;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(255, 249, 243, 0.5);
  border-radius: 999px;
  color: #fffaf3;
  font-size: 0.82rem;
  font-weight: 700;
}
.terms-policy__label span { color: var(--terms-yellow); font-size: 1.15rem; }
.terms-policy .terms-eyebrow { color: var(--terms-pink); }
.terms-policy h2 { color: #fffaf3; }
.terms-policy__content > p:not(.terms-eyebrow) { color: #f4e9df; }
.terms-policy__link, .terms-contact__link {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding: 0.8rem 1.2rem;
  border: 2px solid var(--terms-ink);
  border-radius: 999px;
  background-color: var(--terms-yellow);
  color: var(--terms-ink);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease;
}
.terms-policy__link:hover, .terms-policy__link:focus-visible, .terms-contact__link:hover, .terms-contact__link:focus-visible {
  transform: translateY(-2px);
  background-color: var(--terms-pink);
}

.terms-contact {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 3rem);
  padding: clamp(2rem, 4vw, 3.5rem);
  border: 3px solid var(--terms-ink);
  border-radius: 2rem;
  background-color: var(--terms-pink);
}
.terms-contact__body { max-width: 650px; }
.terms-contact__stamp {
  display: grid;
  width: 8.5rem;
  aspect-ratio: 1;
  align-content: center;
  justify-items: center;
  gap: 0.3rem;
  border: 2px dashed var(--terms-ink);
  border-radius: 50%;
  color: var(--terms-ink);
  transform: rotate(8deg);
}
.terms-contact__stamp span { font-size: 0.55rem; font-weight: 800; letter-spacing: 0.1em; }
.terms-contact__stamp b { font-size: 2.3rem; line-height: 1; }
.terms-contact__link { background-color: var(--terms-ink); border-color: var(--terms-ink); color: #fffaf3; }
.terms-contact__link:hover, .terms-contact__link:focus-visible { background-color: var(--terms-wine); }
.terms-page a:focus-visible { outline: 3px solid #145b47; outline-offset: 4px; }

@media (max-width: 760px) {
  body[data-helper-page] > header .header-layer { min-height: 5.5rem; padding: 0.75rem 1rem; }
  .terms-page { width: min(100% - 2rem, 620px); padding-top: 2.5rem; }
  .terms-hero { grid-template-columns: 1fr; gap: 1.75rem; padding: 1.5rem; border-radius: 1.6rem; box-shadow: 7px 7px 0 var(--terms-pink); }
  .terms-hero h1 { font-size: clamp(2.7rem, 12vw, 4rem); }
  .terms-hero__note { max-width: 32rem; }
  .terms-section { grid-template-columns: 2.8rem minmax(0, 1fr); gap: 1rem; padding: 2.25rem 0.1rem; }
  .terms-section__index { width: 2.55rem; height: 2.55rem; font-size: 0.75rem; }
  .terms-policy { grid-template-columns: 1fr; gap: 1.35rem; margin-block: 2.75rem; padding: 1.5rem; border-radius: 1.5rem; }
  .terms-contact { grid-template-columns: 2.8rem minmax(0, 1fr); gap: 1rem; padding: 1.5rem; border-radius: 1.5rem; }
  .terms-contact__stamp { grid-column: 2; width: 6.25rem; justify-self: end; }
  .terms-contact__stamp b { font-size: 1.7rem; }
}

@media (max-width: 420px) {
  .terms-page { width: min(100% - 1.35rem, 390px); }
  .terms-hero { padding: 1.2rem; }
  .terms-hero__note { grid-template-columns: 2.25rem minmax(0, 1fr); padding: 1rem; }
  .terms-hero__note-mark { width: 2.1rem; }
  .terms-section { grid-template-columns: 1fr; }
  .terms-section__index { width: 2.2rem; height: 2.2rem; }
  .terms-section__body > p:not(.terms-eyebrow), .terms-policy__content > p:not(.terms-eyebrow), .terms-contact__body > p:not(.terms-eyebrow) { font-size: 0.98rem; }
  .terms-contact { grid-template-columns: 1fr; }
  .terms-contact__stamp { grid-column: 1; }
  .terms-policy__link, .terms-contact__link { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .terms-policy__link, .terms-contact__link { transition: none; }
}
