/* ==========================================================================
   Talkiyo - legal & support pages
   Privacy Policy, Terms of Use, Community Guidelines, Listener Terms, Refund,
   Delete Account, Contact Us and Safety Center.

   The documents share one set of classes (legal-*, safety-center-*); this
   file styles them in the site's design language. Loads after style.css + responsive.css and reuses their
   tokens - nothing here redefines a brand colour.
   ========================================================================== */

.legal-page {
  --legal-ink: #4f4f4f;          /* body copy on tinted surfaces (4.5:1+ on lavender) */
  --legal-rule: #ece8f4;
  --legal-wash: #f6f2fd;         /* hover / active tint */
  --legal-surface: #faf8fe;      /* list rows, notes */
  --legal-gutter: 60px;          /* numbered documents: numeral column */
  --legal-measure: 760px;

  --icon-contents: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h2M4 12h2M4 18h2M10 6h10M10 12h10M10 18h10'/%3E%3C/svg%3E");
  --icon-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M4 9v6M12 4v16M20 9v6'/%3E%3C/svg%3E");
  --icon-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 7.5h.01'/%3E%3C/svg%3E");
  --icon-warning: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5 2.5 20h19L12 3.5Z'/%3E%3Cpath d='M12 9.5v4.5M12 17.5h.01'/%3E%3C/svg%3E");
  --icon-critical: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5h.01'/%3E%3C/svg%3E");
  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  --icon-external: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Masthead - a shorter version of the home hero
   ========================================================================== */

.legal-masthead {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + 64px) 0 90px;
  /* the home hero gradient with a longer purple run: these heroes are shorter,
     so the standard ramp would put the orange corner under the standfirst */
  background: radial-gradient(at 0% 0%, #813dd6 62%, #fdaa04 115%);
  color: #fff;
}

/* decoration: the same rings + dot grid as the home hero */
.legal-masthead::before {
  content: "";
  position: absolute;
  width: 640px;
  height: 640px;
  right: -200px;
  top: 60px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.legal-masthead::after {
  content: "";
  position: absolute;
  left: 30px;
  bottom: 40px;
  width: 88px;
  height: 110px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 1.6px, transparent 2px) 0 0 / 22px 22px;
  pointer-events: none;
}

.legal-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  align-items: center;
  gap: 50px;
}

.legal-title {
  font-family: var(--font-heading);
  font-size: clamp(2.125rem, 1.5rem + 2.4vw, 3.5rem);
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

/* reference eyebrow: tracked caps above the title */
.legal-label {
  display: block;
  margin-bottom: 22px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
}

.legal-standfirst {
  max-width: 640px;
  margin-top: 24px;
  font-size: 1.0625rem;
  color: #fff;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.legal-meta span {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: rgba(42, 11, 82, 0.3);
  font-size: var(--fs-small);
  font-weight: 500;
  color: #fff;
}

/* the page illustration, inked in this palette */
.legal-hero-art {
  --color-primary: var(--primary);
  --color-primary-light: #9d51fe;
  --color-secondary: var(--accent);
  --color-white: #fff;
  justify-self: end;
  width: 100%;
  max-width: 320px;
}

.legal-hero-art svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(42, 11, 82, 0.3));
  animation: float 7s ease-in-out infinite;
}

/* ==========================================================================
   Document layout: sticky contents card + article
   ========================================================================== */

.legal-doc {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  align-items: start;
  gap: 70px;
  width: min(100% - 2 * var(--gutter), var(--container-width));
  margin: 0 auto;
  padding-block: var(--section-space);
}

/* --- Contents card -------------------------------------------------------- */

.legal-index {
  position: sticky;
  top: calc(var(--header-h-scrolled) + 24px);
  max-height: calc(100vh - var(--header-h-scrolled) - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 22px 22px;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-card-strong);
  scrollbar-width: thin;
}

.legal-index-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0 6px 16px;
  border-bottom: 1px solid var(--legal-rule);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--primary);
}

.legal-index-title::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: var(--icon-contents) center / contain no-repeat;
  mask: var(--icon-contents) center / contain no-repeat;
}

/* the toggle JS adds on small screens takes over the title's look */
.legal-index-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  text-align: left;
}

.legal-index-toggle .icon {
  width: 18px;
  height: 18px;
  margin-left: auto;
  stroke-width: 2.4;
  transition: transform var(--dur) var(--ease);
}

.legal-index.is-open .legal-index-toggle .icon {
  transform: rotate(180deg);
}

.legal-index-list {
  counter-reset: lg-index;
}

.legal-index-list li {
  counter-increment: lg-index;
}

.legal-index-list a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: baseline;
  padding: 8px 10px 8px 6px;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-primary);
  transition: color var(--dur), background-color var(--dur);
}

.legal-index-list a::before {
  content: counter(lg-index);
  font-family: var(--font-heading);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}

.legal-index-list a:hover,
.legal-index-list a.is-active {
  background: var(--legal-wash);
  color: var(--primary-dark);
}

.legal-index-list a.is-active {
  font-weight: 500;
  box-shadow: inset 3px 0 0 var(--accent);
}

/* unnumbered documents drop the index numerals too */
.legal-index-list--plain a {
  grid-template-columns: minmax(0, 1fr);
  padding-left: 14px;
}

.legal-index-list--plain a::before {
  content: none;
}

/* documents whose preamble is clause 1 start numbering at 2 */
.legal-doc--from-two .legal-index-list {
  counter-reset: lg-index 1;
}

.legal-doc--from-two .legal-body {
  counter-reset: lg-section 1;
}

/* ==========================================================================
   Article
   ========================================================================== */

.legal-body {
  max-width: var(--legal-measure);
  counter-reset: lg-section;
}

.legal-intro {
  padding-bottom: 12px;
}

.legal-intro p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.legal-intro p + p {
  margin-top: 18px;
  color: var(--text-secondary);
}

.legal-section {
  counter-increment: lg-section;
  margin-top: 50px;
  padding-top: 50px;
  border-top: 1px solid var(--legal-rule);
}

.legal-intro + .legal-section,
.legal-body > .legal-section:first-child {
  margin-top: 30px;
}

.legal-body > .legal-section:first-child {
  padding-top: 0;
  border-top: 0;
}

/* numbered heading: the numeral sits in a lavender chip */
.legal-heading {
  display: grid;
  grid-template-columns: var(--legal-gutter) minmax(0, 1fr);
  align-items: center;
  margin-bottom: 24px;
}

.legal-heading::before {
  content: counter(lg-section);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50% 14px 50% 50%;
  background: var(--lavender);
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}

.legal-heading span {
  font-family: var(--font-heading);
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-heading);
}

/* unnumbered documents: a short brand rule above the heading instead */
.legal-body--unnumbered .legal-heading {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.legal-body--unnumbered .legal-heading::before {
  content: "";
  width: 44px;
  height: 4px;
  border-radius: 4px;
  background: var(--grad-badge);
}

.legal-lead,
.legal-prose {
  padding-left: var(--legal-gutter);
}

.legal-body--unnumbered .legal-lead,
.legal-body--unnumbered .legal-prose {
  padding-left: 0;
}

.legal-lead {
  margin-bottom: 22px;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.legal-prose p {
  margin-bottom: 20px;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.legal-prose > :last-child {
  margin-bottom: 0;
}

.legal-prose h3 {
  position: relative;
  margin: 34px 0 12px;
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.35;
}

.legal-prose h3:first-child {
  margin-top: 0;
}

.legal-prose strong,
.legal-intro strong {
  color: var(--text-primary);
}

.legal-prose a,
.legal-link,
.legal-note a {
  font-weight: 500;
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(129, 61, 214, 0.35);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: color var(--dur), text-decoration-color var(--dur);
}

.legal-prose a:hover,
.legal-link:hover,
.legal-note a:hover {
  color: var(--primary-dark);
  text-decoration-color: currentColor;
}

/* Long unbreakable tokens (emails, URLs) wrap instead of widening the page. */
.legal-list > li,
.legal-defs > div,
.legal-defs dd,
.legal-clauses > li,
.legal-subclauses > li,
.legal-steps > li,
.legal-related-list a {
  min-width: 0;
  overflow-wrap: break-word;
}

/* --- Lists: tinted rows with a waveform marker --------------------- */

.legal-list {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.legal-list > li {
  position: relative;
  padding: 16px 20px 16px 50px;
  border-radius: 12px;
  background: var(--legal-surface);
  box-shadow: inset 0 0 0 1px var(--legal-rule);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--legal-ink);
}

.legal-list > li::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 22px;
  width: 14px;
  height: 14px;
  background-color: var(--primary);
  -webkit-mask: var(--icon-wave) center / contain no-repeat;
  mask: var(--icon-wave) center / contain no-repeat;
}

.legal-list > li strong {
  display: block;
  margin-bottom: 2px;
  font-weight: 500;
  color: var(--text-heading);
}

.legal-list > li p {
  margin-bottom: 8px;
  font-size: inherit;
}

.legal-list > li p:last-child {
  margin-bottom: 0;
}

/* tight: short scannable items as a ruled list, not a stack of cards */
.legal-list--tight {
  gap: 0;
}

.legal-list--tight > li {
  padding: 12px 0 12px 30px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 1rem;
  color: var(--text-secondary);
}

.legal-list--tight > li + li {
  border-top: 1px solid var(--legal-rule);
}

.legal-list--tight > li::before {
  left: 2px;
  top: 19px;
  width: 12px;
  height: 12px;
}

.legal-list--tight > li strong {
  display: inline;
}

.legal-list--numbered {
  counter-reset: legal-item;
}

.legal-list--numbered > li {
  counter-increment: legal-item;
}

.legal-list--numbered > li::before {
  content: counter(legal-item) ".";
  top: 16px;
  width: auto;
  height: auto;
  background: none;
  -webkit-mask: none;
  mask: none;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--primary);
}

/* --- Numbered clauses (2.1, 2.2 ...) -------------------------------------- */

.legal-clauses {
  counter-reset: lg-clause;
  margin-bottom: 22px;
}

.legal-clauses > li {
  counter-increment: lg-clause;
  position: relative;
  margin-bottom: 20px;
  padding-left: var(--legal-gutter);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.legal-clauses > li:last-child {
  margin-bottom: 0;
}

.legal-clauses > li::before {
  content: counter(lg-section) "." counter(lg-clause);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.8;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}

.legal-clauses > li strong {
  color: var(--text-primary);
}

.legal-clauses > li > strong:first-child {
  display: block;
  margin-bottom: 2px;
}

.legal-clauses > li > ul,
.legal-clauses > li > ol {
  margin-top: 12px;
}

.legal-subclauses {
  counter-reset: lg-subclause;
  margin-top: 14px;
  padding: 16px 18px 16px 22px;
  border-left: 3px solid var(--lavender);
  border-radius: 0 12px 12px 0;
  background: var(--legal-surface);
}

.legal-subclauses > li {
  counter-increment: lg-subclause;
  position: relative;
  margin-bottom: 12px;
  padding-left: 56px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--legal-ink);
}

.legal-subclauses > li:last-child {
  margin-bottom: 0;
}

.legal-subclauses > li::before {
  content: counter(lg-section) "." counter(lg-clause) "." counter(lg-subclause);
  position: absolute;
  left: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 2.1;
  color: var(--text-secondary);
}

/* --- Steps: orange numerals on a dashed spine (reference step badges) ---- */

.legal-steps {
  counter-reset: lg-step;
  margin: 6px 0 24px 16px;
  padding-left: 0;
  border-left: 2px dashed #e2dcf6;
}

.legal-steps > li {
  counter-increment: lg-step;
  position: relative;
  padding: 0 0 22px 34px;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.legal-steps > li:last-child {
  padding-bottom: 0;
}

.legal-steps > li::before {
  content: counter(lg-step);
  position: absolute;
  left: -17px;
  top: -2px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px #fff, 0 8px 18px rgba(253, 170, 4, 0.4);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--on-accent);
}

/* --- Definition cards ----------------------------------------------------- */

.legal-defs {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.legal-defs > div {
  display: grid;
  grid-template-columns: minmax(0, 12.5rem) minmax(0, 1fr);
  gap: 22px;
  padding: 18px 22px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--legal-rule), 0 6px 16px rgba(129, 61, 214, 0.04);
  transition: box-shadow var(--dur), background-color var(--dur);
}

.legal-defs > div:hover {
  background: var(--legal-wash);
  box-shadow: inset 0 0 0 1px #ddd2f4;
}

.legal-defs dt {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-heading);
}

.legal-defs dd {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--legal-ink);
}

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

.legal-callout {
  position: relative;
  margin-bottom: 22px;
  padding: 20px 22px 20px 58px;
  border-radius: 12px;
  background: var(--legal-wash);
  box-shadow: inset 4px 0 0 var(--primary);
}

.legal-callout::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 23px;
  width: 20px;
  height: 20px;
  background-color: var(--primary);
  -webkit-mask: var(--icon-info) center / contain no-repeat;
  mask: var(--icon-info) center / contain no-repeat;
}

.legal-callout p {
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--legal-ink);
}

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

.legal-callout--warning {
  background: #fff6e3;
  box-shadow: inset 4px 0 0 #d98a00;
}

.legal-callout--warning::before {
  background-color: #a15c00;
  -webkit-mask-image: var(--icon-warning);
  mask-image: var(--icon-warning);
}

.legal-callout--critical {
  background: #fdf0f0;
  box-shadow: inset 4px 0 0 #dc2626;
}

.legal-callout--critical::before {
  background-color: #b91c1c;
  -webkit-mask-image: var(--icon-critical);
  mask-image: var(--icon-critical);
}

/* --- Table (available to documents that need one) ------------------------- */

.legal-table-wrap {
  overflow-x: auto;
  margin-bottom: 22px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--legal-rule);
}

.legal-table {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.legal-table th,
.legal-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--legal-rule);
  text-align: left;
  vertical-align: top;
}

.legal-table thead th {
  background: var(--legal-surface);
  font-weight: 500;
  color: var(--text-heading);
}

/* --- Related documents & closing note -------------------------------------- */

.legal-related {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--legal-rule);
}

.legal-related-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--primary);
}

.legal-related-title::before {
  content: "";
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: var(--icon-contents) center / contain no-repeat;
  mask: var(--icon-contents) center / contain no-repeat;
}

.legal-related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.legal-related-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-card);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur), color var(--dur);
}

.legal-related-list a::after {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background-color: var(--primary);
  -webkit-mask: var(--icon-arrow) center / contain no-repeat;
  mask: var(--icon-arrow) center / contain no-repeat;
  transition: transform var(--dur) var(--ease);
}

.legal-related-list a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  color: var(--primary);
}

.legal-related-list a:hover::after {
  transform: translateX(4px);
}

.legal-note {
  margin-top: 50px;
  padding: 22px 24px;
  border-radius: 12px;
  background: var(--legal-surface);
  box-shadow: inset 0 0 0 1px var(--legal-rule);
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--legal-ink);
}

/* ==========================================================================
   Safety Center
   ========================================================================== */

/* in-page section tabs, pinned under the header */
.safety-center-nav {
  position: sticky;
  top: var(--header-h-scrolled);
  z-index: 50;
  border-bottom: 1px solid var(--legal-rule);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.safety-center-nav ul {
  display: flex;
  gap: 6px;
  padding: 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.safety-center-nav ul::-webkit-scrollbar {
  display: none;
}

.safety-center-nav a {
  display: block;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  white-space: nowrap;
  color: var(--text-primary);
  transition: background-color var(--dur), color var(--dur);
}

.safety-center-nav a:hover {
  background: var(--legal-wash);
  color: var(--primary-dark);
}

.safety-center-nav a.is-active {
  background: var(--primary);
  color: #fff;
}

/* the tab bar sits over anchored sections, so they land below it too */
.safety-center-section,
.safety-center-help {
  scroll-margin-top: 70px;
}

.safety-center-section {
  position: relative;
  padding-block: var(--section-space);
}

.safety-center-section--haze {
  background: var(--grad-soft);
}

.safety-center-eyebrow {
  margin-bottom: 20px;
  font-family: var(--font-heading);
  font-size: var(--fs-label);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--primary);
}

.safety-center-heading {
  font-size: var(--fs-h2);
  font-weight: 500;
  line-height: 1.2;
}

.safety-center-standfirst {
  max-width: 680px;
  margin-top: 20px;
}

.safety-center-standfirst a,
.safety-center-link,
.safety-center-prose a {
  font-weight: 500;
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(129, 61, 214, 0.35);
  text-underline-offset: 3px;
}

.safety-center-section-head {
  max-width: 760px;
  margin: 0 auto var(--head-gap);
  text-align: center;
}

.safety-center-section-head .safety-center-standfirst {
  margin-inline: auto;
}

.safety-center-columns .safety-center-heading {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
}

.safety-center-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 70px;
}

.safety-center-prose p {
  font-size: 1.0625rem;
  line-height: 1.8;
}

.safety-center-prose p + p {
  margin-top: 18px;
}

/* --- three stages: numbered cards, screenshot alternating sides ---------- */

.safety-center-spine {
  display: grid;
  gap: 40px;
  counter-reset: sc-stage;
}

.safety-center-stage {
  counter-increment: sc-stage;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas:
    ".    shot"
    "when shot"
    "text shot"
    ".    shot";
  column-gap: 56px;
  padding: 50px 56px;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-card-strong);
}

.safety-center-stage::before {
  /* reference process numerals: orange badge */
  content: "0" counter(sc-stage);
  position: absolute;
  top: -18px;
  left: 44px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(253, 170, 4, 0.45);
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--on-accent);
}

.safety-center-stage-when {
  grid-area: when;
  justify-self: start;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--lavender);
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary-dark);
}

/* the body wrapper steps aside so its text and screenshot join the stage grid */
.safety-center-stage-body {
  display: contents;
}

.safety-center-stage-text {
  grid-area: text;
}

.safety-center-stage:nth-child(even) {
  grid-template-columns: 250px minmax(0, 1fr);
  grid-template-areas:
    "shot ."
    "shot when"
    "shot text"
    "shot .";
}

.safety-center-stage-text h3 {
  margin-bottom: 14px;
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary);
}

.safety-center-stage-text p {
  line-height: 1.8;
}

.safety-center-stage-text p + p,
.safety-center-stage-text p + ul {
  margin-top: 14px;
}

.safety-center-stage-list {
  display: grid;
  gap: 10px;
}

.safety-center-stage-list li {
  position: relative;
  padding-left: 32px;
  line-height: 1.7;
}

.safety-center-stage-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--grad-icon);
}

.safety-center-stage-list li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 12px;
  height: 12px;
  background-color: #fff;
  -webkit-mask: var(--icon-check) center / contain no-repeat;
  mask: var(--icon-check) center / contain no-repeat;
}

.safety-center-stage-list strong,
.safety-center-stage-text strong,
.safety-center-steps strong {
  color: var(--text-primary);
}

.safety-center-shot {
  grid-area: shot;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 250px;
  text-align: center;
}

.safety-center-shot img {
  width: 100%;
  padding: 8px;
  border-radius: 34px;
  background: #fff;
  box-shadow: 0 26px 50px rgba(42, 11, 82, 0.2), inset 0 0 0 1px var(--legal-rule);
  transition: transform 0.5s var(--ease);
}

/* Talkiyo screenshots already include a phone bezel */
.safety-center-shot img.shot-bare {
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  filter: drop-shadow(0 26px 40px rgba(42, 11, 82, 0.22));
}

.safety-center-stage:hover .safety-center-shot img {
  transform: translateY(-6px) rotate(-1.5deg);
}

.safety-center-shot figcaption {
  margin-top: 16px;
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

/* --- report steps ---------------------------------------------------------- */

.safety-center-steps {
  counter-reset: sc-step;
  display: grid;
  gap: 16px;
  margin-top: 34px;
}

.safety-center-steps li {
  counter-increment: sc-step;
  position: relative;
  padding: 18px 22px 18px 72px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-card);
  line-height: 1.7;
}

.safety-center-steps li::before {
  content: counter(sc-step);
  position: absolute;
  left: 20px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--on-accent);
  transform: translateY(-50%);
}

#report-steps .safety-center-columns > section:last-child {
  position: sticky;
  top: calc(var(--header-h-scrolled) + 90px);
  padding: 40px;
  border-radius: var(--radius-md);
  background: var(--grad-soft);
}

/* --- point cards (privacy / guidelines) ------------------------------------ */

.safety-center-points {
  --per-row: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.safety-center-point {
  flex: 0 1 calc((100% - (var(--per-row) - 1) * 30px) / var(--per-row));
  padding: 34px 30px;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.safety-center-point:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.safety-center-point dt {
  position: relative;
  padding-top: 64px;
  margin-bottom: 10px;
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-heading);
}

.safety-center-point dt::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  border-radius: 50% 14px 50% 50%;
  background: var(--lavender);
}

.safety-center-point dt::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 20px;
  height: 20px;
  background-color: var(--primary);
  -webkit-mask: var(--icon-check) center / contain no-repeat;
  mask: var(--icon-check) center / contain no-repeat;
}

.safety-center-point dd {
  margin: 0;
  line-height: 1.75;
}

.safety-center-cta {
  display: flex;
  justify-content: center;
  margin-top: 50px;
}

/* --- resources ------------------------------------------------------------- */

.safety-center-subsection + .safety-center-subsection {
  margin-top: 70px;
}

.safety-center-subhead {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.3;
}

.safety-center-subsection > .safety-center-standfirst {
  margin-top: 8px;
}

.safety-center-contacts,
.safety-center-resources {
  display: grid;
  gap: 30px;
  margin-top: 30px;
}

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

.safety-center-resources {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.safety-center-contact,
.safety-center-resource {
  display: flex;
  flex-direction: column;
  padding: 34px 30px;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-card-strong);
}

.safety-center-contact h4,
.safety-center-resource h4 {
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.35;
}

.safety-center-contact h4 span {
  display: block;
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--primary);
}

.safety-center-contact p,
.safety-center-resource p {
  margin-top: 12px;
  line-height: 1.7;
}

.safety-center-contact a {
  margin-top: 18px;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--primary);
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: rgba(129, 61, 214, 0.35);
  text-underline-offset: 3px;
}

.safety-center-resource {
  justify-content: space-between;
  gap: 22px;
}

.safety-center-resource a {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  padding: 11px 22px;
  border: 1.5px solid #cbc1e6;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary-dark);
  transition: background-color var(--dur), border-color var(--dur), color var(--dur);
}

.safety-center-resource a::after {
  content: "";
  width: 14px;
  height: 14px;
  background-color: currentColor;
  -webkit-mask: var(--icon-external) center / contain no-repeat;
  mask: var(--icon-external) center / contain no-repeat;
}

.safety-center-resource a:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.safety-center-disclaimer {
  margin-top: 20px;
  padding: 26px 28px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px #dbe7e4;
}

.safety-center-disclaimer p {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--legal-ink);
}

.safety-center-disclaimer p + p {
  margin-top: 12px;
}

/* --- need help: the home page's CTA panel ---------------------------------- */

.safety-center-help {
  padding-block: var(--section-space);
}

.safety-center-help > .container {
  position: relative;
  overflow: hidden;
  padding: 70px;
  border-radius: var(--radius-lg);
  /* text fills both columns, so the panel stays purple under every word and
     the orange accent lives in the empty lower-left corner (see ::after) */
  background: linear-gradient(135deg, #813dd6 0%, #7434cf 55%, #5813af 100%);
  box-shadow: 0 30px 60px rgba(88, 19, 175, 0.28);
  color: #fff;
}

.safety-center-help > .container::after {
  content: "";
  position: absolute;
  left: -90px;
  bottom: -110px;
  width: 300px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(253, 170, 4, 0.9), rgba(253, 170, 4, 0));
  pointer-events: none;
}

.safety-center-help > .container::before {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  right: -120px;
  top: -200px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.safety-center-help .safety-center-columns {
  position: relative;
  align-items: center;
}

.safety-center-help .safety-center-eyebrow,
.safety-center-help .safety-center-heading {
  color: #fff;
}

.safety-center-help-intro {
  margin-bottom: 28px;
  font-size: 1.0625rem;
  color: #fff;
}

.safety-center-help-meta {
  margin-top: 24px;
  font-size: var(--fs-small);
  color: #fff;
}

.safety-center-help-meta a {
  font-weight: 500;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.safety-center-help :focus-visible,
.legal-masthead :focus-visible {
  outline-color: #fff;
}

/* ==========================================================================
   Footer without the overlapping home CTA
   ========================================================================== */

.footer--plain {
  padding-top: 90px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1199px) {
  .legal-doc {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 50px;
  }

  .safety-center-stage {
    padding: 44px 40px;
  }

  .safety-center-stage,
  .safety-center-stage:nth-child(even) {
    column-gap: 40px;
  }

  .safety-center-help > .container {
    padding: 56px 50px;
  }

  .legal-masthead::before {
    right: -420px;
  }

  /* narrow margins would put the dot grid (hero) and ring (help panel)
     under the copy */
  .legal-masthead::after,
  .safety-center-help > .container::before {
    display: none;
  }
}

@media (max-width: 991px) {
  .legal-masthead {
    padding: calc(var(--header-h) + 44px) 0 70px;
  }

  .safety-center-help > .container::after {
    display: none;
  }

  .legal-masthead::before,
  .legal-masthead::after {
    display: none;
  }

  .legal-hero-grid {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 30px;
  }

  /* single column: the contents card becomes a collapsible panel on top */
  .legal-doc {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .legal-index {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 20px 22px;
  }

  .legal-index.is-collapsible .legal-index-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .legal-index.is-collapsible.is-open .legal-index-title {
    margin-bottom: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--legal-rule);
  }

  .legal-index.is-collapsible:not(.is-open) .legal-index-list {
    display: none;
  }

  .legal-body {
    max-width: none;
  }

  .safety-center-columns {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  #report-steps .safety-center-columns > section:last-child {
    position: static;
  }

  .safety-center-points {
    --per-row: 2;
  }

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

  .safety-center-stage,
  .safety-center-stage:nth-child(even) {
    grid-template-columns: minmax(0, 1fr) 210px;
    grid-template-areas:
      ".    shot"
      "when shot"
      "text shot"
      ".    shot";
  }
}

@media (max-width: 767px) {
  .legal-page {
    --legal-gutter: 48px;
  }

  /* stacked: the orange glow moves behind the illustration, as on the home hero */
  .legal-masthead {
    padding: calc(var(--header-h) + 36px) 0 56px;
    background: var(--grad-hero-stacked);
    text-align: center;
  }

  .legal-hero-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 30px;
  }

  .legal-hero-art {
    justify-self: center;
    max-width: 200px;
  }

  .legal-label {
    margin-bottom: 16px;
    font-size: 0.8125rem;
    letter-spacing: 2px;
  }

  .legal-standfirst {
    margin-top: 18px;
    font-size: 1rem;
  }

  .legal-meta {
    justify-content: center;
    margin-top: 24px;
  }

  .legal-intro p {
    font-size: 1.0625rem;
  }

  .legal-section {
    margin-top: 40px;
    padding-top: 40px;
  }

  .legal-heading::before {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .legal-prose p,
  .legal-lead,
  .legal-clauses > li,
  .legal-steps > li,
  .legal-list > li {
    font-size: 1rem;
  }

  .legal-list > li {
    padding: 14px 16px 14px 44px;
  }

  .legal-list > li::before {
    left: 17px;
    top: 20px;
  }

  .legal-defs > div {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 18px;
  }

  .legal-callout {
    padding: 18px 18px 18px 50px;
  }

  .legal-callout::before {
    left: 18px;
    top: 21px;
  }

  .safety-center-nav ul {
    padding: 10px 0;
  }

  .safety-center-heading {
    text-align: inherit;
  }

  .safety-center-section-head,
  .safety-center-columns > div:first-child,
  #report-steps .safety-center-columns > section {
    text-align: center;
  }

  .safety-center-stage {
    padding: 44px 24px 30px;
  }

  .safety-center-stage::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .safety-center-stage,
  .safety-center-stage:nth-child(even) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "when" "text" "shot";
  }

  .safety-center-stage-when {
    justify-self: center;
  }

  .safety-center-shot {
    margin-top: 30px;
  }

  .safety-center-stage-text h3 {
    text-align: center;
  }

  .safety-center-shot {
    max-width: 220px;
  }

  .safety-center-steps {
    text-align: left;
  }

  .safety-center-steps li {
    padding-left: 66px;
  }

  #report-steps .safety-center-columns > section:last-child {
    padding: 32px 22px;
  }

  .safety-center-standfirst {
    margin-inline: auto;
  }

  .safety-center-points {
    --per-row: 1;
    gap: 20px;
  }

  .safety-center-contacts,
  .safety-center-resources {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .safety-center-point,
  .safety-center-contact,
  .safety-center-resource {
    padding: 28px 24px;
  }

  .safety-center-subsection + .safety-center-subsection {
    margin-top: 50px;
  }

  .safety-center-subhead,
  .safety-center-subsection > .safety-center-standfirst {
    text-align: center;
  }

  .safety-center-help > .container {
    width: calc(100% - 2 * var(--gutter));
    padding: 44px 24px;
    text-align: center;
  }

  .safety-center-help > .container::before {
    display: none;
  }

  .safety-center-help .btn {
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 479px) {
  .legal-meta span {
    padding: 6px 12px;
    font-size: 0.8125rem;
  }

  .legal-index-list a {
    font-size: 0.9375rem;
  }

  .safety-center-nav a {
    padding: 8px 14px;
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-hero-art svg {
    animation: none;
  }
}
