/* The free tools (fair housing checker, MLS character counter). Colours come from brand.css; layout pieces from style.css. */
:root { --sev-high: #b3261e; --sev-high-bg: #fdecea; --sev-check: #8a5a00; --sev-check-bg: #fff4d6; --sev-mls: #2f4f8f; --sev-mls-bg: #e9effb; --sev-ok: #1f6b43; --sev-ok-bg: #e7f4ec; --sev-verify: #5b5b60; --sev-verify-bg: #f0f0ee; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sev-high: #ff9b8f; --sev-high-bg: #3a1714; --sev-check: #f2c66b; --sev-check-bg: #352a10; --sev-mls: #9db8f0; --sev-mls-bg: #172238; --sev-ok: #8fd0a9; --sev-ok-bg: #12291c; --sev-verify: #b9b9bd; --sev-verify-bg: #222327; } }
:root[data-theme="dark"] { --sev-high: #ff9b8f; --sev-high-bg: #3a1714; --sev-check: #f2c66b; --sev-check-bg: #352a10; --sev-mls: #9db8f0; --sev-mls-bg: #172238; --sev-ok: #8fd0a9; --sev-ok-bg: #12291c; --sev-verify: #b9b9bd; --sev-verify-bg: #222327; }

.fhc-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.fhc { padding: 20px; display: grid; gap: 12px; }
.fhc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fhc-head label { font: 600 17px var(--display); letter-spacing: -.01em; }
.fhc-head .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.fhc textarea { min-height: 230px; font-size: 16px; line-height: 1.55; }
.fhc-private { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin: 0; }
.fhc-private svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* the counter */
.fhc-meter { display: grid; gap: 8px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.fhc-counts { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; font-size: 14px; color: var(--muted); }
.fhc-counts b { font: 600 24px/1 var(--display); color: var(--ink); letter-spacing: -.02em; margin-right: 4px; }
.fhc-limit-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 14px; }
.fhc-limit-row select, .fhc-limit-row input { width: auto; padding: 7px 10px; font-size: 15px; }
.fhc-limit-row input { width: 7.5em; }
#c-left { font-weight: 600; }
.fhc-track { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.fhc-track i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.fhc-meter.near .fhc-track i { background: var(--sev-check); } .fhc-meter.near #c-left { color: var(--sev-check); }
.fhc-meter.over .fhc-track i { background: var(--sev-high); } .fhc-meter.over #c-left { color: var(--sev-high); }
.fhc-notes { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.fhc-notes:empty { display: none; }
.fhc-tools { display: flex; flex-wrap: wrap; gap: 8px; }

/* the marked-up text */
.fhc-view { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; line-height: 1.75; font-size: 15px; min-height: 90px; }
.fhc-view mark { border-radius: 4px; padding: 1px 2px; cursor: pointer; color: inherit; }
.fhc-view mark:focus-visible { outline: 2px solid var(--glint); outline-offset: 1px; }
mark.sev-high { background: var(--sev-high-bg); box-shadow: inset 0 -2px 0 var(--sev-high); }
mark.sev-check { background: var(--sev-check-bg); box-shadow: inset 0 -2px 0 var(--sev-check); }
mark.sev-mls { background: var(--sev-mls-bg); box-shadow: inset 0 -2px 0 var(--sev-mls); }
mark.sev-verify { background: transparent; box-shadow: inset 0 -1px 0 var(--sev-verify); }
mark.sev-ok { background: transparent; box-shadow: inset 0 -1px 0 var(--sev-ok); }
.fhc-view .cut { opacity: .45; text-decoration: line-through; text-decoration-color: var(--sev-high); }
.fhc-cutnote { font-size: 13px; color: var(--sev-high); margin: -4px 0 0; }

/* summary and findings */
.fhc-sum { display: flex; flex-wrap: wrap; gap: 6px; min-height: 8px; }
.chip { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.chip.sev-high { background: var(--sev-high-bg); color: var(--sev-high); }
.chip.sev-check { background: var(--sev-check-bg); color: var(--sev-check); }
.chip.sev-mls { background: var(--sev-mls-bg); color: var(--sev-mls); }
.chip.sev-verify { background: var(--sev-verify-bg); color: var(--sev-verify); }
.chip.sev-ok { background: var(--sev-ok-bg); color: var(--sev-ok); }
.fhc-clear { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--sev-ok-bg); color: var(--ink); font-size: 15px; }
.fhc-list { display: grid; gap: 18px; }
.fd-group { display: grid; gap: 10px; }
.fd-group h3, .fd-group summary { font: 600 15px var(--display); letter-spacing: -.01em; margin: 0; }
details.fd-group { border: 0; padding: 0; }
details.fd-group summary { font-size: 15px; }
details.fd-group[open] summary { margin-bottom: 10px; }
.fd-group .n { color: var(--muted); font-weight: 500; }
.fd { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--sev-verify); border-radius: 10px; padding: 12px 14px; transition: box-shadow .3s; }
.fd.sev-high { border-left-color: var(--sev-high); } .fd.sev-check { border-left-color: var(--sev-check); } .fd.sev-mls { border-left-color: var(--sev-mls); } .fd.sev-ok { border-left-color: var(--sev-ok); }
.fd.flash { box-shadow: 0 0 0 3px color-mix(in srgb, var(--glint) 40%, transparent); }
.fd-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; margin: 0 0 4px; }
.fd-top q { font-weight: 600; }
.fd-top .cls { font-size: 12px; color: var(--muted); }
.fd .why { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.alts { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.alt { border: 1px solid var(--line); background: var(--soft); color: var(--ink); border-radius: 999px; padding: 4px 11px; font: 500 13px var(--sans); cursor: pointer; }
.alt:hover { border-color: var(--ink); }
.alt-text { font-size: 13px; background: var(--soft); border-radius: 8px; padding: 3px 8px; }
.link-btn { margin-top: 8px; border: 0; background: none; padding: 0; color: var(--muted); font: 500 13px var(--sans); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.fhc-empty { font-size: 14px; color: var(--muted); margin: 0; }

/* page content */
.legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.legend > div { border-top: 3px solid var(--sev-verify); padding-top: 10px; }
.legend .l-high { border-color: var(--sev-high); } .legend .l-check { border-color: var(--sev-check); } .legend .l-mls { border-color: var(--sev-mls); } .legend .l-ok { border-color: var(--sev-ok); }
.legend p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.words td:first-child { white-space: nowrap; }
.disclaimer { font-size: 13px; color: var(--muted); border-left: 3px solid var(--line); padding: 6px 0 6px 14px; max-width: 52em; }
.try-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.sources { font-size: 13px; color: var(--muted); }
.sources a { overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .fhc-grid { grid-template-columns: 1fr; }
  .legend { grid-template-columns: 1fr 1fr; }
  .try-card { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .fhc { padding: 14px; } .legend { grid-template-columns: 1fr; } .fhc textarea { min-height: 190px; } }

/* style.css .small (muted text) would grey out .btn.small labels */
.fhc .btn.small:not(.ghost) { color: var(--accent-ink); font-size: 14px; }
.fhc .btn.ghost.small { font-size: 14px; }
@media (min-width: 861px) { .fhc-grid > .fhc { position: sticky; top: 80px; } }
