@import url(/assets/fonts.css);

:root {
  --form: #E4EDE4;
  --guilloche: #8DB39A;
  --ink: #22306B;
  --refusal: #B0281F;
  --text: #1C211E;
  --muted: #4A544E;
  --paper: #FFFFFF;
  --rule: #C9D6CB;

  --serif: 'Literata', Georgia, serif;
  --sans: 'Public Sans', system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 1.5rem + 2vw, 2.75rem);

  --measure: 66ch;
  --gutter: clamp(1rem, 4vw, 3rem);
}

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

html { -webkit-text-size-adjust: 100%; color-scheme: only light; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 650;
  line-height: 1.15;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--step-3); letter-spacing: -0.01em; }
h2 { font-size: var(--step-2); }

p { margin: 0; max-width: var(--measure); text-wrap: pretty; }

a { color: var(--ink); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 650;
  font-size: var(--step-1);
  color: var(--ink);
  text-decoration: none;
}

.masthead nav { font-size: var(--step--1); color: var(--muted); }

/* hero: the form band */

.hero {
  background-color: var(--form);
  background-image:
    repeating-radial-gradient(circle at 0 100%, transparent 0 17px, rgba(141, 179, 154, 0.28) 17px 18px);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.hero-grid {
  display: grid;
  gap: 1.5rem 3.5rem;
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  align-items: start;
}

@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
}

.hero-grid > * { min-width: 0; }
.hero-copy { display: grid; gap: 1.25rem; }
.hero-copy .lede { font-size: var(--step-1); line-height: 1.45; color: var(--text); }

.button {
  display: inline-block;
  justify-self: start;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.25rem;
  border-radius: 3px;
}
.button:hover { background: #18224F; }

.aside { font-size: var(--step--1); color: var(--muted); }

/* the product register */

.register {
  margin: 0 6px clamp(2.5rem, 6vw, 4.5rem);
  background: var(--paper);
  border: 1px solid var(--guilloche);
  box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px var(--guilloche);
  font-size: var(--step--1);
}

.register-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.3rem 1.5rem;
  padding: 1rem 1.1rem 0.85rem;
  border-bottom: 1px solid var(--rule);
}
.register-title { font-family: var(--serif); font-weight: 650; font-size: var(--step-1); color: var(--ink); }
.register-alert { color: var(--refusal); font-weight: 600; }

.cols, .item > summary, .item.ok {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 0.9fr) 1.25rem;
  gap: 0 1rem;
  padding: 0.55rem 1.1rem;
  align-items: baseline;
}
.item.ok::after { content: ''; }

.cols { color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--rule); }
.cols::after { content: ''; }

.num { text-align: right; white-space: nowrap; }

.item { border-bottom: 1px solid var(--rule); }
.item .product { font-weight: 600; color: var(--ink); }
.item.ok .state { color: #2F6B45; }
.item.lost > summary { background: #FBEDEB; box-shadow: inset 4px 0 0 var(--refusal); }
.item.lost .state, .item.lost .duty { color: var(--refusal); font-weight: 600; }
.item.lost[open] > .detail { box-shadow: inset 4px 0 0 var(--refusal); }
.item.risk[open] > .detail { box-shadow: inset 4px 0 0 #A86A12; }
.item.risk > summary { background: #FBF4E4; box-shadow: inset 4px 0 0 #A86A12; }
.item.risk .state, .item.risk .duty { color: #8A560C; font-weight: 600; }

.item > summary { cursor: pointer; list-style: none; }
.item > summary::-webkit-details-marker { display: none; }
.item > summary::after {
  content: '';
  justify-self: end;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.15rem) rotate(45deg);
  color: var(--muted);
}
.item[open] > summary::after { transform: translateY(0.1rem) rotate(-135deg); }

.narrow-only { display: none; }

.detail {
  display: grid;
  gap: 1.5rem 2.5rem;
  padding: 1.1rem 1.1rem 1.3rem;
  border-top: 1px solid var(--rule);
}
@media (min-width: 60rem) {
  .detail { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}
.detail > * { min-width: 0; }
.detail-short p { max-width: var(--measure); }

.detail h3 { font-size: var(--step-0); margin-bottom: 0.4rem; }
.detail .meta { color: var(--muted); margin-bottom: 0.4rem; }

.detail table { width: 100%; border-collapse: collapse; }
.detail caption { text-align: left; padding: 0.3rem 0; color: var(--muted); }
.detail th, .detail td { text-align: left; padding: 0.4rem 0.6rem 0.4rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.detail th { font-weight: 600; color: var(--muted); }
.detail td.num, .detail th.num { text-align: right; padding-left: 0.6rem; padding-right: 1rem; }
.detail td:last-child, .detail th:last-child { padding-right: 0; }
.detail tfoot th, .detail tfoot td { font-weight: 600; color: var(--text); border-bottom: 0; }
.bom td.supplier { white-space: nowrap; }
.bom .changed td { background: #FBEDEB; }
.bom .status.ok { color: #2F6B45; }
.bom .status.bad { color: var(--refusal); font-weight: 600; }

.verdict {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content);
  gap: 0.35rem 1rem;
  margin: 0.8rem 0 0;
}
.verdict dt { color: var(--muted); }
.verdict dd { margin: 0; text-align: right; font-weight: 600; }
.verdict .after { color: var(--refusal); }

.stamp {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 0.5rem;
  border: 2px solid var(--refusal);
  color: var(--refusal);
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  transform: rotate(-1.5deg);
}

.impact .next { margin-top: 0.9rem; }

.register .note { padding: 0.8rem 1.1rem 0.9rem; color: var(--muted); font-style: italic; }

@media (max-width: 45rem) {
  .cols { display: none; }
  .item > summary, .item.ok {
    grid-template-columns: max-content minmax(0, 1fr) 1.25rem;
    grid-template-areas: "product product chev" "dest state chev" "orders duty chev";
    gap: 0.15rem 1rem;
  }
  .item .product { grid-area: product; }
  .item .dest { grid-area: dest; color: var(--muted); }
  .item .state { grid-area: state; text-align: right; }
  .item .orders { grid-area: orders; }
  .item .duty { grid-area: duty; }
  .item .dest, .item .orders { white-space: nowrap; }
  .item > summary::after, .item.ok::after { grid-area: chev; align-self: center; }
  .narrow-only { display: inline; }
  .item.ok .duty { visibility: hidden; }
}

@media (max-width: 30rem) {
  .detail .hide-narrow { display: none; }
  .verdict { grid-template-columns: minmax(0, 1fr) minmax(0, 45%); }
}

/* body sections */

.section {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: 0;
  display: grid;
  gap: 1.25rem;
}

.section > * { max-width: var(--measure); }

.pains, .builds { margin: 0; padding: 0; list-style: none; display: grid; gap: 1.1rem; }

.pains li { padding-left: 1.1rem; border-left: 3px solid var(--guilloche); }
.pains strong, .builds strong { color: var(--ink); font-weight: 600; }

.builds li { padding-left: 1.1rem; border-left: 3px solid var(--ink); }

.offer {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  background: var(--form);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.offer .section { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }

.colophon {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  font-size: var(--step--1);
  color: var(--muted);
  display: grid;
  gap: 0.6rem;
}
.colophon p { max-width: var(--measure); }

@media print {
  .hero, .offer { background: none; }
}
