/* Affiliate Terms page.
   zt-prefixed selectors keep this page isolated from older affiliate/legal styles. */

.zt-page {
  --zt-paper: #fff8ee;
  --zt-paper-strong: #fffdf8;
  --zt-ink: var(--ink, #11100f);
  --zt-muted: var(--muted, #6f6860);
  --zt-accent: var(--accent, #f28b1c);
  --zt-line: rgba(17, 16, 15, 0.1);
  --zt-line-strong: rgba(17, 16, 15, 0.16);
  --zt-soft: rgba(242, 139, 28, 0.1);
  --zt-brown: #704831;
  --zt-brown-2: #8b5a38;
  width: min(1088px, calc(100% - 80px));
  margin: 0 auto;
  padding: 42px 0 82px;
}

.site-nav .zt-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid rgba(242, 139, 28, 0.34);
  border-radius: 999px;
  background: var(--zt-accent, #f28b1c);
  color: #15110d;
  font-weight: 900;
  padding: 0 15px;
  text-decoration: none;
}

.site-nav .zt-nav-cta:hover {
  background: #ffa83c;
  color: #15110d;
}

.zt-hero,
.zt-reader {
  border: 1px solid var(--zt-line);
  border-radius: 30px;
  background: rgba(255, 250, 242, 0.94);
  box-shadow: var(--shadow-paper, 0 24px 60px rgba(34, 22, 10, 0.08));
}

.zt-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.56fr);
  gap: clamp(28px, 4vw, 50px);
  align-items: start;
  overflow: hidden;
  padding: clamp(34px, 4.4vw, 54px);
}

.zt-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 8%, rgba(242, 139, 28, 0.11), transparent 30%),
    linear-gradient(135deg, rgba(255, 253, 248, 0.92), rgba(255, 248, 237, 0.82));
}

.zt-hero::after {
  content: "";
  position: absolute;
  right: -118px;
  bottom: -124px;
  z-index: -1;
  width: 340px;
  height: 250px;
  border: 1px solid rgba(242, 139, 28, 0.16);
  border-radius: 45% 55% 42% 58%;
  background: rgba(242, 139, 28, 0.12);
  transform: rotate(-10deg);
}

.zt-hero-copy {
  min-width: 0;
}

.zt-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 10px 15px;
  border: 1px solid rgba(242, 139, 28, 0.28);
  border-radius: 999px;
  background: var(--zt-soft);
  color: var(--zt-ink);
  font: 900 11px/1 var(--mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  letter-spacing: 1.35px;
  text-transform: uppercase;
}

.zt-eyebrow span {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--zt-accent);
  box-shadow: 0 0 0 5px rgba(242, 139, 28, 0.13);
}

.zt-eyebrow-small {
  margin-bottom: 18px;
}

.zt-hero-title {
  display: block;
  max-width: 760px;
  margin: clamp(24px, 2.8vw, 34px) 0 0;
  color: var(--zt-ink);
  font-family: var(--serif, Georgia, Cambria, "Times New Roman", serif);
  font-size: clamp(44px, 4.8vw, 68px);
  font-style: italic;
  font-weight: 900;
  line-height: 1.01;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.zt-hero-lede {
  max-width: 705px;
  margin: 22px 0 0;
  color: var(--zt-muted);
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.68;
}

.zt-hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin-top: 24px;
  color: var(--zt-muted);
  font-size: 14px;
  line-height: 1.5;
}

.zt-soft-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid rgba(242, 139, 28, 0.28);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.88);
  color: var(--zt-ink);
  font-weight: 900;
  line-height: 1;
  padding: 0 17px;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.zt-soft-link:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 139, 28, 0.46);
  background: var(--zt-soft);
}

.zt-soft-link:focus-visible,
.zt-view-toggle:focus-visible,
.zt-tab:focus-visible,
.site-nav .zt-nav-cta:focus-visible {
  outline: 3px solid rgba(242, 139, 28, 0.34);
  outline-offset: 3px;
}

.zt-meta {
  display: grid;
  gap: 14px;
  padding-top: clamp(18px, 3.8vw, 44px);
}

.zt-meta-card {
  border: 1px solid var(--zt-line);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.96);
  padding: 17px;
}

.zt-meta-card span {
  display: block;
  margin-bottom: 9px;
  color: var(--zt-muted);
  font: 900 10px/1 var(--mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  letter-spacing: 1.25px;
  text-transform: uppercase;
}

.zt-meta-card strong {
  display: block;
  color: var(--zt-ink);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.28;
}

.zt-reader {
  margin-top: 26px;
  overflow: hidden;
}

.zt-reader-intro {
  padding: clamp(26px, 3.6vw, 40px) clamp(26px, 4vw, 44px) 26px;
  border-bottom: 1px solid var(--zt-line);
  background: rgba(255, 253, 248, 0.74);
}

.zt-reader-intro h2 {
  max-width: 780px;
  margin: 0;
  color: var(--zt-ink);
  font-family: var(--serif, Georgia, Cambria, "Times New Roman", serif);
  font-size: clamp(30px, 3.1vw, 44px);
  font-style: italic;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.024em;
  text-wrap: balance;
}

.zt-reader-intro p:not(.zt-eyebrow) {
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--zt-muted);
  line-height: 1.7;
}

.zt-view-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding: 6px;
  border: 1px solid var(--zt-line);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.78);
}

.zt-view-toggle {
  appearance: none;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--zt-muted);
  cursor: pointer;
  font: 900 13px/1 var(--sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  padding: 0 14px;
}

.zt-view-toggle.is-active {
  background: var(--zt-accent);
  color: #13100d;
  box-shadow: 0 10px 20px rgba(242, 139, 28, 0.16);
}

.zt-reader-grid {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 500px;
  background: rgba(255, 250, 242, 0.7);
}

.zt-tabs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-right: 1px solid var(--zt-line);
  background: rgba(255, 253, 248, 0.62);
}

.zt-tab {
  appearance: none;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: 100%;
  border: 1px solid var(--zt-line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.96);
  color: var(--zt-ink);
  cursor: pointer;
  padding: 14px;
  text-align: left;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.zt-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 139, 28, 0.32);
  background: var(--zt-soft);
}

.zt-tab[aria-selected="true"] {
  border-color: rgba(242, 139, 28, 0.48);
  background: var(--zt-accent);
  color: #13100d;
  box-shadow: 0 14px 24px rgba(242, 139, 28, 0.18);
}

.zt-tab-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(17, 16, 15, 0.06);
  font: 950 11px/1 var(--mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  letter-spacing: 0.5px;
}

.zt-tab-text {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.zt-tab-text strong {
  font-size: 14px;
  font-weight: 950;
  line-height: 1.15;
}

.zt-tab-text small {
  color: rgba(17, 16, 15, 0.58);
  font-size: 12px;
  line-height: 1.45;
}

.zt-tab[aria-selected="true"] .zt-tab-text small {
  color: rgba(18, 16, 14, 0.72);
}

.zt-panels {
  padding: clamp(28px, 3.8vw, 44px);
}

.zt-panel {
  min-height: 390px;
  animation: ztFade 0.18s ease-out;
}

.js .zt-reader[data-zt-view="section"] .zt-panel:not(.is-active),
.zt-panel[hidden] {
  display: none;
}

.zt-reader[data-zt-view="all"] .zt-reader-grid,
.no-js .zt-reader-grid {
  grid-template-columns: 1fr;
}

.zt-reader[data-zt-view="all"] .zt-tabs,
.no-js .zt-tabs,
.no-js .zt-view-switch {
  display: none;
}

.zt-reader[data-zt-view="all"] .zt-panels,
.no-js .zt-panels {
  display: grid;
  gap: clamp(28px, 4vw, 42px);
}

.zt-reader[data-zt-view="all"] .zt-panel,
.no-js .zt-panel {
  min-height: 0;
  padding-bottom: clamp(28px, 4vw, 42px);
  border-bottom: 1px solid var(--zt-line);
  animation: none;
}

.zt-reader[data-zt-view="all"] .zt-panel:last-child,
.no-js .zt-panel:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

@keyframes ztFade {
  from { opacity: 0.35; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.zt-panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--zt-accent);
  font: 950 12px/1 var(--mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  letter-spacing: 1.35px;
  text-transform: uppercase;
}

.zt-panel h3 {
  max-width: 830px;
  margin: 0;
  color: var(--zt-ink);
  font-family: var(--serif, Georgia, Cambria, "Times New Roman", serif);
  font-size: clamp(28px, 3.2vw, 42px);
  font-style: italic;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.zt-panel h4 {
  margin: 26px 0 0;
  color: var(--zt-ink);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.3;
}

.zt-panel p,
.zt-panel li {
  color: var(--zt-muted);
  font-size: 15px;
  line-height: 1.68;
}

.zt-panel p {
  max-width: 880px;
  margin: 15px 0 0;
}

.zt-panel ul,
.zt-panel ol {
  display: grid;
  gap: 12px;
  max-width: 900px;
  margin: 18px 0 0;
  padding-left: 20px;
}

.zt-card-grid,
.zt-record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.zt-mini-card,
.zt-record-card {
  border: 1px solid var(--zt-line);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.96);
  padding: 18px;
}

.zt-mini-card > span {
  display: block;
  color: var(--zt-accent);
  font: 950 22px/1 var(--mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
}

.zt-mini-card strong,
.zt-record-card strong {
  display: block;
  margin-top: 10px;
  color: var(--zt-ink);
  font-weight: 950;
  line-height: 1.25;
}

.zt-mini-card p,
.zt-record-card span {
  display: block;
  margin-top: 8px;
  color: var(--zt-muted);
  font-size: 13px;
  line-height: 1.55;
}

.zt-callout {
  max-width: 900px;
  margin-top: 22px;
  border: 1px solid rgba(112, 72, 49, 0.18);
  border-radius: 20px;
  background: rgba(112, 72, 49, 0.1);
  padding: 18px;
}

.zt-callout strong {
  display: block;
  color: var(--zt-ink);
  font-weight: 950;
}

.zt-callout p {
  margin-top: 8px;
}

.zt-active-box {
  margin-top: 26px;
  border: 1px solid rgba(112, 72, 49, 0.22);
  border-radius: 26px;
  background: linear-gradient(135deg, var(--zt-brown) 0%, var(--zt-brown-2) 100%);
  color: rgba(255, 249, 242, 0.96);
  padding: clamp(22px, 3.6vw, 34px);
  box-shadow: 0 24px 42px rgba(112, 72, 49, 0.16);
}

.zt-active-box h4,
.zt-active-box p {
  color: rgba(255, 249, 242, 0.96);
}

.zt-active-box h4 {
  margin: 0;
  font-family: var(--serif, Georgia, Cambria, "Times New Roman", serif);
  font-size: clamp(26px, 3vw, 38px);
  font-style: italic;
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.018em;
}

.zt-active-box p {
  color: rgba(255, 249, 242, 0.78);
}

.zt-active-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.zt-soft-link-dark {
  border-color: rgba(255, 249, 242, 0.28);
  background: rgba(255, 249, 242, 0.1);
  color: rgba(255, 249, 242, 0.96);
}

.zt-soft-link-dark:hover {
  border-color: rgba(255, 249, 242, 0.46);
  background: rgba(255, 249, 242, 0.16);
}

[data-theme="dark"] .zt-page {
  --zt-paper: #211d18;
  --zt-paper-strong: #1a1714;
  --zt-ink: rgba(255, 250, 242, 0.96);
  --zt-muted: rgba(255, 250, 242, 0.68);
  --zt-line: rgba(255, 250, 242, 0.12);
  --zt-line-strong: rgba(255, 250, 242, 0.18);
  --zt-soft: rgba(242, 139, 28, 0.13);
}

[data-theme="dark"] .zt-hero,
[data-theme="dark"] .zt-reader {
  background: rgba(33, 29, 24, 0.92);
}

[data-theme="dark"] .zt-hero::before,
[data-theme="dark"] .zt-reader-intro,
[data-theme="dark"] .zt-reader-grid,
[data-theme="dark"] .zt-tabs {
  background: rgba(26, 23, 20, 0.76);
}

[data-theme="dark"] .zt-soft-link,
[data-theme="dark"] .zt-view-switch,
[data-theme="dark"] .site-nav .zt-nav-cta {
  background: rgba(26, 23, 20, 0.88);
}

[data-theme="dark"] .zt-meta-card,
[data-theme="dark"] .zt-tab,
[data-theme="dark"] .zt-mini-card,
[data-theme="dark"] .zt-record-card {
  background: rgba(26, 23, 20, 0.96);
}

[data-theme="dark"] .zt-tab-text small {
  color: rgba(255, 250, 242, 0.58);
}

[data-theme="dark"] .zt-tab[aria-selected="true"] .zt-tab-text small {
  color: rgba(18, 16, 14, 0.72);
}

@media (prefers-reduced-motion: reduce) {
  .zt-panel,
  .zt-soft-link,
  .zt-tab {
    animation: none;
    transition: none;
  }
}

@media (max-width: 980px) {
  .zt-page {
    width: min(100% - 48px, 1088px);
  }

  .zt-hero {
    grid-template-columns: 1fr;
  }

  .zt-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 0;
  }

  .zt-reader-grid {
    grid-template-columns: 1fr;
  }

  .zt-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--zt-line);
  }

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

@media (max-width: 720px) {
  .zt-page {
    width: min(100% - 28px, 1088px);
    padding: 28px 0 64px;
  }

  .zt-hero,
  .zt-reader {
    border-radius: 24px;
  }

  .zt-reader {
    margin-top: 20px;
  }

  .zt-hero,
  .zt-reader-intro,
  .zt-panels {
    padding: 22px;
  }

  .zt-reader-intro {
    padding-bottom: 18px;
  }

  .zt-reader-intro h2 {
    font-size: clamp(27px, 8vw, 34px);
  }

  .zt-reader-intro p:not(.zt-eyebrow) {
    margin-top: 12px;
    line-height: 1.58;
  }

  .zt-hero-title {
    margin-top: 22px;
    font-size: 42px;
    line-height: 1;
  }

  .zt-hero-lede {
    margin-top: 18px;
  }

  .zt-eyebrow {
    width: auto;
    line-height: 1.25;
    white-space: normal;
  }

  .zt-hero-links,
  .zt-active-links {
    align-items: stretch;
  }

  .zt-hero-links .zt-soft-link,
  .zt-active-links .zt-soft-link {
    width: 100%;
  }

  .zt-view-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
    margin-top: 16px;
    padding: 5px;
    border-radius: 999px;
  }

  .zt-view-toggle {
    min-height: 38px;
    padding: 0 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .zt-reader-grid {
    min-height: 0;
  }

  .zt-tabs {
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 16px;
    scroll-snap-type: x proximity;
    padding: 16px 16px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--zt-line);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .zt-tabs::-webkit-scrollbar {
    display: none;
  }

  .zt-tab {
    flex: 0 0 min(78vw, 260px);
    scroll-snap-align: start;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    min-height: 74px;
    padding: 12px;
    border-radius: 18px;
  }

  .zt-tab-number {
    width: 30px;
    height: 30px;
    font-size: 10px;
  }

  .zt-tab-text strong {
    font-size: 13px;
  }

  .zt-tab-text small {
    font-size: 11px;
    line-height: 1.35;
  }

  .zt-panels {
    padding-top: 20px;
  }

  .zt-panel {
    min-height: 0;
  }

  .zt-panel-kicker {
    margin-bottom: 14px;
    font-size: 11px;
    line-height: 1.25;
  }

  .zt-panel h3 {
    font-size: clamp(28px, 8vw, 34px);
  }

  .zt-panel h4 {
    margin-top: 22px;
    font-size: 17px;
  }

  .zt-panel p,
  .zt-panel li {
    font-size: 14px;
    line-height: 1.62;
  }

  .zt-meta,
  .zt-card-grid,
  .zt-record-grid {
    grid-template-columns: 1fr;
  }

  .zt-mini-card,
  .zt-record-card,
  .zt-callout {
    border-radius: 18px;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .zt-page {
    width: min(100% - 22px, 1088px);
  }

  .zt-hero,
  .zt-reader-intro,
  .zt-panels {
    padding: 20px;
  }

  .zt-tabs {
    padding: 14px 14px 12px;
  }

  .zt-view-switch {
    gap: 4px;
    padding: 4px;
  }

  .zt-view-toggle {
    min-height: 36px;
    font-size: 11px;
    padding: 0 6px;
  }

  .zt-tab {
    flex-basis: min(82vw, 245px);
    min-height: 70px;
    padding: 11px;
  }

  .zt-tab-text small {
    display: none;
  }

  .zt-hero-title {
    margin-top: 20px;
    font-size: 36px;
  }

  .zt-panel h3 {
    font-size: 29px;
  }
}

@media print {
  .site-nav,
  .zt-view-switch,
  .zt-tabs,
  .site-footer,
  .zt-hero::after {
    display: none;
  }

  .zt-page {
    width: 100%;
    padding: 0;
  }

  .zt-hero,
  .zt-reader {
    border: 0;
    box-shadow: none;
  }

  .zt-reader-grid,
  .zt-panels {
    display: block;
  }

  .zt-panel,
  .js .zt-reader[data-zt-view="section"] .zt-panel:not(.is-active) {
    display: block;
    min-height: 0;
    break-inside: avoid;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--zt-line-strong);
  }
}
