/* Design v5: Link Check, wherever the tool is (Link Check's page and Home: site-src/v5/lc.mjs), and its result card
   (tools/link-check/card.js, unchanged). Restyled only: every word, colour meaning and behaviour of the card is the tool's. The
   colours of a verdict are the only red, orange and grey here. The two lines the card draws in CSS (a Grey website that Link Check
   can't vouch for) are kept word for word, in English and Hinglish. */

/* Full check brings its consent and its live view into view just under the page's top edge (audit CODE-19): no room is kept. */
html:has(.is-lc) { scroll-padding-top: 0; }

/* ───────── the tool: language, box, button, privacy line, examples ───────── */
.lc-tool { display: grid; gap: var(--s4); max-width: var(--col); }
.lc-head { display: grid; justify-items: start; gap: var(--s3); }
.langs { display: inline-flex; border: 1px solid var(--ink-3); }
.langs button { min-height: var(--tap); padding: 0 var(--s4); border: 0; background: transparent; font-size: var(--t-small); font-weight: 700; }
.langs button + button { border-left: 1px solid var(--ink-3); }
.langs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.lc-form { display: grid; gap: var(--s3); }
.lc-form .field { display: grid; gap: var(--s2); }
.lc-form label { font-weight: 700; }
.lc-form .lc-input { width: 100%; min-height: calc(3 * 1.55em + 2 * var(--s3) + 4px); padding: var(--s3); border: 2px solid var(--ink); border-radius: 0; background: var(--field); font-size: var(--t-body); line-height: 1.55; resize: vertical; }
.lc-form .lc-input:focus { outline: 3px solid var(--ink); outline-offset: 2px; }
.lc-go { width: 100%; }
@media (min-width: 700px) { .lc-go { width: auto; min-width: 14rem; justify-self: start; } }
.lc-privacy { font-size: var(--t-fine); line-height: var(--lh-fine); color: var(--ink-2); }
/* its words are a block, so the height app.js holds while Full check works (min-height) applies: the line never gets shorter */
.lc-privacy > span { display: block; }
.lc-ex { display: grid; gap: var(--s2); }
.lc-ex-h { font-size: var(--t-small); font-weight: 700; }
.choices { display: flex; flex-wrap: wrap; gap: var(--s2); }
.choice { min-height: var(--tap); padding: 0 var(--s4); border: 1px solid var(--ink-3); border-radius: 0; background: transparent; font-size: var(--t-small); font-weight: 700; }
.choice:hover { border-color: var(--ink); }
.lc-paid a { display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--tap); font-weight: 700; }
.lc-paid svg, .lc-both svg { width: 20px; height: 20px; flex-shrink: 0; }
.lc-arrive svg { width: 24px; height: 24px; }
/* the row pattern on the page itself, an icon then the sentence: no box, no line (the owner, 23 October 2026) */
.lc-arrive:not([hidden]) { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--s3); align-items: start; }
.lc-status:empty { display: none; }
.lc-result:empty { display: none; }
.lc-result { margin-top: var(--s5); scroll-margin-top: 12px; }
.lc-both { display: none; gap: var(--s3); grid-template-columns: 20px minmax(0, 1fr); font-size: var(--t-small); line-height: var(--lh-small); color: var(--ink-2); }
.lc-both a { display: inline-block; padding-block: 10px; margin-block: -10px; color: var(--ink); font-weight: 700; }
.lc-result:has(.lc-card) + .lc-both { display: grid; }
.lc-error { padding: var(--s3) var(--s4); background: var(--red); color: var(--on-red); font-weight: 700; }
/* after the first check the opening folds away (app.js sets data-checked), so the box and the result sit near the top */
.lc-page[data-checked="true"] .lc-lead, .lc-page[data-checked="true"] .lc-ex { display: none; }
.lc-check, .home-lc { padding-top: var(--s5); }
.lc-lead { max-width: 34em; }

/* ───────── the card ───────── */
.lc-card { display: grid; gap: var(--s5); min-width: 0; padding-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.lc-card svg { fill: none; }
.lc-answer { display: grid; gap: var(--s5); }
.lc-block { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s2) var(--s3); align-items: start; padding: var(--s4); background: var(--grey); color: var(--on-grey); border: 1px solid var(--grey-line); }
.lc-block > svg { width: 32px; height: 32px; stroke-width: 2.2; grid-row: span 2; }
.lc-block > :not(svg) { grid-column: 2; }
.lc-card[data-level="red"] .lc-block { background: var(--red); color: var(--on-red); border-color: var(--red); }
.lc-card[data-level="amber"] .lc-block { background: var(--orange); color: var(--on-orange); border-color: var(--orange); }
/* Grey: a "?" in a disc in place of the tick, so no shape says "fine" */
.lc-card[data-level="grey"] .lc-block > svg { grid-area: 1 / 1 / span 2; }
.lc-card[data-level="grey"] .lc-block > svg path, .lc-card .lc-row > svg[data-icon="ok"] path { display: none; }
.lc-card[data-level="grey"] .lc-block::before { content: "?" / ""; grid-area: 1 / 1 / span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 19px; line-height: 1; }
.lc-title { font-size: clamp(24px, 6.6vw, 32px); line-height: 1.08; font-weight: 700; letter-spacing: -0.015em; }
.lc-title span { display: block; }
.lc-title:focus, .lc-title:focus-visible { outline: none; }
.lc-main { font-size: var(--t-body); line-height: 1.45; }
.lc-nof { font-size: var(--t-small); font-weight: 700; }

/* where the link really goes: the made-up part struck through, the website it opens large, the page on it quiet */
.lc-where { display: grid; gap: var(--s2); }
.lc-where-h { font-size: var(--t-small); font-weight: 700; color: var(--ink-2); }
.lc-plate { display: grid; gap: var(--s1); padding-block: var(--s3); border-block: 1px solid var(--line); min-width: 0; }
.lc-plate-rows { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2) var(--s3); align-items: baseline; }
.lc-plate-front, .lc-plate-path { font-size: var(--t-body); overflow-wrap: anywhere; min-width: 0; }
.lc-plate-front { text-decoration: line-through; text-decoration-color: var(--red-text); text-decoration-thickness: 2px; }
.lc-plate-path { color: var(--ink-2); }
.lc-plate-real { justify-self: start; font-size: clamp(22px, 6vw, 30px); line-height: 1.15; font-weight: 700; overflow-wrap: anywhere; min-width: 0; text-decoration: underline; text-decoration-color: var(--red-text); text-decoration-thickness: 3px; text-underline-offset: 0.18em; }
.lc-card[data-level="amber"] .lc-plate-real { text-decoration-color: var(--orange-text); }
.lc-card[data-level="grey"] .lc-plate-real { text-decoration: none; }
.lc-plate-l { font-size: var(--t-fine); color: var(--ink-2); text-align: right; }
.lc-plate-l-real { font-weight: 700; color: var(--red-text); }
.lc-card[data-level="amber"] .lc-plate-l-real { color: var(--orange-text); }
.lc-card[data-level="grey"] .lc-plate-l-real { color: var(--ink); }
.lc-plate-rows > .lc-plate-real, .lc-plate-rows > .lc-plate-l-real { grid-column: 1 / -1; }
.lc-plate-rows > .lc-plate-l-real { text-align: left; }
.lc-plate-note { display: flex; align-items: flex-start; gap: var(--s2); font-size: var(--t-small); }
.lc-plate-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; stroke-width: 2.2; }
.lc-plate-explain { font-size: var(--t-small); color: var(--ink-2); }
.lc-card[data-level="grey"] .lc-plate:not(:has(.lc-plate-note)) { padding-inline: var(--s3); border: 1px dashed var(--grey-line); }
.lc-card[data-level="grey"] .lc-plate:not(:has(.lc-plate-note)) .lc-plate-real { color: var(--ink-2); font-size: clamp(18px, 4.8vw, 21px); }
.lc-card[data-level="grey"] .lc-plate:not(:has(.lc-plate-note))::after { content: "Link Check can't tell whether this website is real."; display: block; margin-top: var(--s1); font-weight: 700; font-size: var(--t-small); color: var(--ink); }
:lang(hi-Latn) .lc-card[data-level="grey"] .lc-plate:not(:has(.lc-plate-note))::after, .lc-card[data-level="grey"]:lang(hi-Latn) .lc-plate:not(:has(.lc-plate-note))::after { content: "Link Check nahi bata sakta ki yeh website asli hai ya nahi."; }

/* what to do, and the buttons */
.lc-do { font-size: var(--t-body); font-weight: 700; }
.lc-sure { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--s2); font-size: var(--t-fine); line-height: var(--lh-fine); color: var(--ink-2); }
.lc-sure svg { width: 20px; height: 20px; }
.lc-sure a { display: inline-block; padding-block: var(--s3); margin-block: calc(-1 * var(--s3)); color: var(--ink); font-weight: 700; white-space: nowrap; }
.lc-buttons { display: flex; flex-wrap: wrap; gap: var(--s3); }
.lc-buttons > .lc-btn { flex: 1 1 190px; }
.lc-buttons > :not(.lc-btn) { flex: 1 1 100%; min-width: 0; }
.lc-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: var(--s2) var(--s4); border: 2px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); font-weight: 700; font-size: var(--t-body); line-height: 1.25; text-align: center; }
.lc-primary { background: var(--ink); color: var(--bg); }
.lc-card[data-level="grey"] .lc-buttons > .lc-primary { background: transparent; color: var(--ink); }
/* the nudge (a Grey result, Full check first): Full check is visibly the main button; colour only */
.lc-card[data-level="grey"] .lc-buttons > .lc-full.lc-primary { background: var(--ink); color: var(--bg); }
.lc-btn-sub { font-size: var(--t-fine); font-weight: 400; }
.lc-full-note:empty { display: none; }
.lc-until, .lc-next { font-size: var(--t-small); color: var(--ink-2); }
.lc-call { display: inline-flex; align-items: center; gap: var(--s2); flex-shrink: 0; min-height: var(--tap); padding: var(--s1) var(--s4); border: 2px solid var(--ink); color: var(--ink); font-weight: 700; text-decoration: none; }
.lc-call svg { width: 20px; height: 20px; }

/* the folds inside the card, and the page's own Questions: thin lines, a real button, + and − */
.lc-folds { display: grid; border-top: 1px solid var(--line); }
.lc-fold { border-bottom: 1px solid var(--line); }
.lc-fold-h { font: inherit; }
.lc-fold-btn { position: relative; display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 56px; padding: var(--s2) 0; border: 0; background: none; text-align: left; font-weight: 700; font-size: var(--t-body); }
.lc-fold-btn > span { margin-right: auto; }
.lc-fold-btn svg { width: 24px; height: 24px; flex-shrink: 0; }
.lc-fold-btn [data-icon="minus"] { position: absolute; right: 0; top: 0; bottom: 0; margin: auto 0; }
.lc-fold-btn[aria-expanded="true"] [data-icon="plus"], .lc-fold-btn[aria-expanded="false"] [data-icon="minus"] { visibility: hidden; }
.lc-fold-in { display: grid; gap: var(--s4); padding-bottom: var(--s5); max-width: var(--col); }
.lc-fold-in[hidden] { display: none; }
.lc-help { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s3); border-block: 1px solid var(--line); }
.lc-help .lc-fold-h { flex: 1 1 9em; min-width: 0; }
.lc-help .lc-fold-in { flex: 1 1 100%; min-width: 0; }
.lc-help .lc-call { margin-block: var(--s1); }
.lc-help:has(.lc-fold-btn[aria-expanded="true"]) .lc-call { display: none; }
.lc-region { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); font-size: var(--t-small); font-weight: 700; }
.lc-region-pick { min-height: var(--tap); max-width: 100%; padding: 0 var(--s3); border: 2px solid var(--ink-3); border-radius: 0; background: var(--field); font-size: var(--t-small); font-weight: 700; }

/* rows: an icon, a bold label, a value, one small grey line */
.lc-row { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--s1) var(--s3); align-items: start; }
.lc-row > svg { width: 24px; height: 24px; }
.lc-row > p { overflow-wrap: anywhere; }
.lc-row > p > strong:first-child { display: block; font-weight: 600; }
.lc-row .lc-from, .lc-row .lc-limit { grid-column: 2; }
.lc-from { display: block; font-size: 14px; color: var(--ink-2); }
.lc-idea, .lc-limit, .lc-why, .lc-instruction { font-size: var(--t-fine); line-height: var(--lh-fine); color: var(--ink-2); }
.lc-row .lc-limit { font-size: 14px; }
.lc-sub { font-size: var(--t-small); font-weight: 700; color: var(--ink-2); }
.lc-note { padding-block: var(--s3); border-block: 1px solid var(--line); font-size: var(--t-small); }
.lc-notes { display: grid; gap: var(--s3); }
.lc-panel, .lc-actions, .lc-share, .lc-cleanbox, .lc-others { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); }
.lc-share .lc-btn, .lc-cleanbox .lc-btn { align-self: stretch; }
/* no bullets or numbers drawn by the browser anywhere in the card (the owner, 23 October 2026: one row pattern, no bullets) */
.lc-card ol, .lc-card ul { list-style: none; }
.lc-steps { list-style: none; counter-reset: step; display: grid; gap: var(--s4); }
.lc-steps li { counter-increment: step; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); padding-left: var(--s6); }
.lc-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; font-weight: 700; }
.lc-acts, .lc-others ul { list-style: none; display: grid; gap: var(--s2); }
.lc-link-btn { display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--tap); padding: var(--s2) var(--s4); border: 1px solid var(--ink-3); border-radius: 0; background: transparent; font-size: var(--t-small); font-weight: 700; color: var(--ink); text-align: left; text-decoration: none; }
.lc-link-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.lc-lvl { margin-left: auto; padding-left: var(--s2); font-weight: 400; color: var(--ink-2); }
.lc-parts { list-style: none; display: grid; gap: var(--s2); }
.lc-parts li { display: grid; gap: 2px; }
.lc-code { font-family: var(--mono); font-size: 14px; padding: 2px var(--s1); background: var(--tint); overflow-wrap: anywhere; }
.lc-label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.lc-clean { width: 100%; padding: var(--s2) var(--s3); border: 1px solid var(--line); font-family: var(--mono); font-size: 14px; }
.lc-until, .lc-anon { color: var(--ink-2); }
.lc-neutral .lc-main { font-size: var(--t-body); }

/* the last line: Helpful? Yes / No, Wrong result?, and what is counted */
.lc-last { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); font-size: var(--t-small); color: var(--ink-2); }
.lc-helpful, .lc-yn { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.lc-yn-btn { min-width: 56px; min-height: var(--tap); border: 1px solid var(--ink-3); border-radius: 0; background: transparent; font-size: var(--t-small); font-weight: 700; color: var(--ink); }
.lc-yn-btn[disabled] { color: var(--ink-2); cursor: default; }
.lc-thanks { font-weight: 700; color: var(--ink); }
.lc-thanks:empty { display: none; }
.lc-wrong { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--ink-2); }
.lc-anon { flex-basis: 100%; font-size: 14px; }

/* "Report this link": what is kept, always in view above the button; then the line it says after the tap, and Turnstile's box if it asks */
.lc-report { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); }
.lc-report .lc-btn[disabled] { border-color: var(--ink-3); color: var(--ink-2); cursor: default; }
.lc-report-say { font-size: var(--t-small); font-weight: 700; }
.lc-report-say:empty, .lc-report-human:empty { display: none; }
.lc-report-human { max-width: 100%; overflow-x: auto; }

/* Full check's consent and live view bring their own stylesheets; here they take this look's surface and edges */
.is-lc .lc-card .lc-consent, .is-lc .lc-card .lc-pv-sites, .is-lc .lc-card .lc-pv-no { background: var(--bg); border-radius: 0; }
.is-lc .lc-card .lc-quiet { border-color: var(--ink-3); }
@media (max-width: 699.98px) { .is-lc .lc-card .lc-consent { margin-inline: -6px; padding: 20px 14px; } }
.is-lc .lc-pv-time li[data-state="done"]::after { border-color: var(--bg); }

/* motion: a new result and an opened fold fade in, once, short; nothing with reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .lc-card.lc-new { animation: v5-in 180ms ease-out; }
  .lc-in { animation: v5-in 160ms ease-out; }
}
@keyframes v5-in { from { opacity: 0; } }
