:root {
  color-scheme: dark;
  --bg: #0f0d16;
  --panel: #17131f;
  --panel-2: #211a2e;
  --text: #f5f1f9;
  --muted: #aaa1b6;
  --line: rgba(255, 255, 255, .1);
  --accent: #b76cff;
  --accent-2: #7148ff;
  --success: #37d89b;
  --warning: #ffcc66;
  --shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, rgba(183, 108, 255, .18), transparent 35%),
    radial-gradient(circle at 90% 8%, rgba(113, 72, 255, .12), transparent 32%),
    var(--bg);
  font: 15px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

a { color: #d8b8ff; }
a:hover { color: #fff; }

.legal-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 72px;
  padding: 12px max(22px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(15, 13, 22, .88);
  backdrop-filter: blur(18px);
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
}

.legal-brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  background-color: #160d25;
  background-image: url("/assets/triva-logo.jpg?v=1.16.2");
  background-repeat: no-repeat;
  background-position: 50% 42%;
  background-size: 218px auto;
  box-shadow: 0 10px 30px rgba(113, 72, 255, .26);
}

.legal-brand strong,
.legal-brand small { display: block; }
.legal-brand strong { letter-spacing: .08em; }
.legal-brand small { color: var(--muted); font-size: 11px; }

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.legal-nav a {
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a.active {
  color: #fff;
  background: var(--panel-2);
}

.legal-shell {
  width: min(100% - 28px, 960px);
  margin: 0 auto;
  padding: 54px 0 72px;
}

.legal-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  padding: clamp(25px, 5vw, 48px);
  border: 1px solid rgba(183, 108, 255, .2);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(183,108,255,.16), rgba(113,72,255,.04)),
    var(--panel);
  box-shadow: var(--shadow);
}

.legal-hero::after {
  position: absolute;
  top: -90px;
  right: -70px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(183,108,255,.12);
  filter: blur(2px);
  content: "";
}

.legal-eyebrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 9px;
  border: 1px solid rgba(183,108,255,.25);
  border-radius: 999px;
  color: #e4ccff;
  background: rgba(183,108,255,.08);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.legal-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.06;
  letter-spacing: -.035em;
}

.legal-hero p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 15px 0 0;
  color: #c8c0d1;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px !important;
  font-size: 13px;
}

.legal-meta span { color: #fff; font-weight: 750; }

.doc-content,
.support-card,
.price-card,
.legal-menu-card {
  margin-top: 16px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(23, 19, 31, .94);
}

.doc-content section + section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.doc-content h2,
.support-card h2,
.price-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.25;
}

.doc-content h3 { margin: 20px 0 8px; font-size: 17px; }
.doc-content p { margin: 9px 0; }
.doc-content ul,
.doc-content ol { margin: 10px 0; padding-left: 22px; }
.doc-content li + li { margin-top: 7px; }

.notice {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 204, 102, .24);
  border-radius: 14px;
  color: #f7e6bd;
  background: rgba(255, 204, 102, .07);
}

.notice.success {
  border-color: rgba(55, 216, 155, .24);
  color: #c8f5e3;
  background: rgba(55, 216, 155, .06);
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.info-chip {
  display: grid;
  min-height: 104px;
  align-content: center;
  gap: 7px;
  padding: 18px;
  border: 1px solid rgba(183,108,255,.2);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(33,26,46,.96), rgba(23,19,31,.96));
}

.info-chip span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.info-chip strong { color: #fff; font-size: 16px; line-height: 1.35; }

.return-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.return-step {
  display: flex;
  min-height: 142px;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(23,19,31,.94);
}

.return-step > span {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(113,72,255,.24);
}

.return-step strong { display: block; margin: 5px 0 7px; font-size: 16px; }
.return-step p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.return-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 16px 0;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(55,216,155,.24);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(55,216,155,.1), rgba(113,72,255,.08)), var(--panel);
  box-shadow: var(--shadow);
}

.return-callout span { color: #79e6ba; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.return-callout h2 { margin: 7px 0; font-size: clamp(20px, 3vw, 28px); line-height: 1.2; }
.return-callout p { margin: 0; color: var(--muted); }
.return-callout .legal-action { flex: 0 0 auto; }

.support-icon { display: grid; width: 46px; height: 46px; margin-bottom: 16px; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(255,255,255,.05); font-size: 22px; }
.featured-support { border-color: rgba(183,108,255,.28); background: linear-gradient(145deg, rgba(39,28,57,.96), rgba(23,19,31,.96)); }
.inline-cta { display: inline-flex; margin-top: 8px; color: #e1c8ff; font-weight: 800; text-decoration: none; }
.inline-cta:hover { color: #fff; }

.store-details {
  display: grid;
  grid-template-columns: minmax(150px, .75fr) minmax(0, 1.5fr);
  gap: 0;
  margin: 16px 0 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
}

.store-details dt,
.store-details dd {
  margin: 0;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.store-details dt { color: var(--muted); background: rgba(255,255,255,.025); }
.store-details dd { font-weight: 700; }
.store-details dt:last-of-type,
.store-details dd:last-of-type { border-bottom: 0; }

.legal-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.legal-menu-card {
  display: flex;
  min-height: 160px;
  flex-direction: column;
  margin: 0;
  color: var(--text);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease;
}

.legal-menu-card:hover {
  transform: translateY(-3px);
  border-color: rgba(183,108,255,.35);
}

.legal-menu-card span { font-size: 27px; }
.legal-menu-card h2 { margin: 16px 0 6px; font-size: 19px; }
.legal-menu-card p { margin: 0; color: var(--muted); }

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.support-card { margin: 0; }

.support-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 12px;
  padding: 11px 17px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 34px rgba(113, 72, 255, .23);
  font-weight: 850;
  text-decoration: none;
}

.support-contact:hover { color: #fff; filter: brightness(1.08); }

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.legal-action {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #efe6fa;
  background: var(--panel-2);
  font-weight: 750;
  text-decoration: none;
}

.legal-action.primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.legal-footer {
  padding: 24px 14px 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.muted { color: var(--muted); }
.hidden { display: none !important; }

@media (max-width: 760px) {
  .legal-topbar { position: static; align-items: flex-start; flex-direction: column; padding: 13px 16px; }
  .legal-nav { width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .legal-nav a { white-space: nowrap; }
  .legal-shell { padding-top: 26px; }
  .legal-menu,
  .support-grid,
  .info-strip,
  .return-flow { grid-template-columns: 1fr; }
  .return-callout { align-items: stretch; flex-direction: column; }
  .return-callout .legal-action { text-align: center; }
  .legal-menu-card { min-height: 132px; }
  .store-details { grid-template-columns: 1fr; }
  .store-details dt { padding-bottom: 2px; border-bottom: 0; }
  .store-details dd { padding-top: 2px; }
}

@media print {
  :root { color-scheme: light; }
  body { color: #111; background: #fff; }
  .legal-topbar,
  .legal-actions,
  .legal-footer { display: none; }
  .legal-shell { width: 100%; padding: 0; }
  .legal-hero,
  .doc-content { border: 0; color: #111; background: #fff; box-shadow: none; }
  .legal-hero p,
  .doc-content p,
  .doc-content li { color: #222; }
}
