/* The Security Shortlist — a buying publication for comparing two systems.
   A centred masthead, a book serif for argument, a quiet sans for evidence,
   the verdict set apart by a claret rule, vendors divided by hairlines. */

:root {
  color-scheme: light;
  --paper: #fbfaf7;
  --ink: #1c1a18;
  --text: #2a2724;
  --muted: #5d5650;
  --rule: #d9d2c7;
  --hair: #e7e1d7;
  --claret: #7a2333;
  --claret-dark: #551522;
  --wash: #f4efe7;
  --focus: #1f5f9e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --measure: 39rem;
  --wide: 58rem;
  --side: clamp(1rem, 5vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 1.09rem/1.62 var(--serif);
  font-variant-numeric: lining-nums;
  border-top: 4px solid var(--ink);
}

a { color: var(--claret); text-decoration-thickness: 1px; text-underline-offset: .17em; }
a:hover { color: var(--claret-dark); text-decoration-thickness: 2px; }
a:focus-visible, .scroll:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 1px; }

.skip { position: absolute; left: 1rem; top: -10rem; z-index: 5; background: var(--ink); color: var(--paper); padding: .6rem 1rem; font: 600 .9rem var(--sans); }
.skip:focus { top: 1rem; color: var(--paper); }

/* Masthead */
.masthead {
  max-width: calc(var(--wide) + 2 * var(--side));
  margin: 0 auto; padding: 1.7rem var(--side) 0;
  text-align: center;
}
.brand {
  display: inline-block; color: var(--ink); text-decoration: none;
  font: 600 clamp(1.55rem, 1.2rem + 1.4vw, 2.05rem)/1.1 var(--serif);
  letter-spacing: .01em;
}
.brand:hover { color: var(--ink); }
.masthead nav {
  display: flex; justify-content: center; flex-wrap: wrap; gap: .1rem 1.8rem;
  margin-top: 1.05rem; padding: .55rem 0;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
  font: .86rem/1.9 var(--sans);
}
.masthead nav a { color: var(--muted); text-decoration: none; }
.masthead nav a:hover { color: var(--ink); text-decoration: underline; }
.masthead nav a[aria-current] { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--claret); text-decoration-thickness: 2px; text-underline-offset: .35em; }

/* Story column */
main { max-width: calc(var(--measure) + 2 * var(--side)); margin: 0 auto; padding: clamp(2rem, 6vw, 3.6rem) var(--side) 3.5rem; }

h1, h2, h3 { color: var(--ink); font-family: var(--serif); text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 2.95rem); line-height: 1.1; font-weight: 600; letter-spacing: -.012em; margin: 0 0 1rem; }
h2 { font-size: 1.42rem; line-height: 1.25; font-weight: 600; margin: 2.8rem 0 .7rem; }
h3 { font-size: 1.12rem; line-height: 1.35; font-weight: 600; margin: 1.9rem 0 .35rem; }
p { margin: 0 0 1.1rem; text-wrap: pretty; }
strong { color: var(--ink); }

.byline { font: .84rem/1.5 var(--sans); color: var(--muted); margin-bottom: 2rem; }
.byline a { color: var(--muted); }

/* Numbered sources: set in the small sans so they read as references */
a.src {
  font: .8em/1.4 var(--sans); color: var(--muted);
  text-decoration-color: var(--rule); white-space: nowrap;
}
a.src:hover { color: var(--claret); text-decoration-color: currentColor; }
.src-id { font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .01em; }

/* The verdict */
.verdict {
  margin: 0 0 2.6rem; padding: 1.25rem 0 1.15rem;
  border-top: 3px solid var(--claret); border-bottom: 1px solid var(--rule);
}
.verdict p { margin: 0; font-size: 1.2rem; line-height: 1.56; color: var(--ink); }
.verdict strong { color: var(--claret); }
.verdict a.src { font-size: .72em; }

/* Comparison tables: one criterion per row, vendors divided by hairlines */
.scroll { overflow-x: auto; margin: 0 0 2.4rem; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font: .93rem/1.5 var(--sans); color: var(--text); }
thead th {
  text-align: left; vertical-align: bottom;
  font-size: .8rem; font-weight: 600; color: var(--ink); letter-spacing: .01em;
  padding: 0 1rem .55rem; border-bottom: 2px solid var(--ink);
}
tbody th, tbody td { text-align: left; vertical-align: top; padding: .85rem 1rem .95rem; border-bottom: 1px solid var(--rule); }
thead th:first-child, tbody th { padding-left: 0; }
tbody th { width: 26%; font-weight: 600; color: var(--ink); font-size: .88rem; }
tbody td + td, thead th + th + th { border-left: 1px solid var(--hair); }
thead th:last-child, tbody td:last-child { padding-right: 0; }
tbody td:last-child { padding-right: 0; }
tbody td + td { padding-left: 1rem; }
table a.src { font-size: .88em; }

/* Purchase conditions that change the answer */
.conditions { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0 2.5rem; margin: 2.8rem 0 .8rem; }
.condition h2 { margin-top: 0; padding-top: .9rem; border-top: 2px solid var(--ink); font-size: 1.3rem; }
.condition + .condition { margin-top: 1.4rem; }

/* Contents page */
.contents .intro { font-size: 1.38rem; line-height: 1.45; color: var(--ink); font-style: italic; margin-bottom: 1.4rem; }
.contents section { margin-top: 2.8rem; padding-top: .9rem; border-top: 2px solid var(--ink); }
.contents section h2 { margin: 0 0 .4rem; font-size: 1.22rem; }
.contents ul { list-style: none; margin: 0; padding: 0; }
.contents li { padding: .95rem 0 1rem; border-bottom: 1px solid var(--rule); }
.contents li:last-child { border-bottom: 0; }
.contents li > a { font-size: 1.14rem; line-height: 1.35; font-weight: 600; color: var(--ink); text-decoration: none; }
.contents li > a:hover { color: var(--claret); text-decoration: underline; }
.contents li p { margin: .3rem 0 0; font: .93rem/1.5 var(--sans); color: var(--muted); }

/* Footer */
.colophon {
  max-width: calc(var(--measure) + 2 * var(--side)); margin: 0 auto;
  padding: 1.4rem var(--side) 3rem; text-align: center;
  font: .85rem/1.6 var(--sans); color: var(--muted);
}
.colophon p { margin: 0; padding-top: 1.3rem; border-top: 1px solid var(--rule); }
.colophon strong { color: var(--ink); font-weight: 600; }

/* Phones: each criterion becomes a short record with the vendors one after another */
@media (max-width: 47.99rem) {
  body { font-size: 1.04rem; }
  .masthead nav { gap: 0 1.15rem; font-size: .84rem; }
  .verdict p { font-size: 1.1rem; }
  .scroll { overflow: visible; border-top: 2px solid var(--ink); }
  .scroll table, .scroll tbody, .scroll tr, .scroll th, .scroll td { display: block; width: auto; }
  .scroll thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .scroll tbody tr { padding: .9rem 0 .5rem; border-bottom: 1px solid var(--rule); }
  .scroll tbody th { border: 0; padding: 0 0 .55rem; width: auto; font-size: .95rem; }
  .scroll tbody td { border: 0; border-left: 2px solid var(--hair); padding: 0 0 0 .8rem; margin-bottom: .7rem; }
  .scroll tbody td + td { border-left: 2px solid var(--hair); padding-left: .8rem; }
  .scroll td::before { content: attr(data-label); display: block; font-weight: 600; font-size: .78rem; color: var(--claret); letter-spacing: .01em; }
  table a.src { white-space: normal; }
}

/* Wide screens: tables and the pair of conditions use more width than the text */
@media (min-width: 64rem) {
  .scroll, .conditions {
    width: min(var(--wide), calc(100vw - 4rem));
    margin-left: calc((var(--measure) - min(var(--wide), calc(100vw - 4rem))) / 2);
  }
  .conditions { gap: 0 3rem; }
  .condition + .condition { margin-top: 0; }
  .contents { max-width: calc(var(--wide) + 2 * var(--side)); }
  .contents > h1, .contents > .intro, .contents > p { max-width: var(--measure); }
  .contents section { display: grid; grid-template-columns: 16rem minmax(0, 1fr); column-gap: 2.5rem; }
  .contents section h2 { margin-top: .9rem; font-size: 1.15rem; text-wrap: wrap; }
  .contents li:first-child { padding-top: .9rem; }
}

@media print {
  body { background: #fff; border: 0; }
  .masthead nav, .skip { display: none; }
}
