/* Clever Legal redesign (v2), November 2026: the free tools and the fallback
   enquiry form. Loaded after v2.css by /tools, /tools/medical-records-request,
   /tools/medical-negligence-time-limit-checker and /assessment. Uses only the
   v2 tokens (--ink, --on, --muted, --accent, --grey-*, --radius). The class
   names are the ones the pages' scripts already emit, so nothing in the JS
   changed. */

:root {
  --t-line: #8E8A99;          /* control borders: 3:1 against white */
  --t-ok-bg: #EAF6EE; --t-ok-line: #B9DEC5; --t-ok-ink: #14532D;
  --t-warn-bg: #FFF6EC; --t-warn-line: #F4D6B8; --t-warn-ink: #5B3A1E;
  --t-err-bg: #FDF1EE; --t-err-line: #E8BDB3; --t-err-ink: #7A2E22;
  --t-tint: #F5F1FD; --t-tint-line: #DCCFF6;
}

[hidden] { display: none !important; }
html { scroll-padding-top: 92px; }
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
::selection { background: var(--accent); color: #fff; }
button, input, textarea, select { font-family: inherit; }
a, button, summary, label { -webkit-tap-highlight-color: transparent; }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
a.visually-hidden:focus { position: fixed; top: 12px; left: 12px; z-index: 1000; width: auto; height: auto; margin: 0; padding: 12px 18px; clip: auto; clip-path: none; overflow: visible; background: var(--ink); color: var(--white); font-weight: 600; }

.ic { display: inline-block; vertical-align: middle; }
.eyebrow { font: 600 .92rem/1.3 var(--sans); color: var(--accent); }

/* Buttons: v2 .btn is the primary; add the outline and disabled states the pages use. */
.btn--ghost { background: transparent; color: var(--ink) !important; border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white) !important; border-color: var(--ink); }
.btn .ic { width: 18px; height: 18px; flex: none; }
.btn[disabled], .btn:disabled { background: var(--grey-100); border-color: var(--grey-300); color: #6B6775 !important; cursor: not-allowed; }
.btn { cursor: pointer; }
.btn:focus-visible, .linkbtn:focus-visible, .mic-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.header .btn { color: var(--white); }

/* ---- Page header band -------------------------------------------------- */
.page-hero { background: var(--grey-50); border-bottom: 1px solid var(--grey-300); padding: clamp(48px, 6vw, 88px) 0 clamp(40px, 5vw, 72px); }
.page-hero .eyebrow { margin-bottom: 16px; }
.page-hero h1 { max-width: 20ch; }
.page-hero p.sub { margin-top: 22px; max-width: 62ch; font-size: var(--lead); line-height: 1.5; color: var(--on); }

/* Sections around the tools */
.rr, .tools-sec { padding-top: clamp(40px, 5vw, 72px); padding-bottom: clamp(48px, 6vw, 88px); }
main > section:not(.page-hero):not(.rr):not(.rr-explain):not(.assess__band) { padding-top: clamp(40px, 5vw, 72px); padding-bottom: clamp(56px, 7vw, 96px); }

/* ---- /tools hub -------------------------------------------------------- */
.toolgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.toolcard { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--grey-300); border-top: 4px solid var(--accent); padding: clamp(24px, 3vw, 36px); color: var(--on); text-decoration: none; transition: box-shadow .18s ease, transform .18s ease; }
a.toolcard:hover { box-shadow: 0 14px 34px rgba(14, 12, 18, .1); transform: translateY(-2px); }
a.toolcard:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.toolcard .cat { font: 600 .92rem/1.3 var(--sans); color: var(--accent); }
.toolcard h2 { font-size: clamp(1.4rem, 2vw, 1.75rem); line-height: 1.15; margin: 12px 0 14px; }
.toolcard p { color: var(--on); line-height: 1.55; }
.toolcard__facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; }
.toolcard__facts li { font-size: .85rem; color: var(--muted); background: var(--grey-100); border: 1px solid var(--grey-300); padding: 5px 12px; }
.toolcard .more { margin-top: auto; padding-top: 24px; font-weight: 600; color: var(--accent); }
.toolcard .more--link { display: inline-block; margin-top: 20px; padding: 12px 0; text-decoration: underline; text-underline-offset: 4px; }
.toolcard--soon { background: var(--grey-50); border-top-color: var(--grey-300); border-style: dashed; border-top-style: solid; }
.toolcard--soon h2 { color: var(--muted); }
.toolgrid__foot { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--grey-300); font-size: var(--small); color: var(--muted); line-height: 1.6; max-width: 70ch; }
.toolgrid__foot a, .rr-disc a, .rr-explain__foot a, .rr-sources a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.toolgrid__foot a { min-height: 44px; }

/* ---- Tool shell: questions on one side, result on the other ------------ */
.rr-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.rr-noscript { background: var(--grey-50); border: 1px solid var(--grey-300); border-left: 4px solid var(--accent); padding: 24px; margin: 24px 0 8px; }
.rr-noscript h2 { font-size: 1.25rem; margin-bottom: 8px; }
.rr-noscript p { color: var(--on); margin-bottom: 14px; }

.rr-step { background: var(--white); border: 1px solid var(--grey-300); border-top: 4px solid var(--accent); padding: clamp(20px, 2.4vw, 30px) clamp(18px, 2.4vw, 30px) 10px; margin-bottom: 20px; }
.rr-step > h2 { font-size: 1.3rem; line-height: 1.2; display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.rr-step > h2 .n { flex: none; width: 30px; height: 30px; background: var(--accent); color: var(--white); font: 700 .9rem/1 var(--sans); display: grid; place-items: center; }
.rr-step > p.note { color: var(--muted); font-size: .95rem; margin: 0 0 20px 42px; }
.rr-step .sub-f { margin-top: 4px; padding-top: 16px; border-top: 1px dashed var(--t-line); }

/* Fields */
.rr-f, .field, .cl-tcard__f { margin-bottom: 18px; }
.rr-f label, .field label, .cl-tcard__f label { display: block; font-weight: 600; font-size: .95rem; color: var(--ink); margin-bottom: 6px; }
.rr-f .opt, .assess-opt { font-weight: 400; color: var(--muted); font-size: .88rem; }
.req { color: var(--t-err-ink); }
.rr-f input[type="text"], .rr-f input[type="email"], .rr-f input[type="tel"], .rr-f input[type="date"], .rr-f textarea,
.field input:not([type="checkbox"]):not([type="file"]), .field textarea, .cl-tcard__f input {
  display: block; width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--t-line); border-radius: var(--radius);
  background: var(--white); color: var(--ink); font: 400 1rem/1.4 var(--sans); }
.rr-f textarea, .field textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.field textarea#matter_summary { min-height: 150px; }
.rr-f input::placeholder, .rr-f textarea::placeholder, .field input::placeholder, .field textarea::placeholder { color: #6B6775; }
.rr-f input:focus-visible, .rr-f textarea:focus-visible, .field input:focus-visible, .field textarea:focus-visible, .cl-tcard__f input:focus-visible,
.cl-tcompose textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.rr-f .hint, .field .hint, .assess .hint { color: var(--muted); font-size: .88rem; line-height: 1.5; margin-top: 6px; }
.rr-aside { color: var(--muted); font-size: .88rem; line-height: 1.5; margin: -6px 0 18px; }
.rr-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.rr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Choice cards (who holds the records / who was injured) */
.rr-seg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 8px; }
.rr-seg label { position: relative; display: block; min-height: 64px; border: 1px solid var(--t-line); padding: 15px 16px 15px 46px; cursor: pointer; background: var(--white); transition: border-color .15s ease, box-shadow .15s ease; }
.rr-seg label:hover { border-color: var(--accent); }
.rr-seg input { position: absolute; left: 16px; top: 17px; width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.rr-seg .t { display: block; font-weight: 600; color: var(--ink); }
.rr-seg .d { display: block; color: var(--muted); font-size: .88rem; margin-top: 3px; line-height: 1.45; }
.rr-seg label:has(input:checked), .rr-seg--4 label.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--t-tint); }
.rr-seg input:checked ~ .t { color: var(--accent-deep); }
.rr-seg label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.rr-seg--4 .d { font-size: .86rem; }

/* Callout that changes with the choice */
.rr-law { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0 20px; background: var(--t-tint); border: 1px solid var(--t-tint-line); padding: 14px 16px; font-size: .92rem; color: var(--on); line-height: 1.55; }
.rr-law svg { flex: none; width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }
.rr-law b { color: var(--accent-deep); }

/* Record-type checklist */
.rr-checks { list-style: none; margin: 0 0 8px; padding: 0; }
.rr-checks li { border-top: 1px solid var(--grey-300); }
.rr-checks li:first-child { border-top: 0; }
.rr-checks label { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 11px 2px; cursor: pointer; font-size: .95rem; color: var(--on); line-height: 1.5; }
.rr-checks input, .rr-consent input, .consent input, .cl-tcard__consent input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.rr-checks label:has(input:focus-visible), .rr-consent:has(input:focus-visible), .consent:has(input:focus-visible), .cl-tcard__consent:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.rr-bulk { display: flex; gap: 8px; margin: 0 0 6px; padding-bottom: 8px; }
.rr-bulk button { min-height: 44px; padding: 0 4px; background: none; border: 0; cursor: pointer; color: var(--accent); font: 600 .92rem/1 var(--sans); text-decoration: underline; text-underline-offset: 4px; }
.rr-bulk button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }

/* ---- The letter -------------------------------------------------------- */
.rr-paperhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.rr-paperhead .live { font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.rr-paperhead .dot { width: 8px; height: 8px; border-radius: 50%; background: #16A34A; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
/* The visitor's own document, set as a document (A4 proportions, document serif), not as site chrome. */
.rr-paper { background: var(--white); border: 1px solid var(--grey-300); box-shadow: 0 18px 50px rgba(14, 12, 18, .1), 0 2px 6px rgba(14, 12, 18, .05);
  padding: 11.9% 11.9% 13%; font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif; font-size: .96rem; line-height: 1.62; color: #1C1A24; }
.rr-paper p { margin: 0 0 13px; }
.rr-paper .date { margin-bottom: 26px; color: #3B3652; }
.rr-paper .addr { margin-bottom: 26px; white-space: pre-line; line-height: 1.5; }
.rr-paper .subj { font-weight: 700; font-size: .92rem; margin: 22px 0 16px; }
.rr-paper .ref { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 3px; margin: 0 0 22px; line-height: 1.5; }
.rr-paper .ref dt { color: #4A4560; }
.rr-paper .ref dd { margin: 0; white-space: pre-line; }
.rr-paper h3 { font-family: inherit; font-size: .96rem; font-weight: 700; letter-spacing: 0; color: #1C1A24; margin: 24px 0 10px; }
.rr-paper ul { margin: 0 0 15px; padding-left: 22px; }
.rr-paper li { margin-bottom: 8px; line-height: 1.55; }
.rr-paper .sign { margin-top: 30px; }
.rr-paper .sign .nm { margin-top: 46px; }
.rr-paper .enc { margin-top: 22px; color: #4A4560; }
/* An unfilled value: deliberately un-letterlike so the gap is obvious. */
.ph { font-family: var(--sans); font-size: .86em; color: var(--accent-deep); background: var(--t-tint); border-bottom: 1px dashed #B79DEB; padding: 0 4px; font-style: normal; }

/* Send / capture panel */
.rr-send { margin-top: 20px; background: var(--grey-50); border: 1px solid var(--grey-300); border-top: 4px solid var(--accent); padding: clamp(20px, 2.4vw, 28px); }
.rr-send h2 { font-size: 1.3rem; margin-bottom: 6px; }
.rr-send > p { color: var(--on); font-size: .95rem; margin-bottom: 18px; }
.rr-consent { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--on); line-height: 1.55; cursor: pointer; margin: 2px 0 16px; }
.rr-consent a, .consent a, .cl-tcard__consent a, .notice a, .assess-lede a, .cl-tcard__note a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
#ts-widget:not(:empty) { margin: 0 0 16px; }
.rr-send .btn--primary { width: 100%; justify-content: center; font-size: 1.02rem; }
.rr-missing { font-size: .88rem; color: var(--muted); margin-top: 12px; text-align: center; line-height: 1.5; }
.rr-missing b { color: var(--t-err-ink); font-weight: 600; }
.rr-sent { background: var(--t-ok-bg); border: 1px solid var(--t-ok-line); border-top: 4px solid #16A34A; padding: 24px; margin-top: 20px; }
.rr-sent h2 { font-size: 1.25rem; color: var(--t-ok-ink); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.rr-sent h2 svg { width: 22px; height: 22px; color: #16A34A; flex: none; }
.rr-sent p { font-size: .95rem; color: #31533C; line-height: 1.6; margin-bottom: 10px; }
.rr-sent .again { min-height: 44px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--t-ok-ink); font: inherit; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; }
.rr-disc { margin-top: 24px; font-size: .88rem; color: var(--muted); line-height: 1.6; }

/* Post-send dialog */
dialog.rr-claim { border: 0; padding: 0; max-width: 34rem; width: calc(100% - 2rem); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); background: var(--white); color: var(--on); margin: auto; }
dialog.rr-claim::backdrop { background: rgba(14, 12, 18, .6); }
.rr-claim__sent { display: flex; gap: 10px; align-items: flex-start; background: var(--t-ok-bg); border-bottom: 1px solid var(--t-ok-line); padding: 16px 26px; font-size: .94rem; color: #24503A; line-height: 1.5; }
.rr-claim__sent svg { flex: none; width: 18px; height: 18px; color: #16A34A; margin-top: 2px; }
.rr-claim__sent b { color: var(--t-ok-ink); }
.rr-claim__body { padding: 24px 26px 6px; }
.rr-claim__body h2 { font-size: 1.5rem; margin-bottom: 10px; }
.rr-claim__body p { font-size: .98rem; color: var(--on); line-height: 1.6; margin-bottom: 12px; }
.rr-claim__body p strong { color: var(--ink); }
.rr-claim__foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 8px 26px 24px; }
.rr-claim__foot .dismiss { margin-left: auto; min-height: 44px; background: none; border: 0; padding: 6px 2px; cursor: pointer; color: var(--muted); font: inherit; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; }
.rr-claim__foot .dismiss:hover { color: var(--ink); }
.rr-claim__foot .dismiss:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Sticky action bar: keeps "Email me my letter" reachable; the page's script hides it when the real panel is on screen. */
.rr-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--grey-300); box-shadow: 0 -6px 24px rgba(14, 12, 18, .08); transform: translateY(105%); transition: transform .22s ease; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
.rr-bar.is-on { transform: none; }
.rr-bar .inner { display: flex; align-items: center; gap: 18px; justify-content: space-between; }
.rr-bar .st { font-size: .9rem; color: var(--muted); line-height: 1.4; }
.rr-bar .st b { color: var(--ink); font-weight: 600; display: block; font-size: .98rem; }
.rr-bar .btn { flex: none; }

/* ---- Time limit checker ------------------------------------------------ */
.tl-form [hidden] { display: none !important; }
.rr-f input[type="date"] { min-height: 48px; }
.tl-mode { display: inline-flex; border: 1px solid var(--t-line); padding: 3px; background: var(--white); margin: 0 0 16px; }
.tl-mode label { position: relative; display: block; cursor: pointer; margin: 0; }
.tl-mode input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tl-mode span { display: flex; align-items: center; min-height: 42px; padding: 0 18px; font-size: .95rem; font-weight: 600; color: var(--muted); }
.tl-mode input:checked + span { background: var(--accent); color: var(--white); }
.tl-mode input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.tl-disc { margin: 0 0 20px; border: 1px solid var(--t-tint-line); background: var(--t-tint); }
.tl-disc summary { cursor: pointer; list-style: none; min-height: 48px; padding: 12px 16px; font-size: .95rem; font-weight: 600; color: var(--accent-deep); display: flex; gap: 10px; align-items: center; }
.tl-disc summary::-webkit-details-marker { display: none; }
.tl-disc summary::before { content: "+"; font-size: 1.25rem; line-height: 1; width: 14px; text-align: center; flex: none; }
.tl-disc[open] summary::before { content: "\2013"; }
.tl-disc summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.tl-disc .b { padding: 0 16px 14px 40px; font-size: .92rem; color: var(--on); line-height: 1.6; }
.tl-disc .b ul { margin: 6px 0 8px 18px; padding: 0; }
.tl-disc .b p { margin: 0 0 8px; }

.tl-ex { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 28px; }
.tl-ex > span { font-size: .95rem; color: var(--ink); font-weight: 600; margin-right: 6px; }
.tl-ex button { min-height: 44px; font: 500 .92rem/1.2 var(--sans); color: var(--on); background: var(--white); border: 1px solid var(--t-line); padding: 0 16px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.tl-ex button:hover { border-color: var(--accent); color: var(--accent-deep); }
.tl-ex button[aria-pressed="true"] { border-color: var(--accent); background: var(--t-tint); color: var(--accent-deep); box-shadow: inset 0 0 0 1px var(--accent); }
.tl-ex button.clear { border-style: dashed; color: var(--muted); }
.tl-ex button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.tl-res { position: sticky; top: 92px; }
.tl-card { background: var(--white); border: 1px solid var(--grey-300); border-top: 4px solid var(--accent); box-shadow: 0 18px 50px rgba(14, 12, 18, .1), 0 2px 6px rgba(14, 12, 18, .04); overflow: hidden; }
.tl-empty { padding: 40px 30px 36px; }
.tl-empty svg { width: 40px; height: 40px; color: var(--accent); margin-bottom: 12px; }
.tl-empty h2 { font-size: 1.4rem; margin-bottom: 8px; }
.tl-empty p { color: var(--on); max-width: 44ch; }

.tl-status { padding: 26px 28px 22px; border-bottom: 1px solid var(--grey-300); }
.tl-status .lede { font-size: 1.3rem; line-height: 1.35; color: var(--ink); font-weight: 700; letter-spacing: -.015em; margin-bottom: 12px; }
.tl-status .lede b { color: var(--accent-deep); font-weight: 700; white-space: nowrap; }
.tl-status.is-passed .lede b { color: #9A3B12; }
.tl-status p { color: var(--on); font-size: .98rem; line-height: 1.6; margin: 0 0 8px; }
.tl-status p:last-child { margin-bottom: 0; }
.tl-status .tag { display: inline-block; font-size: .82rem; font-weight: 600; padding: 4px 10px; margin-bottom: 14px; background: #EFE8FC; color: var(--accent-deep); }
.tl-status.is-passed .tag { background: #FDEBDD; color: #8A3410; }
.tl-status.is-near .tag { background: #FEF1CC; color: #6B4300; }

.tl-dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--grey-300); }
.tl-date { padding: 20px 22px 20px 28px; position: relative; }
.tl-date + .tl-date { border-left: 1px solid var(--grey-300); }
.tl-date .k { font-size: .88rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 24px; }
.tl-date .v { font: 700 1.5rem/1.2 var(--sans); color: var(--ink); letter-spacing: -.02em; margin: 6px 0; font-variant-numeric: tabular-nums; }
.tl-date .v.is-open { font-size: 1.05rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.tl-date .v.is-past { color: #9A3B12; }
.tl-date .w { font-size: .86rem; color: var(--muted); line-height: 1.5; }
.tl-date .earlier { font-size: .74rem; font-weight: 700; color: var(--white); background: var(--accent); padding: 2px 8px; }
.tl-date.is-earlier::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }

.tl-chron { padding: 22px 28px 8px; border-bottom: 1px solid var(--grey-300); }
.tl-chron h3 { font-size: 1.05rem; margin-bottom: 16px; }
.tl-chron ol { list-style: none; margin: 0; padding: 0; position: relative; }
.tl-chron li { position: relative; padding: 0 0 18px 32px; }
.tl-chron li::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: -4px; width: 2px; background: var(--t-line); }
.tl-chron li:last-child::before { display: none; }
.tl-chron li.is-future::before { background: repeating-linear-gradient(to bottom, var(--t-line) 0 4px, transparent 4px 8px); }
.tl-chron .pt { position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 2px solid var(--ink); }
.tl-chron li.is-future .pt { background: var(--white); border-color: var(--muted); }
.tl-chron li.limit .pt { border-radius: 2px; transform: rotate(45deg) scale(.86); background: var(--accent); border-color: var(--accent); }
.tl-chron li.limit.is-future .pt { background: var(--white); border-color: var(--accent); }
.tl-chron li.limit.is-passed .pt { background: #C2410C; border-color: #C2410C; }
.tl-chron li.today .pt { background: var(--white); border: 3px solid var(--accent); box-shadow: 0 0 0 4px rgba(109, 40, 217, .16); }
.tl-chron .d { font-size: .86rem; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-chron .e { font-size: .98rem; color: var(--on); line-height: 1.45; }
.tl-chron li.today .e { font-weight: 700; color: var(--accent-deep); }
.tl-chron li.limit .e { font-weight: 600; color: var(--ink); }
.tl-chron .gap { display: block; font-size: .82rem; color: var(--muted); margin-top: 3px; }

.tl-flags { padding: 4px 28px 0; }
.tl-flag { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0 0; padding: 14px 16px; font-size: .92rem; line-height: 1.55; background: var(--t-tint); border: 1px solid var(--t-tint-line); color: var(--on); }
.tl-flag svg { flex: none; width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }
.tl-flag b { color: var(--ink); }
.tl-flag.warn { background: var(--t-warn-bg); border-color: var(--t-warn-line); color: var(--t-warn-ink); }
.tl-flag.warn svg { color: #C2410C; }
.tl-note { margin: 20px 28px 0; border-left: 3px solid var(--ink); padding: 2px 0 2px 16px; }
.tl-note p { font-size: .94rem; color: var(--on); line-height: 1.6; margin: 0 0 6px; }
.tl-note p:last-child { margin: 0; }
.tl-note b { color: var(--ink); }
.tl-next { padding: 22px 28px 26px; }
.tl-next h3 { font-size: 1.15rem; margin-bottom: 8px; }
.tl-next p { font-size: .95rem; color: var(--on); margin-bottom: 16px; line-height: 1.6; }
.tl-next .row { display: flex; flex-wrap: wrap; gap: 10px; }
.tl-err { padding: 22px 28px; color: var(--t-err-ink); font-size: .95rem; line-height: 1.6; background: var(--t-err-bg); }
.tl-err b { display: block; margin-bottom: 4px; }

/* ---- Explainer beneath each tool -------------------------------------- */
.rr-explain { border-top: 1px solid var(--grey-300); background: var(--grey-50); padding: clamp(48px, 6vw, 88px) 0 clamp(72px, 8vw, 112px); }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); line-height: 1.15; margin: 48px 0 16px; }
.prose h3 { font-size: 1.2rem; margin: 24px 0 8px; }
.prose p { color: var(--on); line-height: 1.65; margin: 0 0 16px; }
.prose ul, .prose ol { color: var(--on); margin: 0 0 20px; padding-left: 22px; }
.prose li { line-height: 1.6; margin: 0 0 10px; }
.prose strong { color: var(--ink); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.rr-explain .prose > p:first-child { font-size: 1.15rem; line-height: 1.6; }
.prose .tablewrap { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--grey-300); background: var(--white); }
.prose table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .98rem; }
.prose th, .prose td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--grey-300); color: var(--on); line-height: 1.55; vertical-align: top; }
.prose thead th { background: var(--grey-100); color: var(--ink); font-weight: 600; font-size: .92rem; }
.prose th[scope="row"] { color: var(--ink); font-weight: 600; }
.prose tbody tr:last-child td, .prose tbody tr:last-child th { border-bottom: 0; }
.prose .tablenote { color: var(--muted); font-size: .88rem; margin: -6px 0 22px; }
.rr-steps { margin: 4px 0 8px; padding-left: 22px; }
.rr-steps li { margin-bottom: 14px; line-height: 1.65; }
.rr-sources { list-style: none; margin: 4px 0 0; padding: 0; }
.rr-sources li { margin-bottom: 10px; font-size: .95rem; line-height: 1.55; padding-left: 18px; position: relative; }
.rr-sources li::before { content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 6px; background: var(--accent); }
.rr-explain__foot { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--grey-300); font-size: .92rem; color: var(--muted); line-height: 1.65; }
.prose .rr-explain__foot { color: var(--muted); }

.faq { display: block; margin-top: 8px; max-width: none; }
.faq details { border: 1px solid var(--grey-300); background: var(--white); }
.faq details + details { margin-top: 12px; }
.faq summary { list-style: none; cursor: pointer; position: relative; min-height: 56px; padding: 18px 56px 18px 22px; font-weight: 600; font-size: 1.05rem; line-height: 1.35; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: var(--accent-deep); }
.faq summary:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.faq .a { padding: 0 24px 22px 22px; color: var(--on); line-height: 1.65; max-width: 66ch; }

.toolcta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: space-between; background: var(--ink); color: #D8D5E0; padding: clamp(22px, 3vw, 32px); margin: 32px 0; }
.toolcta h3 { color: var(--white); margin: 0 0 6px; font-size: 1.35rem; }
.toolcta p { color: #D8D5E0; line-height: 1.55; margin: 0; max-width: 46ch; }
.toolcta .btn { flex: none; background: var(--white); border-color: var(--white); color: var(--ink) !important; text-decoration: none; }
.toolcta .btn:hover { background: var(--grey-100); }
.prose .toolcta .btn { color: var(--ink); text-decoration: none; }

/* ---- /assessment: the fallback enquiry form and assistant ------------- */
.assess .assess__band { padding: clamp(40px, 5vw, 72px) 0 clamp(64px, 7vw, 104px); }
.assess__grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(32px, 4vw, 64px); align-items: start; }
.assess h1 { margin-top: 16px; max-width: 14ch; }
.assess .sub { margin-top: 20px; color: var(--on); font-size: var(--lead); line-height: 1.5; max-width: 52ch; }
.assess-card { margin-top: 36px; background: var(--white); border: 1px solid var(--grey-300); border-top: 4px solid var(--accent); box-shadow: 0 18px 50px rgba(14, 12, 18, .08); overflow: hidden; }

.assess-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--grey-300); }
.assess-card[data-step="form"] .assess-steps { display: none; }
.assess-steps li { display: flex; flex-direction: column; gap: 8px; padding: 18px 22px 16px; }
.assess-steps__bar { height: 4px; background: var(--grey-300); transition: background .25s; }
.assess-steps__n { font: 600 .84rem/1.2 var(--sans); color: var(--muted); }
.assess-steps__l { font-size: 1rem; font-weight: 600; color: var(--muted); line-height: 1.3; }
.assess-card[data-step="details"] li[data-s="details"],
.assess-card[data-step="chat"] li:is([data-s="details"], [data-s="chat"]),
.assess-card[data-step="review"] li { --reached: var(--accent); }
.assess-steps li .assess-steps__bar { background: var(--reached, var(--grey-300)); }
.assess-steps li .assess-steps__n { color: var(--reached, var(--muted)); }
.assess-steps li[aria-current="step"] { background: var(--grey-50); }
.assess-steps li[aria-current="step"] .assess-steps__l { color: var(--ink); }

.assess-pane { padding: clamp(24px, 3vw, 36px); }
#form-card { margin-top: 0; }
.assess-card[data-step="chat"] #triage-card { padding-top: 26px; padding-bottom: 30px; }
.assess-card[data-step="review"] #triage-card { padding-bottom: 22px; }
.assess-card[data-step="review"] #form-card { border-top: 1px solid var(--grey-300); }
.assess-h2 { font-size: 1.6rem; line-height: 1.2; color: var(--ink); }
.assess-lede { margin-top: 8px; color: var(--on); max-width: 62ch; }
.notice { margin: 22px 0 6px; background: var(--grey-50); border: 1px solid var(--grey-300); border-left: 4px solid var(--accent); padding: 14px 16px; font-size: .92rem; color: var(--on); line-height: 1.55; }
.notice strong { color: var(--ink); }

.assess-fields { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 20px; }
.assess-fields__wide { grid-column: 1 / -1; }
.assess-card[data-step="review"] .assess-fields .field { grid-column: 1 / -1; }
.assess-fields > .hint { margin-top: -10px; }
.assess .assess-fields .field, .assess .cl-tcard__f { margin: 0; }
#matter-field, .field--file { margin: 20px 0 0; }
.field--file input[type="file"] { display: block; width: 100%; padding: 18px; border: 1.5px dashed var(--t-line); background: var(--grey-50); color: var(--muted); font: inherit; font-size: .95rem; cursor: pointer; }
.field--file input[type="file"]::file-selector-button { margin-right: 14px; min-height: 40px; padding: 0 16px; border: 1px solid var(--ink); background: var(--white); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.field--file input[type="file"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; font-size: .95rem; color: var(--on); line-height: 1.5; }
.assess-send { width: 100%; justify-content: center; margin-top: 20px; min-height: 54px; font-size: 1.05rem; }
.form-foot { color: var(--muted); font-size: .88rem; margin-top: 14px; text-align: center; line-height: 1.55; }
.form-status { margin-top: 14px; padding: 12px 14px; font-size: .95rem; display: none; }
.form-status.ok { display: block; background: var(--t-ok-bg); border: 1px solid var(--t-ok-line); color: var(--t-ok-ink); }
.form-status.err { display: block; background: var(--t-err-bg); border: 1px solid var(--t-err-line); color: var(--t-err-ink); }

.voicebar { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.mic-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--white); color: var(--ink); font: 600 .95rem/1 var(--sans); cursor: pointer; }
.mic-btn:hover { background: var(--ink); color: var(--white); }
.mic-btn[aria-pressed="true"] { background: #7A2E22; border-color: #7A2E22; color: var(--white); }
.mic-btn:disabled { opacity: .45; cursor: not-allowed; }
.mic-btn svg { flex: none; }
.mic-status { font-size: .88rem; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .mic-btn[aria-pressed="true"] svg { animation: micpulse 1.2s ease-in-out infinite; } }
@keyframes micpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Step 1: details card */
.cl-tcard { margin: 0; padding: 0; background: none; border: 0; }
.cl-tcard__note { margin: 14px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.assess-consents { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--grey-300); display: flex; flex-direction: column; gap: 14px; }
.cl-tcard__consent { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-size: .95rem; color: var(--on); line-height: 1.5; cursor: pointer; }
.cl-tcard__ts { margin: 18px 0 0; }
.cl-tcard__ts:empty { margin: 0; }
.assess-actions { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.linkbtn { min-height: 44px; background: none; border: 0; padding: 0 2px; font: 600 .95rem/1 var(--sans); color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.linkbtn:hover { color: var(--accent-deep); }
.linkbtn:disabled { color: #8A8694; cursor: default; text-decoration: none; }

/* Step 2: conversation */
.cl-tprogress { font: 600 .88rem/1.3 var(--sans); color: var(--accent-deep); margin: 0 0 14px; }
.cl-tlog { display: flex; flex-direction: column; gap: 10px; min-height: 260px; max-height: 52vh; overflow-y: auto; padding: 2px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.assess-card[data-step="review"] .cl-tlog { min-height: 0; max-height: 280px; }
.cl-tmsg { max-width: 80%; padding: 12px 16px; font-size: 1rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.cl-tmsg--assistant { align-self: flex-start; background: var(--grey-100); border: 1px solid var(--grey-300); color: var(--ink); }
.cl-tmsg--user { align-self: flex-end; background: var(--accent); color: var(--white); }
.cl-typing { display: inline-flex; gap: 5px; align-items: center; }
.cl-typing span { width: 7px; height: 7px; border-radius: 50%; background: #8A8694; display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .cl-typing span { animation: cltype 1.1s ease-in-out infinite; }
  .cl-typing span:nth-child(2) { animation-delay: .18s; }
  .cl-typing span:nth-child(3) { animation-delay: .36s; }
}
@keyframes cltype { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.cl-tcompose { margin-top: 16px; display: flex; align-items: flex-end; gap: 10px; border: 1px solid var(--t-line); background: var(--white); padding: 10px 10px 10px 16px; }
.cl-tcompose:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.cl-tcompose textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 160px; border: 0; background: transparent; padding: 8px 0; color: var(--ink); font: 400 1rem/1.45 var(--sans); resize: none; }
.cl-tcompose textarea:focus-visible { outline: none; }
.cl-tcompose textarea:disabled { color: #8A8694; -webkit-text-fill-color: #8A8694; cursor: not-allowed; }
.cl-trow { flex: none; display: flex; align-items: center; gap: 10px; }
.cl-tcompose .btn:disabled { opacity: .5; }
.cl-tstatus { display: block; margin-top: 8px; }
.cl-tstatus:empty { display: none; }
.cl-tfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-top: 14px; }
.assess-about { margin-top: 18px; border-top: 1px solid var(--grey-300); padding-top: 14px; color: var(--on); font-size: .92rem; line-height: 1.55; }
.assess-card:not([data-step="chat"]) .assess-about { display: none; }
.assess-about summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--ink); }
.assess-about summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.assess-about p { margin-top: 8px; }
.assess-about strong { color: var(--ink); }
.assess-about a { color: var(--accent); text-decoration: underline; }

/* Reassurance column */
.assess__aside { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 16px; padding-top: 6px; }
.assess-kicker { font: 600 .9rem/1.3 var(--sans); color: var(--accent); }
.assess-cost { background: var(--ink); padding: 28px; color: #D8D5E0; }
.assess-cost .assess-kicker { color: #C4B5FD; }
.assess-cost__row { margin-top: 16px; }
.assess-cost__row + .assess-cost__row { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .16); }
.assess-cost__big { font: 700 2.1rem/1.1 var(--sans); color: var(--white); letter-spacing: -.02em; }
.assess-cost p { margin-top: 6px; color: #D8D5E0; font-size: .95rem; line-height: 1.5; }
.assess-next { background: var(--white); border: 1px solid var(--grey-300); border-top: 4px solid var(--accent); padding: 26px; }
.assess-next ol { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.assess-next li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; color: var(--on); font-size: .94rem; line-height: 1.5; }
.assess-next b { display: block; color: var(--ink); font-size: 1rem; font-weight: 600; }
.assess-next__n { width: 28px; height: 28px; background: var(--accent); color: var(--white); display: grid; place-items: center; font: 700 .85rem/1 var(--sans); }
.assess-private { background: var(--grey-100); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.assess-private b { color: var(--ink); font-size: 1rem; }
.assess-private p { color: var(--on); font-size: .92rem; line-height: 1.55; }
.assess-private a, .assess-email a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.assess-email { color: var(--on); font-size: .95rem; padding: 0 4px; }

/* ---- Narrow screens ---------------------------------------------------- */
@media (max-width: 1080px) { .assess__grid { grid-template-columns: minmax(0, 1fr) 320px; } }
@media (max-width: 980px) {
  .rr-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .tl-res { position: static; }
}
@media (max-width: 900px) {
  .assess__grid { grid-template-columns: minmax(0, 1fr); }
  .assess__aside { position: static; padding-top: 0; }
}
@media (max-width: 860px) { .toolgrid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .rr-seg { grid-template-columns: minmax(0, 1fr); }
  .rr-paper { padding: 30px 22px 34px; font-size: .92rem; }
}
@media (max-width: 560px) {
  .rr-2 { grid-template-columns: minmax(0, 1fr); }
  .tl-dates { grid-template-columns: minmax(0, 1fr); }
  .tl-date + .tl-date { border-left: 0; border-top: 1px solid var(--grey-300); }
  .tl-next .btn, .toolcta .btn { width: 100%; justify-content: center; }
  .rr-bar .st { font-size: .82rem; }
  .rr-bar .btn { padding: 0 16px; font-size: .9rem; }
  .rr-step > p.note { margin-left: 0; }
  .rr-claim__foot { padding: 8px 20px 20px; }
  .rr-claim__foot .dismiss { margin-left: 0; width: 100%; text-align: left; }
  .rr-claim__body, .rr-claim__sent { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 600px) {
  .assess-pane { padding: 22px 18px 26px; }
  .assess-steps li { padding: 14px 12px 12px; gap: 6px; }
  .assess-steps__n { font-size: .78rem; }
  .assess-steps__l { font-size: .86rem; }
  .assess-fields { grid-template-columns: minmax(0, 1fr); }
  .assess-fields > .hint { margin-top: -12px; }
  .cl-tlog { min-height: 200px; }
  .cl-tmsg { max-width: 92%; }
  .cl-tcompose { flex-wrap: wrap; padding: 10px 10px 10px 14px; }
  .cl-tcompose textarea { flex-basis: 100%; }
  .cl-trow { margin-left: auto; }
  .assess-actions .btn { width: 100%; justify-content: center; }
}
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { font-size: max(16px, 1em) !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---- Print: the letter alone on clean A4 ------------------------------- */
@media print {
  .header, .site-footer, .rr-paperhead, .rr-send, .rr-sent, .rr-claim, .rr-disc, .rr-bar, .page-hero, .rr-grid > div:first-child, .rr-explain, .witty-dock { display: none !important; }
  .rr { padding: 0; }
  .container { max-width: none; padding: 0; }
  .rr-grid { display: block; }
  .rr-paper { border: 0; box-shadow: none; padding: 0; font-size: 11pt; line-height: 1.5; color: #000; }
  .rr-paper li, .rr-paper .sign { page-break-inside: avoid; }
  .ph { background: none; border-bottom: 1px solid #999; color: #000; font-style: italic; }
  .tl-ex, .tl-form, .tl-next { display: none !important; }
  .tl-res { position: static; }
  @page { size: A4; margin: 25mm 22mm; }
}
