:root {
  --ink: #2d1723;
  --wine: #5b1836;
  --plum: #74415a;
  --paper: #f3eee7;
  --cream: #fbf8f3;
  --line: #c8beb4;
  --green: #285f4c;
  --green-soft: #d7e6dc;
  --white: #fffdf9;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
a { color: inherit; }

.site-header {
  min-height: 108px;
  padding: 24px clamp(24px, 4.5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(45, 23, 35, 0.25);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-underline-offset: 5px;
  font-size: 14px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
}

.eyebrow > span {
  width: 8px;
  height: 8px;
  background: var(--wine);
  border-radius: 50%;
}

.lookup-page {
  min-height: calc(100vh - 210px);
  padding: clamp(80px, 13vw, 180px) clamp(24px, 10vw, 160px);
}

.lookup-page h1,
.certificate-hero h1,
.message-page h1 {
  margin: 32px 0 0;
  max-width: 1100px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 8.8vw, 138px);
  font-weight: 400;
  line-height: 0.91;
  letter-spacing: -0.065em;
}

.intro {
  max-width: 680px;
  margin: 38px 0 0;
  font: 400 clamp(21px, 2.2vw, 32px)/1.3 Georgia, serif;
}

.lookup-form {
  margin-top: 72px;
  max-width: 860px;
}

.lookup-form label,
.field-label,
.section-kicker {
  display: block;
  margin: 0 0 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  font-weight: 750;
}

.lookup-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 1px solid var(--ink);
}

.lookup-controls input {
  min-width: 0;
  padding: 20px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  outline: none;
  font: 400 clamp(18px, 2vw, 26px) Georgia, serif;
}

.lookup-controls input::placeholder { color: rgba(45, 23, 35, 0.45); }

.lookup-controls button,
.button-link {
  border: 0;
  border-radius: 999px;
  background: var(--wine);
  color: white;
  padding: 16px 24px;
  display: inline-flex;
  align-items: center;
  gap: 25px;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}

.certificate-hero {
  padding: 54px clamp(24px, 4.5vw, 72px) 78px;
}

.hero-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 10px 15px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  font-weight: 750;
}

.status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-valid { color: var(--green); background: var(--green-soft); }
.status-expired,
.status-suspended,
.status-withdrawn { color: #8a392e; background: #f0d8d2; }

.certificate-hero h1 {
  max-width: 1220px;
  margin-top: clamp(70px, 9vw, 128px);
  font-size: clamp(54px, 7.7vw, 118px);
}

.identity-row {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.identity-row > div { padding: 25px 0 0; }

.identity-row > div + div {
  padding-left: 30px;
  border-left: 1px solid var(--line);
}

.identity-value {
  margin: 0;
  font: 400 clamp(23px, 2.5vw, 36px) Georgia, serif;
}

.certificate-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 2fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.certificate-summary {
  padding: 62px clamp(24px, 4.5vw, 72px);
  background: var(--wine);
  color: var(--white);
}

.certificate-summary dl { margin: 48px 0 0; }

.certificate-summary dl > div {
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.certificate-summary dt {
  margin-bottom: 9px;
  opacity: 0.68;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 9px;
  font-weight: 700;
}

.certificate-summary dd {
  margin: 0;
  font: 20px/1.3 Georgia, serif;
}

.certificate-content { background: var(--cream); }

.content-section {
  padding: clamp(58px, 8vw, 108px) clamp(28px, 7vw, 112px);
}

.content-section + .content-section { border-top: 1px solid var(--line); }

.content-section h2 {
  max-width: 850px;
  margin: 34px 0 52px;
  font: 400 clamp(32px, 4.4vw, 64px)/1.02 Georgia, serif;
  letter-spacing: -0.035em;
}

.standards-list,
.tag-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.standards-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  padding: 23px 0;
  border-top: 1px solid var(--line);
  font-size: clamp(17px, 1.6vw, 22px);
}

.standards-list li span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 12px;
}

.site-list { border-top: 1px solid var(--line); }

.site-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 22px;
  align-items: start;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.site-number { font: italic 16px Georgia, serif; color: var(--plum); }
.site-item h3 { margin: 0; font-size: 16px; }
.site-item p { margin: 7px 0 0; color: var(--plum); font-size: 13px; }
.site-item .site-type { margin: 0; text-align: right; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list li {
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
}

.verification-note {
  padding: clamp(70px, 10vw, 140px) clamp(24px, 13vw, 200px);
}

.verification-note > p:nth-child(2) {
  max-width: 920px;
  margin: 34px 0 0;
  font: 400 clamp(27px, 3.7vw, 54px)/1.08 Georgia, serif;
  letter-spacing: -0.03em;
}

.last-updated {
  margin-top: 42px !important;
  font: 13px/1.5 "Helvetica Neue", sans-serif !important;
  letter-spacing: 0 !important;
}

.site-footer {
  padding: 38px clamp(24px, 4.5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
}

.site-footer nav { display: flex; gap: 20px; }

.loading-page,
.message-page {
  min-height: calc(100vh - 108px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 70px clamp(24px, 10vw, 160px);
}

.loading-page {
  align-items: center;
  gap: 24px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  font-weight: 700;
}

.loading-orb {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--wine);
  border-top-color: transparent;
  animation: spin 0.9s linear infinite;
}

.message-page h1 { max-width: 950px; font-size: clamp(56px, 7.5vw, 108px); }
.message-page > p:not(.message-code) { max-width: 580px; margin: 32px 0; font: 22px/1.4 Georgia, serif; }
.message-code { margin: 28px 0 0; color: var(--plum); }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .site-header { min-height: 88px; }
  .text-link { display: none; }
  .certificate-grid { grid-template-columns: 1fr; }
  .identity-row { grid-template-columns: 1fr; }
  .identity-row > div { padding: 22px 0; }
  .identity-row > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 580px) {
  .lookup-controls { grid-template-columns: 1fr; gap: 18px; border: 0; }
  .lookup-controls input { border-bottom: 1px solid var(--ink); }
  .lookup-controls button { justify-content: space-between; }
  .hero-topline { align-items: flex-start; }
  .site-item { grid-template-columns: 34px 1fr; }
  .site-item .site-type { grid-column: 2; text-align: left; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-orb { animation: none; border-top-color: var(--wine); }
}
