/* emttech.info - one stylesheet. The only font is Archivo (SIL OFL 1.1), served from this site.
   Colors: soft blue-gray ground, slate ink, the logo's navy, one calm slate blue for links and marks.
   Meaning never rests on color alone. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo.woff2") format("woff2");
}

:root {
  --text: #1f2b38;
  --muted: #4f5d6b;
  --bg: #f7f9fb;
  --bg-soft: #e5ebf1;
  --card: #ffffff;
  --brand: #1d2f66;
  --brand-text: #ffffff;
  --accent: #3b5f86;
  --link: #2f5880;
  --link-visited: #5a4a82;
  --focus: #b4580a;
  --border: #cdd6df;
  --draft-bg: #fff4d6;
  --draft-border: #8a5a00;
  --paper: #ffffff;
  --paperline: #c3ccd6;
  --shade: #cfd8e1;
}

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

html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
  margin: 0;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -10rem;
  padding: 0.5rem 1rem;
  background: var(--bg);
  color: var(--link);
  border: 2px solid var(--brand);
  z-index: 10;
}
.skip-link:focus { top: 0.5rem; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 2px; }

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

.wrap { max-width: 48rem; margin: 0 auto; padding: 0 1rem; }
.wide { max-width: 77rem; margin: 0 auto; padding: 0 1rem; }

/* Header */
header.site { background: var(--brand); color: var(--brand-text); }
header.site .wrap,
header.site .wide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
header.site .wrap { max-width: 77rem; }
.site-name {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-stretch: 112%;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--brand-text);
  text-decoration: none;
  line-height: 1.1;
}
.site-name:visited { color: var(--brand-text); }
.site-name small {
  display: block;
  font-weight: 400;
  font-stretch: 100%;
  font-size: 0.78rem;
  letter-spacing: 0;
  opacity: 0.9;
}
.site-mark { background: #fff; border-radius: 50%; padding: 3px; width: 44px; height: auto; }
header.site :focus-visible { outline-color: #ffd28a; }

nav.site ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
nav.site a,
nav.site a:visited {
  display: inline-block;
  padding: 0.6rem 0;
  color: var(--brand-text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
nav.site a:hover { border-bottom-color: var(--brand-text); }
nav.site a[aria-current="page"] { border-bottom-color: var(--brand-text); font-weight: 700; }

main { padding: 1.5rem 0 2.5rem; }
main.home { padding: 0; }

h1, h2, h3 { line-height: 1.15; color: var(--brand); font-weight: 800; font-stretch: 112%; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: 2.1rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.5rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }

p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.35rem; }

.lead { font-size: 1.2rem; color: var(--muted); }

.notice {
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
}
.notice p:last-child { margin-bottom: 0; }

.draft {
  background: var(--draft-bg);
  border: 2px solid var(--draft-border);
  padding: 0.75rem 1rem;
  margin: 1rem 0 1.5rem;
}
.draft p { margin: 0; }
.draft strong { font-size: 1.15rem; }

table { border-collapse: collapse; width: 100%; margin: 0 0 1rem; background: var(--card); }
th, td { text-align: left; border: 1px solid var(--border); padding: 0.5rem 0.7rem; vertical-align: top; }
th { background: var(--bg-soft); }
caption { text-align: left; }

.meta { color: var(--muted); font-size: 0.95rem; }

/* Home page */
.band { padding: clamp(1.75rem, 4vw, 4rem) 0; }
.band.soft { background: var(--bg-soft); }
.home h1 { font-size: clamp(2.1rem, 5vw, 3.25rem); line-height: 1.05; margin: 0 0 1rem; }
.home h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 0 0 1rem; }
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.5rem 3rem; align-items: end; }
.status { border-left: 4px solid var(--accent); padding: 0.25rem 0 0.25rem 1rem; margin: 0; font-size: 1rem; }
.status strong { display: block; font-size: 1.1rem; }
.fig { margin: 1.75rem 0 0; background: var(--bg-soft); }
.fig svg { display: block; width: 100%; height: auto; }
.f-paper { fill: var(--paper); }
.s-line { stroke: var(--paperline); stroke-width: 2; }
.f-line { fill: var(--paperline); }
.f-shade { fill: var(--shade); }
.f-accent { fill: var(--accent); }
.f-grey { fill: var(--bg-soft); }
.arrow { stroke: var(--accent); stroke-width: 5; stroke-linecap: round; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 2.5rem; margin-top: 1.5rem; }
.steps h3 { margin-top: 0; }
.steps p { color: var(--muted); font-size: 1rem; }
.home .narrow { max-width: 46rem; }
.editions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.edition { background: var(--card); border: 1px solid var(--border); padding: 1.25rem 1.5rem 1rem; }
.edition h3 { margin-top: 0; font-size: 1.3rem; }
.edition .price { font-weight: 800; font-stretch: 112%; font-size: 1.6rem; color: var(--brand); margin: 0 0 0.25rem; }
.edition .who { color: var(--muted); }
.edition h4 { font-size: 0.98rem; margin: 1.25rem 0 0.4rem; padding-top: 0.9rem; border-top: 1px solid var(--border); }
ul.feat { list-style: none; padding: 0; margin: 0; }
ul.feat li { position: relative; padding: 0.3rem 0 0.3rem 1.6rem; margin: 0; font-size: 1rem; }
ul.feat li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.75rem;
  width: 0.75rem;
  height: 0.4rem;
  border-left: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  transform: rotate(-45deg);
}
ul.feat.later li::before { border-color: var(--muted); }
.glance { margin-top: 2rem; }
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem 2.5rem; }
.rules div { border-top: 3px solid var(--brand); padding-top: 0.75rem; }
.rules h3 { margin-top: 0; }
.rules p { color: var(--muted); font-size: 1rem; }
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 3.5rem; }
.big { font-weight: 800; font-stretch: 112%; font-size: clamp(3rem, 7vw, 5rem); line-height: 1; color: var(--accent); letter-spacing: -0.03em; margin: 0 0 1rem; }
.logo-full { display: block; width: 100%; max-width: 26rem; height: auto; margin: 0 0 1.5rem; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.pair h3 { margin-top: 0; }
.pair p { color: var(--muted); font-size: 1rem; }

/* Footer */
footer.site { border-top: 6px solid var(--brand); background: var(--bg-soft); font-size: 0.95rem; padding: 1rem 0 1.5rem; }
footer.site .wrap { max-width: 77rem; }
footer.site ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }

@media (max-width: 56rem) {
  .hero, .about { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 45rem) {
  .steps, .editions, .rules, .pair { grid-template-columns: minmax(0, 1fr); }
  table.stack thead { display: none; }
  table.stack tr { display: block; border-bottom: 1px solid var(--border); padding: 0.5rem 0; }
  table.stack th, table.stack td { display: block; border: 0; padding: 0.2rem 0.5rem; }
  table.stack td::before { content: attr(data-l) ": "; font-weight: 700; }
}
@media (max-width: 30rem) {
  h1 { font-size: 1.7rem; }
  body { font-size: 1rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6ecf2;
    --muted: #b3c0cd;
    --bg: #131a22;
    --bg-soft: #1b2430;
    --card: #18212b;
    --brand: #22386f;
    --accent: #8fb0d3;
    --link: #a9c6e4;
    --link-visited: #c7b7e6;
    --focus: #ffb36b;
    --border: #334252;
    --draft-bg: #3a2f12;
    --draft-border: #e0b44a;
    --paper: #26313e;
    --paperline: #56677a;
    --shade: #0c1117;
  }
  h1, h2, h3, .edition .price { color: #dfe7f1; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  header.site, footer.site, .skip-link { display: none; }
  a { color: inherit; }
}

/* The skip link moves focus to <main>; it is not a control, so no outline. */
main:focus { outline: none; }

/* Long email addresses must wrap on narrow screens (WCAG 1.4.10 reflow). */
td, p, li, dd { overflow-wrap: anywhere; }

/* The logo artwork is drawn for a light background. */
@media (prefers-color-scheme: dark) {
  .logo-full { background: #ffffff; padding: 0.75rem 1rem; border-radius: 6px; }
}

/* Text for screen readers only. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
