:root {
  color-scheme: light;
  --ink: #26231f;
  --muted: #645c51;
  --night: #171613;
  --bronze: #ad8c64;
  --light: #faf8f4;
  --border: #e4ddd1;
  --accent: #6d482b;
  --display: "Iowan Old Style", Baskerville, Georgia, serif;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--light);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; }
p, h1, h2 { margin: 0; }
.wrap { width: min(64rem, 100% - 3rem); margin-inline: auto; }

.skip {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 2;
  padding: .7rem 1rem;
  background: white;
  color: var(--ink);
  transform: translateY(-200%);
}

.skip:focus { transform: translateY(0); }
:where(a, button, input):focus-visible { outline: 2px solid #a15c31; outline-offset: 4px; }

.masthead {
  color: #fffaf2;
  background: var(--night);
  border-bottom: 1px solid #5b4d3a;
}

.masthead-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
}

.masthead-inner { min-height: 4.75rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  color: inherit;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 6.25rem;
  height: auto;
  filter: brightness(0) invert(1);
}

.brand span {
  padding-left: .85rem;
  border-left: 1px solid #7a6a52;
  font-size: .88rem;
  line-height: 1.25;
}

.somus-link, .footer a {
  text-underline-offset: .22em;
  font-size: .9rem;
}

.intro {
  color: #fffaf2;
  background: linear-gradient(115deg, #171613 40%, #2c251d);
  border-bottom: 4px solid var(--bronze);
}

.intro-inner { padding-block: clamp(2.5rem, 6vw, 4.3rem); }
.eyebrow {
  margin-bottom: .7rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #e4ccb1;
}

h1 {
  margin-bottom: .75rem;
  font: 500 clamp(2.65rem, 7vw, 4.8rem)/1.03 var(--display);
  letter-spacing: -.04em;
}

.intro-inner > p:last-child {
  max-width: 38rem;
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.6;
  color: #f0e7db;
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .7fr);
  align-items: start;
  gap: 1.2rem;
  padding-block: clamp(1.5rem, 5vw, 3.25rem);
}

.lookup, .result, .guidance {
  min-width: 0;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: #fffdf9;
}

.lookup, .result { grid-column: 1; }
.guidance { grid-column: 2; grid-row: 1 / span 2; }
h2 { margin-bottom: .9rem; font: 600 clamp(1.5rem, 3vw, 2rem)/1.12 var(--display); }
label { display: block; margin-bottom: .45rem; font-size: .92rem; font-weight: 650; }
.form-row { display: flex; gap: .5rem; }
input, button {
  min-height: 2.85rem;
  border-radius: .55rem;
  font: inherit;
}

input {
  width: 100%;
  min-width: 0;
  padding: .65rem .75rem;
  border: 1px solid #b7a898;
  color: var(--ink);
  background: #fff;
}

input::placeholder { color: #6b6256; }
button {
  padding: .65rem 1.05rem;
  border: 1px solid var(--night);
  color: white;
  background: var(--night);
  font-weight: 650;
  cursor: pointer;
}
button:hover { background: #423329; }

.hint, .guidance p, .result p {
  color: var(--muted);
  line-height: 1.55;
}

.hint { margin-top: .65rem; font-size: .92rem; }
.text-link {
  display: inline-block;
  margin-top: .85rem;
  color: var(--accent);
  font-weight: 650;
  text-underline-offset: .22em;
}

.result h2 { margin-block: .72rem .5rem; }
.example-label {
  margin: 1.25rem 0 .45rem;
  font-size: .95rem;
  font-weight: 650;
}
.example-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.example-links .text-link { margin-top: 0; }

.state[hidden] { display: none; }

.state {
  display: inline-block;
  padding: .33rem .68rem;
  border: 1px solid #c7ac89;
  border-radius: 2rem;
  color: #5c3c22;
  background: #f1e3d2;
  font-size: .83rem;
  font-weight: 700;
}

.result[data-state="demo"] {
  border-color: #c7ac89;
  background: #fdf8ee;
}
.result[data-state="active"] .state { color: #432b14; background: #ead7aa; border-color: #b99b64; }
.result:is([data-state="expired"], [data-state="revoked"], [data-state="invalid"]) .state {
  color: #6c302c;
  background: #f7e4e1;
  border-color: #c68d87;
}

.result { container-type: inline-size; }
.result-body { display: grid; gap: 1.2rem; }
.result-badge { justify-self: center; width: min(100%, 18rem); margin-block-start: 1.3rem; }
.record { min-width: 0; margin: 1.2rem 0 0; }
.result-badge:not([hidden]) + .record { margin: 0; }

@container (min-width: 31rem) {
  .result-body:has(.result-badge:not([hidden])) {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    align-items: start;
    margin-block-start: 1.3rem;
  }

  .result-body:has(.result-badge:not([hidden])) .result-badge { margin: 0; }
  .result-body:has(.result-badge:not([hidden])) .record > div { grid-template-columns: 1fr; gap: .18rem; }
}

.record > div {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr);
  align-items: start;
  gap: .7rem;
  padding-block: .6rem;
  border-top: 1px solid var(--border);
}
.record dt { color: var(--muted); }
.record dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.record dd.record-category { font-weight: 400; }

.guidance ul { margin: 0; padding: 0; list-style: none; }
.guidance li {
  display: grid;
  gap: .22rem;
  padding-block: .72rem;
  border-top: 1px solid var(--border);
}
.guidance li span { color: var(--muted); line-height: 1.48; }
.guidance p { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .9rem; }

.footer { border-top: 1px solid var(--border); }
.footer-inner { padding-block: 1.4rem; color: var(--muted); font-size: .9rem; }

@media (max-width: 48rem) {
  .content { display: block; }
  .content > section:not([hidden]) ~ section:not([hidden]) { margin-top: 1rem; }
}

@media (max-width: 27rem) {
  .wrap { width: calc(100% - 2rem); }
  .brand { gap: .55rem; }
  .brand img { width: 4.6rem; }
  .brand span { padding-left: .55rem; font-size: .79rem; }
  .somus-link { font-size: .82rem; }
  .record > div { grid-template-columns: 1fr; gap: .18rem; }
  .footer-inner { align-items: start; flex-direction: column; gap: .45rem; }
}
