/* Legalist design tokens — palette derived from the approved Legalist logo
   (espresso ink #2B1D12 on warm ivory #F5EEE3). Do not alter the logo itself. */
@font-face { font-family: "Source Serif 4"; src: url("/fonts/source-serif-4-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  /* colour */
  --ink: #2B1D12;          /* logo ink — headings, primary buttons */
  --ink-2: #4A3A2C;        /* body text (≈10:1 on ivory) */
  --muted: #6A5D51;        /* secondary text (≈5.6:1 on ivory) */
  --ivory: #F5EEE3;        /* logo ground — page background */
  --paper: #FFFDF9;        /* cards, surfaces */
  --sand: #EDE3D3;         /* subtle fills */
  --line: #DDD0BC;         /* borders */
  --brass: #8C6A35;        /* decorative accent, rules, icons (large/non-text) */
  --link: #6B4A1E;         /* link text (≈6.9:1 on paper) */
  --slate: #3F4A55;        /* utility / info */
  --ok: #2F6B3A; --ok-bg: #E7F1E6;
  --warn: #8A5A00; --warn-bg: #FBF0D9;
  --err: #9B2C1F; --err-bg: #FBE7E3;
  --focus: #1D5FD1;
  /* type */
  --serif: "Source Serif 4", Georgia, "Noto Serif Devanagari", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif;
  --fs-0: .875rem; --fs-1: 1rem; --fs-2: 1.125rem; --fs-3: 1.375rem; --fs-4: 1.75rem; --fs-5: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
  --lh-body: 1.65; --lh-tight: 1.2;
  /* space, shape, depth, motion */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;
  --r1: 4px; --r2: 8px; --r3: 14px;
  --shadow-1: 0 1px 2px rgba(43,29,18,.06), 0 1px 1px rgba(43,29,18,.04);
  --shadow-2: 0 6px 24px rgba(43,29,18,.08);
  --dur: 160ms; --ease: cubic-bezier(.2,.7,.2,1);
  --max: 72rem; --prose: 44rem;
}
@media (prefers-reduced-motion: reduce) { :root { --dur: 0ms; } * { scroll-behavior: auto !important; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ivory); color: var(--ink-2); font: 400 var(--fs-1)/var(--lh-body) var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--ink); line-height: var(--lh-tight); margin: 0 0 var(--s4); letter-spacing: -.005em; }
h1 { font-size: var(--fs-5); } h2 { font-size: var(--fs-4); } h3 { font-size: var(--fs-3); } h4 { font-size: var(--fs-2); }
p { margin: 0 0 var(--s4); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s4); top: -3rem; background: var(--ink); color: #fff; padding: var(--s2) var(--s4); border-radius: var(--r1); z-index: 100; }
.skip:focus { top: var(--s2); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--s4); }
@media (min-width: 48rem) { .wrap { padding: 0 var(--s6); } }

/* header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--ink); }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.brand span { font: 600 1.25rem/1 var(--serif); letter-spacing: .06em; }
.nav { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s5); }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; padding: var(--s2) 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brass); }
.header-actions { display: flex; gap: var(--s2); align-items: center; }
.menu-btn { background: none; border: 1px solid var(--line); border-radius: var(--r1); padding: var(--s2) var(--s3); font: 600 .9rem var(--sans); color: var(--ink); cursor: pointer; min-height: 44px; }
.mobile-nav { border-top: 1px solid var(--line); background: var(--paper); }
.mobile-nav[hidden] { display: none; }
.mobile-nav ul { list-style: none; margin: 0; padding: var(--s2) var(--s4) var(--s4); }
.mobile-nav a { display: block; padding: var(--s3) 0; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--sand); }
@media (min-width: 72rem) { .nav { display: block; } .menu-btn, .mobile-nav { display: none !important; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; padding: var(--s2) var(--s5); border-radius: var(--r1); font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; border: 1px solid var(--ink); transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.btn-primary { background: var(--ink); color: var(--ivory); }
.btn-primary:hover { background: #1a110a; color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--sand); color: var(--ink); }
.btn-sm { min-height: 36px; padding: var(--s1) var(--s3); font-size: .875rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* layout blocks */
.section { padding: var(--s7) 0; }
.section-tight { padding: var(--s6) 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { font: 600 .8rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--brass); margin: 0 0 var(--s3); }
.lede { font-size: var(--fs-2); color: var(--ink-2); max-width: 40rem; }
.rule { width: 3rem; height: 2px; background: var(--brass); border: 0; margin: 0 0 var(--s5); }
.grid { display: grid; gap: var(--s5); }
@media (min-width: 40rem) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 56rem) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 40rem) and (max-width: 56rem) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s5); box-shadow: var(--shadow-1); }
.card h3 { font-size: var(--fs-2); margin-bottom: var(--s2); }
.card p:last-child { margin-bottom: 0; }
a.card { display: block; text-decoration: none; color: inherit; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
a.card:hover { border-color: var(--brass); box-shadow: var(--shadow-2); }
.card .more { color: var(--link); font-weight: 600; font-size: .9rem; }
.pathway { border-top: 3px solid var(--brass); }
.hero { padding: var(--s7) 0 var(--s6); }
.hero h1 { max-width: 44rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.facts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s5); padding: 0; list-style: none; color: var(--muted); font-size: .95rem; }
.breadcrumb { font-size: .875rem; color: var(--muted); margin: var(--s5) 0 0; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.breadcrumb li + li::before { content: "/"; margin-right: var(--s2); color: var(--line); }
.page-head { padding: var(--s5) 0 var(--s6); border-bottom: 1px solid var(--line); margin-bottom: var(--s6); }
.meta { color: var(--muted); font-size: .9rem; }

/* prose (CMS bodies) */
.prose { max-width: var(--prose); font-size: 1.0625rem; }
.prose h2 { font-size: var(--fs-3); margin-top: var(--s6); scroll-margin-top: 6rem; }
.prose h3 { font-size: var(--fs-2); margin-top: var(--s5); scroll-margin-top: 6rem; }
.prose h4 { font-size: var(--fs-1); margin-top: var(--s5); }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 var(--s4); }
.prose li { margin-bottom: var(--s2); }
.prose img { border-radius: var(--r2); margin: var(--s5) 0; max-height: 34rem; width: auto; }
.prose blockquote { margin: var(--s5) 0; padding: var(--s3) var(--s5); border-left: 3px solid var(--brass); background: var(--paper); }
.prose table { width: 100%; border-collapse: collapse; margin: var(--s5) 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: var(--s2) var(--s3); text-align: left; vertical-align: top; }
.with-aside { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); }
.with-aside > * { min-width: 0; }
.prose { overflow-wrap: anywhere; }
@media (min-width: 64rem) { .with-aside { grid-template-columns: minmax(0, 1fr) 18rem; } .aside { position: sticky; top: 6rem; align-self: start; } }
.toc { font-size: .9rem; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc a { display: block; padding: var(--s1) 0; text-decoration: none; }

/* notices */
.notice { border: 1px solid var(--line); border-left: 4px solid var(--slate); background: var(--paper); padding: var(--s4); border-radius: var(--r1); font-size: .95rem; }
.notice-warn { border-left-color: var(--warn); background: var(--warn-bg); }
.notice-ok { border-left-color: var(--ok); background: var(--ok-bg); }
.notice-err { border-left-color: var(--err); background: var(--err-bg); }
.badge { display: inline-block; font: 600 .75rem/1 var(--sans); padding: .3rem .5rem; border-radius: 999px; background: var(--sand); color: var(--ink); letter-spacing: .02em; }
.badge-ok { background: var(--ok-bg); color: var(--ok); } .badge-warn { background: var(--warn-bg); color: var(--warn); } .badge-err { background: var(--err-bg); color: var(--err); }

/* people */
.person { text-align: left; }
/* Round portraits with brass ring — matches the founder image */
.person { text-align: center; }
.person img { width: 9.5rem; height: 9.5rem; aspect-ratio: 1; object-fit: cover; object-position: center 25%; border-radius: 50%; border: 4px solid var(--brass); box-shadow: var(--shadow-1); background: var(--sand); margin: 0 auto var(--s3); }
.person h2, .person h3 { margin-bottom: var(--s1); }
.person p { color: var(--muted); font-size: .92rem; margin: 0 auto; max-width: 16rem; }
.founder-ventures { margin-bottom: var(--s2); }
.founder-ventures .meta { font-size: .85rem; }

/* forms */
.form { display: grid; gap: var(--s4); }
.field label, .field legend { display: block; font-weight: 600; color: var(--ink); margin-bottom: var(--s1); font-size: .95rem; }
.field .hint { display: block; font-size: .85rem; color: var(--muted); margin-bottom: var(--s2); }
.field input, .field select, .field textarea { width: 100%; font: 400 1rem var(--sans); color: var(--ink); background: #fff; border: 1px solid #B9AA93; border-radius: var(--r1); padding: .65rem .75rem; min-height: 44px; }
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field [aria-invalid="true"] { border-color: var(--err); }
.field .error { color: var(--err); font-size: .875rem; margin-top: var(--s1); }
.field fieldset { border: 0; padding: 0; margin: 0; }
fieldset { min-width: 0; max-width: 100%; }
.choice { display: flex; gap: var(--s2); align-items: flex-start; margin: var(--s2) 0; font-weight: 400 !important; }
.choice input { width: auto; min-height: auto; margin-top: .3rem; }
.error-summary { border: 2px solid var(--err); background: var(--err-bg); padding: var(--s4); border-radius: var(--r1); }
.error-summary h2 { font-size: var(--fs-2); color: var(--err); }

/* footer */
.site-footer { background: var(--ink); color: #E9DFD0; padding: var(--s7) 0 var(--s5); margin-top: var(--s8); font-size: .95rem; }
.site-footer a { color: #F5EEE3; }
.site-footer h2 { color: #fff; font-size: var(--fs-2); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--s2); }
/* Announcement bar + Court Resources highlight (blinking) */
.announce-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .45rem; padding: .55rem 1rem; background: #8B5A2B; color: #FFF8EE; text-align: center; font-size: .92rem; line-height: 1.4; text-decoration: none; }
.announce-bar:hover, .announce-bar:focus-visible { background: #6F4520; color: #fff; }
.announce-cta { text-decoration: underline; font-weight: 600; animation: lg-blink 1.1s steps(2, start) infinite; }
.announce-dot { width: .6rem; height: .6rem; border-radius: 50%; background: #FFD27A; box-shadow: 0 0 0 0 rgba(255,210,122,.8); animation: lg-pulse 1.4s ease-out infinite; flex: none; }
.nav-highlight { position: relative; font-weight: 700; color: #8B5A2B !important; border-radius: .4rem; padding-inline: .45rem; animation: lg-glow 1.4s ease-in-out infinite; }
.nav-new { display: inline-block; margin-left: .35rem; padding: .05rem .35rem; border-radius: .3rem; background: #C0392B; color: #fff; font-size: .62rem; font-weight: 700; letter-spacing: .04em; vertical-align: middle; animation: lg-blink 1s steps(2, start) infinite; }
@keyframes lg-blink { to { visibility: hidden; } }
@keyframes lg-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,210,122,.8); } 100% { box-shadow: 0 0 0 .6rem rgba(255,210,122,0); } }
@keyframes lg-glow { 0%, 100% { background: transparent; } 50% { background: rgba(139,90,43,.16); } }
@media (prefers-reduced-motion: reduce) { .announce-cta, .announce-dot, .nav-highlight, .nav-new { animation: none; } .nav-highlight { background: rgba(139,90,43,.12); } }
.site-footer .social-title { font-size: 1rem; margin-top: var(--s5); margin-bottom: var(--s3); }
.site-footer .social-links { display: flex; flex-wrap: wrap; gap: .6rem; }
.site-footer .social-links li { margin: 0; }
.site-footer .social-links a { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid rgba(245,238,227,.35); color: #F5EEE3; transition: background .15s, color .15s, border-color .15s; }
.site-footer .social-links a:hover, .site-footer .social-links a:focus-visible { background: #F5EEE3; color: var(--ink); border-color: #F5EEE3; }
.footer-base { border-top: 1px solid rgba(245,238,227,.2); margin-top: var(--s6); padding-top: var(--s4); font-size: .85rem; color: #CDBFAB; }

/* disclaimer dialog */
.disclaimer { position: fixed; inset: 0; background: rgba(20,13,8,.6); display: flex; align-items: center; justify-content: center; padding: var(--s4); z-index: 50; }
.disclaimer[hidden] { display: none; }
.disclaimer .panel { background: var(--paper); max-width: 36rem; width: 100%; max-height: 90vh; overflow: auto; border-radius: var(--r3); padding: var(--s6); box-shadow: var(--shadow-2); }
.disclaimer .actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }

/* ---- Headline colour (site-wide): deep legal navy, 10.5:1 on ivory ---- */
:root { --heading: #1B365D; }
h1, h2, h3, h4, .card h3, .person h2, .person h3, .founder-name { color: var(--heading); }
.site-footer h2 { color: #fff; }
a.card:hover h3 { color: var(--ink); }

/* ---- Homepage refresh ---- */
.btn-lg { min-height: 52px; padding: .75rem 1.6rem; font-size: 1.02rem; }
.hero-split { padding: var(--s7) 0; background: linear-gradient(180deg, var(--paper) 0%, var(--ivory) 100%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: var(--s6); align-items: center; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: 1.4fr 1fr; } }
.hero-emblem { display: none; justify-self: center; }
@media (min-width: 56rem) { .hero-emblem { display: block; } }
.hero-emblem img { width: 300px; height: 300px; border-radius: 50%; border: 6px solid var(--brass); box-shadow: var(--shadow-2); object-fit: cover; }
.ic-wrap { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; background: var(--sand); color: var(--heading); border: 1px solid var(--line); }
.practice-card { display: flex !important; gap: var(--s4); align-items: flex-start; }
.practice-card h3 { margin-bottom: var(--s1); }
.practice-card p { font-size: .94rem; color: var(--muted); }
a.practice-card:hover .ic-wrap { background: var(--heading); color: #fff; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s5); counter-reset: none; }
@media (min-width: 40rem) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s5); box-shadow: var(--shadow-1); }
.steps h3 { font-size: var(--fs-2); margin: var(--s3) 0 var(--s2); }
.steps p { font-size: .95rem; margin: 0; }
.mini-article { margin-bottom: var(--s5); }
.mini-article h3 { font-size: 1.12rem; margin-bottom: .25rem; }
.mini-article h3 a { color: var(--heading); text-decoration: none; }
.mini-article h3 a:hover { text-decoration: underline; }
.guide-list { list-style: none; padding: 0; margin: 0; }
.guide-list a { display: flex; gap: .6rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-weight: 600; }
.guide-list a:hover { color: var(--heading); }
.guide-list .ic { color: var(--brass); flex: 0 0 auto; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r2); margin-bottom: var(--s3); }
.faq summary { cursor: pointer; padding: var(--s4) var(--s5); font: 600 1.05rem/1.4 var(--serif); color: var(--heading); list-style: none; position: relative; padding-right: 3rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%); font: 600 1.4rem var(--sans); color: var(--brass); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 var(--s5) var(--s4); margin: 0; }
.cta-card { border-top: 4px solid var(--brass); }

/* ---- Booking ---- */
.day-tabs { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .5rem; margin: .5rem 0 1rem; }
.day-tab { flex: 0 0 auto; min-height: 44px; padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font: 600 .9rem var(--sans); color: var(--ink-2); cursor: pointer; }
.day-tab[aria-selected="true"] { background: var(--heading); border-color: var(--heading); color: #fff; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: .5rem; }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slot span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid #B9AA93; border-radius: var(--r1); background: #fff; font-weight: 600; cursor: pointer; }
.slot input:checked + span { background: var(--heading); border-color: var(--heading); color: #fff; }
.slot input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.small-steps { padding-left: 1.2rem; margin: 0 0 1rem; }
.header-actions .btn-book { display: none; }
@media (min-width: 40rem) { .header-actions .btn-book { display: inline-flex; } }

/* founder highlight */
.founder { display: grid; gap: var(--s5); align-items: center; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--brass); border-radius: var(--r3); padding: var(--s6); box-shadow: var(--shadow-2); }
@media (min-width: 44rem) { .founder { grid-template-columns: 10rem 1fr; padding: var(--s6) var(--s7); } }
.founder-mark { width: 8.5rem; height: 8.5rem; border-radius: 50%; background: var(--ink); color: var(--ivory); display: flex; align-items: center; justify-content: center; border: 4px solid var(--brass); overflow: hidden; }
@media (min-width: 44rem) { .founder-mark { width: 10rem; height: 10rem; } }
.founder-mark span { font: 600 2.6rem/1 var(--serif); letter-spacing: .04em; }
.founder-mark img { width: 100%; height: 100%; object-fit: cover; }
.founder-name { font-size: var(--fs-4); margin-bottom: var(--s1); }
.founder-title { font-weight: 600; color: var(--brass); margin-bottom: var(--s4); }
.founder-title { margin-bottom: var(--s2); }
.founder-edu { color: var(--ink-2); font-weight: 600; margin-bottom: var(--s4); }
.founder-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s5) 0 0; }

/* WhatsApp message button — fixed, compact, never covers the footer text on small screens */
.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .6rem 1rem; border-radius: 999px; background: #1F7A4D; color: #fff; text-decoration: none; font: 600 .95rem var(--sans); box-shadow: 0 6px 18px rgba(0,0,0,.18); transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); }
.wa-float:hover { background: #17633E; color: #fff; transform: translateY(-1px); }
.wa-float:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (max-width: 40rem) { .wa-float { padding: .7rem; } .wa-float span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.site-footer { padding-bottom: 5.5rem; }
@media print { .wa-float { display: none; } }

/* ---- Tools section ---- */
.tool-card-title { font-size: var(--fs-2); margin-bottom: var(--s2); }
.tool-card p { font-size: .94rem; color: var(--muted); }
.tool-card > span:last-child { min-width: 0; }
.tool-search input { width: 100%; font: 400 1.1rem var(--sans); padding: .8rem 1rem; min-height: 52px; border: 1px solid #B9AA93; border-radius: var(--r2); background: #fff; color: var(--ink); }
.tool-search input:focus { outline: 3px solid var(--focus); outline-offset: 1px; }
.result-list { list-style: none; padding: 0; margin: var(--s4) 0 0; }
.result-list li { padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.result-list li > a { text-decoration: none; color: var(--heading); font-size: 1.05rem; }
.result-list li > a:hover strong { text-decoration: underline; }
.result-list li p { margin: .3rem 0 0; color: var(--muted); font-size: .95rem; }
.chips { border: 0; padding: 0; margin: 0 0 var(--s5); display: flex; flex-wrap: wrap; gap: .5rem; }
.chips legend { font-weight: 600; color: var(--ink); margin-bottom: var(--s3); width: 100%; float: left; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1rem; border: 1px solid #B9AA93; border-radius: 999px; background: #fff; font-weight: 600; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.chip input:checked + span { background: var(--heading); border-color: var(--heading); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.url-line { overflow-wrap: anywhere; margin: 0; }
.tool-filters { display: grid; gap: var(--s4); margin-bottom: var(--s3); max-width: 40rem; }
@media (min-width: 40rem) { .tool-filters { grid-template-columns: 2fr 1fr; } }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: var(--s3); }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 18rem; }
.data-table th, .data-table td { border: 1px solid var(--line); padding: var(--s2) var(--s3); text-align: left; vertical-align: top; }
.data-table th { background: var(--sand); color: var(--ink); }
.check-list { list-style: none; padding: 0; margin: 0 0 var(--s3); }
.check-list li { border-bottom: 1px solid var(--sand); }
.check-list .choice { margin: 0; padding: .6rem 0; min-height: 44px; align-items: flex-start; gap: .7rem; cursor: pointer; }
.check-list .choice input { width: 1.25rem; height: 1.25rem; margin: .2rem 0 0; flex: none; accent-color: var(--heading); }
.check-list .choice input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--brass); }
.card h3 a, .tool-card-title a, .mini-article h3 a { display: inline-block; padding: .25rem 0; }
@media (max-width: 40rem) { .announce-long { display: none; } .staging-bar { font-size: .72rem; } }
.az { display: flex; flex-wrap: wrap; gap: .35rem; margin: var(--s3) 0 var(--s5); }
.az a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--r1); background: var(--paper); text-decoration: none; font-weight: 600; }
.glossary { margin: 0; }
.gl-letter h2 { font-size: var(--fs-3); border-bottom: 2px solid var(--brass); padding-bottom: .3rem; margin-top: var(--s5); scroll-margin-top: 6rem; }
.gl-item { padding: var(--s3) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 6rem; }
.gl-item dt { font: 600 1.08rem/1.35 var(--serif); color: var(--heading); }
.gl-hi { font-family: var(--sans); font-weight: 400; color: var(--brass); margin-left: .35rem; }
.gl-item dd { margin: .25rem 0 0; }
.gl-item:target { background: var(--warn-bg); }
[hidden] { display: none !important; }
@media print { .site-header, .site-footer, .announce-bar, .staging-bar, .breadcrumb, .no-print, .tool-limit + p, .wa-float, .disclaimer { display: none !important; } body { background: #fff; } .checklist[hidden] { display: none !important; } .card { box-shadow: none; } }

/* ---- Open-source tools ---- */
.private-note { margin-bottom: var(--s5); }
.field input[type="file"] { padding: .55rem; background: var(--paper); cursor: pointer; }
.file-list { list-style: none; padding: 0; margin: 0 0 var(--s4); }
.file-list:empty { display: none; }
.file-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem 0; border-bottom: 1px solid var(--sand); }
.fl-name { min-width: 0; overflow-wrap: anywhere; flex: 1 1 12rem; }
.fl-btns { display: flex; gap: .35rem; }
.fl-btns .btn { min-width: 44px; min-height: 44px; padding: 0 .6rem; }
.tool-result { margin: var(--s4) 0; padding: var(--s4); border: 2px solid var(--ok); background: var(--ok-bg); border-radius: var(--r2); }
.tool-result .btn { white-space: normal; text-align: center; max-width: 100%; }
.ocr-preview { max-height: 22rem; width: auto; max-width: 100%; margin: 0 0 var(--s4); border: 1px solid var(--line); border-radius: var(--r1); }
.ocr-text { min-height: 16rem !important; font: 400 1rem/1.55 var(--sans); }
progress { width: 100%; height: 12px; accent-color: var(--heading); margin-top: var(--s3); }
.hash-out { display: grid; gap: var(--s4); margin-top: var(--s5); }
.hash-label { font-weight: 600; color: var(--ink); margin: var(--s3) 0 var(--s1); }
.hash-value { display: block; font: 600 .95rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--sand); padding: .6rem .75rem; border-radius: var(--r1); overflow-wrap: anywhere; word-break: break-all; color: var(--ink); }
.hash-match:empty { display: none; }
.calc-result ul { padding-left: 1.2rem; margin: 0; }
.calc-big { font: 600 clamp(1.4rem, 1.1rem + 1.5vw, 2rem)/1.2 var(--serif); color: var(--heading); margin: .2rem 0 .75rem; overflow-wrap: anywhere; }
.calc-result .data-table { margin-top: .5rem; }
.credits ul { padding-left: 1.2rem; }
.sec-table td { min-width: 12rem; }
.sec-note { display: inline-block; margin-top: .2rem; font-size: .88rem; color: var(--warn); }
.cb-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: var(--s4); }
.cb-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 3px solid var(--brass); }
.tl-item { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s4); margin: 0 0 var(--s4) var(--s3); }
.tl-item::before { content: ""; position: absolute; left: calc(-1 * var(--s3) - 1.1rem - 8px); top: 1.2rem; width: 13px; height: 13px; border-radius: 50%; background: var(--brass); border: 3px solid var(--ivory); }
.tl-date { font: 600 1.02rem var(--serif); color: var(--heading); margin: 0 0 .3rem; }
.tl-text { margin: 0 0 .3rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-src { margin: 0 0 .5rem; overflow-wrap: anywhere; }
.tl-btns { margin: 0; }
.draft-out { min-height: 26rem !important; font: 400 .95rem/1.6 Georgia, serif !important; white-space: pre-wrap; }
.rti-grid { align-items: start; }
.chips legend { float: none; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--sand); padding: .05rem .3rem; border-radius: 3px; }
.fit-row { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); margin-bottom: var(--s3); }
.fit-row > .field, .tool-filters > .field, .grid > * { min-width: 0; }
.tool-page .card > .field, .tool-page .card > .fit-row, .tool-page .card > .tool-filters, .tool-page .card > .file-list { margin-bottom: var(--s4); }
.tool-page .card > .fit-row .field, .tool-page .card > .tool-filters .field { margin-bottom: 0; }
.field input, .field select { max-width: 100%; min-width: 0; }
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; }

/* ---- Mobile & small-screen hardening (all devices) ---- */
html, body { overflow-x: hidden; }
body { overflow-wrap: break-word; }
input, select, textarea, button { font-size: max(16px, 1em); } /* prevents iOS zoom on focus */
.site-header .wrap { flex-wrap: nowrap; }
.brand { min-width: 0; flex-shrink: 0; }
@media (max-width: 23.5rem) { /* <= 375px phones */
  .wrap { padding: 0 .85rem; }
  .brand span { font-size: 1.05rem; letter-spacing: .04em; }
  .brand img { width: 38px; height: 38px; }
  .header-actions .btn-secondary.btn-sm { display: none; }
  .card { padding: var(--s4); }
  .hero-actions .btn { width: 100%; }
  h1 { font-size: 1.75rem; }
}
@media (max-width: 40rem) {
  .announce-bar { font-size: .82rem; padding: .5rem .75rem; gap: .3rem; }
  .page-head { padding: var(--s4) 0 var(--s5); margin-bottom: var(--s5); }
  .section { padding: var(--s6) 0; }
  .site-footer .grid-3 { gap: var(--s6); }
  .disclaimer .panel { padding: var(--s5); }
  .founder { padding: var(--s5); }
  .practice-card { gap: var(--s3); }
  .ic-wrap { width: 44px; height: 44px; flex-basis: 44px; }
}
/* Desktop header: never wrap words; wider container; menu button below 72rem */
.site-header .wrap { max-width: 90rem; }
.nav a, .header-actions .btn, .brand span { white-space: nowrap; }
.nav-highlight { padding-inline: .3rem; }
@media (min-width: 72rem) and (max-width: 86rem) {
  .nav ul { gap: var(--s4); }
  .nav a { font-size: .9rem; }
  .header-actions .btn-secondary.btn-sm { display: none; }
  .nav-new { margin-left: .2rem; }
}
.mobile-nav li:last-child a { border-bottom: 0; }
.mobile-nav .mobile-portal a { color: var(--link); }
@media (hover: none) { a.card:hover { box-shadow: var(--shadow-1); } }
@supports (padding: max(0px)) { .wa-float { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); } }

/* ---- Touch-friendly sizing (phones, tablets and any touch screen) ----
   Every tappable control gets a ~44px target; small text never below 12px; form text 16px (no iOS zoom). */
.nav-new { font-size: .75rem; padding: .1rem .4rem; }
.draft-out, .ocr-text { font-size: 16px !important; }
.calc-result .data-table { min-width: 0; }
.data-table td, .data-table th { overflow-wrap: anywhere; }
@media (max-width: 64rem), (pointer: coarse) {
  .announce-bar { min-height: 44px; }
  .brand { min-height: 44px; }
  .btn-sm { min-height: 44px; padding-inline: var(--s4); }
  .menu-btn { min-width: 64px; }
  .breadcrumb { margin-top: var(--s3); }
  .breadcrumb a { display: inline-block; padding: .8rem .35rem; margin: -.6rem -.35rem; }
  .site-footer li { margin: 0; }
  .site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
  .facts a, .founder-ventures a,
  main li > a:only-child:not(.card):not(.btn):not(.prose a),
  main p > a:only-child:not(.card):not(.btn):not(.prose a) { display: inline-block; padding: .8rem .1rem; margin: -.6rem 0; }
  .card h2 a, .card h3 a, .tool-card-title a, .mini-article h3 a { display: inline-block; padding: .7rem 0; margin: -.5rem 0; }
  .card details > summary, details.card > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; }
  .prose a, .notice a, .meta a { padding-block: .6rem; } /* inline: bigger hit area, no layout change */
  .breadcrumb a { padding-inline: .5rem; margin-inline: -.5rem; }
  .guide-list a { min-height: 44px; }
  .az a, .chip span, .day-tab, .slot span { min-height: 44px; }
  .result-list li > a { display: inline-block; padding: .55rem 0; }
  .tl-btns .btn, .fl-btns .btn { min-height: 44px; }
}

/* Announcement bar v2: two links; blink by fading (never hides the link, so it is always tappable) */
.announce-bar { gap: .2rem .5rem; }
.announce-bar a { color: #FFF8EE; text-decoration: underline; text-underline-offset: .2em; display: inline-flex; align-items: center; min-height: 36px; padding: 0 .15rem; }
.announce-bar a:hover, .announce-bar a:focus-visible { color: #fff; background: rgba(0,0,0,.18); border-radius: 4px; }
.announce-bar:hover { background: #8B5A2B; }
.announce-sep { opacity: .7; }
.announce-cta { font-weight: 700; animation: lg-fade 1.1s ease-in-out infinite; }
.nav-new { animation: lg-fade 1s ease-in-out infinite; }
@keyframes lg-fade { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .announce-cta, .nav-new { animation: none; } }
@media (max-width: 64rem), (pointer: coarse) { .announce-bar a { min-height: 44px; } }
@media (max-width: 30rem) { .sec-table td, .sec-table th { min-width: 0; } .sec-table { min-width: 0; } }
@media (max-width: 22rem) { .announce-bar { font-size: .78rem; gap: 0 .35rem; padding: .25rem .5rem; } .announce-bar strong, .announce-dot { display: none; } }
@media (max-width: 64rem), (pointer: coarse) { .choice a { padding-block: .7rem; } }
/* Inline links (in sentences, tables, footer line): enlarge the tap area vertically without moving any text. */
@media (max-width: 64rem), (pointer: coarse) {
  main p a:not(.btn):not(.card), main li a:not(.btn):not(.card), main td a, main dd a, main address a, .footer-base a, .hero a:not(.btn) { padding-block: .7rem; }
}

/* Judgment search */
.ik-attr { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin: var(--s4) 0 var(--s3); }
.ik-logo { display: inline-block; line-height: 0; }
.ik-logo img { max-width: none; height: auto; }
.ik-title { font-size: var(--fs-2); margin: .1rem 0 .3rem; }
.ik-src { margin: 0; text-transform: none; }
.ik-head { color: var(--ink-2); font-size: .95rem; overflow-wrap: anywhere; }
.ik-head b { background: var(--warn-bg); color: var(--ink); font-weight: 600; }
.ik-acts { margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.ik-doc { margin-top: var(--s4); }
.ik-body { max-width: none; overflow-wrap: anywhere; }
.ik-body table { display: block; overflow-x: auto; }
.row-actions { margin-top: var(--s2); }
.private-ok-note { margin-bottom: var(--s4); }

/* staging banner */
.staging-bar { background: #3F4A55; color: #fff; font-size: .8rem; text-align: center; padding: .35rem var(--s4); }
.staging-bar a { color: #fff; }