/* ============ Trace Buddy showcase ============
   Loaded after styles.css. Colours come from the app itself
   (lib/models.dart section colours, the candy palette and the launcher icon). */
:root {
  --tr: #9B6BFF;          /* icon purple / Nature */
  --tr-pink: #FF6B8B;     /* icon pink / Letters */
  --tr-deep: #6741D9;     /* Nature dark */
  --tr-ink-app: #4A3B7C;  /* app ink */
  --tr-soft: #8A7BB8;     /* app subtitle */
  --tr-green: #4CD08B;    /* start dot / Next */
  --tr-green-dark: #2F9E44;
  --tr-sun: #FFD43B;
  --tr-star: #FFB400;
  --tr-ink: var(--tr-ink-app);
  --tr-lilac: #EBE0FF;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --tr-ink: #CDBBFF; --tr-lilac: #2C2442; }
}
:root[data-theme="dark"] { --tr-ink: #CDBBFF; --tr-lilac: #2C2442; }

.tr-page { background: var(--bg); }
.tr-page .eyebrow b { color: var(--tr-ink); font-weight: 600; }
.tr-page :focus-visible { outline-color: var(--tr); }

.crumbs { font-size: 14px; color: var(--ink-3); margin-bottom: 26px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

.btn--tr { background: linear-gradient(135deg, var(--tr) 0%, var(--tr-pink) 100%); color: #fff; }
.btn--sun { background: var(--tr-sun); color: #3A2A00; }

/* ============ Hero ============ */
.tr-hero {
  position: relative; overflow: hidden;
  padding: 40px 0 72px;
  background:
    radial-gradient(55% 60% at 88% 18%, color-mix(in srgb, var(--tr) 24%, transparent), transparent 70%),
    radial-gradient(45% 50% at 62% 96%, color-mix(in srgb, var(--tr-pink) 20%, transparent), transparent 70%),
    radial-gradient(30% 40% at 100% 70%, color-mix(in srgb, #3DB5FF 16%, transparent), transparent 70%),
    var(--bg);
}
@media (min-width: 960px) { .tr-hero { padding: 64px 0 104px; } }
.tr-hero__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .tr-hero__grid { grid-template-columns: 1.05fr .95fr; gap: 56px; } }
.tr-id { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.tr-id img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 10px 24px -10px rgba(103,65,217,.6); }
.tr-id .eyebrow { margin: 0; }
.tr-id__name { font: 800 22px/1.1 var(--font-display); color: var(--tr-ink); letter-spacing: -0.01em; }
.tr-hero h1 { font-size: clamp(40px, 6.2vw, 76px); font-weight: 800; }
.tr-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--tr-pink), #FFA23B 30%, #4CD08B 55%, #3DB5FF 75%, var(--tr));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tr-hero .facts dd { color: var(--ink); }

/* ---------- phone with the live tracing pad ---------- */
.tr-try { scroll-margin-top: 90px; }
.tr-stage { position: relative; display: grid; place-items: center; }
.tr-phone {
  position: relative; width: min(330px, 86vw);
  border-radius: 46px; padding: 11px;
  background: #241C3B;
  box-shadow: 0 0 0 2px #3C305E inset, 0 40px 80px -30px rgba(70,40,140,.6), 0 18px 30px -18px rgba(0,0,0,.4);
}
.tr-screen {
  --sec: #FF6B8B; --sec-dark: #D6336C; --sec-soft: #FFE3EA;
  position: relative; border-radius: 36px; overflow: hidden;
  background: var(--sec-soft); color: var(--sec-dark);
  padding: 16px 14px 14px;
  display: flex; flex-direction: column; align-items: center;
  transition: background .3s ease;
}
.tr-screen__bar { width: 100%; display: flex; align-items: center; gap: 8px; }
.tr-screen__name {
  flex: 1; min-width: 0; text-align: center;
  font: 900 26px/1.1 var(--font-body); color: var(--sec-dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tr-icon {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: #fff; color: var(--sec-dark);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--sec-dark) 30%, transparent);
  transition: transform .15s ease;
}
.tr-icon:active { transform: scale(.92); }
.tr-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.tr-screen__msg {
  height: 40px; display: grid; place-items: center;
  font: 900 16px/1 var(--font-body); color: color-mix(in srgb, var(--sec-dark) 70%, transparent);
}
.tr-screen__msg.is-praise { font-size: 25px; animation: tr-pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes tr-pop { from { transform: scale(.4); } to { transform: scale(1); } }

.tr-pad {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 7%;
  overflow: hidden; background: linear-gradient(#FFF0F4, #FFD9E4);
  box-shadow: 0 10px 24px -6px color-mix(in srgb, var(--sec) 45%, transparent);
}
.tr-pad canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  touch-action: none; cursor: crosshair; border-radius: inherit;
}
.tr-pad canvas:focus-visible { outline: 3px solid var(--sec-dark); outline-offset: -3px; }
.tr-pad__art {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0;
  transform-origin: 50% 50%; pointer-events: none; user-select: none;
}
.tr-screen__actions {
  height: 72px; width: 100%; display: flex; justify-content: center; align-items: center; gap: 14px;
  visibility: hidden; opacity: 0; transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s .25s;
}
.tr-screen.is-done .tr-screen__actions { visibility: visible; opacity: 1; transform: none; transition-delay: .35s, .35s, 0s; }
.tr-chunky {
  --c: var(--sec); --d: var(--sec-dark);
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; cursor: pointer; border-radius: 22px; padding: 11px 18px 12px;
  font: 900 18px/1 var(--font-body); color: #fff; background: var(--c);
  box-shadow: 0 5px 0 var(--d); transition: transform .1s ease, box-shadow .1s ease;
}
.tr-chunky:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--d); }
.tr-chunky svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tr-chunky--go { --c: var(--tr-green); --d: var(--tr-green-dark); }

.tr-stage__chip { position: absolute; z-index: 2; pointer-events: none; }
.tr-stage__chip--a { top: 22%; left: max(0px, calc(50% - 250px)); transform: rotate(-4deg); }
.tr-stage__chip--b { bottom: 18%; right: max(0px, calc(50% - 255px)); transform: rotate(3deg); }
@media (max-width: 600px) { .tr-stage__chip { display: none; } }

.tr-controls { margin: 26px auto 0; max-width: 460px; display: grid; gap: 16px; }
.tr-picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tr-picks button, .tr-tabs [role="tab"] {
  font: 700 14.5px/1 var(--font-body); padding: 10px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.tr-picks button:hover { border-color: var(--ink-3); color: var(--ink); }
.tr-picks button[aria-pressed="true"] { background: var(--tr); border-color: var(--tr); color: #fff; }
.tr-picks .is-surprise { border-style: dashed; }

.tr-settings {
  margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 16px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.tr-settings legend { padding: 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.tr-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.tr-switch input {
  appearance: none; -webkit-appearance: none; margin: 0; cursor: pointer;
  width: 36px; height: 21px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s;
}
.tr-switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s;
}
.tr-switch input:checked { background: var(--tr); }
.tr-switch input:checked::after { transform: translateX(15px); }
.tr-switch input:focus-visible { outline: 2px solid var(--tr); outline-offset: 2px; }
.tr-seg { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.tr-seg__label { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-right: 6px; }
.tr-seg label { cursor: pointer; }
.tr-seg input { position: absolute; opacity: 0; pointer-events: none; }
.tr-seg span:not(.tr-seg__label) {
  display: inline-block; font-size: 13px; font-weight: 700; padding: 6px 11px; border-radius: 999px;
  border: 1.5px solid var(--line); color: var(--ink-2); background: var(--surface);
}
.tr-seg input:checked + span { background: var(--tr-lilac); border-color: var(--tr); color: var(--tr-ink); }
.tr-seg input:focus-visible + span { outline: 2px solid var(--tr); outline-offset: 2px; }

/* ============ Sections ============ */
.tr-section { padding: 80px 0; }
@media (min-width: 960px) { .tr-section { padding: 120px 0; } }
.tr-section--alt { background: var(--bg-2); }

/* --- How it works --- */
.tr-steps { display: grid; gap: 18px; counter-reset: none; }
@media (min-width: 640px) { .tr-steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .tr-steps { grid-template-columns: repeat(4, 1fr); gap: 22px; } }
.tr-step { position: relative; background: var(--surface); border-radius: var(--radius); padding: 16px 16px 24px; box-shadow: var(--shadow); }
.tr-step__pad { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: linear-gradient(var(--bg0), var(--bg1)); }
.tr-step__pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tr-step__n {
  position: absolute; top: 26px; left: 26px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--tr-ink-app);
  font: 900 15px/1 var(--font-body); box-shadow: 0 3px 8px -2px rgba(74,59,124,.35);
}
.tr-step h3 { font-size: 20px; margin: 18px 6px 0; }
.tr-step p { margin: 8px 6px 0; color: var(--ink-2); font-size: 15.5px; }

/* --- Picture gallery --- */
.tr-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tr-tabs [role="tab"] { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; font-size: 15px; }
.tr-tabs [role="tab"]:hover { border-color: var(--sec); color: var(--ink); }
.tr-tabs [role="tab"][aria-selected="true"] { background: var(--sec); border-color: var(--sec); color: #fff; box-shadow: 0 4px 0 var(--sec-dark); }
.tr-tab__emoji {
  min-width: 28px; height: 28px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--sec) 18%, transparent); font-size: 14px; font-weight: 900; color: var(--sec-dark);
}
[aria-selected="true"] .tr-tab__emoji { background: rgba(255,255,255,.25); color: #fff; }
.tr-tab__n { font-size: 12px; font-weight: 800; opacity: .65; }

.tr-gallery { --sec: #FFA23B; --sec-dark: #E8590C; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .tr-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 900px) { .tr-gallery { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 1120px) { .tr-gallery { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tr-gallery[data-section="letters"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 640px) { .tr-gallery[data-section="letters"] { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .tr-gallery[data-section="letters"] { grid-template-columns: repeat(9, minmax(0, 1fr)); } }
.tr-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; width: 100%;
  padding: 7px 7px 9px; cursor: default; text-align: center; font: inherit; color: inherit;
  background: #fff; border-radius: 22px;
  border: 2px solid color-mix(in srgb, var(--sec) 35%, transparent);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--sec) 25%, transparent);
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
  animation: tr-in .35s ease both;
}
@keyframes tr-in { from { opacity: 0; transform: translateY(8px); } }
.tr-card:hover { transform: translateY(-4px); }
.tr-card__art { position: relative; aspect-ratio: 1; border-radius: 15px; overflow: hidden; background: linear-gradient(var(--bg0), var(--bg1)); }
.tr-card__art > * { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .3s ease, transform .4s cubic-bezier(.2,1.5,.4,1); }
.tr-card__done { opacity: 0; transform: scale(.7); }
.tr-card:hover .tr-card__done, .tr-card:focus-visible .tr-card__done { opacity: 1; transform: none; }
.tr-card:hover .tr-card__guide, .tr-card:focus-visible .tr-card__guide { opacity: 0; }
.tr-card__name { font: 900 14px/1.2 var(--font-body); color: var(--sec-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.tr-card--glyph .tr-card__name { font-size: 12.5px; }
.tr-card.is-starred::after {
  content: "★"; position: absolute; top: 8px; right: 10px; z-index: 1;
  font-size: 22px; line-height: 1; color: var(--tr-star); text-shadow: 0 1px 0 #fff, 0 2px 4px rgba(0,0,0,.2);
}
.tr-gallery__hint { margin-top: 22px; font-size: 14px; color: var(--ink-3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tr-card { background: var(--surface); } }
:root[data-theme="dark"] .tr-card { background: var(--surface); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tr-card__name { color: color-mix(in srgb, var(--sec) 75%, #fff); } }
:root[data-theme="dark"] .tr-card__name { color: color-mix(in srgb, var(--sec) 75%, #fff); }

/* --- Features --- */
.tr-features { display: grid; gap: 18px; }
@media (min-width: 720px) { .tr-features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .tr-features { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.tr-feature { background: var(--surface); border-radius: var(--radius); padding: 28px 26px 30px; box-shadow: var(--shadow); }
.tr-feature__icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--tr-lilac); color: var(--tr-ink); margin-bottom: 20px;
}
.tr-features .tr-feature:nth-child(6n+2) .tr-feature__icon { background: color-mix(in srgb, #4CD08B 20%, var(--surface)); color: #2F9E44; }
.tr-features .tr-feature:nth-child(6n+3) .tr-feature__icon { background: color-mix(in srgb, #3DB5FF 20%, var(--surface)); color: #1C7ED6; }
.tr-features .tr-feature:nth-child(6n+4) .tr-feature__icon { background: color-mix(in srgb, #FF6B8B 18%, var(--surface)); color: #D6336C; }
.tr-features .tr-feature:nth-child(6n+5) .tr-feature__icon { background: color-mix(in srgb, #FFD43B 30%, var(--surface)); color: #C77700; }
.tr-features .tr-feature:nth-child(6n+6) .tr-feature__icon { background: color-mix(in srgb, #FFA23B 22%, var(--surface)); color: #E8590C; }
.tr-feature__icon svg { width: 28px; height: 28px; }
.tr-feature h3 { font-size: 22px; }
.tr-feature p { margin-top: 10px; color: var(--ink-2); font-size: 16px; }
.tr-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tr-pills li { font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.tr-pills li.is-on { background: var(--tr); color: #fff; }
.tr-starcount { display: inline-flex !important; align-items: center; gap: 6px; margin-top: 16px !important; padding: 5px 12px; border-radius: 14px; background: linear-gradient(135deg, #FFA23B, #E8590C); color: #fff !important; font-weight: 800; font-size: 14px !important; }
.tr-starcount span { color: #FFE066; font-size: 17px; }

/* --- Why tracing --- */
.tr-why { display: grid; gap: 44px; align-items: start; }
@media (min-width: 1000px) { .tr-why { grid-template-columns: .85fr 1.15fr; gap: 64px; } }
.tr-why .section-head p + p { margin-top: 14px; }
.tr-why .section-head em { font-style: normal; font-weight: 700; color: var(--tr-ink); }
.tr-moments { display: grid; gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
@media (min-width: 640px) { .tr-moments { grid-template-columns: repeat(2, 1fr); } }
.tr-moment { background: var(--surface); padding: 22px 22px 24px; display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start; }
.tr-moment__img { width: 64px; height: 64px; border-radius: 16px; overflow: hidden; background: linear-gradient(var(--bg0), var(--bg1)); box-shadow: 0 6px 14px -8px rgba(0,0,0,.4); }
.tr-moment__img img { width: 100%; height: 100%; }
.tr-moment h3 { font-size: 18px; }
.tr-moment p { margin-top: 6px; font-size: 15px; color: var(--ink-2); }

/* --- Grown-ups (dark band) --- */
.tr-grownups { background: #3A2C6B; color: #F4EEFF; padding: 88px 0 96px; }
@media (min-width: 960px) { .tr-grownups { padding: 120px 0 128px; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tr-grownups { background: #221B38; } }
:root[data-theme="dark"] .tr-grownups { background: #221B38; }
.tr-grownups .section-head .eyebrow { color: rgba(244,238,255,.6); }
.tr-grownups .section-head p:not(.eyebrow) { color: rgba(244,238,255,.78); }
.tr-grownups .principles { background: rgba(244,238,255,.16); }
.tr-grownups .principles li { background: #3A2C6B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tr-grownups .principles li { background: #221B38; } }
:root[data-theme="dark"] .tr-grownups .principles li { background: #221B38; }
.tr-grownups .principles__n { color: var(--tr-sun); }
.tr-grownups .principles p { color: rgba(244,238,255,.74); }
.tr-gate {
  margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px;
  padding: 24px 26px; border-radius: var(--radius); background: rgba(255,255,255,.07);
}
.tr-gate__q { font: 900 30px/1 var(--font-display); background: #FFF8EE; color: var(--tr-ink-app); padding: 12px 22px; border-radius: 18px; }
.tr-gate p { flex: 1 1 260px; color: rgba(244,238,255,.8); font-size: 16px; }
.tr-gate p b { color: #fff; }
.tr-legal-links { margin-top: 26px; font-size: 15px; color: rgba(244,238,255,.75); }
.tr-legal-links a { color: #fff; text-underline-offset: 4px; text-decoration-color: var(--tr-sun); text-decoration-thickness: 2px; font-weight: 600; }

/* --- CTA --- */
.tr-cta { padding: 88px 0; }
@media (min-width: 960px) { .tr-cta { padding: 120px 0; } }
.tr-cta__card {
  position: relative; overflow: hidden; border-radius: 32px;
  background: linear-gradient(135deg, var(--tr) 0%, #B45DE0 45%, var(--tr-pink) 100%);
  color: #fff; padding: 44px 26px; display: grid; gap: 32px; align-items: center;
}
@media (min-width: 860px) { .tr-cta__card { grid-template-columns: 1.3fr auto; padding: 64px 60px; } }
.tr-cta__card h2 { font-size: clamp(32px, 4.4vw, 52px); max-width: 14em; }
.tr-cta__card p { margin-top: 16px; font-size: 18px; color: rgba(255,255,255,.86); max-width: 32em; }
.tr-cta__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; position: relative; z-index: 1; }
.tr-cta__actions .link { color: #fff; text-decoration-color: var(--tr-sun); }
.tr-cta__deco {
  position: absolute; right: -40px; top: -50px; width: 260px; height: 260px; opacity: .2;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 1.5 3.2 6.6 7.3 1-5.3 5.1 1.3 7.2L12 18l-6.5 3.4 1.3-7.2L1.5 9.1l7.3-1z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 1.5 3.2 6.6 7.3 1-5.3 5.1 1.3 7.2L12 18l-6.5 3.4 1.3-7.2L1.5 9.1l7.3-1z'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(14deg);
}
.tr-stores { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.tr-stores li { font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); color: rgba(255,255,255,.92); }

@media (prefers-reduced-motion: reduce) {
  .tr-card, .tr-card:hover { transform: none; animation: none; }
  .tr-screen__msg.is-praise { animation: none; }
}

/* ============ Legal pages (privacy.html, terms.html) ============ */
.footer__legal { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.footer__legal a { color: var(--ink-3); text-decoration: none; }
.footer__legal a:hover, .footer__legal a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

.legal-hero { padding: 40px 0 44px; border-bottom: 1px solid var(--line);
  background: radial-gradient(50% 120% at 90% 0%, color-mix(in srgb, var(--tr) 18%, transparent), transparent 70%), var(--bg); }
@media (min-width: 960px) { .legal-hero { padding: 56px 0 60px; } }
.legal-hero h1 { font-size: clamp(36px, 5.6vw, 64px); font-weight: 800; }
.legal-hero__meta { margin-top: 16px; color: var(--ink-3); font-size: 15px; }
.legal-hero__meta a { color: var(--ink-2); }

.legal { display: grid; gap: 40px; padding-top: 48px; padding-bottom: 96px; }
@media (min-width: 960px) { .legal { grid-template-columns: 240px minmax(0, 1fr); gap: 72px; padding-top: 64px; padding-bottom: 120px; } }
.legal__toc { font-size: 14px; }
@media (min-width: 960px) { .legal__toc { position: sticky; top: 96px; align-self: start; } }
.legal__toc p { font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.legal__toc ol { display: grid; gap: 2px; }
.legal__toc a { display: block; padding: 6px 10px; margin-left: -10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.legal__toc a:hover { background: var(--bg-2); color: var(--ink); }
@media (max-width: 959px) {
  .legal__toc { background: var(--surface); border-radius: var(--radius-sm); padding: 18px 20px; box-shadow: var(--shadow); }
  .legal__toc ol { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

.legal__body { max-width: 720px; }
.legal__body section { scroll-margin-top: 96px; }
.legal__body section + section { margin-top: 44px; }
.legal__body h2 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 14px; }
.legal__body h3 { font-size: 18px; margin: 22px 0 8px; font-family: var(--font-body); font-weight: 700; letter-spacing: 0; }
.legal__body p, .legal__body li { color: var(--ink-2); font-size: 16.5px; }
.legal__body p + p { margin-top: 12px; }
.legal__body ul { margin-top: 12px; display: grid; gap: 8px; }
.legal__body ul li { position: relative; padding-left: 22px; }
.legal__body ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--tr); }
.legal__body strong { color: var(--ink); }
.legal__body a { color: var(--tr-ink); text-underline-offset: 3px; }
.legal__caps { text-transform: uppercase; font-size: 14.5px !important; letter-spacing: .01em; }

.legal-glance { background: var(--tr-lilac); border-radius: var(--radius); padding: 26px 26px 28px; margin-bottom: 48px; }
.legal-glance h2 { font-size: 22px; margin-bottom: 16px; color: var(--tr-ink); }
.legal-glance ul { margin: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .legal-glance ul { grid-template-columns: 1fr 1fr; gap: 14px 24px; } }
.legal-glance li { padding-left: 30px !important; color: var(--ink) !important; font-size: 15.5px !important; }
.legal-glance li::before {
  width: 18px !important; height: 18px !important; left: 0 !important; top: .2em !important;
  background: var(--tr) !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  border-radius: 0 !important;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .legal-glance li::before { background: var(--tr-sun) !important; } }
:root[data-theme="dark"] .legal-glance li::before { background: var(--tr-sun) !important; }

.legal-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.legal-table th { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.legal-table td { color: var(--ink-2); }
.legal-table td:first-child { color: var(--ink); font-weight: 600; }
@media (max-width: 560px) {
  .legal-table thead { display: none; }
  .legal-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .legal-table td { display: block; border: 0; padding: 3px 0; }
}
.legal-contact { margin-top: 18px; display: inline-flex; }
