/* AlarmMonitoring.co.uk
 *
 * One stylesheet, no framework, no external fonts. The system font stack is a
 * deliberate choice rather than a shortcut: a webfont would be the only
 * external-looking request on the site, it would cost a round trip before text
 * paints, and nothing here needs a distinctive typeface more than it needs to
 * render instantly on a phone with two bars of signal.
 *
 * Colours are defined as tokens on :root, with a dark scheme applied only via
 * prefers-color-scheme. Every token has a light value defined unconditionally,
 * so nothing depends on a media query to have a colour at all.
 */

:root {
  --ink: #101720;
  --ink-soft: #46535f;
  --ink-faint: #6b7887;
  --paper: #ffffff;
  --paper-soft: #f4f6f8;
  --paper-sunk: #eaeef2;
  --line: #d6dde4;
  --line-soft: #e6ebef;
  --brand: #10395e;
  --brand-ink: #0b2843;
  --accent: #b3341f;
  --accent-soft: #fdf2ef;
  --focus: #1a6fd4;
  --ok: #1c6b45;
  --warn-bg: #fdf6e3;
  --warn-line: #e6d5a3;
  --radius: 6px;
  --wrap: 68rem;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8edf2;
    --ink-soft: #a8b6c2;
    --ink-faint: #8494a1;
    --paper: #0e141b;
    --paper-soft: #151d26;
    --paper-sunk: #1b242e;
    --line: #2b3743;
    --line-soft: #212b35;
    --brand: #9dc4e8;
    --brand-ink: #cfe2f4;
    --accent: #f08a72;
    --accent-soft: #2a1a16;
    --focus: #6fb2ff;
    --ok: #6fc79b;
    --warn-bg: #2a2517;
    --warn-line: #4d452a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }

section.wrap { padding-block: 2.25rem; }
section.wrap + section.wrap { border-top: 1px solid var(--line-soft); }

/* Long-form text gets a comfortable measure; tables and link grids do not. */
.prose > p, .prose > ul, .prose > ol, .prose > h2 + p, .answer > p { max-width: var(--measure); }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--paper); color: var(--ink); padding: 0.75rem 1rem; border: 2px solid var(--focus);
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

h1, h2, h3 { line-height: 1.22; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 4.2vw, 2.4rem); margin: 0 0 0.5rem; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin: 2rem 0 0.6rem; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.4rem; }
h2:first-child, h3:first-child { margin-top: 0; }
p { margin: 0 0 1rem; }

ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin-bottom: 0.4rem; }

.muted { color: var(--ink-faint); font-size: 0.9375rem; }
.lede { font-size: 1.1875rem; color: var(--ink-soft); max-width: var(--measure); }

/* ---------- Masthead ---------- */

.masthead { background: var(--brand); border-bottom: 1px solid var(--brand-ink); }
@media (prefers-color-scheme: dark) { .masthead { background: var(--paper-soft); border-bottom-color: var(--line); } }

.masthead__inner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block: 0.85rem; }

.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: #fff; font-weight: 700; font-size: 1.0625rem; text-decoration: none; letter-spacing: -0.01em; }
@media (prefers-color-scheme: dark) { .brand { color: var(--ink); } }
.brand__tld { font-weight: 400; opacity: 0.75; }
.brand__mark { width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 3px solid currentColor; position: relative; flex: none; }
.brand__mark::after { content: ""; position: absolute; inset: 0.22rem; border-radius: 50%; background: var(--accent); }

.nav { margin-left: auto; }
.nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; list-style: none; margin: 0; padding: 0; }
.nav a { color: #e7eef5; text-decoration: none; font-size: 0.9375rem; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { color: #fff; border-bottom-color: var(--accent); }
@media (prefers-color-scheme: dark) {
  .nav a { color: var(--ink-soft); }
  .nav a:hover, .nav a[aria-current] { color: var(--ink); }
}

.navtoggle { display: none; margin-left: auto; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); border-radius: var(--radius); padding: 0.4rem 0.7rem; font: inherit; font-size: 0.875rem; cursor: pointer; }
@media (prefers-color-scheme: dark) { .navtoggle { color: var(--ink); border-color: var(--line); } }

@media (max-width: 52rem) {
  .navtoggle { display: block; }
  .nav { flex-basis: 100%; margin-left: 0; display: none; }
  .nav[data-open] { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { display: block; padding: 0.6rem 0; border-bottom: 1px solid rgba(255,255,255,0.15); }
}

/* ---------- Breadcrumbs + page head ---------- */

.crumbs { padding-top: 1rem; font-size: 0.875rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; margin: 0; padding: 0; color: var(--ink-faint); }
.crumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--line); }

.pagehead { padding-block: 1.5rem 0; }
/* The page head already provides breathing room below the lede, so the first
 * content section does not need its full top padding as well — together they
 * left an odd gap that read as a missing element. */
.pagehead + section.wrap { padding-top: 1.25rem; }

/* ---------- Hero ---------- */

.hero-wrap { background: var(--paper-soft); border-bottom: 1px solid var(--line-soft); }
.hero { padding-block: 1rem; }
.hero h1 { max-width: 30ch; }
.hero .lede { font-size: 1.25rem; }
.hero__disclose { font-size: 0.9375rem; color: var(--ink-faint); max-width: var(--measure); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.25rem; }

.btn {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  padding: 0.7rem 1.4rem; border-radius: var(--radius); font-weight: 600; font-size: 1rem;
  border: 1px solid transparent;
}
.btn:hover { background: var(--brand); color: #fff; }
.btn--ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn--ghost:hover { background: var(--paper-sunk); color: var(--brand); }
@media (prefers-color-scheme: dark) {
  .btn { color: #14202b; }
  .btn:hover { background: var(--brand); color: #14202b; }
}

/* ---------- Answers ---------- */

.answer { padding-bottom: 0.5rem; }
.answer + .answer { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line-soft); }
.answer h2, .answer h3 { margin-top: 0; }
.answer h2 a, .answer h3 a { text-decoration: none; }
.answer h2 a:hover, .answer h3 a:hover { text-decoration: underline; }

/* The direct answer. Visually separated because it is doing a different job
 * from the paragraphs after it — it is the whole answer, standalone. */
.answer__lead {
  font-size: 1.125rem;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding: 0.15rem 0 0.15rem 1rem;
  margin-bottom: 1rem;
  max-width: var(--measure);
}
.answer--solo .answer__lead { font-size: 1.1875rem; }

/* ---------- Callouts ---------- */

.callout {
  margin: 1.5rem 0; padding: 1rem 1.15rem; border-radius: var(--radius);
  background: var(--paper-soft); border: 1px solid var(--line-soft); border-left: 4px solid var(--ink-faint);
  max-width: var(--measure);
}
.callout p { margin: 0; }
.callout--important { background: var(--accent-soft); border-left-color: var(--accent); border-color: var(--line-soft); }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; margin: 1.25rem 0 1.5rem; }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 0.9375rem; }
caption { text-align: left; font-size: 0.875rem; color: var(--ink-faint); padding-bottom: 0.5rem; }
th, td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { background: var(--paper-sunk); border-bottom: 2px solid var(--line); font-size: 0.875rem; }
tbody th { font-weight: 600; }

/* ---------- Lists, links, cards ---------- */

.links { list-style: none; padding: 0; margin: 0 0 1rem; }
.links li { margin-bottom: 0.35rem; }
.links--cols { columns: 2; column-gap: 2rem; }
.links--dense { font-size: 0.9375rem; }
.links--dense li { margin-bottom: 0.2rem; }
@media (min-width: 46rem) { .links--cols { columns: 3; } }
@media (min-width: 64rem) { .links--dense.links--cols { columns: 4; } }

.list--negative li::marker { color: var(--accent); }
.list--check { list-style: none; padding-left: 0; }
.list--check li { padding-left: 1.5rem; position: relative; }
.list--check li::before { content: "?"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; background: var(--paper); }
.card h3 { margin: 0 0 0.4rem; font-size: 1.0625rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 0; font-size: 0.9375rem; color: var(--ink-soft); }

.steps { padding-left: 1.3rem; max-width: var(--measure); }
.steps li { margin-bottom: 0.6rem; }

.toc { background: var(--paper-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 2rem; max-width: var(--measure); }
.toc h2 { font-size: 0.9375rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin: 0 0 0.6rem; }
.toc .links { margin-bottom: 0; }

.qcat { margin-bottom: 2rem; }
.qcat h2 { padding-bottom: 0.4rem; border-bottom: 2px solid var(--line); }

.tag { display: inline-block; font-size: 0.75rem; padding: 0.1rem 0.45rem; border-radius: 3px; vertical-align: middle; }
.tag--warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--ink-soft); }

/* ---------- Glossary ---------- */

.glossary { margin: 0; }
.glossary dt { font-weight: 700; margin-top: 1.4rem; }
.glossary dt a { text-decoration: none; }
.glossary dt a:hover { text-decoration: underline; }
.glossary dd { margin: 0.3rem 0 0; max-width: var(--measure); color: var(--ink-soft); }

/* ---------- Enquiry form ---------- */

.enquiry { background: var(--paper-soft); border-top: 1px solid var(--line); padding-block: 2.5rem; }
.enquiry > h2, .enquiry > p, .enquiry > form { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.enquiry > p { max-width: calc(var(--measure) + 2.5rem); margin-inline: auto; }
.enquiry--compact { padding-block: 2rem; }

.form { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); align-items: start; }
.form__row { display: flex; flex-direction: column; gap: 0.3rem; }
.form__row--full { grid-column: 1 / -1; }
.form__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }

label { font-size: 0.9375rem; font-weight: 600; }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem 0.7rem; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--focus); }
textarea { resize: vertical; }

button {
  font: inherit; font-weight: 600; font-size: 1rem; cursor: pointer;
  background: var(--accent); color: #fff; border: none; border-radius: var(--radius); padding: 0.75rem 1.6rem;
}
button:hover { background: var(--brand); }
@media (prefers-color-scheme: dark) { button { color: #14202b; } button:hover { color: #14202b; } }

.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; font-size: 0.9375rem; }
.check input { width: auto; margin-top: 0.25rem; flex: none; }
.hint { font-size: 0.875rem; color: var(--ink-faint); margin: 0; }

/* Honeypot. Off-screen rather than display:none — some bots skip hidden
 * fields, and this way it stays in the layout for them while being invisible
 * and unreachable for people. aria-hidden and tabindex handle the rest. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Shop ----------
 *
 * Kept deliberately plain and bright: white cards, thin borders, a lot of space
 * around each shot. Product photography on Amazon is inconsistent — some cut out
 * on white, some photographed on a wall — so the card gives every image the same
 * white field and a fixed square box, which is what stops the grid looking like
 * a jumble sale. `object-fit: contain` means nothing is ever cropped.
 */

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.affiliate {
  font-size: 0.9375rem; color: var(--ink-soft);
  background: var(--paper-soft); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 0.85rem 1rem; max-width: var(--measure);
}

.shop { padding-top: 1rem; }

.shopgroup { margin-bottom: 2.75rem; }
.shopgroup:last-child { margin-bottom: 0; }
.shopgroup h2 { padding-bottom: 0.4rem; border-bottom: 2px solid var(--line); }
.shopgroup__blurb { max-width: var(--measure); color: var(--ink-soft); }

.products {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  margin-top: 1.25rem;
}

.product { display: flex; }

.product__link {
  display: flex; flex-direction: column; gap: 0.5rem;
  /* Always white, in both schemes. Amazon shots are overwhelmingly cut out on
   * white, so a dark card puts a glowing white square inside a dark tile and
   * looks broken. A white card with dark text inside it is the honest fix. */
  background: #fff; color: #101720;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.75rem; text-decoration: none; width: 100%;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.product__link:hover {
  border-color: var(--accent); color: #101720;
  box-shadow: 0 2px 10px rgb(16 23 32 / 0.1); transform: translateY(-2px);
}
@media (prefers-reduced-motion: reduce) {
  .product__link { transition: none; }
  .product__link:hover { transform: none; }
}

.product__shot {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1; background: #fff; border-radius: 3px; overflow: hidden;
}
.product__shot img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

.product__title { font-size: 0.8125rem; line-height: 1.35; font-weight: 600; }
.product__meta { font-size: 0.75rem; color: #6b7887; margin-top: -0.25rem; }
.product__cta {
  margin-top: auto; font-size: 0.8125rem; font-weight: 600; color: var(--accent);
}
.product__link:hover .product__cta { text-decoration: underline; }

/* ---------- Footer ---------- */

.footer { background: var(--paper-sunk); border-top: 1px solid var(--line); padding-block: 2rem; margin-top: 1rem; font-size: 0.9375rem; }
.disclosure { max-width: 52rem; color: var(--ink-soft); border-left: 3px solid var(--accent); padding-left: 1rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; list-style: none; padding: 0; margin: 1.25rem 0; }
.footer__meta { color: var(--ink-faint); font-size: 0.875rem; margin: 0; max-width: 52rem; }

@media print {
  .masthead, .footer__links, .enquiry, .navtoggle, .skip { display: none; }
  body { font-size: 11pt; }
}
