/* free_calc.css — the phone-first free-calculator surface (T-LITE-3).
   Loaded ONLY on /calculators/* so the marketing pages pay nothing for it.

   The brief, in the owner's words: "the value for a cellphone app would be to
   filter and then open the direct PDF links on the phone." So the design rules
   are not stylistic:

     * ONE column at every width. There is no desktop layout to fall back to,
       because the user is standing up.
     * Every tappable thing is >= 44 px tall, and the two document buttons are
       full-width — they are what the page exists for.
     * The result list starts ABOVE THE FOLD after a search. The form collapses
       to a single line once it has been used.
     * Nothing is truncated. Citations, notices and the search scope go into
       <details>, which is expandable, offline, and needs no JavaScript.
     * No horizontal scroll at 375 px. Long approval numbers wrap; nothing is
       laid out in a table.                                                    */

.fc {
  --fc-gap: 12px;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 64px;
}
.fc h1 { font-size: clamp(1.5rem, 5.5vw, 2.1rem); margin-bottom: .35em; }
.fc .fc-blurb { color: var(--ink-2); margin-bottom: 20px; }

/* Pocket mode — the same page, signed in (D-LITE-7). Understated on purpose:
   it announces that the site came from their project, and nothing else. It is
   not a "premium" skin, because the free page is not the degraded one. */
.fc-pocket {
  background: var(--brand-50);
  border: 1px solid #cfe3ff;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 0 0 16px;
  font-size: .9rem;
  color: var(--ink-2);
}
.fc-pocket p { margin: 0; }

/* A submit button that reads as a link — it posts the form to /remember, so it
   must be a real button, not an <a> that would lose the chosen county. */
.fc-linkbtn {
  background: none; border: 0; padding: 0;
  font: inherit; color: var(--brand); font-weight: 600;
  text-decoration: underline; cursor: pointer;
  min-height: 44px;
}

/* ── The form ────────────────────────────────────────────────────────────── */
.fc-form {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 20px;
  display: grid;
  gap: var(--fc-gap);
}
.fc-form label { font-weight: 600; color: var(--ink); font-size: .9rem; display: block; margin-bottom: 4px; }
.fc-form input[type="search"],
.fc-form input[type="text"],
.fc-form input[type="date"],
.fc-form select {
  width: 100%;
  min-height: 48px;               /* thumb target, not a mouse target */
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;                /* < 16px makes iOS Safari zoom on focus */
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.fc-form input[type="search"] { font-size: 17px; font-weight: 600; }
.fc-row { display: grid; gap: var(--fc-gap); grid-template-columns: 1fr 1fr; }
.fc-check {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; font-weight: 600; color: var(--ink);
}
.fc-check input { width: 22px; height: 22px; accent-color: var(--brand); }
.fc-form .btn { min-height: 52px; }
.fc-form .fc-hint { font-size: .85rem; color: var(--muted); margin: -4px 0 0; }

/* Once a search has run, the form folds away so results are above the fold. */
.fc-fold > summary {
  cursor: pointer; list-style: none; padding: 12px 14px;
  min-height: 48px; display: flex; align-items: center; gap: 8px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); font-weight: 700; color: var(--ink);
  margin-bottom: 20px;
}
.fc-fold > summary::-webkit-details-marker { display: none; }
.fc-fold > summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.fc-fold[open] > summary { margin-bottom: 12px; }
.fc-fold[open] > summary::after { content: "▴"; }

/* ── Headline + funnel ───────────────────────────────────────────────────── */
.fc-headline {
  font-size: 1.02rem; color: var(--ink); font-weight: 600;
  margin: 0 0 14px; line-height: 1.45;
}
.fc-error {
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
  padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px;
}

/* Words the search read as filters, and the jurisdiction answer. Both are
   things the user did not type into a dropdown, so both are stated visibly
   rather than left to be inferred from a changed result count. */
.fc-readas { margin: -6px 0 14px; }
.fc-readas .fc-note { margin: 0 0 4px; }

.fc-juris {
  border-left: 4px solid var(--ok);
  background: #ecfdf5;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin: 0 0 16px;
  font-size: .92rem;
  color: #065f46;
}
.fc-juris p { margin: 0; }
.fc-cite-more > summary {
  cursor: pointer; min-height: 44px; display: flex; align-items: center;
  font-weight: 600; font-size: .86rem; opacity: .8;
}
.fc-cite-more p { font-size: .84rem; padding-bottom: 6px; }
/* Inside the HVHZ the answer is a constraint, not a reassurance. */
.fc-juris-hvhz { border-left-color: var(--warn); background: #fffbeb; color: #92400e; }
/* An unrecognised county answered nothing — never render that as a green tick. */
.fc-juris-unknown { border-left-color: var(--muted); background: var(--bg-soft); color: var(--ink-2); }

/* ── One result ──────────────────────────────────────────────────────────── */
.fc-list { display: grid; gap: 14px; }
.fc-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.fc-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.15rem; font-weight: 700; color: var(--ink);
  overflow-wrap: anywhere;        /* a long number wraps; the page never scrolls */
}
.fc-mfr { font-weight: 600; color: var(--ink); margin-top: 2px; }
.fc-prod { color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }

.fc-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
/* A determination's VALUE, on its own line and free to wrap.
   ⚠ Added for the FIFTH calculator, and the reason is worth keeping: pills are
   `white-space: nowrap` on purpose — a status or a DCR is a token and must not
   break across lines. `lite_feeder_01` put the engine's `value` in one, and this
   engine's values are frequently whole sentences: "Neutral ISOLATED; EGC bonded
   to enclosure; no bonding screw" measured 416 px on one unbreakable line and
   dragged the page to 462 px against a 356 px viewport — 106 px of horizontal
   scroll at 375 px (`T-LFD-2`). A value goes here; only tokens go in a pill. */
.fc-value {
  font-weight: 600; color: var(--ink);
  margin: 10px 0 0;
  overflow-wrap: anywhere;
}
.fc-pill {
  font-size: .78rem; font-weight: 700; letter-spacing: .01em;
  padding: 5px 10px; border-radius: 999px; border: 1px solid transparent;
  white-space: nowrap;
}
.fc-pill-ok    { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.fc-pill-warn  { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.fc-pill-stop  { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.fc-pill-plain { background: var(--bg-soft-2); color: var(--ink-2); border-color: var(--line); }

/* The two buttons the whole tool exists to deliver. */
.fc-docs { display: grid; gap: 8px; }
.fc-doc {
  display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 12px 14px;
  border-radius: var(--radius-sm); font-weight: 700;
  background: var(--brand); color: #fff; box-shadow: var(--shadow-sm);
}
.fc-doc:hover { background: var(--brand-700); color: #fff; text-decoration: none; }
.fc-doc-2 { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.fc-doc-2:hover { background: var(--bg-soft); color: var(--ink); }
.fc-doc small { font-weight: 500; opacity: .85; }

.fc-more { margin-top: 10px; }
.fc-more > summary {
  cursor: pointer; min-height: 44px; display: flex; align-items: center;
  font-weight: 600; color: var(--brand); font-size: .92rem;
}
.fc-more ul { display: grid; gap: 4px; padding: 4px 0; }
/* ⚠ The document list is a TAP TARGET LIST, not prose. Measured in Chrome at
   375 px these links were 20 px tall — 50 of them on one results page, stacked,
   at the exact moment the user is trying to hit one specific PDF one-handed.
   `display:block` + padding is what makes the whole row tappable rather than
   just the text run; the 44 px floor is the same one the buttons above use. */
.fc-more li a {
  display: block;
  min-height: 44px;
  padding: 11px 4px;
  overflow-wrap: anywhere;
}
.fc-more li a:hover { background: var(--bg-soft); border-radius: var(--radius-sm); }
.fc-note { font-size: .88rem; color: var(--ink-2); margin: 8px 0 0; }
.fc-cite {
  font-size: .82rem; color: var(--muted); margin-top: 8px;
  overflow-wrap: anywhere;
}

/* ── The page's standing statements ──────────────────────────────────────── */
.fc-refusals {
  margin-top: 28px; padding: 14px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.fc-refusals h2 { font-size: 1.05rem; margin-bottom: .5em; }
.fc-refusals li { margin-bottom: 10px; padding-left: 20px; position: relative; color: var(--ink-2); }
.fc-refusals li::before { content: "•"; position: absolute; left: 6px; color: var(--warn); font-weight: 700; }
.fc-scope { margin-top: 16px; }
.fc-scope > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--ink-2); }
.fc-scope p { font-size: .9rem; color: var(--ink-2); margin-top: 6px; }

.fc-upsell {
  margin-top: 28px; padding: 18px;
  border: 1px solid var(--brand-50); background: var(--brand-50);
  border-radius: var(--radius);
}
.fc-upsell h2 { font-size: 1.1rem; margin-bottom: .4em; }
.fc-upsell p { color: var(--ink-2); }
.fc-upsell .btn { min-height: 48px; }

.fc-pager { display: flex; gap: 10px; margin-top: 20px; }
.fc-pager .btn { flex: 1; min-height: 48px; }

/* ── The index of free tools ─────────────────────────────────────────────── */
.fc-index { display: grid; gap: 14px; margin-top: 20px; }
.fc-index a.fc-card { display: block; color: inherit; }
.fc-index a.fc-card:hover { text-decoration: none; border-color: var(--brand); }
.fc-index h2 { font-size: 1.15rem; margin-bottom: .35em; }
.fc-index p { color: var(--ink-2); margin: 0; }

/* A wider screen gets more room, never a second column: the layout is the
   layout, and one that reflows into columns stops being the thing that was
   tested at 375 px. */
/* ── The calculator pages ────────────────────────────────────────────────── */
/* Added for the SECOND lite module. A search page's payload is a link; a
   calculator's payload is a number, so it gets the treatment the document
   buttons get on the search page: the biggest thing on the screen, above the
   fold, with its basis immediately under it. */

.fc-status-ok      { color: #14532d; }
.fc-status-action  { color: #991b1b; }
/* ⚠ ANALYSIS is NOT a pass and must not be green. It means quantities were
   computed and no compliance check could run. */
.fc-status-analysis     { color: #92400e; }
.fc-status-unavailable  { color: #92400e; }
.fc-status-input-error  { color: #991b1b; }
/* ⚠ An OK that carries warnings is not painted green. Measured at 375 x 812: a
   run with no dp is OK on its checks and "R IS NOT DETERMINED" in its warnings,
   and green above amber reads as a verdict on the whole answer. The word stays
   the engine's; only the colour is the page's to choose. */
.fc-status-ok.fc-status-warned { color: #92400e; }

.fc-answer { display: grid; gap: var(--fc-gap); margin: 4px 0 16px; }
.fc-answer-big {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.fc-answer-label { display: block; font-size: .85rem; color: var(--muted); }
.fc-answer-big strong {
  display: block;
  font-size: clamp(1.9rem, 9vw, 2.6rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
/* "lower bound" rides on the number rather than under it — a caption is what
   gets cropped in a screenshot, and this qualifier changes what R means. */
.fc-answer-plus { font-size: .95rem; font-weight: 600; color: #92400e; }
.fc-answer-sub { display: block; font-size: .85rem; color: var(--ink-2); margin-top: 4px; }

/* The engine's warnings sit ABOVE the arithmetic. On this page the single most
   important sentence — "R IS NOT DETERMINED" — is a warning. */
.fc-warnings {
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
  border-radius: var(--radius-sm);
  padding: 4px 12px 12px;
  margin: 0 0 16px;
}

/* ⚠ The engine's SVGs carry width/height attributes (460x300), which is wider
   than a 375 px viewport. Without this the diagram alone would break the
   no-horizontal-scroll rule the whole surface is measured against. */
.fc-diagram { margin: 16px 0; overflow-x: auto; }
.fc-diagram svg { max-width: 100%; height: auto; display: block; }

/* ── The property list ───────────────────────────────────────────────────── */
/* Added for the THIRD lite module. A section-properties answer is ~16 rows of
   label + number, and the obvious layout — a two-column table — is the one
   thing that reliably breaks the no-horizontal-scroll rule at 375 px, because
   "Second moment Ix (strong axis)" will not share a line with a number and a
   unit. So it is a definition list that stacks the number under the label at
   phone width and puts them on one line only when there is room. */
.fc-props { display: grid; gap: 0; margin: 4px 0 20px; }
.fc-prop {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 4px 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.fc-prop:first-child { border-top: 1px solid var(--line); }
.fc-prop:nth-child(odd) { background: var(--bg-soft); }
.fc-prop dt { color: var(--ink-2); font-size: .9rem; flex: 1 1 60%; }
.fc-prop dd {
  margin: 0; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}
.fc-prop-u { font-weight: 500; color: var(--muted); font-size: .85em; }
/* The marker on a value that is zero by symmetry and came back as round-off.
   Not a warning colour: nothing is wrong with the answer, only with printing
   1e-17 at somebody. */
.fc-dagger { color: var(--muted); font-weight: 500; }

/* Published beside computed. ⚠ The row that disagrees is marked, but the block
   renders the same way whether the two agree or not — an agreement shown is
   evidence, and only ever showing the comparison when it fails would make its
   absence unreadable. */
.fc-props-cc .fc-prop dd { font-weight: 600; font-size: .9rem; }
.fc-cc-pub { color: var(--ink); font-weight: 700; }
.fc-cc-ours { color: var(--ink-2); }
.fc-cc-vs { font-family: inherit; font-weight: 500; color: var(--muted); font-size: .8rem; }
.fc-cc-d { color: var(--ink-2); }
.fc-prop-off { border-left: 3px solid var(--warn); background: #fffbeb; }
.fc-prop-off .fc-cc-d { color: #92400e; font-weight: 700; }

@media (min-width: 700px) {
  .fc { padding: 32px 24px 80px; }
  .fc-docs { grid-template-columns: 1fr 1fr; }
  .fc-answer { grid-template-columns: 1fr 1fr; }
  .fc-prop dt { flex: 0 1 auto; }
  .fc-prop dd { margin-left: auto; }
}
