:root {
  --ink: #15171c; --muted: #5b616e; --line: #e3e5ea; --soft: #f6f7f9;
  --accent: #d93025; --accent-soft: #fdecea; --center: 820px; color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: #fff; font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
body.has-anchor { padding-bottom: 104px; }
a { color: var(--accent); }

/* header */
.top { border-bottom: 1px solid var(--line); background: #fff; }
.bar { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.2rem; }
.logo { background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .04em; padding: 6px 7px; border-radius: 7px; }
nav { display: flex; gap: 18px; font-size: .95rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--ink); }

/* page: centre column with an ad rail each side on wide screens */
.page { display: grid; grid-template-columns: minmax(0, var(--center)); justify-content: center; column-gap: 40px; padding: 0 20px; }
.rail { display: none; }
.center { min-width: 0; padding-bottom: 12px; }
@media (min-width: 1240px) { .page { grid-template-columns: 160px minmax(0, var(--center)) 160px; } .rail { display: block; } }
h1 { font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1.2; letter-spacing: -.02em; margin: 24px 0 8px; }
.lead { font-size: 1.08rem; color: var(--muted); margin: 0 0 20px; }
.loading { color: var(--muted); }

/* the tool box */
.box-slot { min-height: 160px; }
iframe.box { width: 100%; height: 260px; border: 0; display: block; background: transparent; }

/* tool list */
.toolgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 8px 0 10px; }
.toolcard { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 12px; color: var(--ink); text-decoration: none; background: #fff; transition: border-color .15s, box-shadow .15s; }
.toolcard:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(217, 48, 37, .12); }
.toolcard .icon { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; }
.toolcard strong { font-size: 1rem; }
.toolcard span:last-child { color: var(--muted); font-size: .88rem; line-height: 1.4; }

/* text sections */
.why, .howto, .faq, .more { margin-top: 36px; }
.why h2, .howto h2, .faq h2, .more h2 { font-size: 1.3rem; margin: 0 0 12px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid > div { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.grid h3 { font-size: 1rem; margin: 0 0 6px; }
.grid p { margin: 0; color: var(--muted); font-size: .94rem; }
.howto ol { padding-left: 1.3rem; color: var(--ink); }
.howto li { margin: 6px 0; }
.faq h3 { font-size: 1.02rem; margin: 18px 0 4px; }
.faq p { margin: 0; color: var(--muted); }
.morelinks { display: flex; flex-wrap: wrap; gap: 8px; }
.morelinks a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--ink); text-decoration: none; font-size: .92rem; }
.morelinks a:hover { border-color: var(--accent); color: var(--accent); }
.button { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; padding: 11px 18px; border-radius: 9px; }
.prose h2 { font-size: 1.3rem; margin: 30px 0 8px; }
.prose li { margin: 6px 0; }
.small { font-size: .85rem; color: var(--muted); }

/* ad spaces (hidden until Google gives each an ad unit number) */
.ad { display: block; }
.ad-top { margin: 20px 0 0; min-height: 280px; }
.ad-bottom { margin: 32px 0 20px; min-height: 280px; }
.ad-rail { position: sticky; top: 20px; margin-top: 20px; width: 160px; min-height: 600px; }
.anchor { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: center; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); padding: 4px 0; }
.anchor[hidden] { display: none; }
.ad-anchor { width: 728px; max-width: 100%; height: 90px; overflow: hidden; }
.anchor-close { position: absolute; top: -28px; left: 10px; width: 36px; height: 28px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: #fff; color: var(--muted); cursor: pointer; }
.no-ads .ad, .no-ads .rail, .no-rails .rail, .ad[hidden] { display: none; }
.no-ads .page, .no-rails .page { grid-template-columns: minmax(0, var(--center)); }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--soft); margin-top: 36px; padding: 26px 20px 34px; font-size: .92rem; color: var(--muted); }
.footwrap { max-width: 1200px; margin: 0 auto; }
.foot p { margin: 4px 0; }
.foot a { color: var(--muted); }

@media (max-width: 760px) {
  body.has-anchor { padding-bottom: 116px; }
  .page { padding: 0 14px; }
  .ad-top, .ad-bottom { min-height: 300px; }
  .ad-anchor { width: 320px; height: 100px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  nav a:not(:first-child) { display: none; }
}
