
  :root{
    --ink:#0c2547;
    --ink-soft:#28466f;
    --paper:#eef3fb;
    --paper-raised:#ffffff;
    --paper-line:#d3e0f2;
    --accent:#1a5fd4;
    --accent-strong:#0a3d8f;
    --accent-bright:#4f8ff5;
    --accent-soft:#dce9fc;
    --text:#0c2547;
    --text-dim:#54708f;
    --accent-red:#b3392f;
    --focus:#1a5fd4;
    --shine: linear-gradient(180deg, rgba(255,255,255,0.65), rgba(255,255,255,0));
    --sheen-line: rgba(255,255,255,0.6);
    --gloss: linear-gradient(135deg, var(--accent-bright), var(--accent-strong));
    --hero-grad: linear-gradient(155deg, #0a3d8f 0%, #1a5fd4 55%, #5fa0f7 100%);
    --hero-cta-text: #0a3d8f;
    --shadow: 0 1px 2px rgba(12,37,71,0.08), 0 4px 20px rgba(12,37,71,0.08);
    --glow: 0 4px 18px rgba(26,95,212,0.28);
    --radius: 6px;
  }
  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]){
      --ink:#dfe9fb;
      --ink-soft:#a9c1e4;
      --paper:#050d1c;
      --paper-raised:#0d1b34;
      --paper-line:#1e3459;
      --accent:#5b93e6;
      --accent-strong:#8fb8f2;
      --accent-bright:#7fb0ee;
      --accent-soft:#132a4d;
      --text:#e7eefc;
      --text-dim:#8ba3c7;
      --accent-red:#e08a7d;
      --focus:#7fb0ee;
      --shine: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0));
      --sheen-line: rgba(255,255,255,0.08);
      --gloss: linear-gradient(135deg, #6fa4ec, #14315c);
      --hero-grad: linear-gradient(155deg, #030a18 0%, #123568 55%, #2f6fd0 100%);
      --hero-cta-text: #0a3d8f;
      --shadow: 0 1px 2px rgba(0,0,0,0.5), 0 10px 30px rgba(0,0,0,0.45);
      --glow: 0 4px 22px rgba(95,150,235,0.35);
    }
  }
  :root[data-theme="dark"]{
    --ink:#dfe9fb;
    --ink-soft:#a9c1e4;
    --paper:#050d1c;
    --paper-raised:#0d1b34;
    --paper-line:#1e3459;
    --accent:#5b93e6;
    --accent-strong:#8fb8f2;
    --accent-bright:#7fb0ee;
    --accent-soft:#132a4d;
    --text:#e7eefc;
    --text-dim:#8ba3c7;
    --accent-red:#e08a7d;
    --focus:#7fb0ee;
    --shine: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0));
    --sheen-line: rgba(255,255,255,0.08);
    --gloss: linear-gradient(135deg, #6fa4ec, #14315c);
    --hero-grad: linear-gradient(155deg, #030a18 0%, #123568 55%, #2f6fd0 100%);
    --hero-cta-text: #0a3d8f;
    --shadow: 0 1px 2px rgba(0,0,0,0.5), 0 10px 30px rgba(0,0,0,0.45);
    --glow: 0 4px 22px rgba(95,150,235,0.35);
  }
  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;}
  body{
    background:var(--paper);
    color:var(--text);
    font-family:'Public Sans', system-ui, -apple-system, sans-serif;
    font-size:15.5px;
    line-height:1.55;
    -webkit-font-smoothing:antialiased;
  }
  ::selection{ background:var(--accent-soft); }
  a{ color:var(--focus); }
  :focus-visible{ outline:2px solid var(--focus); outline-offset:2px; }
  h1,h2,h3,h4{
    font-family:'Playfair Display', Georgia, serif;
    font-weight:600;
    color:var(--ink);
    text-wrap:balance;
    margin:0;
  }
  .mono{ font-family:'IBM Plex Mono', ui-monospace, monospace; font-variant-numeric:tabular-nums; }
  .eyebrow{
    font-family:'IBM Plex Mono', monospace;
    font-size:11.5px;
    letter-spacing:.09em;
    text-transform:uppercase;
    color:var(--accent-strong);
  }

  /* ---------- letterhead header ---------- */
  header.site{
    background:linear-gradient(180deg, var(--paper-raised) 0%, var(--paper) 100%);
    position:relative;
    padding:22px clamp(16px,4vw,40px) 18px;
  }
  header.site::after{
    content:''; position:absolute; left:0; right:0; bottom:0; height:3px;
    background:var(--gloss);
  }
  .letterhead{
    display:flex; align-items:flex-end; justify-content:space-between; gap:20px; flex-wrap:wrap;
    max-width:1180px; margin:0 auto;
  }
  .letterhead .mark{ display:flex; align-items:center; gap:14px; }
  .seal{
    width:48px;height:48px;border-radius:50%;
    position:relative; overflow:hidden;
    background:var(--gloss); border:none;
    display:flex;align-items:center;justify-content:center;
    font-family:'Playfair Display',serif; font-weight:700; font-size:15px; color:#fff;
    flex:none; box-shadow:var(--glow), inset 0 -2px 4px rgba(0,0,0,0.25);
  }
  .seal::before{
    content:''; position:absolute; top:-45%; left:-15%; width:130%; height:85%;
    background:var(--shine); border-radius:50%; pointer-events:none;
  }
  .seal span{ position:relative; z-index:1; }
  .letterhead h1{ font-size:clamp(22px,3vw,30px); }
  .letterhead .sub{ color:var(--text-dim); font-size:13.5px; margin-top:2px; max-width:56ch; }
  .theme-toggle{
    font-family:'IBM Plex Mono',monospace; font-size:12px; letter-spacing:.04em;
    background:var(--paper-raised); border:1px solid var(--paper-line); color:var(--text-dim);
    padding:7px 12px; border-radius:20px; cursor:pointer;
    box-shadow:0 1px 2px rgba(12,37,71,0.06);
  }
  .theme-toggle:hover{ border-color:var(--accent); color:var(--accent-strong); }

  /* ---------- layout: glossy blue side rail ---------- */
  .shell{
    max-width:1180px; margin:0 auto;
    display:flex; align-items:flex-start; gap:0;
    min-height:70vh;
  }
  nav.rail{
    position:sticky; top:0; z-index:5; align-self:flex-start;
    flex:0 0 232px; width:232px;
    background:var(--gloss);
    border-radius:0 var(--radius) var(--radius) 0;
    overflow:hidden;
    box-shadow: var(--glow), 2px 0 0 rgba(12,37,71,0.05);
    max-height:100vh; overflow-y:auto; scrollbar-width:thin;
    transition: flex-basis .32s ease, width .32s ease;
  }
  /* Idle auto-collapse (desktop only — see JS): shrinks to a number-only
     rail after 5s with no click inside it, expands back on click. */
  nav.rail.collapsed{ flex:0 0 60px; width:60px; }
  nav.rail.collapsed button{ justify-content:center; padding:12px 4px; gap:0; }
  nav.rail.collapsed button > span:not(.n){ display:none; }
  nav.rail.collapsed .rail-note{ display:none; }
  nav.rail::before{
    content:""; position:absolute; left:0; right:0; top:0; height:46%;
    background:linear-gradient(180deg, rgba(255,255,255,0.38), rgba(255,255,255,0));
    pointer-events:none;
  }
  nav.rail ul{
    position:relative;
    list-style:none; margin:0; padding:16px 12px;
    display:flex; flex-direction:column; gap:5px;
  }
  nav.rail button{
    all:unset; cursor:pointer; white-space:nowrap;
    display:flex; align-items:baseline; gap:9px;
    width:100%; box-sizing:border-box;
    padding:12px 14px;
    font-size:14px; color:rgba(255,255,255,0.82);
    border-radius:8px;
    background:linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
    transition: background .15s ease, color .15s ease, transform .12s ease, box-shadow .15s ease;
  }
  nav.rail button .n{ font-family:'IBM Plex Mono',monospace; font-size:11px; color:rgba(255,255,255,0.55); }
  nav.rail button:hover{
    color:#fff; transform:translateX(2px);
    background:linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.04));
  }
  nav.rail button[aria-current="true"]{
    color:#fff; font-weight:700;
    background:linear-gradient(180deg, rgba(255,255,255,0.34), rgba(255,255,255,0.08));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 4px 16px rgba(6,20,46,0.35);
  }
  nav.rail button[aria-current="true"] .n{ color:#fff; }
  @keyframes tabZoom{
    0%{ transform:scale(1); }
    45%{ transform:scale(1.14); }
    100%{ transform:scale(1); }
  }
  nav.rail button.zoom-tap{ animation: tabZoom .38s cubic-bezier(.34,1.56,.64,1); }
  .rail-note{
    position:relative;
    padding:12px 16px 16px; font-size:11px; line-height:1.5; color:rgba(255,255,255,0.78);
    border-top:1px solid rgba(255,255,255,0.22);
  }

  main{ flex:1 1 auto; min-width:0; padding:28px clamp(14px,3vw,32px) 60px; }

  @media (max-width: 760px){
    .shell{ display:block; }
    nav.rail, nav.rail.collapsed{
      position:sticky; top:0; z-index:5; align-self:auto;
      width:auto; flex:none;
      border-radius:0; max-height:none; overflow-y:visible;
      border-bottom:1px solid var(--paper-line);
    }
    nav.rail.collapsed button{ justify-content:flex-start; padding:12px 14px; gap:9px; }
    nav.rail.collapsed button > span:not(.n){ display:inline; }
    nav.rail.collapsed .rail-note{ display:block; }
    nav.rail::before{ display:none; }
    nav.rail ul{
      flex-direction:row; gap:4px;
      padding:8px clamp(14px,3vw,32px);
      overflow-x:auto; scrollbar-width:thin;
    }
    nav.rail button{ width:auto; }
    .rail-note{ border-top:none; }
  }
  section.view{ display:none; }
  section.view.active{ display:block; animation:fade .25s ease; }
  @keyframes fade{ from{opacity:0; transform:translateY(3px);} to{opacity:1; transform:none;} }
  @media (prefers-reduced-motion:reduce){ section.view.active{animation:none;} }

  .view-head{ margin-bottom:18px; }
  .view-head h2{ font-size:clamp(20px,2.4vw,26px); }
  .view-head p{ color:var(--text-dim); max-width:68ch; margin-top:6px; font-size:14px; }
  .view-head.act-sub-head{ margin-top:36px; padding-top:28px; border-top:1px solid var(--paper-line); }
  .act-meta-line{ color:var(--accent-strong); font-size:12px; margin-top:8px; letter-spacing:.02em; }
  .h3-eyebrow{ font-family:'Playfair Display',serif; font-size:19px; margin-top:4px; }

  .rpwd-note{
    background:var(--accent-soft); border:1px solid var(--paper-line); border-radius:var(--radius);
    padding:14px 16px; font-size:13px; line-height:1.7; color:var(--ink); margin-bottom:24px;
  }
  .rpwd-item mark, .rpwd-fulltext mark{ background:var(--accent-soft); color:var(--ink); padding:0 2px; border-radius:2px; }

  .search{
    display:flex; align-items:center; gap:8px;
    background:var(--paper-raised); border:1px solid var(--paper-line); border-radius:var(--radius);
    padding:9px 12px; margin:16px 0 20px; max-width:480px;
  }
  .search svg{ flex:none; opacity:.6; }
  .search input{
    all:unset; flex:1; font-family:'Public Sans',sans-serif; font-size:14px; color:var(--text);
  }
  .search .count{ font-family:'IBM Plex Mono',monospace; font-size:11.5px; color:var(--text-dim); white-space:nowrap; }

  /* ---------- hero (landing) ---------- */
  .hero{
    position:relative; overflow:hidden;
    background:var(--hero-grad);
    border-radius:16px;
    padding:clamp(32px,6vw,56px) clamp(24px,6vw,56px) clamp(40px,7vw,64px);
    box-shadow:var(--glow), inset 0 1px 0 rgba(255,255,255,0.25);
  }
  .hero-glow{
    position:absolute; inset:0; pointer-events:none;
    background:
      radial-gradient(ellipse 60% 90% at 15% -10%, rgba(255,255,255,0.35), transparent 60%),
      radial-gradient(ellipse 50% 70% at 105% 110%, rgba(255,255,255,0.16), transparent 60%);
  }
  .hero-eyebrow{ position:relative; color:rgba(255,255,255,0.85) !important; }
  .hero-h1{
    position:relative; color:#fff; font-size:clamp(30px,4.4vw,46px); line-height:1.12;
    margin-top:10px; max-width:16ch;
    text-shadow:0 2px 18px rgba(6,20,45,0.25);
  }
  .hero-p{
    position:relative; color:rgba(255,255,255,0.88); max-width:56ch; margin-top:16px;
    font-size:15px; line-height:1.65;
  }
  .hero-cta{ position:relative; display:flex; gap:12px; flex-wrap:wrap; margin-top:28px; }
  .hero-btn{
    all:unset; cursor:pointer; font-family:'Public Sans',sans-serif; font-size:14px; font-weight:600;
    padding:12px 22px; border-radius:30px; display:inline-flex; align-items:center; gap:8px;
    transition:transform .15s ease, filter .15s ease;
  }
  .hero-btn:hover{ transform:translateY(-1px); }
  .hero-btn.primary{
    background:#fff; color:var(--hero-cta-text);
    box-shadow:0 8px 20px rgba(6,20,45,0.25);
  }
  .hero-btn.primary:hover{ filter:brightness(1.03); }
  .hero-btn.ghost{
    color:#fff; border:1.5px solid rgba(255,255,255,0.55);
    background:rgba(255,255,255,0.08);
  }
  .hero-btn.ghost:hover{ background:rgba(255,255,255,0.18); }
  .hero-stats{ margin-top:-34px; position:relative; z-index:2; padding:0 4px; }
  .hero-stats .stat{ box-shadow:var(--shadow), 0 14px 26px rgba(12,37,71,0.14); }

  /* ---------- overview ---------- */
  .stat-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:12px; margin:20px 0 28px; }
  .stat{
    background:var(--paper-raised); border:1px solid var(--paper-line); border-radius:var(--radius);
    padding:14px 16px; box-shadow:var(--shadow), inset 0 1px 0 var(--sheen-line);
  }
  .stat .num{ font-family:'Playfair Display',serif; font-size:28px; color:var(--ink); font-weight:700; }
  .stat .lbl{ font-size:12px; color:var(--text-dim); margin-top:2px; }

  .card-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:14px; }
  .part-card, .chip-card{
    background:var(--paper-raised); border:1px solid var(--paper-line); border-radius:var(--radius);
    padding:16px 18px; box-shadow:var(--shadow), inset 0 1px 0 var(--sheen-line);
    transition:box-shadow .18s ease, border-color .18s ease;
  }
  .part-card:hover{ border-color:var(--accent); box-shadow:var(--glow), inset 0 1px 0 var(--sheen-line); }
  .part-card .eyebrow{ margin-bottom:6px; display:block; }
  .part-card h3{ font-size:17px; margin-bottom:4px; }
  .part-card .rng{ font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--accent-strong); margin-bottom:8px; display:block; }
  .part-card p{ font-size:13.6px; color:var(--text-dim); margin:0; }

  .disclaimer{
    margin-top:30px; padding:14px 16px; background:var(--accent-soft); border-left:3px solid var(--accent);
    border-radius:0 var(--radius) var(--radius) 0; font-size:13px; color:var(--text);
  }

  /* ---------- KER chapters ---------- */
  .chapter-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:12px; }
  .chapter-card{
    background:var(--paper-raised); border:1px solid var(--paper-line); border-radius:var(--radius);
    padding:14px 16px; position:relative; box-shadow:inset 0 1px 0 var(--sheen-line);
    transition:box-shadow .18s ease, border-color .18s ease;
  }
  .chapter-card:hover{ border-color:var(--accent); box-shadow:var(--glow), inset 0 1px 0 var(--sheen-line); }
  .chapter-card.hl{ border-color:var(--accent); box-shadow:0 0 0 1px var(--accent) inset, inset 0 1px 0 var(--sheen-line); background:var(--accent-soft); }
  .chapter-card .chn{ font-family:'IBM Plex Mono',monospace; color:var(--accent-strong); font-size:12px; }
  .chapter-card h4{ font-size:15px; margin:3px 0 6px; }
  .chapter-card p{ font-size:13px; color:var(--text-dim); margin:0; }
  .chapter-card .hl-tag{
    position:absolute; top:12px; right:12px; font-family:'IBM Plex Mono',monospace;
    font-size:9.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--accent);
  }
  .chapter-card .chapter-link-btn{
    display:inline-block; margin-top:10px; padding:6px 12px; font-size:12px; font-weight:600;
    border:1px solid var(--accent); border-radius:999px; background:var(--accent); color:#fff;
    cursor:pointer; font-family:inherit; transition:opacity .15s ease;
  }
  .chapter-card .chapter-link-btn:hover{ opacity:.85; }

  /* ---------- GO list ---------- */
  .go-list{ display:flex; flex-direction:column; gap:10px; }
  .go-item, .act-item, .rpwd-item, .ch14a-item, .rpwdact-item, .recent-item{
    background:var(--paper-raised); border:1px solid var(--paper-line); border-left:3px solid var(--paper-line);
    border-radius:0 var(--radius) var(--radius) 0; padding:14px 16px 14px 18px;
    box-shadow:inset 0 1px 0 var(--sheen-line);
    transition:box-shadow .18s ease, border-color .18s ease;
  }
  .go-item, .act-item, .rpwd-item, .ch14a-item, .rpwdact-item{ cursor:pointer; }
  .go-item:hover, .act-item:hover, .rpwd-item:hover, .ch14a-item:hover, .rpwdact-item:hover, .recent-item:hover{ border-left-color:var(--accent); box-shadow:var(--glow), inset 0 1px 0 var(--sheen-line); }
  .go-item[aria-expanded="true"], .act-item[aria-expanded="true"], .rpwd-item[aria-expanded="true"], .ch14a-item[aria-expanded="true"], .rpwdact-item[aria-expanded="true"]{ border-left-color:var(--accent); background:var(--paper); box-shadow:none; }
  .go-top, .act-top, .rpwd-top, .ch14a-top{ display:flex; justify-content:space-between; gap:14px; align-items:baseline; flex-wrap:wrap; }
  .go-id, .act-id, .rpwd-id, .ch14a-id{ font-family:'IBM Plex Mono',monospace; font-size:11px; color:var(--text-dim); }
  .go-ref, .act-ref, .rpwd-ref, .ch14a-ref{ font-family:'IBM Plex Mono',monospace; font-size:12.5px; color:var(--accent-strong); }
  .go-date{ font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--text-dim); }
  .go-subject, .act-subject, .rpwd-subject, .ch14a-subject{ font-family:'Playfair Display',serif; font-weight:600; font-size:15.5px; margin-top:4px; color:var(--ink); }
  .go-meta{ display:flex; gap:10px; flex-wrap:wrap; margin-top:6px; }
  .tag{
    font-size:11px; padding:2px 8px; border-radius:20px; border:1px solid var(--paper-line); color:var(--text-dim);
  }
  .tag.rule{ color:var(--accent-strong); border-color:var(--accent-soft); }
  .go-summary, .act-summary, .rpwd-summary, .ch14a-summary{
    margin-top:12px; padding-top:12px; border-top:1px dashed var(--paper-line);
    font-size:13.8px; color:var(--text); display:none;
  }
  .go-item[aria-expanded="true"] .go-summary, .act-item[aria-expanded="true"] .act-summary, .rpwd-item[aria-expanded="true"] .rpwd-summary, .ch14a-item[aria-expanded="true"] .ch14a-summary, .rpwdact-item[aria-expanded="true"] .rpwd-summary{ display:block; }
  .go-summary .caselink{ margin-top:8px; font-size:12.5px; }
  .item-shortdesc{ font-size:12.8px; color:var(--text-dim); margin-top:5px; line-height:1.5; }
  .note-toggle-row{ margin-top:10px; }
  .note-toggle{
    all:unset; cursor:pointer; font-size:12px; padding:6px 13px; border-radius:20px;
    border:1px solid var(--paper-line); color:var(--text-dim);
  }
  .note-toggle:hover{ border-color:var(--accent); color:var(--accent-strong); }
  .item-note-body{ display:none; margin-top:10px; }
  .item-note-body.open{ display:block; }
  .interp-block{
    margin-top:12px; padding-top:12px; border-top:1px dashed var(--paper-line);
  }
  .interp-block .ft-label{
    font-family:'IBM Plex Mono',monospace; font-size:10.5px; text-transform:uppercase; letter-spacing:.07em;
    color:var(--accent-strong); display:block; margin-bottom:8px;
  }
  .ml-pending-note{
    font-family:'IBM Plex Mono',monospace; font-size:11px; color:var(--text-dim); font-style:italic;
    margin-bottom:10px;
  }
  .chapter-card .item-shortdesc{ margin-top:2px; }
  .chapter-fulltext{
    display:none; margin-top:12px; padding:14px 16px; background:var(--paper);
    border:1px dashed var(--paper-line); border-radius:var(--radius);
    font-family:'Lora',serif; font-size:14px; line-height:1.7; white-space:pre-wrap;
    max-height:420px; overflow-y:auto; text-align:left;
  }
  .chapter-fulltext.open{ display:block; }
  .chapter-fulltext .ft-label{
    font-family:'IBM Plex Mono',monospace; font-size:10.5px; text-transform:uppercase; letter-spacing:.07em;
    color:var(--accent-strong); display:block; margin-bottom:8px;
  }
  .recent-links{ font-size:13px; color:var(--text-dim); margin-top:6px; }
  .recent-links a{ color:var(--accent-strong); }

  /* ---------- Chapter XIV-A subject chips ---------- */
  .subject-row{ display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
  .subject-chip{
    font-family:'IBM Plex Mono',monospace; font-size:11.5px; padding:6px 12px; border-radius:20px;
    border:1px solid var(--paper-line); background:var(--paper-raised); color:var(--text-dim); cursor:pointer;
    transition:all .15s ease;
  }
  .subject-chip:hover{ border-color:var(--accent); color:var(--ink); }
  .subject-chip[aria-pressed="true"]{ background:var(--accent); border-color:var(--accent); color:#fff; }

  /* ---------- Case law ---------- */
  .case-table{ width:100%; min-width:760px; border-collapse:collapse; font-size:13.8px; table-layout:fixed; }
  .case-table col.col-case{ width:26%; }
  .case-table col.col-court{ width:15%; }
  .case-table col.col-principle{ width:47%; }
  .case-table col.col-go{ width:12%; }
  .case-table thead th{
    text-align:left; font-family:'IBM Plex Mono',monospace; font-size:11px; text-transform:uppercase;
    letter-spacing:.05em; color:var(--text-dim); padding:8px 10px; border-bottom:1px solid var(--paper-line);
    white-space:normal; word-break:break-word;
  }
  .case-table td{ padding:12px 10px; border-bottom:1px solid var(--paper-line); vertical-align:top; overflow-wrap:anywhere; }
  .case-table tr:hover td{ background:var(--paper-raised); }
  .case-name{ font-family:'Playfair Display',serif; font-weight:600; color:var(--ink); white-space:normal; overflow-wrap:anywhere; }
  .case-table .goref{ font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--accent-strong); cursor:pointer; text-decoration:underline; background:none; border:none; padding:0; }
  .case-ft-toggle{
    all:unset; cursor:pointer; font-size:12px; padding:5px 12px; border-radius:20px;
    border:1px solid var(--paper-line); color:var(--text-dim); margin-top:8px; display:inline-block;
  }
  .case-ft-toggle:hover{ border-color:var(--accent); color:var(--accent-strong); }
  .case-detail-row{ display:none; }
  .case-detail-row.open{ display:table-row; }
  .case-detail-row td{ background:var(--paper-raised); }
  .case-narrative-note{
    font-family:'IBM Plex Mono',monospace; font-size:11px; color:var(--text-dim); font-style:italic;
    margin-bottom:10px; padding-bottom:10px; border-bottom:1px dashed var(--paper-line);
  }
  .case-detail-row .act-fulltext{ display:block; margin-top:0; max-height:none; }

  .table-wrap{ overflow-x:auto; border:1px solid var(--paper-line); border-radius:var(--radius); background:var(--paper-raised); }

  .empty{ padding:30px 10px; text-align:center; color:var(--text-dim); font-size:13.5px; }

  /* ---------- sort row / jump / pdf ---------- */
  .sort-row{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:-8px 0 18px; }
  .sort-label{ font-size:12px; color:var(--text-dim); }
  .sort-group{ display:inline-flex; border:1px solid var(--paper-line); border-radius:var(--radius); overflow:hidden; }
  .sort-btn{
    all:unset; cursor:pointer; font-size:12.5px; padding:6px 12px; color:var(--text-dim);
    border-right:1px solid var(--paper-line);
  }
  .sort-btn:last-child{ border-right:none; }
  .sort-btn[aria-pressed="true"]{ background:var(--gloss); color:#fff; font-weight:600; box-shadow:inset 0 1px 0 var(--sheen-line); }
  .jump-select{ display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-dim); }
  .jump-select select{
    font-family:'IBM Plex Mono',monospace; font-size:12px; padding:5px 8px;
    background:var(--paper-raised); color:var(--text); border:1px solid var(--paper-line); border-radius:var(--radius);
  }
  .go-actions, .act-actions, .rpwd-actions{ display:flex; gap:10px; margin-top:10px; flex-wrap:wrap; }
  .go-actions button, .act-actions button, .rpwd-actions button{
    all:unset; cursor:pointer; font-size:12px; padding:6px 13px; border-radius:20px;
    border:1px solid var(--paper-line); color:var(--text-dim);
  }
  .go-actions button:hover, .act-actions button:hover, .rpwd-actions button:hover{ border-color:var(--accent); color:var(--accent-strong); }

  .go-fulltext, .act-fulltext, .rpwd-fulltext{
    display:none; margin-top:12px; padding:14px 16px; background:var(--paper);
    border:1px dashed var(--paper-line); border-radius:var(--radius);
    font-family:'Lora',serif; font-size:14px; line-height:1.7; white-space:pre-wrap;
    max-height:420px; overflow-y:auto;
  }
  .go-fulltext.open, .act-fulltext.open, .rpwd-fulltext.open{ display:block; }
  .go-fulltext .ft-label, .act-fulltext .ft-label, .rpwd-fulltext .ft-label{
    font-family:'IBM Plex Mono',monospace; font-size:10.5px; text-transform:uppercase; letter-spacing:.07em;
    color:var(--accent-strong); display:block; margin-bottom:8px;
  }

  @media print{
    .no-print{ display:none !important; }
    body{ background:#fff; }
  }

  footer.site{
    max-width:1180px; margin:0 auto; padding:24px clamp(16px,4vw,40px) 40px;
    color:var(--text-dim); font-size:12px; border-top:1px solid var(--paper-line);
  }

  @media (max-width: 560px){
    .rail-note{ display:none; }
    nav.rail button{ padding:12px 12px 10px; font-size:13px; }
  }

  /* ---------- Ask Between the Lines ---------- */
  #askFab{
    position:fixed; right:22px; bottom:22px; z-index:60;
    display:flex; align-items:center; gap:8px; padding:12px 18px;
    border-radius:30px; border:none; cursor:pointer;
    background:linear-gradient(135deg, #4338CA 0%, #DB2777 55%, #F59E0B 100%);
    color:#fff; font-family:'Public Sans',sans-serif; font-weight:600; font-size:13.5px;
    box-shadow:0 6px 22px rgba(88,20,140,.35); transition:transform .15s ease, box-shadow .15s ease;
  }
  #askFab:hover{ transform:translateY(-2px); box-shadow:0 10px 28px rgba(88,20,140,.45); }
  #askFab .ask-fab-icon{ font-size:16px; }
  #askPanel{
    position:fixed; top:0; right:0; bottom:0; z-index:61;
    width:50vw; min-width:340px; max-width:720px; height:100vh; max-height:100vh;
    display:flex; flex-direction:column;
    background:var(--paper); border-left:1px solid var(--paper-line); border-radius:0;
    box-shadow:-18px 0 50px rgba(0,0,0,.35); overflow:hidden;
    opacity:0; transform:translateX(28px); pointer-events:none; transition:opacity .18s ease, transform .18s ease;
  }
  #askPanel.open{ opacity:1; transform:translateX(0); pointer-events:auto; }
  .ask-head{
    display:flex; justify-content:space-between; align-items:flex-start; gap:10px;
    padding:16px 16px 14px;
    background:linear-gradient(120deg, #4338CA 0%, #A21CAF 45%, #DB2777 75%, #F59E0B 100%);
  }
  .ask-title{ font-family:'Playfair Display',serif; font-weight:700; font-size:15.5px; color:#fff; }
  .ask-sub{ font-size:11px; color:rgba(255,255,255,.85); margin-top:2px; }
  #askClose{ background:rgba(255,255,255,.2); border:none; border-radius:50%; width:22px; height:22px; cursor:pointer; color:#fff; font-size:13px; line-height:1; padding:2px; }
  .ask-note{ font-size:11px; color:var(--text-dim); padding:10px 16px; border-bottom:1px dashed var(--paper-line); }
  .ask-log{ flex:1; overflow-y:auto; padding:12px 16px; display:flex; flex-direction:column; gap:12px; min-height:120px; }
  .ask-msg{ font-size:13.2px; line-height:1.55; }
  .ask-msg.user{ align-self:flex-end; background:linear-gradient(135deg, #4338CA, #DB2777); color:#fff; padding:8px 12px; border-radius:12px 12px 2px 12px; max-width:88%; }
  .ask-msg.bot{ background:var(--paper-raised); border:1px solid var(--paper-line); padding:10px 12px; border-radius:12px 12px 12px 2px; }
  .ask-hit{ margin-top:8px; padding-top:8px; border-top:1px dashed var(--paper-line); }
  .ask-hit:first-child{ margin-top:6px; padding-top:0; border-top:none; }
  .ask-hit-tag{ font-family:'IBM Plex Mono',monospace; font-size:10px; text-transform:uppercase; letter-spacing:.05em; color:var(--accent-strong); font-weight:600; }
  .ask-hit-title{ font-weight:600; margin:2px 0 3px; color:var(--ink); }
  .ask-hit-snip{ color:var(--text); font-size:12.6px; }
  .ask-hit-go{ margin-top:5px; font-size:11.5px; color:var(--accent-strong); background:none; border:none; padding:0; cursor:pointer; text-decoration:underline; }
  .ask-direct-answer{
    margin-top:2px; padding:11px 13px; border-left:3px solid var(--accent-strong);
    background:var(--paper-raised); border-radius:4px 10px 10px 4px;
  }
  .ask-direct-answer .ask-hit-tag{ display:block; margin-bottom:4px; }
  .ask-answer-text{ font-size:14px; line-height:1.6; color:var(--ink); font-weight:500; }
  .ask-answer-src{ margin-top:6px; font-size:11px; color:var(--text-dim); font-style:italic; }
  .ask-direct-answer .ask-hit-go{ margin-top:8px; }
  .ask-related-label{
    margin-top:10px; font-family:'IBM Plex Mono',monospace; font-size:10px; text-transform:uppercase;
    letter-spacing:.06em; color:var(--text-dim); border-top:1px dashed var(--paper-line); padding-top:8px;
  }
  .ask-topics{ display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
  .ask-topic-chip{
    display:inline-flex; align-items:center; gap:5px; border:none; border-radius:999px;
    padding:7px 12px; color:#fff; font-size:12px; font-weight:600; font-family:'Public Sans',sans-serif;
    cursor:pointer; box-shadow:0 2px 6px rgba(0,0,0,.18); transition:transform .12s ease, box-shadow .12s ease, filter .12s ease;
  }
  .ask-topic-chip:hover{ transform:translateY(-1px); filter:brightness(1.08); box-shadow:0 4px 12px rgba(0,0,0,.25); }
  .ask-topic-chip .ico{ font-size:13px; }
  .ask-browse-all{
    display:block; width:100%; margin-top:12px; border:none; border-radius:10px;
    padding:9px 12px; color:#fff; font-size:12.5px; font-weight:600; font-family:'Public Sans',sans-serif;
    cursor:pointer; text-align:center; transition:transform .12s ease, filter .12s ease;
  }
  .ask-browse-all:hover{ transform:translateY(-1px); filter:brightness(1.08); }
  .ask-form{ display:flex; gap:8px; padding:12px 14px; border-top:1px solid var(--paper-line); }
  .ask-form input{
    flex:1; padding:9px 12px; border-radius:20px; border:1px solid var(--paper-line);
    background:var(--paper-raised); color:var(--ink); font-size:13px; outline:none;
  }
  .ask-form input:focus{ border-color:var(--accent); }
  .ask-form button{
    width:36px; height:36px; border-radius:50%; border:none; color:#fff;
    background:linear-gradient(135deg, #4338CA, #DB2777);
    cursor:pointer; font-size:14px;
  }
  @media (max-width: 760px){
    #askPanel{ width:100vw; min-width:0; max-width:100vw; }
  }
  @media (max-width: 480px){
    #askFab{ right:16px; bottom:16px; }
    #askFab .ask-fab-label{ display:none; }
  }

/* ---------- Mobile-first refinements ---------- */
body.ask-open{overflow:hidden;}
@media (max-width: 760px){
  header.site{padding:14px 14px 12px;}
  .letterhead{align-items:center; gap:12px;}
  .letterhead .mark{min-width:0; flex:1 1 100%;}
  .letterhead .mark > div:last-child{min-width:0;}
  .letterhead h1{font-size:23px;line-height:1.1;}
  .letterhead .sub{font-size:12px;line-height:1.35;}
  .letterhead > div:last-child{width:100%;justify-content:flex-start;}
  .theme-toggle{font-size:11px;padding:7px 10px;}
  .shell{width:100%;max-width:none;}
  nav.rail{position:sticky;top:0;width:100%;max-width:none;overflow:hidden;background:var(--gloss);}
  nav.rail ul{display:flex;flex-direction:row;overflow-x:auto;overflow-y:hidden;padding:7px 10px;gap:5px;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;}
  nav.rail li{flex:0 0 auto;scroll-snap-align:start;}
  nav.rail button,nav.rail.collapsed button{width:auto;min-height:42px;padding:9px 11px;gap:6px;font-size:12px;border-radius:8px;}
  nav.rail button .n{font-size:9px;}
  nav.rail.collapsed button > span:not(.n){display:inline;}
  nav.rail .rail-note{display:none;}
  main{padding:18px 12px 90px;min-width:0;width:100%;overflow-x:hidden;}
  .view-head{margin-bottom:12px;}
  .view-head h2{font-size:22px;line-height:1.25;}
  .view-head p{font-size:13px;line-height:1.5;}
  .hero{border-radius:12px;padding:28px 20px 34px;}
  .hero-h1{font-size:30px;max-width:none;line-height:1.15;}
  .hero-p{font-size:14px;line-height:1.6;margin-top:13px;}
  .hero-cta{margin-top:20px;gap:8px;}
  .hero-btn{width:100%;justify-content:center;padding:11px 16px;font-size:13px;}
  .hero-stats{margin-top:12px;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .hero-stats .stat{min-width:0;padding:12px 8px;}
  .hero-stats .num{font-size:20px;}
  .hero-stats .lbl{font-size:10px;}
  .card-grid,.chapter-grid{grid-template-columns:1fr;gap:9px;}
  .search{width:100%;max-width:none;margin:12px 0 16px;padding:9px 10px;}
  .search input{min-width:0;width:100%;font-size:14px;}
  .search .count{font-size:10px;}
  .go-item,.act-item,.rpwd-item,.ch14a-item,.rpwdact-item,.recent-item{padding:12px 12px 12px 14px;}
  .go-top,.act-top,.rpwd-top,.ch14a-top{gap:6px;}
  .go-subject,.act-subject,.rpwd-subject,.ch14a-subject{font-size:15px;}
  .item-shortdesc,.go-summary{font-size:13px;}
  .table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
  table{min-width:560px;}
  footer.site{padding:16px 12px 85px;font-size:12px;}
  #askFab{right:14px;bottom:calc(14px + env(safe-area-inset-bottom));padding:12px 14px;min-height:46px;}
  #askFab .ask-fab-label{display:inline;font-size:12px;}
  #askPanel{
    inset:0;
    width:100%;
    min-width:0;
    max-width:none;
    height:100dvh;
    max-height:none;
    border:0;
    border-radius:0;
    transform:translateY(18px);
    padding-bottom:env(safe-area-inset-bottom);
  }
  #askPanel.open{transform:translateY(0);}
  .ask-head{padding:15px 14px 13px;}
  #askClose{width:34px;height:34px;font-size:20px;flex:none;}
  .ask-log{padding:12px 12px 10px;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;}
  .ask-msg{font-size:13px;max-width:94%;}
  .ask-msg.user{max-width:90%;}
  .ask-form{padding:9px 10px calc(9px + env(safe-area-inset-bottom));gap:7px;background:var(--paper);}
  .ask-form input{min-width:0;height:42px;font-size:15px;}
  .ask-form button{width:42px;height:42px;flex:none;}
}
@media (max-width: 480px){
  #askFab{right:12px;bottom:calc(12px + env(safe-area-inset-bottom));}
  #askFab .ask-fab-label{display:inline;}
  .letterhead > div:last-child{display:flex;flex-wrap:wrap;}
}
@media (max-width: 360px){
  #askFab .ask-fab-label{display:none;}
  .hero-h1{font-size:27px;}
  .hero{padding:24px 16px 30px;}
}

/* Case Law / Recent Orders PDF links: always tappable/clickable */
.case-pdf-link{display:inline-flex;align-items:center;min-height:32px;padding:5px 9px;border:1px solid var(--accent-soft);border-radius:6px;color:var(--accent-strong);text-decoration:none;cursor:pointer;position:relative;z-index:5;touch-action:manipulation;}
.case-pdf-link:hover,.case-pdf-link:focus{ text-decoration:underline; }
.go-item:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
.go-summary .caselink{position:relative;z-index:4;}
