/*
 * ResaleWarden public site: the one stylesheet every page uses.
 *
 * No build step, no web fonts, no scripts, nothing from another origin: the
 * site's Content-Security-Policy allows this file and nothing else, so no
 * page may carry a style attribute or a <style> block. Colours are tokens on
 * :root; a dark set follows the reader's system setting.
 */
:root {
  color-scheme: light dark;
  --text: #1b2328;
  --text-soft: #42515a;
  --accent: #1f4e5f;
  --accent-text: #ffffff;
  --accent-wash: #e7f0f3;
  --page: #f5f9fb;
  --panel: #ffffff;
  --rule: #d2dde2;
  --caution: #9a5b00;
  --caution-wash: #fff4de;
  --danger: #a3271f;
  --focus: #1f4e5f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e4ecef;
    --text-soft: #b7c6cd;
    --accent: #8cc2d4;
    --accent-text: #0c2a33;
    --accent-wash: #17262c;
    --page: #11181b;
    --panel: #172025;
    --rule: #34444b;
    --caution: #f0b65a;
    --caution-wash: #2b2214;
    --danger: #f0938b;
    --focus: #8cc2d4;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--page);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
}

/* The first thing a keyboard reaches: hidden until focused. */
.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 20;
  padding: .55rem .9rem;
  border-radius: .35rem;
  background: var(--accent);
  color: var(--accent-text);
}
.skip-link:focus { top: .75rem; }
a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1rem; }

/* Masthead: wordmark, then a short nav that wraps beneath it on a phone. */
.masthead { background: var(--panel); border-bottom: 1px solid var(--rule); }
.masthead .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-top: .7rem;
  padding-bottom: .7rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .01em;
  text-decoration: none;
}
.wordmark svg { width: 1.8rem; height: 1.8rem; flex: none; }
.wordmark .shield { fill: var(--accent); }
.wordmark .bars { fill: var(--panel); }
.masthead ul, .colophon ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
}
.masthead nav a { color: var(--text-soft); text-decoration: none; }
.masthead nav a:hover { color: var(--accent); text-decoration: underline; }
.masthead nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* Reading column. The landing page uses a wider one. */
main {
  display: block;
  flex: 1 0 auto;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
}
main.wide { max-width: 62rem; }
main.wide > p, main.wide > .lead { max-width: 46rem; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 .4rem; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 2.4rem 0 .6rem; }
h3 { font-size: 1.05rem; line-height: 1.35; margin: 1.6rem 0 .4rem; }
p, li, dd, td { color: var(--text-soft); }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.4rem; }
li { margin-bottom: .35rem; }
a { color: var(--accent); }
strong, dt, th { color: var(--text); }
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
}
code {
  background: var(--accent-wash);
  color: var(--text);
  border-radius: .25rem;
  padding: .05rem .3rem;
}
pre {
  background: var(--accent-wash);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: .4rem;
  padding: .8rem 1rem;
  margin: .5rem 0 1.2rem;
  overflow-x: auto;
  line-height: 1.45;
  overflow-wrap: normal;
}
pre code { background: none; padding: 0; border-radius: 0; }
.byline { color: var(--text-soft); font-size: .92rem; margin: 0 0 2rem; }
.lead { font-size: 1.15rem; color: var(--text); }
dl { margin: 0 0 1rem; }
dt { font-weight: 600; margin-top: .8rem; }
dd { margin: .15rem 0 0 0; }

/* Tables scroll in their own box on a narrow screen, never the page. */
.table-scroll { overflow-x: auto; margin: .5rem 0 1.25rem; }
table { width: 100%; border-collapse: collapse; }
caption { text-align: left; font-weight: 600; color: var(--text); padding-bottom: .4rem; }
th, td {
  text-align: left;
  vertical-align: top;
  padding: .5rem .6rem;
  border-bottom: 1px solid var(--rule);
  font-size: .95rem;
}
th { font-weight: 600; }
td ul { margin: 0; padding-left: 1.1rem; }

/* Boxes: a summary, a caution, and the draft banner on legal pages. */
.summary, .caution {
  border-left: 4px solid var(--accent);
  background: var(--panel);
  border-radius: 0 .35rem .35rem 0;
  padding: .75rem 1rem;
  margin: 1.5rem 0;
}
.caution { border-left-color: var(--caution); }
.summary p:last-child, .caution p:last-child { margin-bottom: 0; }
.draft-banner {
  border: 1px solid var(--caution);
  border-left-width: 6px;
  background: var(--caution-wash);
  border-radius: .35rem;
  padding: .75rem 1rem;
  margin: 0 0 1.5rem;
}
.draft-banner p { margin: 0; color: var(--text); }

/* Landing page. */
.hero { padding: .5rem 0 1.5rem; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); margin-bottom: .8rem; }
.pill {
  display: inline-block;
  margin: 0 0 1rem;
  padding: .2rem .65rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: .85rem;
  font-weight: 600;
}
.steps {
  list-style: none;
  margin: 1rem 0 2rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 38rem) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps > li {
  margin: 0;
  padding: 1rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: .5rem;
}
.steps h3 { margin-top: 0; }
.steps p { margin: 0; }

/* Verdict names, set apart wherever a page lists them. */
.verdict { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; color: var(--text); white-space: nowrap; }
.verdict.recalled, .verdict.do-not-sell { color: var(--danger); }
.verdict.check { color: var(--caution); }

/* Question-and-answer blocks on the support page. */
details { border-bottom: 1px solid var(--rule); padding: .6rem 0; }
summary { cursor: pointer; font-weight: 600; color: var(--text); }
details > *:not(summary) { margin-top: .6rem; }

/* Footer: every legal page, the operator and the address, on every page. */
.colophon { background: var(--panel); border-top: 1px solid var(--rule); }
.colophon .wrap { padding-top: 1.25rem; padding-bottom: 2rem; font-size: .92rem; }
.colophon ul { margin-bottom: .75rem; }
.colophon p { margin: 0; }

@media (max-width: 30rem) {
  body { font-size: 16px; }
  main { padding-top: 1.75rem; }
  h1 { font-size: 1.65rem; }
}

@media print {
  .skip-link, .masthead nav, .colophon ul { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
  .draft-banner { background: none; border-color: #000; }
}
