/* ============================================================
   VetAid design system — "federal editorial"
   Light, calm, credible. Navy ink on warm paper, one federal
   blue accent, gold reserved for the brand star. Self-hosted
   fonts (no external requests; CSP stays tight).
   Loaded by every page; page-specific CSS stays in each file.
   ============================================================ */

/* ---- fonts ---- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/static/fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/sourceserif-600.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 700; font-display: swap; src: url('/static/fonts/sourceserif-700.woff2') format('woff2'); }

/* ---- tokens ---- */
:root {
  --paper: #f7f7f4;         /* page background */
  --surface: #ffffff;       /* cards, panels */
  --surface-2: #eef1ee;     /* subtle wells, zebra rows */
  --ink: #16233a;           /* headings, primary text (navy) */
  --ink-2: #3c4a5e;         /* body text */
  --ink-3: #64748b;         /* secondary text */
  --line: #dcdfd9;          /* hairline borders */
  --line-2: #c8ccc4;        /* stronger borders */
  --navy: #16233a;          /* brand navy (header/footer) */
  --navy-2: #1d2f4e;        /* navy surface */
  --navy-ink: #e8ebf2;      /* text on navy */
  --navy-muted: #9aa7bd;    /* secondary text on navy */
  --blue: #1a56b0;          /* accent: links, primary buttons */
  --blue-hover: #164a99;
  --blue-soft: #e7eefa;     /* accent tint wells */
  --gold: #c9a227;          /* brand star + rare highlights */
  --green: #1e6b3c;         /* success */
  --green-soft: #e4f1e8;
  --amber: #92600a;         /* caution */
  --amber-soft: #faf0da;
  --red: #b3261e;           /* error / denial */
  --red-soft: #f9e7e6;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-1: 0 1px 2px rgba(22, 35, 58, .06), 0 1px 3px rgba(22, 35, 58, .08);
  --shadow-2: 0 4px 16px rgba(22, 35, 58, .10), 0 1px 3px rgba(22, 35, 58, .06);
  --maxw: 1120px;
  --measure: 70ch;
}

/* ---- base ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--paper);
}
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.2; letter-spacing: -0.01em; }
h4, h5, h6 { font-family: var(--sans); color: var(--ink); line-height: 1.3; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img, svg, video { max-width: 100%; height: auto; }
strong { color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--blue-soft); }

.va-container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .va-container { padding: 0 18px; } }

/* ---- skip link (a11y) ---- */
.va-skip { position: absolute; left: -9999px; top: 0; background: var(--surface); color: var(--blue); padding: 10px 16px; z-index: 200; border-radius: 0 0 var(--radius-sm) 0; }
.va-skip:focus { left: 0; }

/* ---- header / nav ---- */
.va-header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.va-nav { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 28px; }
.va-brand { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-weight: 700; font-size: 1.18rem; color: #fff; text-decoration: none; letter-spacing: -0.01em; }
.va-brand:hover { text-decoration: none; }
.va-brand .star { color: var(--gold); font-size: 1.15rem; line-height: 1; }
.va-nav-links { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.va-nav-links a { color: var(--navy-ink); font-size: .95rem; font-weight: 500; }
.va-nav-links a:hover { color: #fff; text-decoration: none; }
.va-nav-cta { background: var(--blue); color: #fff !important; padding: 9px 18px; border-radius: var(--radius-sm); font-weight: 600; }
.va-nav-cta:hover { background: var(--blue-hover); }
.va-nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.25); color: var(--navy-ink); border-radius: var(--radius-sm); padding: 7px 12px; font-size: 1rem; cursor: pointer; }
@media (max-width: 820px) {
  .va-nav { flex-wrap: wrap; height: auto; min-height: 60px; padding: 10px 18px; row-gap: 0; }
  .va-nav-toggle { display: block; }
  .va-nav-links { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 0 14px; }
  .va-nav-links.open { display: flex; }
  .va-nav-links a { padding: 10px 4px; width: 100%; }
  .va-nav-cta { text-align: center; margin-top: 6px; }
}

/* ---- footer ---- */
.va-footer { background: var(--navy); color: var(--navy-muted); margin-top: 72px; padding: 44px 0 36px; font-size: .92rem; line-height: 1.7; }
.va-footer a { color: var(--navy-ink); }
.va-footer .va-container > p { max-width: 72ch; }
.va-footer-links { display: flex; gap: 20px; flex-wrap: wrap; margin: 14px 0; padding: 0; list-style: none; }
.va-footer-fine { border-top: 1px solid rgba(255,255,255,.1); margin-top: 20px; padding-top: 18px; font-size: .84rem; }

/* ---- buttons ---- */
.va-btn { display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 1rem; padding: 12px 24px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; text-align: center; transition: background .15s, border-color .15s, color .15s; }
.va-btn:hover { text-decoration: none; }
.va-btn-primary { background: var(--blue); color: #fff; }
.va-btn-primary:hover { background: var(--blue-hover); }
.va-btn-secondary { background: var(--surface); color: var(--blue); border-color: var(--line-2); }
.va-btn-secondary:hover { border-color: var(--blue); }
.va-btn-lg { padding: 15px 32px; font-size: 1.08rem; }
.va-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---- cards ---- */
.va-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-1); }
.va-card h3 { margin-bottom: .5rem; }
.va-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }

/* ---- badges / chips ---- */
.va-badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 100px; border: 1px solid transparent; }
.va-badge-blue { background: var(--blue-soft); color: var(--blue); }
.va-badge-green { background: var(--green-soft); color: var(--green); }
.va-badge-amber { background: var(--amber-soft); color: var(--amber); }
.va-badge-red { background: var(--red-soft); color: var(--red); }
.va-badge-neutral { background: var(--surface-2); color: var(--ink-3); }

/* ---- callouts ---- */
.va-note { border-left: 4px solid var(--blue); background: var(--blue-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 18px; margin: 1.2em 0; }
.va-note-warn { border-left-color: var(--amber); background: var(--amber-soft); }
.va-note-good { border-left-color: var(--green); background: var(--green-soft); }

/* ---- forms ---- */
.va-input, .va-select, .va-textarea {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 11px 14px; width: 100%;
}
.va-input:focus, .va-select:focus, .va-textarea:focus { border-color: var(--blue); outline: 2px solid var(--blue-soft); }
.va-label { display: block; font-size: .9rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }

/* ---- tables ---- */
.va-table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
.va-table-wrap table { margin: 0; border: none; width: 100%; }
table.va-table, .va-article table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--surface); }
table.va-table th, .va-article table th { background: var(--navy); color: var(--navy-ink); text-align: left; font-weight: 600; padding: 10px 14px; white-space: nowrap; }
table.va-table td, .va-article table td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
table.va-table tr:nth-child(even) td, .va-article table tr:nth-child(even) td { background: var(--surface-2); }

/* ---- sections ---- */
.va-section { padding: 72px 0; }
.va-section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.va-eyebrow { font-family: var(--sans); font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; }
.va-section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.va-section-head p { color: var(--ink-3); margin-top: 10px; }
@media (max-width: 640px) { .va-section { padding: 48px 0; } }

/* ---- article layout (blog / QA / guides) ---- */
.va-article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 0; }
.va-article { min-width: 0; max-width: var(--measure); font-size: 1.06rem; line-height: 1.75; }
.va-article h1 { margin: .2em 0 .5em; }
.va-article h2 { margin: 1.7em 0 .6em; padding-top: .3em; }
.va-article h3 { margin: 1.4em 0 .5em; }
.va-article ul, .va-article ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.va-article li { margin-bottom: .45em; }
.va-article li::marker { color: var(--blue); }
.va-article blockquote { border-left: 4px solid var(--line-2); padding: 4px 0 4px 18px; color: var(--ink-3); margin: 1.2em 0; font-style: italic; }
.va-article code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); border-radius: 4px; padding: 1px 6px; }
.va-article img { border-radius: var(--radius-sm); border: 1px solid var(--line); }
.va-article hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }
.va-article-meta { color: var(--ink-3); font-size: .9rem; margin-bottom: 1.4em; }
.va-toc { position: sticky; top: 88px; align-self: start; font-size: .9rem; border-left: 1px solid var(--line); padding-left: 20px; max-height: calc(100vh - 120px); overflow-y: auto; }
.va-toc-title { font-weight: 700; color: var(--ink); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.va-toc a { display: block; color: var(--ink-3); padding: 4px 0; line-height: 1.4; }
.va-toc a:hover { color: var(--blue); text-decoration: none; }
@media (max-width: 960px) { .va-article-wrap { grid-template-columns: 1fr; } .va-toc { display: none; } }

/* article tables always scroll on small screens */
.va-article table { display: block; overflow-x: auto; white-space: normal; }
@media (min-width: 720px) { .va-article table { display: table; } }

/* ---- CTA panel used at article ends + landing ---- */
.va-cta-panel { background: var(--navy); border-radius: var(--radius); color: var(--navy-ink); padding: 34px 30px; margin: 2.4em 0; }
.va-cta-panel h2, .va-cta-panel h3 { color: #fff; margin: 0 0 .4em; padding: 0; }
.va-cta-panel p { color: var(--navy-muted); }
.va-cta-panel .va-btn-primary { margin-top: 8px; }

/* ---- utility ---- */
.va-muted { color: var(--ink-3); }
.va-center { text-align: center; }
.va-mt0 { margin-top: 0; } .va-mb0 { margin-bottom: 0; }
