/* =========================================================
   3 John Labs: tjl.css v1.1 (Navy Standard)
   Drop-in base for every HTML build: website, PDFs, emails.
   Keep this file and fonts/ side by side. Read design.md first.
   ========================================================= */
@import url("fonts/fonts.css");

:root {
  color-scheme: light;
  --tjl-navy: #0B2545;  /* Brand navy, same in both themes: wordmark, mark outline. Headlines use --tjl-heading, panels --tjl-panel */
  --tjl-blue: #1E6FD9;  /* Medical Blue, same in both themes: the fill and cross, buttons, highlights. Blue text uses --tjl-link */
  --tjl-white: #FFFFFF;  /* Brand white, same in both themes. Surfaces use --tjl-surface (pure white in light, never off-white) */
  --tjl-blue-lifted: #4F90F0;  /* Medical Blue on navy (reverse lockup, links on dark) */
  --tjl-blue-deep: #1659B3;  /* Hover and pressed state for blue */
  --tjl-ink: #33404D;  /* Body text */
  --tjl-slate: #5B6B80;  /* Secondary text */
  --tjl-muted: #6B7789;  /* Labels and captions (4.5:1 on white) */
  --tjl-hairline: #E3E8EF;  /* Rules, borders and dividers only, never a fill */
  --tjl-success: #1E7F55;  /* In stock, confirmations */
  --tjl-warning: #A15C07;  /* Low stock, cautions */
  --tjl-danger: #B42318;  /* Errors, sold out */
  --tjl-surface: #FFFFFF;  /* Page, cards, inputs, menus, sheets, dialogs, toasts */
  --tjl-heading: #0B2545;  /* Headlines and other navy text, navy icon strokes */
  --tjl-link: #1E6FD9;  /* Blue as text, icon stroke, focus ring, outline, small accents. Never a fill */
  --tjl-panel: #0B2545;  /* Navy panels and bands: hero, verse, footer, navy buttons and fills */
  --tjl-on-panel: #FFFFFF;  /* Text and icons on navy panels and on Medical Blue fills */
  --tjl-tint: rgba(30,111,217,.06);  /* Faint blue for hover rows, selected chips, progress tracks. Never a surface */
  --tjl-scrim: rgba(11,37,69,.45);  /* Backdrop behind sheets and dialogs */
  --tjl-font-display: 'Manrope', 'Inter', system-ui, sans-serif;
  --tjl-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tjl-font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --tjl-radius-sm: 4px;
  --tjl-radius-md: 6px;
  --tjl-radius-lg: 10px;
  --tjl-radius-pill: 999px;
  --tjl-shadow-card: 0 1px 2px rgba(11,37,69,.06);
  --tjl-shadow-raised: 0 12px 28px rgba(11,37,69,.10);
  --tjl-space-1: 4px;
  --tjl-space-2: 8px;
  --tjl-space-3: 12px;
  --tjl-space-4: 16px;
  --tjl-space-5: 24px;
  --tjl-space-6: 32px;
  --tjl-space-7: 48px;
  --tjl-space-8: 64px;
  --tjl-space-9: 96px;
}

/* Dark theme (design.md 3.1). Site pages (<html class="tjl-site">) follow the device unless the visitor
   chose light; data-theme="dark" turns any page dark. Both blocks carry the same declarations. */
@media (prefers-color-scheme: dark) {
  :root.tjl-site:not([data-theme="light"]) {
    color-scheme: dark;
    --tjl-ink: #D6E0EC;
    --tjl-slate: #B3C1D3;
    --tjl-muted: #9AABC2;
    --tjl-hairline: #2A4A75;
    --tjl-success: #4CC38A;
    --tjl-warning: #F0B354;
    --tjl-danger: #FF8A7A;
    --tjl-surface: #0B2545;
    --tjl-heading: #FFFFFF;
    --tjl-link: #4F90F0;
    --tjl-panel: #081C38;
    --tjl-on-panel: #FFFFFF;
    --tjl-tint: rgba(79,144,240,.12);
    --tjl-scrim: rgba(2,8,18,.65);
    --tjl-shadow-card: 0 1px 2px rgba(0,0,0,.35);
    --tjl-shadow-raised: 0 12px 28px rgba(0,0,0,.55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --tjl-ink: #D6E0EC;
  --tjl-slate: #B3C1D3;
  --tjl-muted: #9AABC2;
  --tjl-hairline: #2A4A75;
  --tjl-success: #4CC38A;
  --tjl-warning: #F0B354;
  --tjl-danger: #FF8A7A;
  --tjl-surface: #0B2545;
  --tjl-heading: #FFFFFF;
  --tjl-link: #4F90F0;
  --tjl-panel: #081C38;
  --tjl-on-panel: #FFFFFF;
  --tjl-tint: rgba(79,144,240,.12);
  --tjl-scrim: rgba(2,8,18,.65);
  --tjl-shadow-card: 0 1px 2px rgba(0,0,0,.35);
  --tjl-shadow-raised: 0 12px 28px rgba(0,0,0,.55);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--tjl-surface); color: var(--tjl-ink);
  font-family: var(--tjl-font-body); font-size: 16px; line-height: 1.625;
  font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .tjl-display { font-family: var(--tjl-font-display); color: var(--tjl-heading); margin: 0; }
.tjl-display { font-weight: 800; font-size: 56px; line-height: 60px; letter-spacing: -.03em; }
h1, .tjl-h1 { font-weight: 800; font-size: 40px; line-height: 44px; letter-spacing: -.025em; }
h2, .tjl-h2 { font-weight: 800; font-size: 30px; line-height: 36px; letter-spacing: -.02em; }
h3, .tjl-h3 { font-weight: 700; font-size: 22px; line-height: 28px; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--tjl-link); text-decoration: none; }
a:hover { color: var(--tjl-blue-deep); text-decoration: underline; text-underline-offset: 3px; }
/* Dark: Blue Deep on navy is 2.3:1, so links keep their colour on hover and the underline shows it.
   :where() holds these at the weight of a:hover, so components still set their own hover colour. */
@media (prefers-color-scheme: dark) { :where(:root.tjl-site:not([data-theme="light"])) a:hover { color: var(--tjl-link); } }
:where(:root[data-theme="dark"]) a:hover { color: var(--tjl-link); }
small, .tjl-small { font-size: 14px; line-height: 22px; }
.tjl-lede { font-size: 18px; line-height: 30px; color: var(--tjl-slate); }
.tjl-muted { color: var(--tjl-muted); }
.tjl-mono { font-family: var(--tjl-font-mono); }
.tjl-eyebrow, .tjl-label {
  font-family: var(--tjl-font-mono); font-weight: 500; font-size: 11px; line-height: 16px;
  letter-spacing: .14em; text-transform: uppercase;
}
.tjl-eyebrow { color: var(--tjl-link); }
.tjl-label { color: var(--tjl-muted); }
hr, .tjl-rule { border: 0; border-top: 1px solid var(--tjl-hairline); margin: 24px 0; }

/* Buttons */
.tjl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--tjl-font-body); padding: 13px 20px; border-radius: var(--tjl-radius-md);
  border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--tjl-blue); color: var(--tjl-on-panel); transition: background .15s, border-color .15s, color .15s;
}
.tjl-btn:hover { background: var(--tjl-blue-deep); color: var(--tjl-on-panel); text-decoration: none; }
.tjl-btn:focus-visible, .tjl-input:focus-visible { outline: 2px solid var(--tjl-link); outline-offset: 2px; }
.tjl-btn--secondary { background: var(--tjl-surface); color: var(--tjl-heading); border-color: var(--tjl-hairline); }
.tjl-btn--secondary:hover { background: var(--tjl-surface); color: var(--tjl-heading); border-color: var(--tjl-heading); }
.tjl-btn--navy { background: var(--tjl-panel); }
.tjl-btn--navy:hover { background: #12345E; }  /* a lifted navy: right in both themes */
.tjl-btn--sm { font-size: 13px; padding: 9px 14px; }
.tjl-btn[disabled], .tjl-btn.is-disabled { background: var(--tjl-hairline); color: var(--tjl-muted); cursor: not-allowed; border-color: transparent; }

/* Surfaces: white + hairline (navy + hairline in dark). Never tint a surface gray. */
.tjl-card { background: var(--tjl-surface); border: 1px solid var(--tjl-hairline); border-radius: var(--tjl-radius-lg); }
.tjl-panel-navy { background: var(--tjl-panel); color: var(--tjl-on-panel); }
.tjl-panel-navy h1, .tjl-panel-navy h2, .tjl-panel-navy h3 { color: var(--tjl-on-panel); }
.tjl-panel-navy a { color: var(--tjl-blue-lifted); }

/* Badges */
.tjl-badge {
  display: inline-flex; align-items: center; gap: 6px; font: 500 11px/1 var(--tjl-font-mono);
  letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: var(--tjl-radius-sm);
  border: 1px solid var(--tjl-hairline); color: var(--tjl-heading); background: var(--tjl-surface);
}
.tjl-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tjl-badge--ok { color: var(--tjl-success); }
.tjl-badge--low { color: var(--tjl-warning); }
.tjl-badge--out { color: var(--tjl-danger); }
.tjl-badge--blue { color: var(--tjl-link); }

/* Forms */
.tjl-input, .tjl-select {
  width: 100%; font: 400 15px/1.4 var(--tjl-font-body); color: var(--tjl-heading);
  padding: 12px 14px; border: 1px solid var(--tjl-hairline); border-radius: var(--tjl-radius-md); background: var(--tjl-surface);
}
.tjl-input:hover, .tjl-select:hover { border-color: #C9D2DD; }  /* hover edge: reads on white and on navy */

/* Notice (research-use, compliance) */
.tjl-notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--tjl-hairline);
  border-left: 3px solid var(--tjl-link); border-radius: var(--tjl-radius-md); font-size: 14px; line-height: 22px; color: var(--tjl-ink);
}

/* Tables */
.tjl-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tjl-table th { text-align: left; font: 500 11px/16px var(--tjl-font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tjl-muted); padding: 10px 12px; border-bottom: 1px solid var(--tjl-heading); }
.tjl-table td { padding: 12px; border-bottom: 1px solid var(--tjl-hairline); vertical-align: top; }

/* The wordmark is a logo, not text. Use logos/*.svg. In running copy write "3 John Labs" (3&nbsp;John in HTML) in the surrounding style. */
