/* LEXEMER · RESOLUTION CHECK · PRESENTATION
   ─────────────────────────────────────────────────────────────────────────
   Editor surface, not a brochure. Cool neutral greys, a single blue accent,
   monospace for anything that is data. The site palette is warm gold and
   cream, so this page defines its own scale locally and does not inherit it.

   The input is the product. It sits at the top, holds focus on load, and the
   result renders live underneath as you type. Nothing here is a form to
   submit.

   site-chrome.css carries no box-sizing rule of its own and assumes the page
   supplies one. Without it the shared header renders 83px instead of 62px. */
* { box-sizing: border-box; }

/* Local scale. Deliberately independent of the site tokens. */
.rc-scope {
  --rc-bg:        #ffffff;
  --rc-surface:   #fbfbfc;
  --rc-raised:    #ffffff;
  --rc-line:      #e7e7ea;
  --rc-line-soft: #f0f0f2;
  --rc-text:      #17171a;
  --rc-dim:       #5f5f6b;
  --rc-faint:     #97979f;
  --rc-accent:    #2f6df6;
  --rc-accent-bg: rgba(47,109,246,.07);
  --rc-stop:      #d92d20;
  --rc-stop-bg:   rgba(217,45,32,.07);
  --rc-warn:      #b54708;
  --rc-warn-bg:   rgba(181,71,8,.07);
  --rc-ok:        #067647;
  --rc-ok-bg:     rgba(6,118,71,.07);
  --rc-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --rc-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html.theme-dark .rc-scope {
  --rc-bg:        #0b0b0d;
  --rc-surface:   #101013;
  --rc-raised:    #16161a;
  --rc-line:      #26262c;
  --rc-line-soft: #1c1c21;
  --rc-text:      #e8e8ec;
  --rc-dim:       #9b9baa;
  --rc-faint:     #63636f;
  --rc-accent:    #6ea0ff;
  --rc-accent-bg: rgba(110,160,255,.10);
  --rc-stop:      #ff6b6b;
  --rc-stop-bg:   rgba(255,107,107,.10);
  --rc-warn:      #f0a860;
  --rc-warn-bg:   rgba(240,168,96,.10);
  --rc-ok:        #4ade9a;
  --rc-ok-bg:     rgba(74,222,154,.10);
}

body {
  margin: 0;
  font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.rc-scope {
  background: var(--rc-bg);
  color: var(--rc-text);
  font-family: var(--rc-sans);
  min-height: 78vh;
}
.rc-wrap { max-width: 780px; margin: 0 auto; padding: 0 22px 110px; }

/* ── opening ────────────────────────────────────────────────────────── */
.rc-hero { padding: 60px 0 0; }
.rc-kicker {
  font-family: var(--rc-mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rc-faint); margin-bottom: 14px;
  display: flex; align-items: center; gap: 9px;
}
.rc-kicker::after {
  content: ''; flex: 1; height: 1px; background: var(--rc-line);
}
body.tool-theme-switchable .rc-hero__h {
  font-family: var(--rc-sans) !important;
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 600 !important;
  line-height: 1.15; letter-spacing: -0.025em;
  margin: 0 0 10px; color: var(--rc-text);
}
.rc-hero__sub {
  font-size: 14.5px; line-height: 1.6; color: var(--rc-dim);
  margin: 0 0 24px; max-width: 50ch;
}

/* ── the input. The centre of the page. ─────────────────────────────── */
.rc-field {
  position: relative; display: flex; align-items: center;
  border: 1px solid var(--rc-line); border-radius: 10px;
  background: var(--rc-raised);
  transition: border-color .13s ease, box-shadow .13s ease;
}
.rc-field:focus-within {
  border-color: var(--rc-accent);
  box-shadow: 0 0 0 3px var(--rc-accent-bg);
}
.rc-field__prompt {
  font-family: var(--rc-mono); font-size: 14px; font-weight: 500;
  color: var(--rc-accent); padding: 0 2px 0 16px; user-select: none;
}
#rc-q {
  flex: 1; min-width: 0;
  font-family: var(--rc-mono); font-size: 14.5px; line-height: 1.4;
  padding: 15px 14px 15px 10px;
  border: 0; background: transparent; color: var(--rc-text);
}
#rc-q:focus { outline: none; }
#rc-q::placeholder { color: var(--rc-faint); }
.rc-field__kbd { display: flex; gap: 5px; padding-right: 12px; }
.rc-kbd {
  font-family: var(--rc-mono); font-size: 10px; line-height: 1;
  padding: 4px 6px; border-radius: 5px;
  border: 1px solid var(--rc-line); color: var(--rc-faint);
  background: var(--rc-surface); white-space: nowrap;
}

/* ── live match list. Keyboard driven. ─────────────────────────────── */
.rc-list {
  margin-top: 8px; border: 1px solid var(--rc-line); border-radius: 10px;
  background: var(--rc-raised); overflow: hidden;
}
.rc-opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 14px; border: 0; border-top: 1px solid var(--rc-line-soft);
  background: transparent; color: var(--rc-text);
  font-family: var(--rc-sans); font-size: 13.5px; text-align: left;
  cursor: pointer;
}
.rc-opt:first-child { border-top: 0; }
.rc-opt:hover { background: var(--rc-surface); }
.rc-opt.is-on { background: var(--rc-accent-bg); }
.rc-opt.is-on .rc-opt__k { color: var(--rc-accent); border-color: var(--rc-accent); }
.rc-opt__k {
  font-family: var(--rc-mono); font-size: 10px; flex: 0 0 auto;
  padding: 3px 6px; border-radius: 4px;
  border: 1px solid var(--rc-line); color: var(--rc-faint);
}
.rc-opt__l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-opt__c {
  font-family: var(--rc-mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--rc-faint); flex: 0 0 auto;
}

.rc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.rc-chip {
  font-family: var(--rc-mono); font-size: 11.5px; cursor: pointer;
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--rc-line); background: transparent; color: var(--rc-dim);
  transition: border-color .12s ease, color .12s ease;
}
.rc-chip:hover { border-color: var(--rc-accent); color: var(--rc-accent); }
.rc-count {
  font-family: var(--rc-mono); font-size: 10.5px; letter-spacing: .05em;
  color: var(--rc-faint); margin: 18px 0 0;
}

/* ── result ─────────────────────────────────────────────────────────── */
.rc-result {
  margin: 22px 0 0; border: 1px solid var(--rc-line); border-radius: 12px;
  background: var(--rc-raised); overflow: hidden;
  animation: rc-in .18s ease-out both;
}
@keyframes rc-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rc-result { animation: none; } }

.rc-result__bar {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 16px; border-bottom: 1px solid var(--rc-line);
  background: var(--rc-surface);
  font-family: var(--rc-mono); font-size: 10.5px;
  letter-spacing: .09em; text-transform: uppercase; color: var(--rc-faint);
}
.rc-result__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rc-faint); flex: 0 0 auto; }
.rc-result--stop .rc-result__dot { background: var(--rc-stop); }
.rc-result--warn .rc-result__dot { background: var(--rc-warn); }
.rc-result--ok   .rc-result__dot { background: var(--rc-ok); }
.rc-result--ask  .rc-result__dot { background: var(--rc-accent); }
.rc-result__id { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rc-body { padding: 22px 24px 20px; }

/* ── the verdict ────────────────────────────────────────────────────── */
.rc-verdict { display: flex; gap: 13px; align-items: flex-start; }
.rc-verdict__icon { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 4px; color: var(--rc-faint); }
.rc-verdict__line {
  font-size: clamp(20px, 2.7vw, 26px); font-weight: 600;
  line-height: 1.25; letter-spacing: -0.022em; color: var(--rc-text);
}
.rc-verdict__sub { font-size: 14px; line-height: 1.55; color: var(--rc-dim); margin-top: 7px; max-width: 46ch; }
.rc-result--stop .rc-verdict__line, .rc-result--stop .rc-verdict__icon { color: var(--rc-stop); }
.rc-result--warn .rc-verdict__line, .rc-result--warn .rc-verdict__icon { color: var(--rc-warn); }
.rc-result--ok   .rc-verdict__icon { color: var(--rc-ok); }
.rc-result--ask  .rc-verdict__icon { color: var(--rc-accent); }

/* ── path and deadlines ─────────────────────────────────────────────── */
.rc-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 20px; }
.rc-strip__arrow { color: var(--rc-faint); font-family: var(--rc-mono); font-size: 12px; }
.rc-pill {
  font-family: var(--rc-mono); font-size: 11px; letter-spacing: .01em;
  padding: 5px 9px; border-radius: 6px; white-space: nowrap;
  border: 1px solid var(--rc-line); background: var(--rc-surface); color: var(--rc-dim);
}
.rc-pill--MEMBERS_ORDINARY,
.rc-pill--MEMBERS_SPECIAL,
.rc-pill--CENTRAL_GOVT { border-color: var(--rc-warn); color: var(--rc-warn); background: var(--rc-warn-bg); }
.rc-pill--PROHIBITED   { border-color: var(--rc-stop); color: var(--rc-stop); background: var(--rc-stop-bg); }
.rc-pill--due { border-color: var(--rc-accent); color: var(--rc-accent); background: var(--rc-accent-bg); }
.rc-pill--none { color: var(--rc-faint); }
.rc-pill--act {
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  color: var(--rc-text); transition: border-color .12s ease, color .12s ease;
}
.rc-pill--act:hover { border-color: var(--rc-accent); color: var(--rc-accent); }
.rc-pill--act svg { width: 12px; height: 12px; }

/* ── facts. Inline controls, never a form. ──────────────────────────── */
.rc-facts {
  display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rc-line-soft);
}
.rc-ctl { display: inline-flex; align-items: center; gap: 6px; }
.rc-ctl__l { font-family: var(--rc-mono); font-size: 10px; letter-spacing: .06em;
             text-transform: uppercase; color: var(--rc-faint); white-space: nowrap; }
.rc-ctl__in {
  font-family: var(--rc-mono); font-size: 11.5px; padding: 6px 9px; border-radius: 6px;
  border: 1px solid var(--rc-line); background: var(--rc-bg); color: var(--rc-text);
  max-width: 128px; transition: border-color .12s ease;
}
.rc-ctl__in:focus { outline: none; border-color: var(--rc-accent); box-shadow: 0 0 0 2.5px var(--rc-accent-bg); }
.rc-ctl--wanted .rc-ctl__in { border-color: var(--rc-accent); background: var(--rc-accent-bg); }
.rc-toggle {
  font-family: var(--rc-mono); font-size: 11px; cursor: pointer;
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--rc-line); background: transparent; color: var(--rc-faint);
  transition: all .12s ease;
}
.rc-toggle:hover { border-color: var(--rc-dim); color: var(--rc-dim); }
.rc-toggle.is-yes { border-color: var(--rc-accent); color: var(--rc-accent); background: var(--rc-accent-bg); }
.rc-toggle.is-no  { border-color: var(--rc-line); color: var(--rc-faint); }

/* ── alternatives ───────────────────────────────────────────────────── */
.rc-alts { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rc-alts__l { font-family: var(--rc-mono); font-size: 10px; letter-spacing: .06em;
              text-transform: uppercase; color: var(--rc-faint); }
.rc-alts__b {
  font-family: var(--rc-mono); font-size: 11px; cursor: pointer;
  padding: 4px 9px; border-radius: 6px;
  border: 1px solid var(--rc-line); background: transparent; color: var(--rc-dim);
}
.rc-alts__b:hover { border-color: var(--rc-accent); color: var(--rc-accent); }

/* ── disclosures ────────────────────────────────────────────────────── */
.rc-more { border-top: 1px solid var(--rc-line-soft); }
.rc-more__s {
  cursor: pointer; list-style: none;
  font-family: var(--rc-mono); font-size: 11px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--rc-faint);
  display: flex; align-items: center; gap: 8px; padding: 12px 24px;
  transition: color .12s ease;
}
.rc-more__s::-webkit-details-marker { display: none; }
.rc-more__s::before {
  content: ''; width: 5px; height: 5px; flex: 0 0 auto;
  border-right: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor;
  transform: rotate(-45deg); transition: transform .14s ease;
}
.rc-more[open] > .rc-more__s::before { transform: rotate(45deg); }
.rc-more__s:hover { color: var(--rc-accent); }
.rc-more > *:not(summary) { margin: 0 24px; }
.rc-more > *:last-child { margin-bottom: 20px; }

.rc-why { padding: 12px 0; border-top: 1px solid var(--rc-line-soft); }
.rc-why:first-of-type { border-top: 0; padding-top: 0; }
.rc-why__t { font-size: 13px; font-weight: 600; color: var(--rc-text); line-height: 1.45; }
.rc-why--blocker .rc-why__t { color: var(--rc-stop); }
.rc-why--warning .rc-why__t { color: var(--rc-warn); }
.rc-why__d { font-size: 12.5px; line-height: 1.65; color: var(--rc-dim); margin-top: 5px; }
.rc-why__r { font-family: var(--rc-mono); font-size: 10px; color: var(--rc-faint); margin-top: 6px; }
.rc-why__h {
  font-family: var(--rc-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--rc-faint); margin: 20px 0 6px;
}

.rc-calc { width: 100%; border-collapse: collapse; font-size: 12px; }
.rc-calc td { padding: 8px 0; border-top: 1px solid var(--rc-line-soft); }
.rc-calc tr:first-child td { border-top: 0; }
.rc-calc__l { color: var(--rc-dim); }
.rc-calc__v { font-family: var(--rc-mono); text-align: right; color: var(--rc-text); white-space: nowrap; }

.rc-doc__warn {
  padding: 11px 13px; border-radius: 7px;
  background: var(--rc-warn-bg); border: 1px solid var(--rc-warn);
  font-size: 12px; line-height: 1.6; color: var(--rc-text);
}
.rc-doc__text {
  font-family: var(--rc-mono); font-size: 11.5px; line-height: 1.85; color: var(--rc-text);
  white-space: pre-wrap; word-break: break-word;
  margin: 0; padding: 15px; border-radius: 8px;
  background: var(--rc-bg); border: 1px solid var(--rc-line);
  max-height: 320px; overflow-y: auto;
}
.rc-nodoc { font-size: 12px; line-height: 1.65; color: var(--rc-faint); }

/* ── empty state ────────────────────────────────────────────────────── */
.rc-empty {
  margin-top: 22px; padding: 18px 20px; border-radius: 10px;
  border: 1px dashed var(--rc-line); background: transparent;
  font-family: var(--rc-mono); font-size: 12px; line-height: 1.8; color: var(--rc-faint);
}
.rc-empty b { color: var(--rc-dim); font-weight: 500; }

@media (max-width: 560px) {
  .rc-body { padding: 18px 16px 16px; }
  .rc-more__s, .rc-more > *:not(summary) { padding-left: 16px; padding-right: 16px; margin: 0 16px; }
  .rc-more__s { margin: 0; }
  .rc-field__kbd { display: none; }
  .rc-ctl__in { max-width: 108px; }
}
