/* The site's look for the tool pages (clause generator, cost calculator). Loaded AFTER each tool's own style.css:
   it keeps the tools' class names and layout logic, and replaces colours, type and shapes with the site's. Light only. */

/* ---------- tokens: the site's palette, forced in both colour schemes ---------- */
:root, :root:not([data-theme="light"]) {
  --white: #fafaf7; --blue: #10296b; --blue-mid: #1b3a86; --blue-pale: #e8edf6; --gold: #a5813f;
  --muted-light: #716d66; --border: #dbd9d3; --border-lt: #eae8e2; --nav-h: 64px;
  --bg: #f4f3ee; --card: #fafaf7; --ink: #181816; --muted: #615e58; --line: #dbd9d3; --line-soft: #eae8e2;
  --accent: #10296b; --accent-ink: #ffffff; --accent-soft: #e8edf6;
  --warn-bg: #f4eddc; --warn-ink: #5e4515; --err-bg: #f8e8e4; --err-ink: #8a2a1c;
  --good: #2e6b4b; --bar: #9fb1da; --assume: #a5813f; --radius: 0px;
  --serif: 'Cormorant Garamond', Georgia, serif; --sans: 'DM Sans', sans-serif; --mono: 'DM Mono', monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root, :root:not([data-theme="light"]) {
    --white: #fafaf7; --blue: #10296b; --blue-mid: #1b3a86; --blue-pale: #e8edf6; --gold: #a5813f;
    --muted-light: #716d66; --border: #dbd9d3; --border-lt: #eae8e2;
    --bg: #f4f3ee; --card: #fafaf7; --ink: #181816; --muted: #615e58; --line: #dbd9d3; --line-soft: #eae8e2;
    --accent: #10296b; --accent-ink: #ffffff; --accent-soft: #e8edf6;
    --warn-bg: #f4eddc; --warn-ink: #5e4515; --err-bg: #f8e8e4; --err-ink: #8a2a1c;
    --good: #2e6b4b; --bar: #9fb1da; --assume: #a5813f;
  }
}

/* ---------- base ---------- */
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; font-variant-numeric: lining-nums; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
.si { max-width: 1180px; margin: 0 auto; padding: 0 40px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--blue); color: #fff; padding: 10px 16px; z-index: 1000; font-family: var(--mono); font-size: 11.5px; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- nav (same as the site's sub-pages) ---------- */
#nav { position: fixed; top: 0; left: 0; right: 0; z-index: 900; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; padding: 0 40px; background: var(--white); border-bottom: 1px solid transparent; transition: border-color .4s, box-shadow .4s; }
#nav.scrolled { border-bottom-color: var(--border); box-shadow: 0 1px 32px rgba(24,24,22,.06); }
.nav-logo { font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 28px; }
.nav-back { font-family: var(--mono); font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.nav-back:hover { color: var(--blue); }
.nav-cta { font-family: var(--mono); font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; padding: 9px 20px; background: var(--blue); color: #fff; transition: background .2s; }
.nav-cta:hover { background: var(--blue-mid); }

/* ---------- hero band: the tool's own header, set on the site's blue ---------- */
.tool-hero { margin-top: var(--nav-h); background: var(--blue); position: relative; overflow: hidden; color: #fff; }
.tool-hero .hero-geo { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.th-inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 64px 40px 56px; }
.tool-hero .top { margin: 0; }
.tool-hero .topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 22px; }
.tool-hero .eyebrow { font: 400 11.5px/1.4 var(--mono); letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255,255,255,.65); margin: 0 0 22px; display: flex; align-items: center; gap: 12px; }
.tool-hero .topbar .eyebrow { margin: 0; }
.tool-hero .eyebrow::after { content: ''; display: block; width: 32px; height: 1px; background: rgba(255,255,255,.3); }
.tool-hero h1 { font-family: var(--serif); font-size: clamp(40px, 5.5vw, 64px); font-weight: 300; line-height: 1.05; letter-spacing: -1.2px; color: #fff; margin: 0 0 22px; max-width: 18ch; }
.tool-hero .lead { color: rgba(255,255,255,.72); font-size: 17px; line-height: 1.7; max-width: 62ch; margin: 0; }
.tool-hero .seg { border: 1px solid rgba(255,255,255,.28); border-radius: 0; background: transparent; }
.tool-hero .seg button { font-family: var(--mono); font-size: 11.5px; letter-spacing: 1.5px; font-weight: 400; color: rgba(255,255,255,.78); background: transparent; padding: 6px 14px; min-height: 34px; }
.tool-hero .seg button[aria-pressed="true"] { background: #fff; color: var(--blue); }

/* ---------- the tool ---------- */
.wrap { max-width: var(--tool-w, 880px); margin: 0 auto; padding: 56px 40px 72px; }
body.t-calc { --tool-w: 1100px; }
body.t-clause { --tool-w: 880px; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: 0; padding: 32px; margin-bottom: 24px; }
.card h2 { font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: -.3px; line-height: 1.2; color: var(--ink); margin: 0 0 12px; }
.card h3 { font-family: var(--serif); font-size: 23px; font-weight: 500; letter-spacing: -.2px; color: var(--ink); margin: 30px 0 10px; }
#stage > h3 { margin-top: 26px; }
.hint, .foot, .durnote, .legend, .src { color: var(--muted); }
.hint { font-size: 14px; line-height: 1.6; }

/* buttons */
.btn { font-family: var(--mono); font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; font-weight: 400; background: var(--blue); color: #fff; border: 1px solid var(--blue); border-radius: 0; padding: 0 28px; min-height: 46px; cursor: pointer; transition: background .2s, color .2s; }
.btn:hover { background: var(--blue-mid); border-color: var(--blue-mid); }
.btn.ghost { background: transparent; color: var(--blue); border-color: rgba(16,41,107,.35); }
.btn.ghost:hover { background: var(--blue-pale); border-color: var(--blue); }
.btn.small { padding: 0 16px; min-height: 36px; font-size: 11px; letter-spacing: 1.5px; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, .opt:has(input:focus-visible), .chk:has(input:focus-visible), .chips label:has(input:focus-visible), .seg label:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

/* form controls */
input[type="text"], input[type="number"], select { font-family: var(--sans); font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--border); border-radius: 0; min-height: 46px; padding: 10px 12px; }
input[type="text"]:hover, select:hover { border-color: rgba(16,41,107,.45); }
.field > span, legend { font-family: var(--mono); font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 400; color: var(--blue); }
.field em { font-family: var(--sans); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--muted); }
#claim { font-family: var(--serif); font-size: 34px; font-weight: 500; min-height: 62px; border: 1px solid var(--ink); border-radius: 0; background: #fff; }
.seg { border: 1px solid var(--border); border-radius: 0; background: #fff; }
.seg button, .seg span { font-family: var(--sans); font-size: 15px; font-weight: 400; }
.seg button[aria-pressed="true"], .seg input:checked + span { background: var(--blue); color: #fff; font-weight: 500; }
.chips span { border-radius: 0; background: #fff; font-size: 15px; }
.chips input:checked + span { background: var(--blue-pale); border-color: var(--blue); color: var(--blue); font-weight: 500; }
.opt, .chk { border-radius: 0; background: #fff; border: 1px solid var(--border); transition: border-color .2s, background .2s; }
.opt:hover, .chk:hover { border-color: rgba(16,41,107,.45); }
.opt:has(input:checked), .chk:has(input:checked) { border-color: var(--blue); background: var(--blue-pale); }
.opt .t, .chk .t { font-weight: 500; font-size: 15.5px; }
.opt .d, .chk .d { font-size: 14px; color: var(--muted); }
.opt input, .chk input { accent-color: var(--blue); }
.other { border-radius: 0; border-color: var(--border); }
.progress { font-family: var(--mono); font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
progress { height: 4px; border-radius: 0; }
progress::-webkit-progress-bar { background: var(--border); }
progress::-webkit-progress-value { background: var(--blue); }
progress::-moz-progress-bar { background: var(--blue); }
.more { border-top: 1px solid var(--border); }
.more > summary { font-family: var(--mono); font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 400; color: var(--blue); }
.more > summary em { border-radius: 0; background: var(--gold); color: #fff; font-family: var(--mono); letter-spacing: 1px; }
.presets button { border-radius: 0; background: var(--blue-pale); color: var(--blue); }
div.assume, .assume { border-radius: 0; border-color: var(--gold); }

/* messages */
.error, .errors { border-radius: 0; border: 1px solid var(--err-ink); }
.notincl, .notes .warn, .d-body .warn { border-radius: 0; background: var(--warn-bg); border: 1px solid rgba(165,129,63,.55); color: var(--warn-ink); }
.disclaimer, .cta { border-radius: 0; background: var(--blue-pale); border: 1px solid rgba(16,41,107,.2); color: var(--ink); font-size: 14px; line-height: 1.65; }
.cta a, .notes a, .src a, .srclist a, .srclink { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(16,41,107,.35); }
.badge { border-radius: 0; background: var(--blue-pale); color: var(--blue); font-family: var(--mono); font-size: 11px; letter-spacing: .5px; }
.badge.sec { background: var(--warn-bg); color: var(--warn-ink); }
.tag.ill { border-radius: 0; background: #ead8ae; color: #5e4515; font-family: var(--mono); font-size: 10.5px; letter-spacing: .5px; white-space: nowrap; margin: 4px 0 2px; }

/* clause output */
.clause { border-radius: 0; border-color: var(--border); background: #fff; }
.clause header { background: var(--blue-pale); border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--blue); }
.clause header h3, .clause header strong { font-family: var(--mono); font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; font-weight: 400; margin: 0; color: var(--blue); }
.clause .body { font-family: var(--serif); font-size: 20px; line-height: 1.65; font-weight: 500; color: var(--ink); }
.sum li span:first-child { color: var(--muted); }
.sum button { color: var(--blue); }

/* tables (calculator) */
table { font-size: 15px; }
th { font-family: var(--mono); font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 400; color: var(--muted); border-bottom: 1px solid var(--ink); }
td { border-bottom: 1px solid var(--border-lt); }
td.total { font-family: var(--serif); font-size: 28px; font-weight: 500; color: var(--blue); }
td.total .meter { background: var(--bar); border-radius: 0; }
tr.is-assume td.total .meter { background: var(--gold); }
.inst { font-family: var(--serif); font-size: 21px; font-weight: 500; color: var(--ink); }
.inst small { font-family: var(--sans); font-size: 13px; }
details.inst-d { border-radius: 0; border-color: var(--border); background: #fff; }
details.inst-d > summary { font-family: var(--serif); font-size: 19px; font-weight: 500; }
.brandbar { display: none !important; } /* the site header already names the firm; the brand still goes into the PDF and the workbook */

/* calculator table: let the long headers wrap, give the institution column room, keep lining figures (Cormorant defaults to old-style) */
#summary th { white-space: normal; letter-spacing: 1px; line-height: 1.35; vertical-align: bottom; }
#summary th:first-child, #summary td:first-child { min-width: 180px; }
#summary td.range { white-space: normal; min-width: 150px; max-width: 200px; }
.num, td.total, .range, .rp-cost, .rp-muted, .rp-line .n, details.inst-d > summary span:last-child, .d-body table td { font-variant-numeric: lining-nums tabular-nums; }
.card.form h2 { margin-bottom: 22px; }

/* calculator on phones: the table turns into cards (the tool's own rule); square them like the rest of the site and let the label wrap, not the figure */
@media (max-width: 900px) {
  #summary tr { border-radius: 0; background: #fff; }
  #summary td { min-width: 0; }
  #summary td[data-label]::before { flex: 1 1 auto; min-width: 0; }
  #summary td.num { white-space: normal; }
}

/* ---------- about + contact + footer ---------- */
.tool-about { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ta-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 80px; align-items: start; padding: 80px 0; }
.ta-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.ta-text h2 { font-family: var(--serif); font-size: 34px; font-weight: 400; letter-spacing: -.5px; line-height: 1.2; margin: 0 0 22px; }
.ta-text p { font-size: 16px; line-height: 1.85; color: var(--ink); opacity: .85; margin: 0 0 18px; }
.ta-text p:last-child { margin-bottom: 0; }
.ta-text .lead { font-family: var(--serif); font-size: 22px; font-style: italic; line-height: 1.6; opacity: .9; background: linear-gradient(var(--gold),var(--gold)) top left / 44px 2px no-repeat; padding-top: 22px; padding-left: 0; margin-bottom: 26px; }
.ta-facts { border: 1px solid var(--border); background: var(--bg); }
.ta-fact { padding: 22px 26px; border-bottom: 1px solid var(--border); }
.ta-fact:last-child { border-bottom: none; }
.taf-l { font-family: var(--mono); font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.taf-v { font-size: 15.5px; color: var(--ink); line-height: 1.55; }
.taf-s { font-size: 14px; color: var(--muted); margin-top: 3px; line-height: 1.55; }

#contact { background: var(--ink); position: relative; overflow: hidden; }
.contact-geo { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; padding: 72px 0; position: relative; z-index: 1; }
.contact-h { font-family: var(--serif); font-size: clamp(34px, 4.6vw, 52px); font-weight: 300; color: #fff; line-height: 1.1; letter-spacing: -1px; margin: 0 0 18px; }
.contact-h em { font-style: italic; opacity: .45; }
.contact-desc { font-size: 16px; color: rgba(250,250,247,.65); line-height: 1.75; margin: 0; }
.c-rows { display: flex; flex-direction: column; }
.c-row { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.07); gap: 16px; }
.c-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; color: rgba(250,250,247,.65); }
.c-val { font-size: 16px; color: #fff; transition: opacity .2s; }
a.c-val:hover { opacity: .55; }
.contact-btn { margin-top: 26px; display: inline-block; padding: 16px 44px; border: 1px solid rgba(255,255,255,.18); color: #fff; font-family: var(--mono); font-size: 11.5px; letter-spacing: 2.5px; text-transform: uppercase; transition: all .25s; }
.contact-btn:hover { background: #fff; color: var(--ink); border-color: #fff; }
.contact-note { margin-top: 10px; font-family: var(--mono); font-size: 11.5px; color: rgba(255,255,255,.65); letter-spacing: .5px; }

footer { background: #101010; padding: 18px 40px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.ft-name { font-family: var(--serif); font-size: 18px; color: rgba(250,250,247,.65); }
.ft-links { display: flex; gap: 22px; align-items: center; }
.ft-link { font-family: var(--mono); font-size: 11.5px; color: rgba(250,250,247,.65); letter-spacing: 1px; transition: opacity .2s; }
.ft-link:hover { opacity: .6; }

/* ---------- Ukrainian interface: DM Sans / DM Mono have no Cyrillic, so the text moves to Cormorant, larger ---------- */
html[lang="uk"] body, html[lang="uk"] .opt .t, html[lang="uk"] .chk .t, html[lang="uk"] .hint, html[lang="uk"] .opt .d, html[lang="uk"] .chk .d, html[lang="uk"] input, html[lang="uk"] select { font-family: var(--serif); }
html[lang="uk"] body { font-size: 18px; font-weight: 500; }
html[lang="uk"] .hint, html[lang="uk"] .opt .d, html[lang="uk"] .chk .d { font-size: 16.5px; }
html[lang="uk"] .opt .t, html[lang="uk"] .chk .t { font-size: 19px; font-weight: 600; }
html[lang="uk"] .btn, html[lang="uk"] .progress, html[lang="uk"] .tool-hero .eyebrow, html[lang="uk"] .field > span, html[lang="uk"] legend, html[lang="uk"] .seg button, html[lang="uk"] .clause header, html[lang="uk"] .clause header h3 { font-family: var(--serif); font-size: 16px; letter-spacing: .04em; text-transform: none; font-weight: 600; }
html[lang="uk"] .tool-hero .lead { font-size: 20px; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  #nav { padding: 0 24px; }
  .si, .th-inner { padding-left: 24px; padding-right: 24px; }
  .th-inner { padding-top: 44px; padding-bottom: 40px; }
  .wrap { padding: 36px 20px 56px; }
  .card { padding: 22px; }
  .ta-grid { grid-template-columns: 1fr; gap: 36px; padding: 52px 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; padding: 52px 0; }
  footer { flex-direction: column; text-align: center; padding: 18px 24px; }
}
@media (max-width: 520px) {
  .nav-back { display: none; }
  .nav-logo { font-size: 16px; white-space: nowrap; }
  .nav-right { gap: 18px; }
  .nav-cta { padding: 8px 12px; }
  #claim { font-size: 28px; }
  .tool-hero .topbar .eyebrow { letter-spacing: 1.5px; flex: 1; min-width: 0; }
  .tool-hero .topbar .eyebrow::after { display: none; }
  .tool-hero .seg { flex: none; }
}

/* ---------- printing: only the tool's own print rules apply ---------- */
@media print {
  #nav, .tool-hero, .tool-about, #contact, footer, .skip { display: none !important; }
  body { background: #fff; }
  .wrap { max-width: none; padding: 0; }
}

/* calculator: the Calculate button row */
.form-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 24px; }
.form-actions .hint { margin: 0; }

/* calculator, "More options": one vertical rhythm between the blocks */
.more-body > * { margin-top: 0; margin-bottom: 0; }
.more-body > * + * { margin-top: 24px; }
.more-body > .grid + .hint { margin-top: 12px; }
.more-body .grid { margin-bottom: 0; }
#counterEcho:empty { display: none; }

/* calculator: the date of the arbitration agreement */
input[type="date"] { font-family: var(--sans); font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--border); border-radius: 0; min-height: 46px; padding: 10px 12px; width: 100%; max-width: 280px; }
input[type="date"]:hover { border-color: rgba(16,41,107,.45); }

/* ---------- placeholders (visible, never disguised as content) ---------- */
.ph { display: inline-block; font-family: var(--mono); font-size: 11px; line-height: 1.5; letter-spacing: .3px; padding: 1px 7px; border: 1px dashed #b07a1a; background: #fff6e0; color: #6b4a0a; border-radius: 2px; }
footer .ph { background: rgba(255,226,150,.12); border-color: #d9b25a; color: #f3dfae; }
