/*
  DS_docs colour version B — close match to live https://www.deadsure.co.uk/
  Colours read 26/11/2026 from:
    https://www.deadsure.co.uk/assets/css/variables.css
    https://www.deadsure.co.uk/assets/css/main.css
  Layout matches assets/site.css (version A). Only colours and close-match
  button/nav styling differ. The live site is a dark theme (not light).
*/

@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=Raleway:wght@400;500;600;700&display=swap");

:root {
  /* From live variables.css */
  --color-bg: #0a0612;
  --color-bg-section: #120a1e;
  --color-bg-card: #1a1028;
  --color-purple: #2d1b4e;
  --color-purple-light: #3d2668;
  --color-magenta: #c026d3;
  --color-magenta-dark: #9333ea;
  --color-orange: #f59e0b;
  --color-orange-dark: #ea580c;
  --color-white: #ffffff;
  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-border: rgba(255, 255, 255, 0.12);
  --gradient-magenta: linear-gradient(135deg, #c026d3 0%, #9333ea 100%);
  --font-heading: "Barlow", system-ui, sans-serif;
  --font-body: "Raleway", system-ui, sans-serif;
  --header-h: 4.25rem;
  --radius: 12px;
  --ds-docs-root: .;

  /* Job Aid tokens remapped to the live dark palette (when this file loads last) */
  --ink: #e2e8f0;
  --muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.12);
  --bg: #0a0612;
  --panel: #1a1028;
  --accent: #c026d3;
  --warn-bg: rgba(245, 158, 11, 0.15);
  --warn-border: #f59e0b;
  --note-bg: #1a1028;
  --note-border: #c026d3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  /* live main.css body: background var(--color-bg); color var(--color-text) */
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
}

body.has-ds-header {
  padding-top: 5.5rem;
}

h1, h2, h3, .ds-logo {
  font-family: var(--font-heading);
}

/* live main.css: h1, h2, h3 { color: var(--color-white) } */
h1, h2, h3 { color: var(--color-white); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----- Header: live .site-header background rgba(10, 6, 18, 0.92) ----- */
.ds-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 6, 18, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-white);
}

.ds-header-inner {
  max-width: 72rem;
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}

.ds-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-white);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.ds-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.ds-nav {
  display: flex;
  gap: 0.25rem 1rem;
  align-items: center;
}

/* live .main-nav a: color muted; hover/active orange */
.ds-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
}

.ds-nav a:hover,
.ds-nav a[aria-current="page"] {
  color: var(--color-orange);
}

.ds-search {
  margin-left: auto;
  position: relative;
  min-width: min(100%, 18rem);
  flex: 1 1 14rem;
  max-width: 24rem;
}

.ds-search input[type="search"] {
  width: 100%;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-white);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.ds-search input[type="search"]::placeholder {
  color: var(--color-text-muted);
}

.ds-search input[type="search"]:focus {
  outline: 2px solid var(--color-magenta);
  outline-offset: 1px;
}

.ds-search-results {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  max-height: min(24rem, 70vh);
  overflow: auto;
  z-index: 1001;
}

.ds-search-results[hidden] { display: none; }

.ds-search-results a,
.ds-search-empty {
  display: block;
  padding: 0.65rem 0.85rem;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}

.ds-search-results a:last-child { border-bottom: 0; }

.ds-search-results a:hover,
.ds-search-results a:focus {
  background: var(--color-purple);
  color: var(--color-white);
}

.ds-search-results .ds-s-section {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-orange);
  font-family: var(--font-heading);
  font-weight: 600;
}

.ds-search-results .ds-s-title {
  font-weight: 600;
  color: var(--color-white);
}

.ds-search-results .ds-s-snippet {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
}

.ds-search-empty { color: var(--color-text-muted); }

/* ----- Listing (index) ----- */
.ds-page {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.ds-page h1 {
  color: var(--color-white);
  font-size: 2rem;
  margin: 0 0 0.35rem;
}

.ds-lead {
  color: var(--color-text-muted);
  margin: 0 0 1.5rem;
}

.ds-page h2 {
  color: var(--color-white);
  margin: 1.75rem 0 0.5rem;
  padding-top: 0.25rem;
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.ds-page ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ds-page li { margin-bottom: 0.45rem; }

/* live in-page links sit on dark text; accent hover is orange */
.ds-page a {
  color: var(--color-magenta);
  text-decoration: none;
}

.ds-page a:hover {
  color: var(--color-orange);
  text-decoration: underline;
}

/* ----- Video page ----- */
.ds-video-wrap video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: #000;
  border-radius: 8px;
}

/* live .btn-primary: magenta gradient, white text, pill */
.ds-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.75rem;
  background: var(--gradient-magenta);
  color: var(--color-white) !important;
  text-decoration: none !important;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
}

.ds-btn:hover { transform: translateY(-1px); }

.ds-note {
  color: var(--color-text-muted);
  margin-top: 1rem;
}

/* Job Aid pages: beat job-aid.css when this file is linked after it */
.job-aid,
.job-aid h1,
.job-aid h2,
.job-aid h3 {
  color: var(--color-white);
}

.job-aid a { color: var(--color-magenta); }
.job-aid a:hover { color: var(--color-orange); }

header.job-aid-header { border-bottom-color: var(--color-magenta); }
header.job-aid-header .brand { color: var(--color-magenta); }

@media (max-width: 720px) {
  :root { --header-h: auto; }

  .ds-header-inner {
    padding: 0.7rem 1rem 0.85rem;
  }

  .ds-nav {
    width: 100%;
    order: 3;
  }

  .ds-search {
    width: 100%;
    max-width: none;
    margin-left: 0;
    order: 2;
    flex: 1 1 100%;
  }

  body.has-ds-header {
    padding-top: 8.5rem;
  }

  .ds-page { padding: 1.25rem 1rem 2.5rem; }
  .ds-page h1 { font-size: 1.6rem; }
}

/* ----- Help shell layout (list + video thumbs + preview) ----- */
.ds-help-layout {
  max-width: 90rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
  display: grid;
  grid-template-columns: minmax(16rem, 1.1fr) minmax(18rem, 1fr);
  gap: 1.5rem 2rem;
  align-items: start;
}

.ds-help-list h1 {
  color: var(--color-white);
  font-size: 1.85rem;
  margin: 0 0 0.35rem;
}

.ds-help-list h2 {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.ds-doc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.ds-doc-list li { margin-bottom: 0.35rem; }

.ds-doc-link {
  color: var(--color-magenta);
  text-decoration: none;
}

.ds-doc-link:hover,
.ds-doc-link.is-active {
  color: var(--color-orange);
  text-decoration: underline;
}

.ds-help-side {
  position: sticky;
  top: calc(var(--header-h) + 0.75rem);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.25rem;
  max-height: calc(100vh - var(--header-h) - 2rem);
  overflow: auto;
}

.ds-side-title {
  font-size: 1rem;
  margin: 0.5rem 0 0.65rem;
  color: var(--color-white);
}

.ds-side-title:first-child { margin-top: 0; }

.ds-video-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.ds-thumb {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.ds-thumb:hover {
  border-color: var(--color-orange);
}

.ds-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ds-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  font-size: 1.75rem;
  color: var(--color-orange);
  background: #120a1e;
}

.ds-thumb-caption {
  padding: 0.45rem 0.55rem;
  font-size: 0.8rem;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-bg-section);
}

.ds-preview-frame-wrap {
  min-height: 18rem;
}

.ds-preview-frame {
  width: 100%;
  min-height: 22rem;
  height: 50vh;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
}

.ds-preview-frame[hidden] { display: none; }

.ds-muted { color: var(--color-text-muted); font-size: 0.9rem; }

.ds-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.ds-user a {
  color: var(--color-orange);
  text-decoration: none;
  font-weight: 600;
}

.ds-login-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 22rem;
}

.ds-login-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.ds-login-form input {
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-white);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
}

.ds-login-error {
  color: #fca5a5;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid #dc2626;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
}

@media (max-width: 960px) {
  .ds-help-layout {
    grid-template-columns: 1fr;
  }
  .ds-help-side {
    position: static;
    max-height: none;
  }
}
