/* ============================================================
   Relistly free-tools shared styles — extracted from /tools so
   each individual /tools/* landing page reuses one stylesheet.
   Light-only theme. Brand palette: indigo/violet (matches site.css).
   ============================================================ */
:root {
  --bg: #f6f6fb;
  --panel: #ffffff;
  --panel-2: #f0f0f7;
  --line: #e6e6f0;
  --text: #1b1a2e;
  --muted: #61617a;
  --dim: #9a9ab0;
  --neon: #6366f1;
  --neon-dim: #4f46e5;
  --link: #4f46e5;
  --on-accent: #ffffff;
  --violet: #8b5cf6;
  --red: #d92d2d;
  --amber: #b26a00;
  --green: #1f9d57;
  --blue: #2563eb;
  --shadow: 0 1px 3px rgba(30, 27, 75, 0.10);
  --radius: 10px;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 78px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- shell (matches app header) ---- */
header {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.logo {
  font-family: var(--mono); font-weight: 700; font-size: 15px;
  letter-spacing: -0.5px; white-space: nowrap; color: var(--text);
}
.logo span { color: var(--neon); }
.logo a { color: inherit; }
.logo a:hover { text-decoration: none; }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
nav a {
  background: none; border: 0; color: var(--muted);
  padding: 7px 13px; border-radius: 7px; cursor: pointer;
  font-size: 13px; font-weight: 500; font-family: inherit;
}
nav a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.who { display: flex; align-items: center; gap: 10px; }

/* ---- buttons ---- */
.btn {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font: inherit;
  font-size: 13px; font-weight: 500; white-space: nowrap; display: inline-flex;
  align-items: center; gap: 7px; text-decoration: none;
}
.btn:hover { border-color: var(--dim); text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--neon), color-mix(in srgb, var(--neon) 45%, var(--violet, #8b5cf6))); color: var(--on-accent); border-color: transparent; font-weight: 600; box-shadow: 0 8px 18px color-mix(in srgb, var(--neon) 30%, transparent); }
.btn-primary:hover { filter: brightness(1.06); border-color: transparent; }
.btn-ghost { color: var(--muted); }
.btn-lg { padding: 12px 20px; font-size: 15px; border-radius: 10px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ---- layout ---- */
main { max-width: 1080px; margin: 0 auto; padding: 0 24px 90px; }
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--neon-dim); margin: 0 0 14px;
}
h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.06; letter-spacing: -1.1px;
  font-weight: 700; margin: 0 0 18px; max-width: 22ch; }
h1 .accent { color: var(--neon); }
.lead { font-size: 17px; color: var(--muted); max-width: 64ch; margin: 0 0 14px; line-height: 1.55; }
.crumbs { font-size: 12.5px; color: var(--muted); padding: 16px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs .sep { color: var(--dim); margin: 0 6px; }

/* ---- hero ---- */
.hero { padding: 30px 0 22px; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* ---- section headings on tool pages ---- */
.sec { border-top: 1px solid var(--line); padding: 40px 0 6px; }
.sec h2 { font-size: clamp(20px, 3vw, 27px); line-height: 1.12; letter-spacing: -0.5px; font-weight: 700; margin: 0 0 10px; }
.sec h3 { font-size: 16px; margin: 20px 0 6px; }
.sec p { color: var(--muted); font-size: 14.5px; line-height: 1.6; max-width: 72ch; }
.sec p b { color: var(--text); }

/* ---- tool sections ---- */
.tool { padding: 8px 0 8px; scroll-margin-top: 78px; }
.tool-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.tool-head .badge {
  flex: none; width: 40px; height: 40px; border-radius: 11px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 21px;
  background: color-mix(in srgb, var(--neon) 14%, var(--panel-2));
  border: 1px solid color-mix(in srgb, var(--neon) 30%, var(--line));
}
.tool h2 { font-size: clamp(20px, 3vw, 27px); line-height: 1.12; letter-spacing: -0.5px; font-weight: 700; margin: 0; }
.tool .sub { font-size: 14.5px; color: var(--muted); margin: 4px 0 22px; line-height: 1.55; max-width: 70ch; }

/* ---- generic tool panel + form controls ---- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px 14px; align-items: stretch; }
label.fld { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
label.fld .hint { font-weight: 400; color: var(--dim); font-size: 11.5px; }
.grid-form > label.fld > .input-affix,
.grid-form > label.fld > input,
.grid-form > label.fld > select,
.grid-form > label.fld > textarea { margin-top: auto; }
input[type=text], input[type=number], select, textarea {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 10px 12px; border-radius: 8px; font: inherit; font-size: 14px; -webkit-appearance: none; appearance: none;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--neon-dim); }
select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%238a8a93' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; cursor: pointer; }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.input-affix { position: relative; }
.input-affix .cur { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 14px; pointer-events: none; }
.input-affix input { padding-left: 26px; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* segmented control */
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 500;
  padding: 7px 14px; border-radius: 6px; cursor: pointer; }
.seg button.on { background: var(--neon); color: var(--on-accent); font-weight: 600; }

/* result readouts */
.result { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.result.hl { background: color-mix(in srgb, var(--neon) 7%, var(--panel)); border-color: color-mix(in srgb, var(--neon) 42%, var(--line)); }
.readout { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.readout:last-child { border-bottom: 0; }
.readout .k { font-size: 13.5px; color: var(--muted); }
.readout .v { font-size: 15px; font-weight: 600; font-family: var(--mono); letter-spacing: -0.3px; white-space: nowrap; }
.readout.big .k { font-size: 14px; color: var(--text); font-weight: 600; }
.readout.big .v { font-size: 22px; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.muted-v { color: var(--muted); }

/* data tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 460px; }
th, td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--panel-2); position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.best td { background: color-mix(in srgb, var(--neon) 9%, transparent); }
td .tag { font-size: 11px; font-family: var(--mono); color: var(--on-accent); background: var(--neon); padding: 2px 7px; border-radius: 5px; font-weight: 600; }
td.num, th.num { text-align: right; font-family: var(--mono); }
td.editable { padding: 0; }
td.editable input { border: 0; border-radius: 0; background: transparent; padding: 11px 13px; }
td.editable input:focus { background: var(--panel-2); }

/* chips / pills */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); padding: 6px 12px;
  border-radius: 999px; font-size: 12.5px; cursor: pointer; user-select: none; }
.chip:hover { border-color: var(--dim); }
.chip.on { background: var(--neon); color: var(--on-accent); border-color: var(--neon); font-weight: 600; }

/* output/copy box */
.outbox { background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px;
  font-size: 14px; line-height: 1.5; display: flex; flex-direction: column; gap: 4px; }
.outbox .ob-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.outbox .ob-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.outbox .ob-count { font-size: 11.5px; font-family: var(--mono); color: var(--dim); }
.outbox .ob-count.over { color: var(--red); }
.outbox .ob-text { color: var(--text); word-break: break-word; }
.copy-btn { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; font: inherit;
  font-size: 11.5px; padding: 3px 9px; cursor: pointer; }
.copy-btn:hover { border-color: var(--neon-dim); color: var(--text); }
.copy-btn.done { color: var(--green); border-color: var(--green); }

/* brand id results */
.brand-hit { border: 1px solid var(--line); background: var(--panel-2); border-radius: var(--radius); padding: 16px; }
.brand-hit h4 { margin: 0 0 4px; font-size: 15px; }
.brand-hit .era { font-size: 12px; font-family: var(--mono); color: var(--neon-dim); margin-bottom: 8px; }
.brand-hit ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.brand-hit ul li { margin-bottom: 3px; }
.brand-hit ul li b { color: var(--text); font-weight: 600; }

.note { font-size: 12px; color: var(--dim); line-height: 1.5; margin-top: 12px; }
.note b { color: var(--muted); font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.divider-lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 4px 0 2px; }

/* faq */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; margin-bottom: 10px; background: var(--panel); }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; font-size: 14.5px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .ans { padding: 14px 16px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.faq .ans a { color: var(--link); }

/* related tools grid */
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.rel-card { display: block; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius);
  padding: 14px 16px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.rel-card:hover { border-color: var(--neon-dim); text-decoration: none; transform: translateY(-2px); }
.rel-card .rc-t { font-size: 14px; font-weight: 600; margin: 0 0 3px; }
.rel-card .rc-d { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* CTA banner */
.cta-banner {
  border: 1px solid var(--neon-dim); border-radius: 16px; padding: 42px 36px; text-align: center; margin-top: 40px;
  background: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--neon) 12%, var(--panel)) 0%, var(--panel) 62%);
}
.cta-banner h2 { font-size: clamp(22px, 4vw, 32px); letter-spacing: -0.8px; margin: 0 0 12px; }
.cta-banner p { color: var(--muted); font-size: 16px; max-width: 56ch; margin: 0 auto 24px; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 30px 24px 60px; color: var(--dim); font-size: 12px; }
footer .inner { max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; }
footer .logo { font-size: 13px; }
.footer-nav { max-width: 1080px; margin: 0 auto 26px; padding-bottom: 24px; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px 40px; }
.footer-nav .fn-h { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--dim); font-weight: 600; margin-bottom: 10px; }
.footer-nav a, .footer-nav .current { display: block; font-size: 13px; padding: 5px 0; line-height: 1.4; text-decoration: none; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--neon); text-decoration: none; }
.footer-nav .current { color: var(--text); font-weight: 600; }
.footer-nav .current::before { content: "\25B8 "; color: var(--neon); }
@media (max-width: 640px){ .footer-nav { grid-template-columns: 1fr; } }

@media (max-width: 760px){ .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 640px){
  nav { display: none; }
  main { padding: 0 16px 70px; }
  header { gap: 12px; padding: 12px 16px; }
  .panel { padding: 16px; }
  .tool { padding: 8px 0 8px; }
}
