/* ToolsHub — public site styles. One bold element: the LCD-style result display. */
:root {
  --paper: #f5f7fa;
  --surface: #ffffff;
  --ink: #15202b;
  --muted: #5b6673;
  --line: #dce1e7;
  --accent: #2f5bea;
  --accent-ink: #ffffff;
  --lcd: #12343b;
  --lcd-ink: #cff5e7;
  --lcd-dim: #86b8a8;
  --warn: #9a4a12;
  --radius-s: 6px;
  --radius-m: 12px;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f161c; --surface: #16202a; --ink: #e8edf2; --muted: #9aa7b4; --line: #2a3744;
    --accent: #7c9bff; --accent-ink: #0f161c; --lcd: #0b2227; --lcd-ink: #c4f3e2; --lcd-dim: #6f9e90; --warn: #f0a46a;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.6 var(--font-body);
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 700; }
h2 { font-size: 1.45rem; font-weight: 650; margin-top: 2.2em; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0 0 1em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.prose { max-width: 68ch; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--lcd); color: var(--lcd-ink); display: grid; place-items: center; font-size: .95rem; }
.header-nav { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.header-nav a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.country-pick select {
  font: inherit; font-size: .9rem; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink); max-width: 170px;
}
@media (max-width: 560px) { .header-nav .hide-sm { display: none; } }

/* Breadcrumbs */
.crumbs { font-size: .88rem; color: var(--muted); margin: 18px 0 8px; }
.crumbs a { color: var(--muted); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }

/* Home */
.hero { padding: 40px 0 28px; display: grid; gap: 28px; grid-template-columns: 1.1fr 1fr; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); max-width: 14ch; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 42ch; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-top: 24px; } }
.quick { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; }
.quick-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 1.05rem; }
.quick-row .input-wrap { width: 110px; flex: none; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 36px; }
.section-head h2 { margin: 0; }
.tool-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 2px 28px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tool-list a { display: flex; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.tool-list a:hover .tl-name { color: var(--accent); }
.tl-icon { font-size: 1.3rem; width: 32px; flex: none; text-align: center; }
.tl-name { font-weight: 700; display: block; }
.tl-desc { color: var(--muted); font-size: .92rem; display: block; line-height: 1.4; }
.featured { min-height: 120px; }
.featured.loading .tool-list { opacity: .5; }

/* Tool page */
.tool-head { margin: 4px 0 18px; }
.tool-head .lead { color: var(--muted); font-size: 1.08rem; max-width: 60ch; }
.tool-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 820px) { .tool-shell { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: .95rem; }
.field .hint { color: var(--muted); font-size: .85rem; }
.input-wrap { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); overflow: hidden; }
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.input-wrap .affix { padding: 0 12px; display: grid; place-items: center; color: var(--muted); font-size: .9rem; background: var(--surface); }
input, select, textarea { font: inherit; color: var(--ink); }
.input-wrap input, .input-wrap select { border: 0; background: transparent; padding: 10px 12px; width: 100%; min-width: 0; outline: none; font-variant-numeric: tabular-nums; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { font-weight: 400; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .92rem; }
.seg input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* The LCD result display */
.lcd {
  background: var(--lcd); color: var(--lcd-ink); border-radius: var(--radius-m); padding: 20px 22px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.06), inset 0 -3px 0 rgba(0,0,0,.25);
  position: sticky; top: 12px;
}
.lcd-primary-label { color: var(--lcd-dim); font-size: .9rem; }
.lcd-primary { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 6vw, 2.9rem); line-height: 1.1; font-variant-numeric: tabular-nums; word-break: break-word; margin: 2px 0 14px; }
.lcd-rows { display: grid; gap: 6px; border-top: 1px dashed color-mix(in srgb, var(--lcd-dim) 50%, transparent); padding-top: 12px; }
.lcd-row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.lcd-row span:first-child { color: var(--lcd-dim); }
.lcd-row span:last-child { font-weight: 700; text-align: right; }
.lcd-note { color: var(--lcd-dim); font-size: .85rem; margin-top: 12px; }
.lcd-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.lcd-actions button { font: inherit; font-size: .88rem; color: var(--lcd-ink); background: transparent; border: 1px solid color-mix(in srgb, var(--lcd-ink) 35%, transparent); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.lcd-actions button:hover { background: rgba(255,255,255,.08); }
.lcd .flash { animation: lcdflash .35s ease-out; }
@keyframes lcdflash { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lcd .flash { animation: none; } }

.table-scroll { overflow-x: auto; margin-top: 12px; }
table.data { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: .92rem; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; }
table.data th:first-child, table.data td:first-child { text-align: left; }

.btn { font: inherit; font-weight: 700; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--radius-s); padding: 10px 16px; cursor: pointer; }
.btn.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.drop {
  border: 2px dashed var(--line); border-radius: var(--radius-m); padding: 28px 16px; text-align: center; cursor: pointer;
  background: var(--paper);
}
.drop.over { border-color: var(--accent); }
.thumbs { display: grid; gap: 10px; margin-top: 14px; }
.thumb { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px; background: var(--surface); }
.thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.thumb .meta { flex: 1; font-size: .9rem; min-width: 0; }
.thumb .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Content below the tool */
.content { margin-top: 12px; }
.example { background: var(--surface); border-left: 4px solid var(--lcd); padding: 14px 18px; border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 8px 0 0; }
.review-note { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding: 0; list-style: none; }
.chips a { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; text-decoration: none; color: var(--ink); background: var(--surface); font-size: .92rem; }
.chips a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Ads: reserve space so they never shift the layout */
.ad { margin: 24px 0; min-height: 100px; display: grid; place-items: center; }
.ad::before { content: "Advertisement"; display: block; font-size: .72rem; color: var(--muted); margin-bottom: 4px; }
.ad ins { display: block; width: 100%; }

/* Footer */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0; font-size: .92rem; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--ink); }
.site-footer .fine { color: var(--muted); margin-top: 24px; }

@media print {
  .site-header, .site-footer, .ad, .lcd-actions, .crumbs, .related, .faq, .country-pick { display: none !important; }
  body { background: #fff; color: #000; }
  .lcd { background: #fff; color: #000; border: 2px solid #000; position: static; }
  .lcd-primary-label, .lcd-row span:first-child, .lcd-note { color: #333; }
}
