/* =====================================================================
   TRENCH LABS - shared shell
   Dark environment. Trench Logic ancestry: deep green + brand gold.
   Signal green as the "lab active" signature. One warm amber for CTAs.
   ===================================================================== */

:root {
  /* Base - Trench Labs dark environment (spec: #171C15) */
  --midnight:   #171C15;
  --panel-deep: #1A1F17;
  --panel:      #1E251C;
  --panel-up:   #263025;
  --line:       #2E3A2D;
  --line-up:    #3E4B3C;

  /* Trench Logic ancestry - field green + secondary sand + cream */
  --field:      #374B33;   /* Trench Logic field green */
  --field-lite: #5C7A54;
  --sand:       #C5B78C;   /* Secondary sand - Trench Logic gold */
  --gold:       #C5B78C;   /* legacy alias */
  --cream:      #E8DCB1;   /* Wordmark cream */
  --light:      #F4F3EF;   /* Light surface */

  /* Rust - brand accent, flask liquid, primary CTA */
  --rust:       #B5644A;
  --rust-deep:  #94472F;

  /* Signal - kept as internal UI accent (not brand) */
  --signal:     #7EE0A0;
  --signal-dim: #4EB077;
  --signal-glow: rgba(126, 224, 160, 0.28);

  /* Slate - supporting */
  --slate:      #5F6B6D;

  /* Text */
  --ink:      #EEF1E9;
  --ink-soft: #C4CFC2;
  --ink-mute: #92A292;
  --ink-dim:  #6B7A6E;

  /* Type - Archivo Black for display (spec placeholder for Owners Bold) */
  --font-display: 'Archivo Black', Impact, 'Franklin Gothic Bold', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-card: 0 24px 60px -30px rgba(0, 0, 0, 0.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.55;
  padding: 30px 18px 60px;
  background:
    radial-gradient(1200px 620px at 82% -10%, #253526 0%, transparent 60%),
    radial-gradient(900px  520px at -8% 108%, #2A2018 0%, transparent 55%),
    var(--midnight);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; }
.wrap.narrow { max-width: 900px; }

/* ===== BRAND (top of every page) =====================================
   The wordmark echoes Trench Logic's stacked composition (TRENCH / LOGIC).
   The mark is a lab flask inside the same gear that frames the Trench Logic
   lightbulb - a direct visual descendant.
   ==================================================================== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  padding: 4px;
  margin: -4px;
  border-radius: 8px;
  transition: opacity 0.15s ease;
}
.brand:hover { opacity: 0.9; }

.brand__mark {
  width: 46px;
  height: 46px;
  color: var(--gold);
  display: inline-flex;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
.brand__mark svg { width: 100%; height: 100%; display: block; }
.brand__mark .signal { color: var(--signal); }

.brand__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 0.86;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.14em;
}
.brand__wordmark .top {
  font-size: 22px;
  color: var(--cream);
}
.brand__wordmark .bot {
  font-size: 22px;
  color: var(--gold);
  margin-top: 3px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.topbar .divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 0 4px;
  min-width: 20px;
}
.topbar .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ===== TYPE =========================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--cream);
  line-height: 1.08;
}
h1 { font-size: clamp(28px, 4vw, 42px); }
h1 .thin { color: var(--gold); font-weight: 400; }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 20px; color: var(--cream); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 10px;
}
.eyebrow.mute { color: var(--ink-mute); }

.sec-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 36px 0 14px;
}

.lede {
  color: var(--ink-soft);
  font-size: 16px;
  margin-top: 12px;
  max-width: 68ch;
}

.pitch {
  margin-top: 20px;
  background: linear-gradient(135deg, #1F3324, #182A1E);
  border: 1px solid #35543D;
  border-left: 4px solid var(--rust);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.pitch b { color: var(--cream); }

/* ===== CARD =========================================================== */
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-deep));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

/* ===== FORMS ========================================================== */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 22px;
}
.grid .full { grid-column: 1 / -1; }

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: #101512;
  border: 1px solid #33443B;
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--field-lite);
  box-shadow: 0 0 0 3px rgba(92, 122, 84, 0.16);
}
.field .hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-mute);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--rust), var(--rust-deep));
  color: #FFF;
  border: none;
  padding: 14px 22px;
  border-radius: 11px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
  box-shadow: 0 10px 24px -10px rgba(181, 100, 74, 0.55);
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.wide { width: 100%; margin-top: 24px; padding: 15px; font-size: 17px; }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line-up);
  color: var(--cream);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.03); }
.btn.field-btn {
  background: var(--field);
  border: 1px solid #4C6A42;
  box-shadow: none;
}
.btn.field-btn:hover { background: #3A5D3E; }

/* ===== SCAN / LOADING ================================================= */
.scan { display: none; text-align: center; padding: 40px 0; }
.scan.on { display: block; }
.radar {
  width: 128px;
  height: 128px;
  margin: 0 auto 18px;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle, #16241B, #0E1512);
  border: 1px solid #2F4A37;
  overflow: hidden;
}
.radar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, transparent 0deg, var(--signal-glow) 50deg, transparent 90deg);
  animation: sweep 1.1s linear infinite;
}
.radar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-radial-gradient(circle, transparent 0 20px, rgba(47, 74, 55, 0.28) 20px 21px);
}
@keyframes sweep { to { transform: rotate(360deg); } }
.scan .status {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--signal);
  letter-spacing: 0.14em;
}

/* ===== RESULTS ======================================================== */
.result { display: none; margin-top: 28px; }
.result.on { display: block; animation: fadein 0.4s ease; }
@keyframes fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.headline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.bignum {
  background: linear-gradient(160deg, rgba(32, 48, 35, 0), rgba(31, 58, 39, 0.25));
  border: 1px solid var(--line-up);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
}
.bignum .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.bignum .v {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 46px;
  color: var(--signal);
  line-height: 1;
  margin: 8px 0 4px;
  letter-spacing: 0.01em;
}
.bignum .u { font-size: 13px; color: var(--ink-mute); }
.bignum.alt .v { color: var(--cream); font-size: 34px; margin-top: 14px; }

.worktitle {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 20px 0 8px;
}

table.workings {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 4px;
}
table.workings td {
  padding: 10px 6px;
  border-bottom: 1px solid #263029;
}
table.workings td.lbl { color: var(--ink-soft); }
table.workings td.val {
  text-align: right;
  font-family: var(--font-mono);
  color: var(--cream);
}
table.workings tr.tot td {
  border-top: 2px solid var(--field-lite);
  border-bottom: none;
  padding-top: 14px;
  font-weight: 700;
}
table.workings tr.tot td.val {
  color: var(--signal);
  font-size: 16px;
}
table.workings tr.dep td { border: none; padding-top: 4px; }
table.workings tr.dep td.val { color: var(--gold); }

.note {
  font-size: 12.5px;
  color: var(--ink-mute);
  background: #131A16;
  border: 1px solid var(--line);
  border-left: 3px solid var(--rust);
  padding: 12px 14px;
  border-radius: 8px;
  margin-top: 20px;
}

/* ===== LEAD CAPTURE (Stage 2 gate) ==================================== */
.gate {
  margin-top: 24px;
  background: linear-gradient(135deg, #1F3324, #182A1E);
  border: 1px solid #35543D;
  border-radius: var(--radius-lg);
  padding: 22px;
}
.gate h3 {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--cream);
  letter-spacing: 0.02em;
}
.gate p { font-size: 13.5px; color: var(--ink-soft); margin: 6px 0 16px; }
.gate .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.gate input {
  background: #101512;
  border: 1px solid #33443B;
  color: var(--ink);
  padding: 11px 12px;
  border-radius: 9px;
  font-size: 14px;
  width: 100%;
}
.gate input:focus {
  outline: none;
  border-color: var(--field-lite);
  box-shadow: 0 0 0 3px rgba(92, 122, 84, 0.16);
}

.booked { display: none; text-align: center; padding: 12px 4px; }
.booked.on { display: block; animation: fadein 0.4s ease; }
.booked .chkm {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(126, 224, 160, 0.12);
  border: 1px solid var(--signal);
  color: var(--signal);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  font-size: 28px;
}

/* ===== BADGES ========================================================= */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 5px;
  font-weight: 700;
}
.badge.live { background: var(--signal); color: #0F1512; }
.badge.soon { background: rgba(255,255,255,0.06); color: var(--ink-mute); border: 1px solid var(--line-up); }
.badge.new  { background: var(--gold); color: #1E1912; }

/* ===== HUB / TOOL GRID (hub page) ===================================== */
.industry {
  margin-top: 42px;
}
.industry__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.industry__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.24em;
}
.industry__name {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--cream);
  letter-spacing: 0.02em;
}
.industry__who {
  font-size: 13.5px;
  color: var(--ink-mute);
  margin-left: auto;
  text-align: right;
  max-width: 40ch;
}

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.tool {
  background: linear-gradient(180deg, var(--panel), var(--panel-deep));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: inherit;
}
.tool:hover {
  border-color: var(--field-lite);
  transform: translateY(-2px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.tool.dim { opacity: 0.6; }
.tool .cat {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.tool h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--cream);
  margin: 6px 0 4px;
  letter-spacing: 0.02em;
}
.tool .q {
  font-size: 13.5px;
  color: var(--ink-soft);
  flex: 1;
  line-height: 1.5;
}
.tool .go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

/* ===== FOOTER - the parent-brand connection =========================== */
.tl-footer {
  margin-top: 60px;
  padding: 30px 0 8px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-mute);
  font-size: 13px;
}
.tl-footer .parent-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-decoration: none;
  padding-bottom: 8px;
  border-bottom: 1px dotted var(--line-up);
}
.tl-footer .parent-brand:hover { color: var(--cream); }
.tl-footer .parent-brand svg { width: 20px; height: 20px; }
.tl-footer .sig {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ===== RIBBON / MISC ================================================== */
.ribbon {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-mute);
}
.ribbon b { color: var(--gold); }
.ribbon a { color: var(--signal); text-decoration: none; }

.cta-panel {
  margin-top: 44px;
  background: linear-gradient(135deg, rgba(32, 48, 35, 0.15), rgba(31, 58, 39, 0.25));
  border: 1px solid var(--line-up);
  border-radius: var(--radius-xl);
  padding: 32px;
  text-align: center;
}
.cta-panel h2 {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--cream);
  letter-spacing: 0.02em;
}
.cta-panel p {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 10px auto 20px;
  max-width: 60ch;
}

/* ===== RESPONSIVE ===================================================== */
@media (max-width: 720px) {
  .grid, .gate .row { grid-template-columns: 1fr; }
  .industry__head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .industry__who { margin-left: 0; text-align: left; max-width: 100%; }
  .brand__wordmark .top, .brand__wordmark .bot { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .radar::before { animation: none; }
  .result.on, .booked.on { animation: none; }
}

/* ===== LEGACY ALIASES ================================================
   These map class names used by the pre-existing tool markup to the new
   visual system, so the tool source can be dropped into the new shell
   without editing. ==================================================== */
p.sub {
  color: var(--ink-soft);
  font-size: 15.5px;
  margin-top: 10px;
  max-width: 66ch;
}
.cta {
  margin-top: 24px;
  background: linear-gradient(135deg, #1F3324, #182A1E);
  border: 1px solid #35543D;
  border-radius: var(--radius-lg);
  padding: 22px;
}
.cta h3 {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--cream);
  letter-spacing: 0.02em;
}
.cta p { font-size: 13.5px; color: var(--ink-soft); margin: 6px 0 16px; }
.cta .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cta .row + .row { margin-top: 10px; }
.cta input {
  background: #101512;
  border: 1px solid #33443B;
  color: var(--ink);
  padding: 11px 12px;
  border-radius: 9px;
  font-size: 14px;
  width: 100%;
  font-family: var(--font-body);
}
.cta input:focus {
  outline: none;
  border-color: var(--field-lite);
  box-shadow: 0 0 0 3px rgba(92, 122, 84, 0.16);
}
.cta .go {
  margin-top: 12px;
  background: var(--field);
  color: var(--ink);
  border: 1px solid #4C6A42;
  padding: 13px;
  border-radius: 9px;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  font-size: 15px;
  transition: background 0.15s ease;
}
.cta .go:hover { background: #3A5D3E; }
.booked .chk {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(126, 224, 160, 0.12);
  border: 1px solid var(--signal);
  color: var(--signal);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  font-size: 28px;
}
@media (max-width: 640px) {
  .cta .row { grid-template-columns: 1fr; }
}

/* Loading status */
.status {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--signal);
  letter-spacing: 0.14em;
}

/* ===== TRENCH LABS LOCKUP =============================================
   The official Trench Labs logo (LABS "A" is an Erlenmeyer flask -
   sibling of the Trench Logic O-as-lightbulb-gear). Wordmark set in
   Archivo Black, flask liquid is Rust (spec: never recolored).
   ==================================================================== */
.tl-logo {
  display: inline-block;
  height: 56px;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.tl-logo:hover { opacity: 0.9; }
.tl-logo svg {
  height: 100%;
  width: auto;
  display: block;
}
.tl-logo.sm { height: 44px; }
.tl-logo.md { height: 60px; }
.tl-logo.lg { height: 96px; }
.tl-logo.xl { height: 128px; }

/* =====================================================================
   Geo / jurisdiction disclaimer
   For calculators that apply state-specific law, regional pricing,
   or state-regulated compliance. Placed at the bottom of the result
   card so out-of-state users see it before the CTA.
   ===================================================================== */
.geo-note {
  margin: 24px 0 4px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(197,183,140,0.08), rgba(197,183,140,0.02));
  border: 1px solid rgba(197,183,140,0.35);
  border-left: 4px solid var(--sand);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.geo-note b { color: var(--cream); }
.geo-note .flag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(181,100,74,0.20);
  border: 1px solid var(--rust);
  border-radius: 4px;
  color: var(--rust);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-right: 8px;
  vertical-align: 1px;
}

/* =====================================================================
   Back-to-parent nav link (Trench Labs -> Trench Logic)
   Sits at the very top-left of every Labs page, subtle sand text.
   ===================================================================== */
.tl-back {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 18px;
  padding: 10px 16px;
  background: rgba(197,183,140,0.14);
  border: 1px solid var(--sand);
  border-radius: 8px;
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cream); text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.tl-back:hover {
  background: var(--rust);
  border-color: var(--rust);
  color: var(--midnight);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.tl-back .arrow { font-size: 16px; line-height: 1; font-weight: 700; }

/* =====================================================================
   Attorney / professional licensing ribbon
   For legal tools + others where the visitor might be a professional
   evaluating a white-label license, not the end consumer.
   ===================================================================== */
.pro-ribbon {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin: 14px 0 22px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #1F3340 0%, #14222B 100%);
  border: 1px solid var(--sand);
  border-radius: 10px;
  color: var(--cream);
}
.pro-ribbon__lbl {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.20em;
  color: var(--sand); text-transform: uppercase;
}
.pro-ribbon__msg {
  font-size: 14px; color: var(--cream); flex: 1; min-width: 260px;
}
.pro-ribbon__msg b { color: var(--sand); }
.pro-ribbon__cta {
  padding: 8px 16px; background: var(--rust); color: var(--midnight);
  border-radius: 6px; text-decoration: none;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 700;
  transition: all 0.15s ease; white-space: nowrap;
}
.pro-ribbon__cta:hover { background: var(--cream); color: var(--midnight); }

/* =====================================================================
   Persistent top-nav row on every Labs page:
   [← Trench Logic]  [Trench Labs]
   ===================================================================== */
.tl-nav {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.tl-nav .tl-back {
  margin-bottom: 0;
}
.tl-labs-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: rgba(181,100,74,0.14);
  border: 1px solid var(--rust);
  border-radius: 8px;
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cream); text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.tl-labs-link:hover {
  background: var(--rust);
  color: var(--midnight);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* =====================================================================
   Demo banner - appears at the very top of legal tool pages to make
   clear this is a demo of a licensable product, not a legal service.
   ===================================================================== */
.demo-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 12px 18px;
  background: linear-gradient(90deg, rgba(181,100,74,0.20), rgba(181,100,74,0.08));
  border: 1px solid var(--rust);
  border-radius: 8px;
}
.demo-banner__tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--rust); color: var(--midnight);
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.20em; text-transform: uppercase; border-radius: 4px;
  white-space: nowrap;
}
.demo-banner__msg {
  font-size: 13px; color: var(--cream); flex: 1; min-width: 240px;
  line-height: 1.5;
}
.demo-banner__msg b { color: var(--cream); }
.demo-banner__msg a { color: var(--sand); text-decoration: underline; }
.demo-banner__msg a:hover { color: var(--cream); }


/* ===== Global focus indicators (WCAG 2.4.7) ===== */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold, #C5B78C) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(197,183,140,0.25);
}
