/* The free online Kiasu Leak Check (/leak-check). Loaded after styles.css and
   uses its tokens: paper, ink, gold, serif numbers, the mono labels and the
   dark "scanner" top. Answer buttons are .opt (styles.css already uses .chip
   for the floating labels in the homepage hero). */

/* The script shows and hides steps with the hidden attribute. Without this,
   any rule that sets display (buttons, grids) would win and show them anyway. */
.lc-page [hidden] { display: none !important; }

.lc-wrap { max-width: 50rem; }
.lc-hero { min-height: 0; display: block; padding: clamp(7rem, 11vw, 8.5rem) 0 clamp(5.5rem, 8vw, 7rem); }
.lc-hero .lc-wrap { position: relative; }
.lc-hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); margin: 1.1rem 0 1rem; }
.lc-hero .lead { max-width: 40rem; }
.lc-hero .hero-grid { mask-image: linear-gradient(#000, transparent 95%); -webkit-mask-image: linear-gradient(#000, transparent 95%); }
.lc-nav-links { display: flex; align-items: center; gap: 1.6rem; font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.lc-nav-links a:hover { color: var(--ink); }
.dark-top .nav:not(.scrolled) .lc-nav-links { color: rgba(251, 250, 247, 0.72); }
.dark-top .nav:not(.scrolled) .lc-nav-links a:hover { color: var(--white); }

.lc-main { padding: 0 0 clamp(3.5rem, 7vw, 6rem); margin-top: clamp(-4rem, -5vw, -3rem); position: relative; }
.lc-card {
  background: var(--white); border: 1px solid var(--rule); border-radius: 0.7rem;
  padding: clamp(1.4rem, 3.5vw, 2.2rem); margin-bottom: 1.2rem;
  box-shadow: 0 2.5rem 5rem -3rem rgba(20, 17, 15, 0.45);
}
.lc-card h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); line-height: 1.15; }
.lc-card h2:focus { outline: none; }
.lc-help { color: var(--muted); font-size: 0.95rem; margin-top: 0.5rem; max-width: 40rem; }
.lc-note, .lc-fine { font-size: 0.78rem; color: var(--muted); line-height: 1.55; margin-top: 1.4rem; }
.lc-fine { margin-top: 1rem; }

/* progress */
.lc-progress { height: 4px; border-radius: 2px; background: var(--paper-2); overflow: hidden; }
.lc-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transition: width .5s var(--ease); }
.lc-progress i.run { animation: lc-run 1.1s var(--ease) forwards; }
@keyframes lc-run { from { width: 0; } to { width: 100%; } }
.lc-count { font-family: var(--mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin: 0.9rem 0 0.8rem; }

/* answers */
.lc-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1.3rem; }
.opt {
  min-height: 48px; padding: 0.75rem 1rem; text-align: left; cursor: pointer;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 0.45rem;
  font-size: 0.95rem; line-height: 1.35; color: var(--ink-2);
  transition: border-color .2s, background .2s, box-shadow .2s, transform .2s var(--ease);
}
.opt:hover { border-color: var(--gold); background: var(--white); transform: translateY(-1px); }
.opt[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--white); box-shadow: 0 0 1.6rem -0.5rem rgba(244, 183, 64, 0.7); }
.opt:focus-visible, .lc-linkbtn:focus-visible, .lc-text:focus-visible, .lc-card input:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 2px; }
.lc-text { grid-column: 1 / -1; width: 100%; padding: 0.8rem 0.9rem; border: 1px solid var(--rule); border-radius: 0.45rem; background: var(--paper); font: inherit; color: var(--ink); resize: vertical; }
.lc-error { margin-top: 0.9rem; font-size: 0.88rem; font-weight: 600; color: var(--red); }
.lc-actions { display: flex; justify-content: space-between; gap: 0.8rem; margin-top: 1.6rem; }
.lc-actions .btn-ink { margin-left: auto; }

/* scanning */
.lc-scanning { display: grid; gap: 1rem; }
.scanline.dark { color: var(--gold); }

/* result */
.lc-result-head .kicker { margin-bottom: 0.7rem; }
.lc-book-now { margin-top: 1.2rem; }
.lc-hours { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 1.5rem; border-top: 2px solid var(--ink); }
.lc-hours > div { padding: 0.9rem 1rem 0.2rem 0; }
.lc-hours > div + div { padding-left: 1rem; border-left: 1px solid var(--rule); }
.lc-hours small, .lc-leak-grid small { display: block; font-family: var(--mono); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem; }
.lc-hours b { font-family: var(--serif); font-weight: 400; font-size: clamp(1.2rem, 2.4vw, 1.6rem); line-height: 1.15; }
#lc-cost-box b { color: var(--gold); }

.lc-leaks { list-style: none; margin: 0; padding: 0; }
.lc-leak-head { display: flex; align-items: baseline; gap: 0.9rem; }
.lc-rank { font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--gold); }
.lc-leak h3 { flex: 1; font-size: 1.4rem; }
.lc-level { font-family: var(--mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.25rem 0.6rem; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.lc-high { color: var(--red); }
.lc-medium { color: var(--gold); }
.lc-low { color: var(--green); }
.lc-meter { height: 6px; border-radius: 3px; background: var(--paper-2); overflow: hidden; margin: 1rem 0 1.1rem; }
.lc-meter i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transition: width 1.1s var(--ease); }
.lc-why { margin: 0 0 1.1rem; padding: 0; list-style: none; display: grid; gap: 0.4rem; font-size: 0.93rem; color: var(--ink-3); }
.lc-why li { position: relative; padding-left: 1.1rem; }
.lc-why li::before { content: ''; position: absolute; left: 0; top: 0.55rem; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--gold); }
.lc-leak-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; border-top: 1px solid var(--rule); padding-top: 1rem; font-size: 0.9rem; color: var(--ink-3); }

.lc-next-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 1.3rem; }
.lc-next-grid > div { display: flex; flex-direction: column; gap: 0.5rem; border-top: 2px solid var(--ink); padding-top: 0.9rem; }
.lc-next-grid h3 { font-family: var(--sans); font-weight: 600; font-size: 1rem; }
.lc-next-grid p { font-size: 0.86rem; color: var(--muted); }
.lc-next-grid .btn { margin-top: auto; align-self: flex-start; }

/* send form (light) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#lc-form { margin-top: 1.2rem; display: grid; gap: 0.9rem; }
.lc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
#lc-form label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--ink-2); margin-bottom: 0.35rem; }
#lc-form input[type="text"], #lc-form input[type="email"] { width: 100%; min-height: 46px; padding: 0.7rem 0.9rem; border: 1px solid var(--rule); border-radius: 0.4rem; background: var(--paper); font: inherit; color: var(--ink); }
#lc-form .lc-check { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 400; font-size: 0.86rem; color: var(--muted); line-height: 1.5; }
.lc-check input { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; accent-color: var(--ink); }
#lc-form .btn { justify-self: start; }
.lc-status { font-size: 0.86rem; color: var(--muted); min-height: 1.2em; }
#lc-thanks:focus { outline: none; }
.lc-restart { text-align: center; margin-top: 1.6rem; }
.lc-linkbtn { background: none; border: 0; padding: 0.4rem; cursor: pointer; font-size: 0.86rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.lc-linkbtn:hover { color: var(--ink); }
.lc-page .footer { padding-top: 2.2rem; }

@media (max-width: 700px) {
  .lc-options, .lc-fields, .lc-leak-grid, .lc-next-grid { grid-template-columns: 1fr; }
  .lc-hours { grid-template-columns: 1fr; }
  .lc-hours > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .lc-leak-head { flex-wrap: wrap; }
  .lc-nav-links a:first-child { display: none; }
}
