/* ==========================================================================
   Delhi Golden Doodle — Policy page layout
   Loaded only by Terms and Conditions, Privacy Policy, Cookie Policy and
   Disclaimer. Header, navigation and footer live in global-site.css.
   Scoped to body.dgd-policy so nothing here can reach another page.
   ========================================================================== */

body.dgd-policy {
  margin: 0;
  background: var(--dgd-cream);
  color: var(--dgd-ink);
  font-family: var(--dgd-sans);
  font-size: 16px;
  line-height: 1.7;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body.dgd-policy *,
body.dgd-policy *::before,
body.dgd-policy *::after { box-sizing: border-box; }
body.dgd-policy h1,
body.dgd-policy h2,
body.dgd-policy h3 { font-family: var(--dgd-serif); line-height: 1.25; margin: 0; }
body.dgd-policy p { margin: 0; }
body.dgd-policy a { color: inherit; text-decoration: none; }
body.dgd-policy img { max-width: 100%; display: block; }
body.dgd-policy :focus-visible { outline: 3px solid var(--dgd-focus); outline-offset: 3px; }
body.dgd-policy p,
body.dgd-policy li,
body.dgd-policy h1,
body.dgd-policy h2,
body.dgd-policy h3 { overflow-wrap: anywhere; }

/* --------------------------------------------------------------- HERO --- */
.policy-hero {
  position: relative;
  background:
    radial-gradient(86% 72% at 8% 8%, rgba(196,136,31,.24) 0%, transparent 56%),
    radial-gradient(70% 62% at 96% 94%, rgba(20,81,63,.4) 0%, transparent 58%),
    linear-gradient(150deg, #0E2A22 0%, #223026 40%, #3B2C1E 72%, #5C4322 100%);
  padding: clamp(56px, 6.5vw, 88px) 0 clamp(48px, 5.5vw, 72px);
  overflow: hidden;
  isolation: isolate;
}
.policy-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(56% 74% at 24% 44%, rgba(255,225,160,.13) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
}
/* Decorative orb, matching the site hero */
.policy-hero::after {
  content: '';
  position: absolute;
  right: -130px;
  bottom: -170px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,136,31,.3) 0%, rgba(196,136,31,0) 68%);
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
}
.policy-hero > .dgd-shell { position: relative; z-index: 2; }
.crumbs { font-size: 13px; color: rgba(255,253,247,.78); margin-bottom: 16px; }
.crumbs a { color: var(--dgd-gold-light); text-decoration: underline; text-underline-offset: 3px; }
.crumbs a:hover { color: var(--dgd-gold-contrast); }
.policy-hero h1 {
  font-size: clamp(29px, 5vw, 46px);
  color: var(--dgd-cream);
  max-width: 780px;
  margin-bottom: 16px;
  line-height: 1.16;
}
.policy-hero h1 .accent { color: var(--dgd-gold-light); }
.policy-lead {
  font-size: clamp(15px, 2vw, 17.5px);
  color: rgba(255,253,247,.92);
  max-width: 720px;
  line-height: 1.7;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,209,102,.14);
  border: 1px solid rgba(255,209,102,.42);
  color: var(--dgd-gold-contrast);
  font-size: 12.5px; font-weight: 600;
  padding: 6px 14px; border-radius: 50px;
}

/* ---------------------------------------------------------- TRUST BAR --- */
.trust-bar { background: var(--dgd-teal-dark); padding: 14px 0; }
.trust-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 30px; }
.trust-item { display: flex; align-items: center; gap: 8px; color: rgba(255,253,247,.96); font-size: 13.5px; font-weight: 600; }
.trust-item a { text-decoration: underline; text-underline-offset: 3px; }
.trust-icon {
  width: 22px; height: 22px; flex: 0 0 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--dgd-gold-contrast); color: var(--dgd-ink);
  border-radius: 50%; font-size: 12px; line-height: 1;
}

/* -------------------------------------------------------- BODY LAYOUT --- */
.policy-body { padding: 54px 0 70px; }
.policy-layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 980px) { .policy-layout { grid-template-columns: 1fr; gap: 26px; } }

/* Table of contents: sticky on desktop, collapsible on small screens */
.toc {
  background: #fff;
  border: 1px solid var(--dgd-line);
  border-radius: var(--dgd-r-md);
  box-shadow: var(--dgd-shadow-sm);
  padding: 20px 20px 8px;
}
@media (min-width: 981px) {
  .toc { position: sticky; top: calc(var(--dgd-header-h) + 18px); max-height: calc(100vh - var(--dgd-header-h) - 46px); overflow-y: auto; }
}
.toc > summary { display: none; cursor: pointer; list-style: none; font-family: var(--dgd-serif); font-size: 17px; font-weight: 700; padding: 2px 0 12px; }
.toc > summary::-webkit-details-marker { display: none; }
.toc-title { font-family: var(--dgd-serif); font-size: 17px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--dgd-line); }
.toc ol { list-style: none; counter-reset: toc; margin: 0; padding: 0; }
.toc li { counter-increment: toc; }
.toc li a {
  display: block; padding: 7px 0 7px 26px; position: relative;
  font-size: 13.8px; color: var(--dgd-ink-2); line-height: 1.5;
  border-bottom: 1px solid rgba(228,213,188,.5);
}
.toc li:last-child a { border-bottom: none; }
.toc li a::before { content: counter(toc) "."; position: absolute; left: 0; top: 7px; color: var(--dgd-teal); font-weight: 700; font-size: 12.5px; }
.toc li a:hover { color: var(--dgd-gold-dark); }
@media (max-width: 980px) {
  .toc { padding: 6px 18px; }
  .toc > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; min-height: 44px; }
  .toc > summary::after { content: '▾'; color: var(--dgd-teal-dark); font-size: 16px; transition: transform .2s; }
  .toc[open] > summary::after { transform: rotate(180deg); }
  .toc[open] > summary { border-bottom: 1px solid var(--dgd-line); }
  .toc .toc-title { display: none; }
  .toc-inner { padding-bottom: 10px; }
  .toc li a { padding-top: 11px; padding-bottom: 11px; }
}

/* ------------------------------------------------------------- PROSE --- */
.policy-content { min-width: 0; }
.policy-intro {
  background: var(--dgd-gold-pale);
  border: 1px solid var(--dgd-line);
  border-left: 4px solid var(--dgd-gold);
  border-radius: 0 var(--dgd-r-md) var(--dgd-r-md) 0;
  padding: 22px 26px;
  margin-bottom: 40px;
}
.policy-intro p { font-size: 15.5px; color: var(--dgd-ink-2); line-height: 1.75; }
.policy-intro p + p { margin-top: 12px; }

.policy-section { padding-top: 8px; margin-bottom: 44px; scroll-margin-top: calc(var(--dgd-header-h) + 20px); }
.policy-section > h2 { font-size: clamp(21px, 3vw, 27px); margin-bottom: 6px; }
.policy-section > h2 + .rule { width: 44px; height: 3px; background: var(--dgd-teal); border-radius: 2px; margin: 12px 0 20px; }
.policy-section h3 { font-size: 17.5px; margin: 26px 0 10px; color: var(--dgd-ink); }

.policy-content p { font-size: 15.6px; color: var(--dgd-ink-2); line-height: 1.78; margin-bottom: 15px; }
.policy-content ul, .policy-content ol { margin: 0 0 18px; padding-left: 0; list-style: none; }
.policy-content ul li { position: relative; padding: 7px 0 7px 24px; font-size: 15.4px; color: var(--dgd-ink-2); line-height: 1.7; }
.policy-content ul li::before { content: ''; position: absolute; left: 4px; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--dgd-gold); }
.policy-content ol { counter-reset: olist; }
.policy-content ol li { counter-increment: olist; position: relative; padding: 7px 0 7px 28px; font-size: 15.4px; color: var(--dgd-ink-2); line-height: 1.7; }
.policy-content ol li::before { content: counter(olist) "."; position: absolute; left: 0; top: 7px; color: var(--dgd-teal-dark); font-weight: 700; }
.policy-content strong { color: var(--dgd-ink); }
.policy-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em; background: var(--dgd-gold-pale);
  border: 1px solid var(--dgd-line); border-radius: 5px;
  padding: 1px 6px; color: var(--dgd-ink);
}
.ctx-link {
  color: var(--dgd-teal-dark); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1.5px; text-decoration-color: rgba(19,111,99,.4);
  transition: color .2s, text-decoration-color .2s;
}
.ctx-link:hover { color: var(--dgd-gold-dark); text-decoration-color: var(--dgd-gold); }

.note-card {
  background: var(--dgd-teal-pale);
  border: 1px solid rgba(19,111,99,.2);
  border-radius: var(--dgd-r-md);
  padding: 20px 24px;
  margin: 22px 0 24px;
}
.note-card p { margin-bottom: 0; font-size: 15px; color: var(--dgd-ink-2); }
.note-card p + p { margin-top: 11px; }
.note-card .note-label { display: block; font-family: var(--dgd-serif); font-size: 15.5px; font-weight: 700; color: var(--dgd-teal-dark); margin-bottom: 7px; }

.alert-card {
  background: var(--dgd-gold-pale);
  border: 1px solid var(--dgd-gold-light);
  border-left: 4px solid var(--dgd-gold-dark);
  border-radius: 0 var(--dgd-r-md) var(--dgd-r-md) 0;
  padding: 20px 24px;
  margin: 22px 0 24px;
}
.alert-card p { margin-bottom: 0; font-size: 15px; color: var(--dgd-ink-2); }
.alert-card .note-label { display: block; font-family: var(--dgd-serif); font-size: 15.5px; font-weight: 700; color: var(--dgd-gold-dark); margin-bottom: 7px; }

/* ------------------------------------------------------------ TABLES --- */
.table-scroll { overflow-x: auto; margin: 4px 0 22px; border: 1px solid var(--dgd-line); border-radius: var(--dgd-r-md); background: #fff; }
.table-scroll table { border-collapse: collapse; width: 100%; min-width: 520px; }
.table-scroll caption { text-align: left; font-size: 13.5px; color: var(--dgd-ink-3); padding: 12px 16px 0; }
.table-scroll th,
.table-scroll td { text-align: left; padding: 12px 16px; font-size: 14.6px; line-height: 1.6; border-bottom: 1px solid var(--dgd-line); vertical-align: top; }
.table-scroll th { background: var(--dgd-gold-pale); font-family: var(--dgd-serif); font-size: 15px; color: var(--dgd-ink); }
.table-scroll tbody tr:last-child td { border-bottom: none; }
.table-scroll td { color: var(--dgd-ink-2); }
.yes { color: var(--dgd-teal-dark); font-weight: 700; }
.no { color: var(--dgd-gold-dark); font-weight: 700; }

/* ---------------------------------------------------------- HELP BOX --- */
.help-box { background: var(--dgd-brown-dark); color: var(--dgd-cream); border-radius: var(--dgd-r-lg); padding: 36px; margin-top: 8px; }
.help-box h3 { font-size: 24px; color: var(--dgd-gold-light); margin: 0 0 12px; }
.help-box p { font-size: 15px; color: rgba(255,253,247,.92); line-height: 1.7; margin-bottom: 14px; }
.help-box a.inline { color: var(--dgd-gold-light); text-decoration: underline; text-underline-offset: 3px; }
.help-box a.inline:hover { color: var(--dgd-gold-contrast); }
.help-list { list-style: none; margin: 0 0 22px; padding: 0; }
.help-list li {
  display: flex; gap: 10px; align-items: flex-start; padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: 14.5px; color: rgba(255,252,244,.92);
}
.help-list li:last-child { border-bottom: none; }
.help-list li::before { content: '✓'; color: var(--dgd-gold-light); font-weight: 700; flex-shrink: 0; }
.help-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* -------------------------------------------------- RELATED POLICIES --- */
.related-policies { margin-top: 40px; }
.related-policies h3 { font-size: 21px; margin: 0 0 16px; color: var(--dgd-ink); }
.rp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.rp-card { display: block; background: #fff; border: 1px solid var(--dgd-line); border-radius: var(--dgd-r-md); padding: 18px 20px; transition: all .2s; }
.rp-card:hover { background: var(--dgd-gold-pale); border-color: var(--dgd-gold-light); transform: translateY(-2px); box-shadow: var(--dgd-shadow-sm); }
.rp-card strong { display: block; font-family: var(--dgd-serif); font-size: 16px; margin-bottom: 5px; color: var(--dgd-ink); }
.rp-card span { font-size: 13.5px; color: var(--dgd-ink-3); line-height: 1.55; }

.back-top { margin-top: 32px; }
.back-top a { font-size: 14px; font-weight: 600; color: var(--dgd-teal-dark); text-decoration: underline; text-underline-offset: 3px; }
.back-top a:hover { color: var(--dgd-gold-dark); }

/* -------------------------------------------------------- RESPONSIVE --- */
@media (max-width: 680px) {
  .policy-hero { padding: 38px 0 36px; }
  .policy-body { padding: 34px 0 50px; }
  .policy-intro { padding: 18px; border-radius: 0 var(--dgd-r-sm) var(--dgd-r-sm) 0; }
  .policy-section { margin-bottom: 36px; }
  .help-box { padding: 26px 20px; border-radius: var(--dgd-r-md); }
  .help-cta .dgd-gbtn { width: 100%; }
  .rp-grid { grid-template-columns: 1fr; }
  .trust-bar-inner { justify-content: flex-start; gap: 8px 18px; }
}
@media (max-width: 480px) {
  .policy-content p,
  .policy-content ul li,
  .policy-content ol li { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  body.dgd-policy *,
  body.dgd-policy *::before,
  body.dgd-policy *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ==========================================================================
   PREMIUM PASS
   Loaded after design-system.css, so these rules refine the shared components
   for the four legal pages without needing extra specificity.
   ========================================================================== */

/* Meta chips read as glass pills on the dark hero */
.meta-chip {
  border-radius: var(--dgd-r-pill);
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(6px);
}

/* Table of contents — sticky rail with a premium surface */
.toc {
  border-radius: var(--dgd-r-lg);
  border-color: var(--dgd-line-soft);
  box-shadow: var(--dgd-shadow-md);
  padding: 24px 24px 12px;
}
.toc a {
  border-radius: var(--dgd-r-sm);
  transition: background-color var(--dgd-t-fast) var(--dgd-ease),
              color var(--dgd-t-fast) var(--dgd-ease),
              transform var(--dgd-t-fast) var(--dgd-ease);
}
@media (prefers-reduced-motion: no-preference) {
  .toc a:hover { transform: translateX(3px); }
}

/* Long-form body: generous measure and clear hierarchy */
.policy-section { scroll-margin-top: calc(var(--dgd-header-h) + 24px); }
.policy-section h2 { letter-spacing: -.018em; }
.policy-body p,
.policy-body li { max-width: 74ch; }

/* Callouts */
.note-card,
.alert-card,
.help-box {
  border-radius: var(--dgd-r-lg);
  box-shadow: var(--dgd-shadow-sm);
}
.help-box { box-shadow: var(--dgd-shadow-md); }

/* Related-policy cards get the same lift as cards elsewhere on the site */
.rp-card {
  border-radius: var(--dgd-r-lg);
  border-color: var(--dgd-line-soft);
  transition: transform var(--dgd-t) var(--dgd-ease),
              box-shadow var(--dgd-t) var(--dgd-ease),
              border-color var(--dgd-t) var(--dgd-ease);
}
.rp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--dgd-shadow-lg);
  border-color: var(--dgd-gold-mid);
}

/* Back-to-top */
.back-top {
  border-radius: var(--dgd-r-pill);
  transition: transform var(--dgd-t-fast) var(--dgd-ease),
              box-shadow var(--dgd-t-fast) var(--dgd-ease);
}
.back-top:hover { transform: translateY(-2px); box-shadow: var(--dgd-shadow-md); }

/* Trust bar matches the site-wide forest treatment */
.trust-bar {
  background: linear-gradient(90deg, var(--dgd-forest-deep) 0%, var(--dgd-forest) 100%);
}

/* Wide tables must scroll inside their own container, never the page */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--dgd-r-md);
}

@media (prefers-reduced-motion: reduce) {
  .rp-card:hover,
  .back-top:hover,
  .toc a:hover { transform: none; }
}
