/* PURPOSE: Datum website additions on top of the shared StratifAI legal page styles (legal.css).
   CONTEXT: Used by the Pricing, Terms, Privacy and Refunds pages on datum.stratifai.solutions.
   HOW IT WORKS: adds the Datum header, tables for the policies and the pricing page layout.
   DEBUG: nothing here changes legal.css; remove this file and the pages fall back to the plain legal look. */

/* Header */
.ds-brand { gap: 10px; }
.ds-mark { width: 30px; height: 30px; display: block; }
.ds-word { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); }
.ds-nav { display: flex; gap: 6px; }
.ds-nav a {
  font-family: var(--font-display); font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: none;
  padding: 8px 14px; border-radius: 999px; border: 1px solid transparent;
}
.ds-nav a:hover { border-color: var(--line); background: var(--surface); }
.ds-nav a[aria-current="page"] { border-color: var(--line); background: var(--surface); }
.ds-nav a:focus-visible, .ds-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Policy tables */
.ds-table { overflow-x: auto; margin: 10px 0 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ds-table table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.55; }
.ds-table th, .ds-table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ds-table th { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--ink); background: var(--muted); }
.ds-table tr:last-child td { border-bottom: 0; }
.legal-body section { margin-bottom: 30px; }

/* Pricing
   Cards share one row grid (subgrid), so names, prices, buttons and lists line up across all four cards. */
.ds-pricing { max-width: 1180px; }
.ds-head { text-align: center; max-width: 760px; margin: 0 auto 32px; }
.ds-head .legal-eyebrow { justify-content: center; }
.ds-head .legal-title { margin-bottom: 14px; }
.ds-intro { font-size: 16px; line-height: 1.65; color: var(--ink-soft); margin: 0 auto 26px; max-width: 680px; }

.ds-period, .ds-packs { border: 0; display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 4px; background: #EAEFF4; border-radius: 12px; }
.ds-period legend, .ds-packs legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ds-period label, .ds-packs label { position: relative; cursor: pointer; }
.ds-period input, .ds-packs input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ds-period span, .ds-packs span {
  display: block; font-family: var(--font-display); font-size: 14px; font-weight: 600; padding: 9px 18px; border-radius: 9px; color: var(--ink-soft); text-align: center;
}
.ds-period input:checked + span, .ds-packs input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(10, 15, 26, 0.14); }
.ds-period input:focus-visible + span, .ds-packs input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.ds-packs span b { display: block; font-size: 15px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.ds-packs input:checked + span b { color: var(--accent); }

.ds-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.ds-card {
  display: grid; grid-template-rows: subgrid; grid-row: span 5; row-gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px 24px;
  box-shadow: 0 1px 2px rgba(10, 15, 26, 0.04);
}
.ds-top h2 { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin-bottom: 6px; }
.ds-for { font-size: 14px; line-height: 1.55; color: var(--ink-soft); margin-bottom: 22px; }
.ds-pricebox { padding-bottom: 20px; }
.ds-big { font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); }
.ds-big-text { font-size: 28px; }
.ds-per { font-size: 14px; color: var(--ink-soft); margin-top: 6px; min-height: 1.5em; }
.ds-mid { padding-bottom: 18px; }
.ds-mid:empty { padding: 0; }
.ds-extra { margin-top: 2px; }
.ds-users { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ds-card > * { min-width: 0; }
.ds-users label { margin-right: 2px; }
.ds-users label, .ds-custom label { font-size: 14px; font-weight: 600; color: var(--ink); }
.ds-step { display: inline-flex; align-items: stretch; border: 1px solid #CBD5E1; border-radius: 10px; overflow: hidden; background: var(--surface); }
.ds-stepbtn { width: 38px; border: 0; background: var(--muted); font-size: 18px; line-height: 1; color: var(--ink); cursor: pointer; }
.ds-stepbtn:hover { background: #E3E9EF; }
.ds-step input {
  width: 56px; border: 0; border-left: 1px solid #CBD5E1; border-right: 1px solid #CBD5E1; text-align: center;
  font: inherit; font-size: 15px; font-weight: 600; padding: 8px 4px; color: var(--ink); -moz-appearance: textfield;
}
.ds-step input::-webkit-outer-spin-button, .ds-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ds-step input:focus { outline: 2px solid var(--primary); outline-offset: -2px; }
.ds-total { flex-basis: 100%; font-size: 14px; font-weight: 600; color: var(--ink); }

.ds-btn {
  display: block; width: 100%; text-align: center; font-family: var(--font-display); font-size: 15px; font-weight: 600;
  color: #fff; background: var(--gradient); border: 0; border-radius: 10px; padding: 12px 18px; cursor: pointer; text-decoration: none;
  align-self: start;
}
.ds-btn:hover { filter: brightness(1.05); }
.ds-btn-line { background: var(--surface); color: var(--ink); border: 1px solid #CBD5E1; }
.ds-btn-line:hover { background: var(--muted); filter: none; }
.ds-btn:disabled { opacity: 0.6; cursor: progress; }

.ds-feat { list-style: none; margin: 22px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--ink); }
.ds-feat li { display: flex; gap: 10px; margin-bottom: 10px; }
.ds-feat li:last-child { margin-bottom: 0; }
.ds-tick { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--accent); }

.ds-account { text-align: center; font-size: 14px; color: var(--ink-soft); margin: 22px auto 0; max-width: 640px; }
.ds-link { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.ds-status { font-size: 14px; color: var(--ink); background: #EAF7FB; border: 1px solid #BEE8F2; border-radius: 10px; padding: 10px 14px; margin: 14px 0; }
.ds-status:empty { display: none; }

/* Below the cards */
.ds-below { margin: 64px auto 0; max-width: 760px; }
.ds-below .ds-btn { width: auto; display: inline-block; margin-top: 16px; padding: 12px 26px; }
.ds-custom { margin-top: 16px; max-width: 280px; }
.ds-custom label { display: block; margin-bottom: 6px; }
.ds-amount { display: flex; align-items: center; gap: 8px; }
.ds-amount span { font-weight: 600; }
.ds-amount input { width: 100%; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid #CBD5E1; border-radius: 10px; background: var(--surface); color: var(--ink); }
.ds-amount input:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
[aria-invalid="true"] { border-color: #C2410C !important; }
.ds-err { font-size: 13px; color: #B42318; margin-top: 6px; }
.ds-err:empty { display: none; }
.ds-note { font-size: 13px; color: var(--ink-soft); margin-top: 10px; }
#top-up { scroll-margin-top: 90px; }

@media (max-width: 1080px) { .ds-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .ds-cards { grid-template-columns: 1fr; }
  .ds-head { text-align: left; }
  .ds-period { display: flex; }
  .ds-period label { flex: 1 1 40%; }
  .ds-period span, .ds-packs span { padding: 8px 10px; font-size: 13px; }
  .ds-nav a { padding: 6px 10px; font-size: 12px; }
  .ds-word { font-size: 18px; }
}
