/* =====================================================================
   SELcurve Design System (ds) - v1.0.0 (2026-10-04)
   Shared tokens + components for every page. Plan: DESIGN-REFRESH-PLAN.md
   Rules:
   - Every selector starts with .ds- (or :root --ds-* tokens). Inert until
     a page uses ds- classes.
   - Comments must stay ASCII-only (10Web minifier drops CSS after
     non-ASCII characters in comments).
   - Buttons/links: state rules written as .ds-x, .ds-x:hover, .ds-x:focus
     so GeneratePress / child-theme hover colours never leak in.
   - No @import. Fonts are loaded by the theme (DM Serif Display, DM Sans)
     and by includes/ds.php.
   ===================================================================== */

:root {
  /* text */
  --ds-ink: #1C2B2A;
  --ds-ink-2: #374151;
  --ds-muted: #6b7280;
  --ds-faint: #9ca3af;
  /* teal scale */
  --ds-t900: #143a38;
  --ds-t800: #1e5c5a;
  --ds-t700: #1b4f4d;
  --ds-t600: #237a75;
  --ds-t500: #22b8b0;
  --ds-t400: #4a8a85;
  --ds-t200: #b9d3d0;
  --ds-t100: #e3f4f2;
  --ds-t50: #f2faf9;
  /* surfaces + lines */
  --ds-white: #ffffff;
  --ds-cream: #fbf7f1;
  --ds-paper: #faf8f4;
  --ds-line: #dbe5e3;
  --ds-line-2: #c9dbd8;
  /* accents */
  --ds-sun: #f2b705;
  --ds-sun-700: #b88a00;
  --ds-sun-100: #fff4cf;
  --ds-coral: #e06a4f;
  --ds-success: #2f9e6b;
  --ds-success-100: #e2f4ea;
  --ds-success-ink: #1d6b45;
  --ds-danger: #b42318;
  --ds-danger-100: #fde8e6;
  --ds-info-100: #e8f1fb;
  --ds-info-ink: #1e4f86;
  /* CASEL unit colours (one agreed set) */
  --ds-sa: #4a8a85;
  --ds-sm: #5b7fa6;
  --ds-soa: #8b6bae;
  --ds-rs: #d4891a;
  --ds-rdm: #d95b43;
  /* type */
  --ds-serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --ds-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ds-app: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --ds-apph: 'SX Playpen', 'Nunito', system-ui, sans-serif;
  --ds-mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
  /* radius */
  --ds-r-sm: 8px;
  --ds-r: 12px;
  --ds-r-md: 14px;
  --ds-r-lg: 16px;
  --ds-r-pill: 999px;
  /* shadow */
  --ds-sh-1: 0 1px 2px rgba(20,58,56,.06);
  --ds-sh-2: 0 6px 18px rgba(20,58,56,.08);
  --ds-sh-3: 0 14px 34px rgba(20,58,56,.12);
  --ds-sh-btn: 0 2px 0 #123c3a;
  --ds-ring: 0 0 0 3px rgba(34,184,176,.35);
  /* layout */
  --ds-w: 860px;
  --ds-w-wide: 1080px;
  --ds-gutter: 16px;
}

/* Every ds element sizes with border-box (prevents inputs + padding overflowing, e.g. in drawers outside .ds-page) */
[class^="ds-"], [class*=" ds-"], [class^="ds-"]::before, [class*=" ds-"]::before, [class^="ds-"]::after, [class*=" ds-"]::after { box-sizing: border-box; }

/* ---------- Page shell + typography ---------- */
.ds-page { max-width: var(--ds-w); margin: 0 auto; font-family: var(--ds-sans); font-size: 16px; line-height: 1.7; color: var(--ds-ink-2); }
.ds-page.ds-wide { max-width: var(--ds-w-wide); }
.ds-page *, .ds-page *::before, .ds-page *::after { box-sizing: border-box; }
.ds-page [hidden], .ds-dash [hidden], [class^="ds-"][hidden], [class*=" ds-"][hidden] { display: none !important; }
.ds-page p { margin: 0 0 14px; }
.ds-page a:not([class]), .ds-dash a:not([class]) { color: var(--ds-t800); text-underline-offset: 2px; }
.ds-page a:not([class]):hover, .ds-dash a:not([class]):hover { color: var(--ds-t900); }
.ds-page h1, .ds-page h2, .ds-page h3, .ds-page h4 { color: var(--ds-ink); margin: 0 0 10px; }
.ds-page h1, .ds-h1 { font-family: var(--ds-serif); font-weight: 400; font-size: 40px; line-height: 1.15; letter-spacing: -.005em; }
.ds-page h2, .ds-h2 { font-family: var(--ds-serif); font-weight: 400; font-size: 30px; line-height: 1.2; color: var(--ds-t800); }
.ds-page h3, .ds-h3 { font-family: var(--ds-sans); font-weight: 700; font-size: 19px; line-height: 1.3; }
.ds-page h4, .ds-h4 { font-family: var(--ds-sans); font-weight: 700; font-size: 16px; line-height: 1.35; }
.ds-lead { font-size: 17px; color: var(--ds-ink-2); }
.ds-small { font-size: 14px; }
.ds-muted { color: var(--ds-muted); }
.ds-center { text-align: center; }
.ds-eyebrow { display: block; font-family: var(--ds-sans); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ds-t600); margin-bottom: 8px; }
.ds-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ds-sun); color: var(--ds-ink); font: 800 14px/1 var(--ds-sans); margin-right: 8px; vertical-align: 4px; }
.ds-mono { font-family: var(--ds-mono); font-size: .92em; }

/* ---------- Sections ---------- */
.ds-section { margin: 0 0 72px; scroll-margin-top: 90px; }
.ds-section-head { max-width: 680px; margin-bottom: 22px; }
.ds-section-head.ds-center { margin-left: auto; margin-right: auto; }
.ds-divider { border: 0; border-top: 1px solid var(--ds-line); margin: 40px 0; }

/* ---------- Hero (dark) + page header (light) ---------- */
.ds-hero { position: relative; overflow: hidden; background: var(--ds-t900); color: #fff; border-radius: var(--ds-r-lg); padding: 52px 44px 44px; text-align: center; margin: 0 0 56px; }
.ds-hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 28px solid rgba(255,255,255,.05); pointer-events: none; }
.ds-hero > * { position: relative; z-index: 1; }
.ds-page .ds-hero h1 { color: #fff; max-width: 680px; margin: 0 auto 16px; }
.ds-hero p { font-size: 17.5px; color: rgba(255,255,255,.84); max-width: 620px; margin: 0 auto 22px; }
.ds-hero .ds-eyebrow { color: #9fd3cf; }
.ds-hero--left { text-align: left; }
.ds-hero--left h1, .ds-hero--left p { margin-left: 0; }
.ds-pagehead { padding: 8px 0 22px; margin: 0 0 28px; border-bottom: 1px solid var(--ds-line); }
.ds-page .ds-pagehead h1 { font-size: 34px; margin-bottom: 6px; }
.ds-pagehead p { margin: 0; color: var(--ds-muted); }

/* ---------- Chips (jump links / filters) ---------- */
.ds-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ds-chip, .ds-chip:hover, .ds-chip:focus, .ds-chip:visited { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 14px; border-radius: var(--ds-r-pill); background: #fff; border: 1.5px solid var(--ds-t200); color: var(--ds-t800); font: 700 14px/1.2 var(--ds-sans); text-decoration: none; cursor: pointer; }
.ds-chip:hover { background: var(--ds-t50); }
.ds-chip.is-on, .ds-chip.is-on:hover { background: var(--ds-t800); border-color: var(--ds-t800); color: #fff; }
.ds-hero .ds-chip, .ds-hero .ds-chip:hover, .ds-hero .ds-chip:focus { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.24); color: #fff; }
.ds-hero .ds-chip:hover { background: rgba(255,255,255,.2); }
.ds-chip b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ds-sun); color: var(--ds-ink); font-size: 11.5px; }

/* ---------- Buttons ---------- */
.ds-btn, .ds-btn:visited, .ds-btn:hover, .ds-btn:focus, .ds-btn:active {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px; border-radius: 10px; border: 2px solid transparent;
  font: 700 15px/1.2 var(--ds-sans); text-decoration: none; cursor: pointer;
  background: var(--ds-t800); color: #fff; box-shadow: var(--ds-sh-btn); transition: background .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}
.ds-btn:hover { background: var(--ds-t900); color: #fff; }
.ds-btn:active { transform: translateY(1px); box-shadow: none; }
.ds-btn--secondary, .ds-btn--secondary:visited, .ds-btn--secondary:hover, .ds-btn--secondary:focus, .ds-btn--secondary:active { background: #fff; color: var(--ds-t800); border-color: var(--ds-t200); box-shadow: none; }
.ds-btn--secondary:hover { background: var(--ds-t50); border-color: var(--ds-t400); color: var(--ds-t900); }
.ds-btn--sun, .ds-btn--sun:visited, .ds-btn--sun:hover, .ds-btn--sun:focus, .ds-btn--sun:active { background: var(--ds-sun); color: var(--ds-ink); box-shadow: 0 2px 0 var(--ds-sun-700); }
.ds-btn--sun:hover { background: #ffc61a; color: var(--ds-ink); }
.ds-btn--ghost, .ds-btn--ghost:visited, .ds-btn--ghost:hover, .ds-btn--ghost:focus, .ds-btn--ghost:active { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); box-shadow: none; }
.ds-btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.ds-btn--danger, .ds-btn--danger:visited, .ds-btn--danger:hover, .ds-btn--danger:focus, .ds-btn--danger:active { background: #fff; color: var(--ds-danger); border-color: #f1b8b2; box-shadow: none; }
.ds-btn--danger:hover { background: var(--ds-danger-100); }
.ds-btn--link, .ds-btn--link:visited, .ds-btn--link:hover, .ds-btn--link:focus, .ds-btn--link:active { background: none; border: 0; box-shadow: none; padding: 6px 2px; min-height: 0; color: var(--ds-t800); text-decoration: underline; text-underline-offset: 3px; }
/* Size modifiers repeat the state selectors so :hover/:focus never reset the size (layout jump bug 2026-10-04) */
.ds-btn--sm, .ds-btn--sm:hover, .ds-btn--sm:focus, .ds-btn--sm:active { min-height: 36px; padding: 7px 14px; font-size: 14px; border-radius: 8px; }
.ds-btn--lg, .ds-btn--lg:hover, .ds-btn--lg:focus, .ds-btn--lg:active { min-height: 52px; padding: 14px 28px; font-size: 16px; border-radius: 12px; }
.ds-btn--block, .ds-btn--block:hover, .ds-btn--block:focus, .ds-btn--block:active { display: flex; width: 100%; }
.ds-btn[disabled], .ds-btn.is-disabled { opacity: .45; cursor: default; pointer-events: none; }
.ds-btn svg { width: 18px; height: 18px; flex: none; }
.ds-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ds-actions.ds-center { justify-content: center; }

/* Focus ring for every interactive ds element */
.ds-btn:focus-visible, .ds-chip:focus-visible, .ds-tab:focus-visible, .ds-faq summary:focus-visible,
.ds-input:focus-visible, .ds-select:focus-visible, .ds-textarea:focus-visible, .ds-tile:focus-within,
.ds-card--link:focus-visible, .ds-rcard:focus-visible, .ds-iconbtn:focus-visible {
  outline: 3px solid var(--ds-t500); outline-offset: 2px;
}

/* ---------- Logo (never stretch: fixed height, auto width, no flex stretch) ---------- */
.ds-logo { display: block; height: 26px; width: auto; max-width: 100%; object-fit: contain; align-self: flex-start; flex: none; }

/* ---------- Icons ---------- */
.ds-icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.ds-icon--lg { width: 28px; height: 28px; }
.ds-iconbox { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ds-t100); color: var(--ds-t800); flex: none; }
.ds-iconbox--sun { background: var(--ds-sun-100); color: #6b4e00; }
.ds-iconbox svg { width: 22px; height: 22px; }
.ds-iconbtn, .ds-iconbtn:hover, .ds-iconbtn:focus { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--ds-line); background: #fff; color: var(--ds-t800); cursor: pointer; padding: 0; }
.ds-iconbtn:hover { background: var(--ds-t50); }

/* ---------- Grid + cards ---------- */
.ds-grid { display: grid; gap: 14px; grid-template-columns: repeat(var(--ds-cols, 3), minmax(0, 1fr)); }
.ds-grid--2 { --ds-cols: 2; } .ds-grid--3 { --ds-cols: 3; } .ds-grid--4 { --ds-cols: 4; } .ds-grid--5 { --ds-cols: 5; }
.ds-card { background: #fff; border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); padding: 20px; box-shadow: var(--ds-sh-1); }
.ds-card > :last-child { margin-bottom: 0; }
.ds-card--tint { background: var(--ds-t50); border-color: var(--ds-t200); box-shadow: none; }
.ds-card--cream { background: var(--ds-cream); box-shadow: none; }
.ds-card--raised { box-shadow: var(--ds-sh-3); }
.ds-card--feature { border: 2px solid var(--ds-t800); }
.ds-card--link, .ds-card--link:hover, .ds-card--link:focus, .ds-card--link:visited { display: block; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s, border-color .15s; }
.ds-card--link:hover { border-color: var(--ds-t200); box-shadow: var(--ds-sh-2); transform: translateY(-2px); color: inherit; }
.ds-card h3 { margin-bottom: 6px; }
.ds-card p { font-size: 15px; color: var(--ds-muted); line-height: 1.6; }
.ds-card .ds-iconbox { margin-bottom: 12px; }

/* Stat cards */
.ds-stat { text-align: center; padding: 18px 12px; }
.ds-stat strong { display: block; font-family: var(--ds-serif); font-weight: 400; font-size: 34px; line-height: 1.1; color: var(--ds-t800); }
.ds-stat span { display: block; font-size: 13.5px; color: var(--ds-muted); margin-top: 4px; }

/* Steps / journey strip */
.ds-steps { display: grid; grid-template-columns: repeat(var(--ds-cols, 4), minmax(0, 1fr)); gap: 12px; counter-reset: dsstep; }
.ds-step { position: relative; background: #fff; border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); padding: 18px 16px; }
.ds-step::before { counter-increment: dsstep; content: counter(dsstep); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ds-t800); color: #fff; font: 700 13px/1 var(--ds-sans); margin-bottom: 10px; }
.ds-step h3 { font-size: 16px; }
.ds-step p { font-size: 14px; color: var(--ds-muted); margin: 0; line-height: 1.55; }

/* Resource card (shared: homepage, library, product suggestions) */
.ds-rcard, .ds-rcard:hover, .ds-rcard:focus, .ds-rcard:visited { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ds-line); border-radius: var(--ds-r); overflow: hidden; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.ds-rcard:hover { box-shadow: var(--ds-sh-2); transform: translateY(-2px); }
/* Product thumbnails are square: keep 1:1, never stretch or crop (contain). */
.ds-rcard__img { aspect-ratio: 1 / 1; background: var(--ds-paper); display: block; width: 100%; height: auto; object-fit: contain; }
.ds-rcard__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 7px; }
.ds-rcard__title { font: 700 14px/1.35 var(--ds-sans); color: var(--ds-ink); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Badges ---------- */
.ds-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.ds-badge { display: inline-flex; align-items: center; gap: 4px; font: 700 11.5px/1.3 var(--ds-sans); padding: 3px 9px; border-radius: var(--ds-r-pill); background: #eef2f1; color: #4b5563; white-space: nowrap; }
.ds-badge--teal, .ds-badge--digital { background: var(--ds-t100); color: var(--ds-t800); }
.ds-badge--solid { background: var(--ds-t800); color: #fff; }
.ds-badge--sun, .ds-badge--free { background: var(--ds-sun-100); color: #6b4e00; }
.ds-badge--success { background: var(--ds-success-100); color: var(--ds-success-ink); }
.ds-badge--danger { background: var(--ds-danger-100); color: var(--ds-danger); }
.ds-badge--muted { background: #f0f0f0; color: #6b7280; }
.ds-badge--dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Lists, callouts, quotes ---------- */
.ds-check { list-style: none; margin: 0 0 14px; padding: 0; }
.ds-check li { position: relative; padding-left: 30px; margin: 0 0 12px; line-height: 1.6; }
.ds-check li::before { content: ''; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ds-t100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e5c5a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 13px no-repeat; }
.ds-check b { color: var(--ds-ink); }
.ds-callout { border-left: 4px solid var(--ds-t500); background: var(--ds-t50); border-radius: 0 var(--ds-r) var(--ds-r) 0; padding: 14px 18px; margin: 0 0 18px; }
.ds-callout--sun { border-color: var(--ds-sun); background: var(--ds-sun-100); }
.ds-callout--info { border-color: #5b8fd1; background: var(--ds-info-100); }
.ds-callout > :last-child { margin-bottom: 0; }
.ds-quote { background: #fff; border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); padding: 22px 22px 18px; margin: 0 0 18px; }
.ds-quote p { font-family: var(--ds-serif); font-size: 20px; line-height: 1.45; color: var(--ds-ink); margin: 0 0 10px; }
.ds-quote footer { font-size: 14px; color: var(--ds-muted); }
.ds-stars { color: var(--ds-sun); letter-spacing: 2px; }

/* ---------- FAQ (native details) ---------- */
.ds-faq details { border: 1px solid var(--ds-line); border-radius: var(--ds-r); background: #fff; margin-bottom: 8px; }
.ds-faq summary { cursor: pointer; list-style: none; position: relative; padding: 14px 46px 14px 16px; font: 700 15.5px/1.4 var(--ds-sans); color: var(--ds-ink); border-radius: var(--ds-r); }
.ds-faq summary::-webkit-details-marker { display: none; }
.ds-faq summary::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 400; color: var(--ds-t600); }
.ds-faq details[open] summary::after { content: '\2212'; }
.ds-faq details > :not(summary) { padding: 0 16px; }
.ds-faq details > :last-child { padding-bottom: 14px; margin-bottom: 0; }

/* ---------- Tabs (ARIA, see ds.js) ---------- */
.ds-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--ds-line); padding-bottom: 10px; margin-bottom: 16px; }
.ds-tab, .ds-tab:hover, .ds-tab:focus { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 16px; border-radius: var(--ds-r-pill); border: 1.5px solid var(--ds-line); background: #fff; color: var(--ds-t800); font: 700 14px/1.2 var(--ds-sans); cursor: pointer; }
.ds-tab:hover { background: var(--ds-t50); }
.ds-tab[aria-selected="true"], .ds-tab.is-on { background: var(--ds-t800); border-color: var(--ds-t800); color: #fff; }
.ds-tab em { font-style: normal; font-size: 11.5px; padding: 0 7px; border-radius: 99px; background: var(--ds-t100); color: var(--ds-t800); }
.ds-tab[aria-selected="true"] em, .ds-tab.is-on em { background: var(--ds-sun); color: var(--ds-ink); }

/* ---------- Table (cards on phones via data-label) ---------- */
.ds-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ds-table { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; border: 1px solid var(--ds-line); border-radius: var(--ds-r); overflow: hidden; }
.ds-table th { text-align: left; font: 700 12px/1.3 var(--ds-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ds-muted); background: var(--ds-paper); padding: 10px 14px; border-bottom: 1px solid var(--ds-line); }
.ds-table td { padding: 12px 14px; border-bottom: 1px solid #eef2f1; vertical-align: top; }
.ds-table tr:last-child td { border-bottom: 0; }

/* ---------- Plans ---------- */
.ds-plan { background: #fff; border: 1px solid var(--ds-line); border-radius: var(--ds-r-lg); padding: 24px; display: flex; flex-direction: column; }
.ds-plan--featured { border: 2px solid var(--ds-t800); background: var(--ds-t50); position: relative; }
.ds-plan__flag { position: absolute; top: -12px; left: 22px; background: var(--ds-sun); color: var(--ds-ink); font: 800 11.5px/1 var(--ds-sans); letter-spacing: .05em; text-transform: uppercase; padding: 6px 10px; border-radius: 99px; }
.ds-plan__price { font-family: var(--ds-serif); font-size: 40px; line-height: 1.1; color: var(--ds-t800); margin: 6px 0 4px; }
.ds-plan__price small { font-family: var(--ds-sans); font-size: 15px; color: var(--ds-muted); }
.ds-plan ul { margin: 12px 0 20px; }
.ds-plan .ds-btn { margin-top: auto; }

/* ---------- CTA band ---------- */
.ds-cta { background: var(--ds-t900); color: #fff; border-radius: var(--ds-r-lg); padding: 44px 32px; text-align: center; margin: 56px 0 0; position: relative; overflow: hidden; }
.ds-page .ds-cta h2 { color: #fff; }
.ds-cta p { color: rgba(255,255,255,.82); max-width: 560px; margin: 0 auto 20px; }

/* ---------- Mockup frame (browser/app) ---------- */
.ds-frame { background: #fff; border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); box-shadow: var(--ds-sh-3); overflow: hidden; position: relative; }
.ds-frame__bar { background: #eef2f1; border-bottom: 1px solid var(--ds-line); padding: 8px 12px; display: flex; align-items: center; gap: 6px; }
.ds-frame__bar i { width: 9px; height: 9px; border-radius: 50%; background: #cfd8d6; display: block; }
.ds-frame__bar span { flex: 1; margin-left: 8px; background: #fff; border-radius: 99px; padding: 3px 12px; font-size: 11.5px; color: var(--ds-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-try { position: absolute; top: 8px; right: 10px; z-index: 3; background: var(--ds-sun); color: var(--ds-ink); font: 800 10.5px/1 var(--ds-sans); letter-spacing: .04em; text-transform: uppercase; padding: 5px 9px; border-radius: 99px; }

/* ---------- Forms ---------- */
.ds-form { display: grid; gap: 16px; }
.ds-field { display: grid; gap: 6px; }
.ds-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ds-label { font: 700 14px/1.3 var(--ds-sans); color: var(--ds-ink); }
.ds-label small { font-weight: 500; color: var(--ds-muted); }
.ds-input, .ds-select, .ds-textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--ds-line-2); border-radius: var(--ds-r);
  background: #fff; color: var(--ds-ink); font: 400 16px/1.4 var(--ds-sans); box-shadow: none; margin: 0;
  -webkit-appearance: none; appearance: none;
}
.ds-textarea { min-height: 110px; resize: vertical; }
.ds-select { padding-right: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e5c5a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 18px no-repeat; }
.ds-input:focus, .ds-select:focus, .ds-textarea:focus { border-color: var(--ds-t800); box-shadow: var(--ds-ring); outline: none; }
.ds-input::placeholder, .ds-textarea::placeholder { color: #8593a1; }
.ds-field.is-error .ds-input, .ds-field.is-error .ds-select, .ds-field.is-error .ds-textarea { border-color: var(--ds-danger); }
.ds-help { font-size: 13.5px; color: var(--ds-muted); margin: 0; }
.ds-field.is-error .ds-help { color: var(--ds-danger); }
.ds-pw { position: relative; }
.ds-pw .ds-input { padding-right: 76px; }
.ds-pw__toggle, .ds-pw__toggle:hover, .ds-pw__toggle:focus { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 34px; padding: 4px 10px; border: 0; border-radius: 8px; background: var(--ds-t50); color: var(--ds-t800); font: 700 13px/1 var(--ds-sans); cursor: pointer; }
.ds-pw__toggle:focus-visible { outline: 3px solid var(--ds-t500); outline-offset: 1px; }
.ds-check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.ds-check-row input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ds-t800); flex: none; }
.ds-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.ds-tile { position: relative; display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 10px; border: 2px solid var(--ds-line-2); border-radius: var(--ds-r); background: #fff; font: 700 15px/1.2 var(--ds-sans); color: var(--ds-t800); cursor: pointer; text-align: center; }
.ds-tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ds-tile:has(input:checked), .ds-tile.is-on { background: var(--ds-t800); border-color: var(--ds-t800); color: #fff; }
.ds-alert { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--ds-r); padding: 12px 14px; font-size: 15px; line-height: 1.5; border: 1px solid; margin: 0 0 16px; }
.ds-alert--error { background: var(--ds-danger-100); border-color: #f1b8b2; color: #8a1c12; }
.ds-alert--success { background: var(--ds-success-100); border-color: #b5e0c8; color: var(--ds-success-ink); }
.ds-alert--info { background: var(--ds-info-100); border-color: #bcd3f0; color: var(--ds-info-ink); }
.ds-alert--sun { background: var(--ds-sun-100); border-color: #f3dc8c; color: #5c4300; }
.ds-formcard { background: #fff; border: 1px solid var(--ds-line); border-radius: var(--ds-r-lg); box-shadow: var(--ds-sh-3); padding: 32px; max-width: 460px; margin: 0 auto; }

/* ---------- Grades K-12 + role chips (core 1.9.59; includes/grades.php) ---------- */
.scg { display: grid; gap: 8px; }
.scg-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; align-items: center; }
.scg-h { font: 700 12px/1.2 var(--ds-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ds-muted); }
.scg-tiles { display: flex; flex-wrap: wrap; gap: 6px; }
.scg-t { position: relative; display: grid; place-items: center; min-width: 46px; height: 44px; padding: 0 10px; border: 2px solid var(--ds-line-2); border-radius: 10px; background: #fff; font: 700 15px/1 var(--ds-sans); color: var(--ds-t800); cursor: pointer; margin: 0; }
.scg-t input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.scg-t:has(input:checked) { background: var(--ds-t800); border-color: var(--ds-t800); color: #fff; }
.scg-t:has(input:focus-visible), .ds-chip-ck:has(input:focus-visible) { outline: 3px solid var(--ds-t500); outline-offset: 2px; }
.scr-roles { display: flex; flex-wrap: wrap; gap: 8px; }
.ds-chip-ck { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--ds-line-2); border-radius: 99px; background: #fff; font: 600 14.5px/1 var(--ds-sans); color: var(--ds-ink-2); cursor: pointer; margin: 0; }
.ds-chip-ck input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.ds-chip-ck:has(input:checked) { background: var(--ds-t100); border-color: var(--ds-t800); color: var(--ds-t800); }
.ds-chip-ck:has(input:checked)::before { content: '\2713'; margin-right: 6px; font-weight: 800; }
@media (max-width: 520px) { .scg-row { grid-template-columns: 1fr; gap: 6px; } .scg-t { min-width: 44px; padding: 0 8px; } }

/* ---------- Wizard progress ---------- */
.ds-progress { display: flex; align-items: center; gap: 8px; justify-content: center; margin-bottom: 18px; }
.ds-progress span { width: 34px; height: 6px; border-radius: 3px; background: var(--ds-line); }
.ds-progress span.is-on { background: var(--ds-t800); }
.ds-progress span.is-done { background: var(--ds-t400); }

/* ---------- Empty state + result line ---------- */
.ds-empty { text-align: center; padding: 40px 20px; border: 1.5px dashed var(--ds-line-2); border-radius: var(--ds-r-md); background: var(--ds-paper); }
.ds-empty .ds-iconbox { margin: 0 auto 12px; }
.ds-empty h3 { margin-bottom: 4px; }
.ds-empty p { color: var(--ds-muted); max-width: 420px; margin: 0 auto 16px; }
.ds-resultline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 15px; color: var(--ds-ink-2); margin: 0 0 14px; }
.ds-resultline b { color: var(--ds-ink); }

/* ---------- Modal + drawer shells ---------- */
.ds-overlay { position: fixed; inset: 0; z-index: 9000; background: rgba(20,30,30,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ds-modal { background: #fff; border-radius: var(--ds-r-lg); box-shadow: 0 24px 60px rgba(0,0,0,.25); width: min(560px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.ds-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--ds-line); }
.ds-modal__head h3 { margin: 0; }
.ds-modal__body { padding: 18px; overflow: auto; }
.ds-modal__foot { padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ds-line); display: flex; gap: 10px; justify-content: flex-end; }
.ds-toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 9500; background: var(--ds-ink); color: #fff; font: 600 14px/1.4 var(--ds-sans); padding: 10px 16px; border-radius: 10px; box-shadow: var(--ds-sh-3); }

/* ---------- Dashboard building blocks ---------- */
.ds-dash { max-width: 980px; margin-left: auto; margin-right: auto; font-family: var(--ds-sans); color: var(--ds-ink-2); }
.ds-dash *, .ds-dash *::before, .ds-dash *::after { box-sizing: border-box; }
.ds-panel { background: #fff; border: 1px solid var(--ds-line); border-radius: var(--ds-r-md); box-shadow: var(--ds-sh-1); margin: 0 0 18px; }
.ds-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--ds-line); }
.ds-panel__head h2, .ds-panel__head h3 { margin: 0; font-family: var(--ds-sans); font-weight: 700; font-size: 17px; color: var(--ds-ink); }
.ds-panel__body { padding: 18px 20px; }
.ds-kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 15px; }
.ds-kv dt { color: var(--ds-muted); font-weight: 500; }
.ds-kv dd { margin: 0; color: var(--ds-ink); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .ds-grid--4, .ds-grid--5 { --ds-cols: 3; }
}
@media (max-width: 768px) {
  .ds-page { padding-left: var(--ds-gutter); padding-right: var(--ds-gutter); padding-bottom: 40px; }
  .ds-page h1, .ds-h1 { font-size: 30px; }
  .ds-page h2, .ds-h2 { font-size: 25px; }
  .ds-page .ds-pagehead h1 { font-size: 28px; }
  .ds-hero { margin-left: calc(-1 * var(--ds-gutter)); margin-right: calc(-1 * var(--ds-gutter)); border-radius: 0; padding: 40px 20px 32px; }
  .ds-hero p { font-size: 16px; }
  .ds-section { margin-bottom: 56px; }
  .ds-grid--3, .ds-grid--4, .ds-grid--5, .ds-steps { --ds-cols: 2; }
  .ds-cta { padding: 36px 20px; }
  .ds-cta .ds-actions { flex-direction: column; align-items: stretch; }
}
@media (max-width: 560px) {
  .ds-grid--2, .ds-grid--3 { --ds-cols: 1; }
  .ds-grid--4, .ds-grid--5 { --ds-cols: 2; }
  .ds-steps { --ds-cols: 1; gap: 8px; }
  .ds-step { display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; padding: 12px 14px; }
  .ds-step::before { grid-row: span 2; margin: 0; }
  .ds-step h3 { margin: 0; font-size: 15px; }
  .ds-row { grid-template-columns: 1fr; }
  .ds-formcard { padding: 24px 18px; border-radius: var(--ds-r-md); }
  .ds-kv { grid-template-columns: 1fr; gap: 2px; }
  .ds-kv dd { margin-bottom: 10px; }
  .ds-table--cards thead { display: none; }
  .ds-table--cards, .ds-table--cards tbody, .ds-table--cards tr, .ds-table--cards td { display: block; width: 100%; }
  .ds-table--cards tr { border-bottom: 1px solid var(--ds-line); padding: 8px 0; }
  .ds-table--cards td { border: 0; padding: 4px 14px; }
  .ds-table--cards td::before { content: attr(data-label); display: block; font: 700 11px/1.4 var(--ds-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ds-muted); }
  .ds-actions .ds-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ds-btn, .ds-card--link, .ds-rcard { transition: none; }
  .ds-card--link:hover, .ds-rcard:hover { transform: none; }
  .ds-page *, .ds-dash * { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Teacher ratings (core 1.9.49; reviews live in selcurve-resource-viewer 1.5.32) ---------- */
.sc-st { display: inline-flex; align-items: center; gap: 1px; color: #e3a008; vertical-align: middle; }
.sc-st .ds-icon { width: 16px; height: 16px; fill: currentColor; stroke: currentColor; stroke-width: 1; flex: none; }
.sc-st .ds-icon.o { color: #d9dedb; }
.sc-st--lg .ds-icon { width: 22px; height: 22px; }
.sc-st-h { position: relative; display: inline-grid; }
.sc-st-h > span { position: absolute; top: 0; bottom: 0; left: 0; width: 50%; overflow: hidden; color: #e3a008; }
.sc-rate { display: inline-flex; align-items: center; gap: 4px; font: 700 12.5px/1 var(--ds-sans); color: var(--ds-ink); white-space: nowrap; }
.sc-rate .ds-icon { width: 14px; height: 14px; color: #e3a008; fill: currentColor; stroke: currentColor; stroke-width: 1; }
.sc-rate small { font-weight: 500; font-size: 12.5px; color: var(--ds-muted); }

/* 1.9.126: growing-library pill next to resource numbers */
.sc-grow { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; white-space: nowrap; font: 700 12.5px/1.2 var(--ds-sans); letter-spacing: 0; color: var(--ds-t800); background: var(--ds-t50); border: 1px solid #bfe3df; border-radius: 99px; padding: 3px 9px 3px 7px; margin-left: 4px; }
.sc-grow svg { width: 13px; height: 13px; flex: none; }
