/* test-docs.css — page styles for the per-venture document libraries.
   Loaded on top of test.css. */

.topbar a.is-active { border-bottom: 1px solid var(--gold); padding-bottom: 1px; }
.topbar-sep { color: rgba(245,241,234,0.35); padding: 0 8px; }

/* Venture nav strip (Hearthstone | Wrenbury | Ashgrove | Volantis) */
.venture-nav {
  background: var(--navy-deep);
  border-bottom: 1px solid rgba(197,165,114,0.3);
  display: flex; gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px;
}
.venture-nav__tab {
  display: flex; align-items: baseline; gap: 8px;
  padding: 16px 18px;
  color: rgba(245,241,234,0.6);
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px; font-weight: 600;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.venture-nav__tab:hover { color: var(--cream); }
.venture-nav__tab.is-active { color: var(--gold); border-bottom-color: var(--gold); }
.venture-nav__count { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; }

/* Venture hero — dark navy intro with stats grid */
.venture-hero {
  background: var(--navy);
  color: var(--cream);
  padding: 64px 24px 48px;
}
.venture-hero h1 {
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px; line-height: 1.15; font-weight: 700;
  margin: 14px 0 18px;
}
.venture-hero .lede { color: rgba(245,241,234,0.85); max-width: 760px; }
.venture-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 22px 32px;
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid rgba(197,165,114,0.25);
}
.venture-stats .meta-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; font-weight: 600; }
.venture-stats .meta-value { font-size: 22px; font-weight: 700; color: var(--cream); }
.venture-stats .meta-value.free { color: var(--gold); }
.venture-stats .meta-value a { color: var(--cream); text-decoration: none; border-bottom: 1px solid var(--gold); }

/* Library */
.library { background: var(--paper); padding: 56px 24px 80px; }
.library-key {
  background: var(--cream);
  padding: 14px 18px;
  font-size: 14px; color: var(--muted);
  border-left: 3px solid var(--gold);
  margin: 0 0 28px;
  display: flex; flex-wrap: wrap; gap: 8px 24px;
}
.library-key .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: middle; }
.library-key .dot--preview { background: var(--gold); }
.library-key .dot--locked  { background: var(--navy); opacity: 0.45; }

.library-category { margin: 14px 0; border: 1px solid var(--line); background: var(--paper); }
.library-category[open] { box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.library-category__head {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--cream); padding: 14px 18px;
  cursor: pointer; list-style: none;
  transition: background .12s;
}
.library-category[open] .library-category__head { background: #efe8d9; border-bottom: 1px solid var(--line); }
.library-category__head::-webkit-details-marker { display: none; }
.library-category__head::after {
  content: "+";
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 22px; color: var(--gold); margin-left: 12px; line-height: 1;
}
.library-category[open] .library-category__head::after { content: "−"; }
.library-category__head:hover { background: #efe8d9; }
.library-category__head h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px; font-weight: 700; color: var(--navy); margin: 0;
  flex: 1; min-width: 0;
}
.library-category__count { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }

.library-list { list-style: none; margin: 0; padding: 0; }
.library-row {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-items: start;
}
.library-row:last-child { border-bottom: 0; }
.library-row__main { display: flex; align-items: baseline; gap: 12px; min-width: 0; flex-wrap: wrap; }
.library-row__ref {
  font-family: -apple-system, BlinkMacSystemFont, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; white-space: nowrap;
}
.library-row__title { font-size: 16px; color: var(--ink); }
.library-row__meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.library-row__fmt, .library-row__ver {
  font-family: -apple-system, BlinkMacSystemFont, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px; color: var(--muted); padding: 2px 6px;
  border: 1px solid var(--line); border-radius: 2px;
}
.library-row__tier {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 2px;
}
.library-row__tier--preview { background: var(--gold); color: var(--navy-deep); }
.library-row__tier--locked  { background: rgba(10,25,41,0.08); color: var(--navy); }
.library-row--preview { background: rgba(197,165,114,0.04); }
/* Text-only document preview — styled to look like the first page of a
   real document: white page, serif body, generous padding, faint shadow,
   gold "extracted preview" label. Replaces the cream italic blockquote
   that didn't visually register as a "preview". */
.library-row__excerpt {
  grid-column: 1 / -1;
  margin: 14px 0 6px;
  padding: 22px 24px 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14.5px; line-height: 1.65; color: var(--ink);
  position: relative;
}
.library-row__excerpt::before {
  content: "EXTRACTED FROM THE DOCUMENT";
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 10px; letter-spacing: 0.14em; font-weight: 700;
  color: var(--gold); margin-bottom: 10px;
}
.library-row__previews { grid-column: 1 / -1; margin-top: 10px; }
.library-thumb {
  display: inline-flex; flex-direction: column; align-items: stretch;
  width: 220px; max-width: 100%;
  border: 1px solid var(--line); background: var(--paper);
  padding: 0; cursor: pointer;
  font-family: inherit;
}
.library-thumb:hover { border-color: var(--gold); }
.library-thumb img {
  display: block; width: 100%; height: 280px; object-fit: cover; object-position: top center;
  background: #f6f3ec;
}
.library-thumb__cap {
  font-size: 12px; color: var(--gold);
  padding: 8px 10px; text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--navy-deep);
  letter-spacing: 0.04em;
  font-weight: 600;
}

.venture-foot { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); text-align: center; }
.venture-foot .muted { margin-bottom: 22px; }

/* Documents index landing */
.docs-index-hero { background: var(--navy); color: var(--cream); padding: 96px 24px 56px; }
.docs-index-hero h1 { color: var(--cream); }
.docs-index-hero .lede { color: rgba(245,241,234,0.85); }
.docs-index { background: var(--paper); padding: 48px 24px 80px; }
.docs-index__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.docs-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: 28px 26px;
  display: flex; flex-direction: column;
}
.docs-card__eyebrow {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px; font-weight: 600;
}
.docs-card h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px; color: var(--navy); margin: 0 0 12px;
}
.docs-card__blurb { color: var(--muted); font-size: 15px; line-height: 1.55; margin-bottom: 18px; }
.docs-card__stats { display: grid; grid-template-columns: auto 1fr; row-gap: 6px; column-gap: 14px; margin-bottom: 22px; font-size: 14px; }
.docs-card__stats dt { font-weight: 600; color: var(--muted); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.docs-card__stats dd { margin: 0; color: var(--ink); font-weight: 600; }
.docs-card__stats dd.docs-card__free { color: var(--gold); }
.docs-card .btn { margin-top: auto; align-self: flex-start; }

/* Lightbox */
.lb-overlay {
  position: fixed; inset: 0;
  background: rgba(5,13,24,0.92);
  display: none; align-items: center; justify-content: center;
  z-index: 9999; padding: 16px;
}
.lb-overlay.is-open { display: flex; }
.lb-img { max-width: min(90vw, 980px); max-height: 86vh; box-shadow: 0 18px 60px rgba(0,0,0,0.6); background: #fff; }
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(0,0,0,0.45);
  color: var(--cream);
  border: 0; border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 24px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lb-close { top: 16px; right: 16px; }
.lb-prev  { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-prev:disabled, .lb-next:disabled { opacity: 0.25; cursor: not-allowed; }
.lb-caption {
  position: absolute; bottom: 18px; left: 16px; right: 16px;
  text-align: center; color: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 13px; opacity: 0.85;
}

@media (max-width: 640px) {
  .venture-hero { padding: 48px 20px 36px; }
  .venture-hero h1 { font-size: 30px; }
  .library { padding: 36px 16px 64px; }
  .library-category__head { padding: 12px 14px; }
  .library-row { padding: 14px 14px; grid-template-columns: 1fr; }
  .library-row__meta { justify-content: flex-start; }
  .library-thumb { width: 100%; }
  .library-thumb img { height: 200px; }
  .venture-nav__tab { padding: 12px 14px; font-size: 13px; }
  .docs-index-hero { padding: 56px 20px 36px; }
  .docs-index { padding: 28px 16px 56px; }
}

/* ──────────────────────────────────────────────────────────────────────────
   Application form + legal prose pages (apply.html, terms, privacy, cookies)
   ────────────────────────────────────────────────────────────────────────── */
.apply-hero, .legal-hero { background: var(--navy); color: var(--cream); padding: 80px 24px 56px; }
.apply-hero .eyebrow, .legal-hero .eyebrow { color: var(--gold); }
.apply-hero h1, .legal-hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px; color: var(--cream); line-height: 1.2; margin-bottom: 16px;
}
.apply-hero p, .legal-hero p { color: rgba(245,241,234,0.85); max-width: 700px; line-height: 1.65; }
.apply-hero strong { color: var(--gold); }
.apply-wrap, .legal-wrap { background: var(--paper); padding: 56px 24px 96px; }
.apply-wrap .container { max-width: 680px; }
.legal-prose { max-width: 740px; margin: 0 auto; }
.legal-prose__meta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 13px; color: var(--muted);
  padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 28px;
}
.legal-prose h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px; color: var(--navy); margin: 36px 0 12px; line-height: 1.3;
}
.legal-prose h2:first-of-type { margin-top: 0; }
.legal-prose p { font-size: 16px; line-height: 1.75; color: var(--ink); margin-bottom: 14px; }
.legal-prose ul { margin: 12px 0 18px 22px; }
.legal-prose li { font-size: 16px; line-height: 1.7; color: var(--ink); margin-bottom: 8px; }
.legal-prose a { color: var(--navy); border-bottom: 1px solid var(--gold); text-decoration: none; }
.legal-prose a:hover { border-bottom-color: var(--navy); }
.apply-field { display: block; margin-bottom: 22px; }
.apply-field__label {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 6px; font-weight: 600;
}
.apply-field__label .req { color: var(--gold); }
.apply-field__hint  { font-size: 13px; color: var(--muted); margin-top: 6px; }
.apply-field__error { font-size: 13px; color: #b54a3a; margin-top: 6px; display: none; }
.apply-field.has-error .apply-field__error { display: block; }
.apply-input, .apply-select, .apply-textarea {
  display: block; width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  border: 1px solid rgba(0,0,0,0.18);
  background: var(--paper); padding: 12px 14px;
  border-radius: 4px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.apply-textarea { line-height: 1.55; min-height: 110px; resize: vertical; }
.apply-input:focus, .apply-select:focus, .apply-textarea:focus {
  outline: 0;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197,165,114,0.15);
}
.apply-field.has-error .apply-input,
.apply-field.has-error .apply-select,
.apply-field.has-error .apply-textarea { border-color: #b54a3a; }
.apply-radio { display: flex; gap: 18px; margin-top: 4px; }
.apply-radio label {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.apply-radio input { accent-color: var(--gold); transform: scale(1.1); }
.apply-disclosure {
  background: var(--cream); border-left: 3px solid var(--gold);
  padding: 16px 18px; margin: 8px 0 22px;
  font-size: 14px; color: var(--ink); line-height: 1.6;
}
.apply-disclosure label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.apply-disclosure input { margin-top: 4px; accent-color: var(--gold); transform: scale(1.1); }
.apply-disclosure a { color: var(--navy); border-bottom: 1px solid var(--gold); text-decoration: none; }
.apply-note {
  font-size: 14px; color: var(--muted); line-height: 1.65;
  margin: 18px 0 26px; padding: 12px 14px;
  background: rgba(197,165,114,0.07); border-left: 2px solid var(--gold);
}
.apply-submit {
  display: block; width: 100%;
  background: var(--gold); color: var(--navy-deep);
  padding: 16px 24px; border: 0; border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px; font-weight: 700; letter-spacing: 0.02em;
  cursor: pointer; transition: background .15s, transform .05s;
}
.apply-submit:hover  { background: var(--gold-bright); }
.apply-submit:active { transform: translateY(1px); }
.apply-submit[disabled] { opacity: 0.6; cursor: progress; }
.apply-fineprint { margin-top: 14px; text-align: center; font-size: 13px; color: var(--muted); }

/* What's-included grid — first thing shown after the venture hero.
   Surfaces the assets the buyer can verify today (website, email, phone,
   company) AND the top document categories (Policies & Procedures starred). */
.company-included { background: var(--paper); padding: 48px 24px 32px; border-bottom: 1px solid var(--line); }
.company-included .wide { max-width: 1080px; }
.included-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.included-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  padding: 18px 18px 16px;
  display: flex; flex-direction: column;
}
.included-card__label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin-bottom: 6px;
}
.included-card__value {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px; font-weight: 700; color: var(--navy); line-height: 1.2;
  margin-bottom: 6px;
}
.included-card__value a { color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--gold); }
.included-card__value a:hover { border-bottom-color: var(--navy); }
.included-card__sub {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 13px; line-height: 1.5; color: var(--muted);
}
/* Starred card — used for "Policies & Procedures" (the keyword for care
   operators). Reverses to dark navy so it pops out of the grid. */
.included-card--star {
  background: var(--navy);
  border: 1px solid var(--gold);
  border-left: 3px solid var(--gold);
  color: var(--cream);
}
.included-card--star .included-card__label { color: var(--gold); }
.included-card--star .included-card__value { color: var(--cream); }
.included-card--star .included-card__sub   { color: rgba(245,241,234,0.78); }
.included-foot {
  margin-top: 18px;
  font-size: 14px; color: var(--muted); text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* About-this-company section (per-venture pages) */
.company-about { background: var(--paper); padding: 56px 24px 32px; }
.company-about .container { max-width: 760px; }
.company-about h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px; color: var(--navy); line-height: 1.25;
  margin: 8px 0 22px;
}
.company-about p {
  font-size: 17px; line-height: 1.7; color: var(--ink);
  margin-bottom: 16px;
}

/* Key numbers strip */
.company-numbers { background: var(--cream); padding: 40px 24px 56px; }
.company-numbers .section-eyebrow { margin-bottom: 18px; }
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.number-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: 22px 22px 18px;
}
.number-card__label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px; font-weight: 600;
}
.number-card__value {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px; font-weight: 700; color: var(--navy); line-height: 1.05;
  margin-bottom: 4px;
}
.number-card__sub {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 12px; color: var(--muted); line-height: 1.45;
}

/* Application thank-you page */
.applied-hero { background: var(--navy); color: var(--cream); padding: 96px 24px 56px; text-align: center; }
.applied-hero .eyebrow { color: var(--gold); }
.applied-hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--cream); font-size: 38px; line-height: 1.2;
  margin: 12px auto 18px; max-width: 640px;
}
.applied-hero p { color: rgba(245,241,234,0.85); max-width: 640px; margin: 0 auto; line-height: 1.65; }
.applied-body { background: var(--paper); padding: 56px 24px 72px; }
.applied-body .container { max-width: 680px; }
.applied-steps {
  list-style: none; margin: 0; padding: 0;
  counter-reset: applied-step;
  border-top: 1px solid var(--line);
}
.applied-steps li {
  counter-increment: applied-step;
  padding: 22px 0 22px 56px;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: 16px; line-height: 1.65; color: var(--ink);
}
.applied-steps li::before {
  content: counter(applied-step, decimal-leading-zero);
  position: absolute; left: 0; top: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--gold);
}
.applied-steps strong { color: var(--navy); }
.applied-ctas { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .apply-hero, .legal-hero, .applied-hero { padding: 48px 20px 36px; }
  .apply-hero h1, .legal-hero h1, .applied-hero h1 { font-size: 28px; }
  .apply-wrap, .legal-wrap, .applied-body { padding: 32px 16px 64px; }
  .legal-prose h2 { font-size: 19px; }
}
