/* Lawdie demo sites: the demos.lawdie.co design system for every x-firm.lawdie.co page.
   Source of truth for tokens: hub/web/hub.css (kts.lawdie.co brand). Include this file first, then the
   site's own stylesheet for its modules. Per-firm accent: set --accent (and optionally --accent-2) on :root
   in the site's own stylesheet; everything else stays shared so the firm pages and the hub look like one product.

   Adoption (see hub/build/sites-shared.md):
     <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Inter:wght@400;500;600&family=Fragment+Mono&display=swap">
     <link rel="stylesheet" href="/_shared/lawdie-demo.css">   (each firm bucket gets a copy at /_shared/)
     <body class="ld">  ...  <div class="ld-aura"><i class="fa"></i><i class="fb"></i><i class="fc"></i><i class="fd"></i></div>
   Embed mode: body.ld-embed hides the site header and outer chrome (the hub adds ?embed=1 and the site sets the class). */

:root {
  color-scheme: light;
  --ground: #f9f6f2;
  --ink: #3D3731;
  --ink-2: #5F544A;
  --muted: #8B7355;
  --brown: #6B5138;
  --brown-2: #56412C;
  --sand: #C9A876;
  --hair: rgba(107, 81, 56, .14);
  --tile-a: #FAF3E6;
  --tile-b: #EBDFC8;
  --ok: #4F6F4C;
  --ok-led: #5E8B5A;
  --warn: #8A5E0E;
  --bad: #A8402F;
  --accent: var(--brown);
  --accent-2: var(--sand);
  --glass: linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,255,255,.60) 50%, rgba(255,255,255,.76));
  --glass-shadow: 0 1px 2px rgba(31,31,31,.04), 0 4px 12px rgba(61,55,49,.05), inset 0 1px 0 rgba(255,255,255,.9), inset 0 -4px 9px rgba(255,255,255,.08);
  --glass-shadow-hover: 0 2px 4px rgba(31,31,31,.04), 0 18px 40px -18px rgba(61,55,49,.35), inset 0 1px 0 rgba(255,255,255,.95), inset 0 -4px 9px rgba(255,255,255,.1);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --mono: "Fragment Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 20px;
  --radius-s: 12px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* ---------- base ---------- */
body.ld { margin: 0; min-height: 100vh; background: var(--ground); color: var(--ink); font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.ld *, body.ld *::before, body.ld *::after { box-sizing: border-box; }
body.ld [hidden] { display: none !important; }
body.ld a { color: inherit; }
body.ld img, body.ld svg, body.ld video { max-width: 100%; }
body.ld h1, body.ld h2, body.ld h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); margin: 0; letter-spacing: -.01em; text-wrap: balance; }
body.ld h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.08; margin-bottom: 12px; }
body.ld h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.15; margin: 40px 0 14px; }
body.ld h3 { font-size: 19px; line-height: 1.2; }
body.ld h1 em, body.ld h2 em { font-style: normal; color: var(--accent); }
body.ld p { margin: 0 0 12px; }
body.ld .ld-lede { color: var(--ink-2); font-size: 16.5px; max-width: 64ch; margin: 0 0 26px; }
body.ld .ld-muted { color: var(--muted); }
body.ld .ld-small { font-size: 13px; }
body.ld .ld-mono { font-family: var(--mono); font-size: 12.5px; }
body.ld .ld-label { display: flex; align-items: center; gap: 12px; margin: 34px 4px 14px; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
body.ld .ld-label i { flex: 1; height: 1px; background: var(--hair); }
body.ld .ld-wrap { max-width: 1180px; margin: 0 auto; padding: 36px var(--gutter) 80px; }
body.ld .ld-wrap-wide { max-width: 1400px; margin: 0 auto; padding: 24px var(--gutter) 60px; }

/* ---------- drifting light fields behind everything ---------- */
body.ld .ld-aura { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
body.ld .ld-aura i { position: absolute; border-radius: 50%; animation: ld-drift 15s ease-in-out infinite alternate; will-change: transform; }
body.ld .ld-aura .fa { top: -28vmax; left: -16vmax; height: 72vmax; width: 72vmax; background: radial-gradient(closest-side, rgba(139,92,42,.18), rgba(107,81,56,0) 70%); }
body.ld .ld-aura .fb { top: -18vmax; right: -22vmax; height: 80vmax; width: 80vmax; background: radial-gradient(closest-side, rgba(216,209,199,.85), rgba(216,209,199,0) 72%); animation-delay: -5s; }
body.ld .ld-aura .fc { bottom: -26vmax; left: -16vmax; height: 68vmax; width: 68vmax; background: radial-gradient(closest-side, rgba(107,81,56,.15), rgba(107,81,56,0) 70%); animation-delay: -10s; }
body.ld .ld-aura .fd { bottom: -22vmax; right: -14vmax; height: 62vmax; width: 62vmax; background: radial-gradient(closest-side, rgba(199,154,75,.22), rgba(201,168,118,0) 70%); animation-delay: -8s; }
@keyframes ld-drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(4vmax,-3vmax,0) scale(1.08); } }
@keyframes ld-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body.ld .ld-aura i, body.ld .ld-tile { animation: none; } }

/* ---------- header: firm mark and name, frosted segmented module switch ---------- */
body.ld .ld-top { display: flex; align-items: center; gap: 24px; padding: 18px var(--gutter); position: sticky; top: 0; z-index: 5;
  background: linear-gradient(180deg, rgba(249,246,242,.92), rgba(249,246,242,.72)); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-bottom: 1px solid var(--hair); }
body.ld .ld-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
body.ld .ld-brand .mark { width: 32px; height: 32px; object-fit: contain; flex: none; }
body.ld .ld-brand .word { height: 24px; width: auto; }
body.ld .ld-brand .firm { font-family: var(--serif); font-weight: 600; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ld .ld-brand .sub { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-left: 4px; padding-top: 4px; white-space: nowrap; }
body.ld .ld-nav { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.55);
  box-shadow: var(--glass-shadow); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); margin: 0 auto; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
body.ld .ld-nav::-webkit-scrollbar { display: none; }
body.ld .ld-nav a, body.ld .ld-nav button { flex: none; text-decoration: none; padding: 8px 16px; border-radius: 999px; font: 500 13.5px var(--sans); color: var(--muted);
  background: transparent; border: 0; cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; white-space: nowrap; }
body.ld .ld-nav a:hover, body.ld .ld-nav button:hover { color: var(--ink); }
body.ld .ld-nav .on, body.ld .ld-nav [aria-selected="true"], body.ld .ld-nav .active { background: rgba(255,255,255,.95); color: var(--accent);
  box-shadow: 0 1px 2px rgba(31,31,31,.06), 0 6px 16px -8px rgba(61,55,49,.3), inset 0 1px 0 #fff; }
body.ld .ld-top .ld-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
body.ld.ld-embed .ld-top, body.ld.ld-embed .ld-foot, body.ld.ld-embed .ld-hide-embed { display: none !important; }
body.ld.ld-embed .ld-wrap, body.ld.ld-embed .ld-wrap-wide { padding-top: 12px; }

/* ---------- frosted glass surfaces ---------- */
body.ld .ld-glass, body.ld .ld-card, body.ld .ld-tile, body.ld .ld-panel, body.ld .ld-table, body.ld .ld-stage {
  border: 1px solid rgba(255,255,255,.6); background: var(--glass); box-shadow: var(--glass-shadow);
  backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px); border-radius: var(--radius); }
body.ld .ld-card, body.ld .ld-panel { padding: 18px 20px; }
body.ld .ld-card + .ld-card { margin-top: 12px; }
body.ld .ld-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
body.ld .ld-tile { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px; text-decoration: none;
  transition: transform .2s ease-out, box-shadow .2s ease-out; animation: ld-rise .38s cubic-bezier(.25,.8,.25,1) both; }
body.ld .ld-tile:hover { transform: translateY(-3px); box-shadow: var(--glass-shadow-hover); }
body.ld .ld-tile p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
body.ld .ld-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 13px; border: 1px solid rgba(255,255,255,.8);
  background: linear-gradient(180deg, rgba(250,243,230,.95), rgba(235,223,200,.85)); color: var(--accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.9); font: 600 18px var(--serif); }
body.ld .ld-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 16px; }
body.ld .ld-split > * { min-width: 0; }
body.ld .ld-stage { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; padding: 18px; margin-bottom: 12px; }
body.ld .ld-stage .name { font-family: var(--serif); font-weight: 600; font-size: 18px; }
body.ld .ld-stage .n { display: block; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; margin-bottom: 4px; }

/* ---------- pills, status, notices ---------- */
body.ld .ld-pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,.8); background: rgba(255,255,255,.72); color: #6F6154; margin: 2px 4px 2px 0; white-space: nowrap; text-decoration: none; }
body.ld .ld-pill.live, body.ld .ld-pill.ok { color: var(--ok); background: rgba(94,139,90,.10); border-color: rgba(94,139,90,.22); }
body.ld .ld-pill.accent { color: var(--accent); background: linear-gradient(180deg, rgba(243,232,210,.95), rgba(229,211,176,.8)); }
body.ld .ld-pill.warn { color: var(--warn); background: rgba(138,94,14,.08); border-color: rgba(138,94,14,.2); }
body.ld .ld-pill.bad { color: var(--bad); background: rgba(168,64,47,.08); border-color: rgba(168,64,47,.2); }
body.ld .ld-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
body.ld .ld-status .led { width: 7px; height: 7px; border-radius: 50%; background: #CDBFA8; box-shadow: 0 0 0 3px rgba(205,191,168,.25); }
body.ld .ld-status.live .led { background: var(--ok-led); box-shadow: 0 0 0 3px rgba(94,139,90,.18); }
body.ld .ld-notice { border-radius: 14px; padding: 12px 16px; margin: 0 0 18px; color: var(--brown-2); border: 1px solid rgba(201,168,118,.45);
  background: linear-gradient(180deg, rgba(243,232,210,.9), rgba(229,211,176,.6)); }
body.ld .ld-notice.ok { color: var(--ok); border-color: rgba(94,139,90,.3); background: rgba(94,139,90,.10); }

/* ---------- buttons ---------- */
body.ld .ld-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px var(--sans); padding: 10px 18px; border-radius: var(--radius-s); border: 0; cursor: pointer; text-decoration: none;
  background: var(--accent); color: #fff; box-shadow: 0 10px 24px -12px rgba(86,65,44,.7), inset 0 1px 0 rgba(255,255,255,.18); transition: background-color .2s, transform .15s, filter .2s; }
body.ld .ld-btn:hover { filter: brightness(.92); }
body.ld .ld-btn:active { transform: scale(.98); }
body.ld .ld-btn.ghost { background: rgba(255,255,255,.75); color: var(--accent); border: 1px solid rgba(107,81,56,.2); box-shadow: inset 0 1px 0 rgba(255,255,255,.85); }
body.ld .ld-btn.ghost:hover { background: #fff; filter: none; }
body.ld .ld-btn.small { padding: 6px 12px; font-size: 13px; }
body.ld .ld-btn:disabled { opacity: .45; cursor: not-allowed; }
body.ld .ld-btn:focus-visible, body.ld .ld-nav a:focus-visible, body.ld .ld-nav button:focus-visible, body.ld a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ---------- tables and logs ---------- */
body.ld .ld-table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: 16px; overflow: hidden; }
body.ld .ld-table th, body.ld .ld-table td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--hair); vertical-align: top; font-size: 14px; }
body.ld .ld-table tr:first-child th, body.ld .ld-table tr:first-child td { border-top: 0; }
body.ld .ld-table th { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
body.ld .ld-table td a { color: var(--accent); text-decoration: none; }
body.ld .ld-num { font-variant-numeric: tabular-nums; }
body.ld .ld-log { font-family: var(--mono); font-size: 12px; background: linear-gradient(180deg, rgba(250,243,230,.8), rgba(235,223,200,.55)); border: 1px solid rgba(255,255,255,.8);
  border-radius: var(--radius-s); padding: 10px 12px; max-height: 240px; overflow: auto; white-space: pre-wrap; color: var(--ink-2); }
body.ld .ld-frame { width: 100%; height: 560px; border: 1px solid rgba(255,255,255,.7); border-radius: 16px; background: #fff; box-shadow: var(--glass-shadow); }

/* ---------- module switch used by the animation pages (vert-btn) ---------- */
body.ld .vert-bar { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 999px; border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.55); box-shadow: var(--glass-shadow); }
body.ld .vert-btn { font: 500 13.5px var(--sans); color: var(--muted); background: transparent; border: 0; padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: background-color .2s, color .2s; }
body.ld .vert-btn:hover { color: var(--ink); }
body.ld .vert-btn.active, body.ld .vert-btn[aria-selected="true"] { background: rgba(255,255,255,.95); color: var(--accent); box-shadow: 0 1px 2px rgba(31,31,31,.06), 0 6px 16px -8px rgba(61,55,49,.3), inset 0 1px 0 #fff; }

/* ---------- footer ---------- */
body.ld .ld-foot { padding: 28px var(--gutter) 40px; color: var(--muted); font-size: 12.5px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--hair); }
body.ld .ld-foot .ld-synthetic { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  body.ld .ld-split, body.ld .ld-stage { grid-template-columns: minmax(0, 1fr); }
  body.ld .ld-top { gap: 12px; padding: 12px var(--gutter); flex-wrap: wrap; }
  body.ld .ld-nav { order: 3; width: 100%; justify-content: flex-start; }
}
@media (max-width: 480px) {
  body.ld { font-size: 14.5px; }
  body.ld .ld-wrap, body.ld .ld-wrap-wide { padding-left: 16px; padding-right: 16px; }
  body.ld .ld-card, body.ld .ld-panel { padding: 14px; border-radius: 16px; }
  body.ld .ld-frame { height: 420px; }
}
@media print { body.ld .ld-aura, body.ld .ld-top, body.ld .ld-foot { display: none; } body.ld { background: #fff; } }
