:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #1e1e1e;
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #202020;
  --muted: #545454;
  --pink: #fff0ed;
  --red: #d84038;
  --blue: #07589b;
  --green: #1f8a4c;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 320px;
  margin: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  font-size: 14px;
  line-height: 1.6;
}

button, input { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.site-header {
  height: 52px;
  padding: 0 max(24px, calc((100% - 1160px) / 2));
  display: flex;
  align-items: center;
  border-bottom: 1px solid #dedede;
}

.wordmark, .footer-wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #c51d2d;
  line-height: 1;
  text-decoration: none;
}

.lilly-logo {
  display: block;
  width: auto;
  height: 26px;
  color: #c51d2d;
  transform: translateY(1px);
}

.site-header .lilly-logo {
  height: 24px;
}

.footer-lilly-logo {
  height: 24px;
}

.dialog-lilly-logo {
  height: 22px;
}

.notice-bar {
  border-bottom: 1px solid #c5d3dd;
  font-size: 11px;
}

.notice {
  min-height: 23px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 10px;
  color: var(--blue);
}

.notice-primary {
  background: #f3eff9;
  border-top: 1px solid #8064ad;
  border-bottom: 1px solid #8064ad;
}

.notice-primary summary {
  width: 100%;
  min-height: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
}

.notice-primary summary::-webkit-details-marker { display: none; }
.notice-primary > p { margin: 0 0 7px 24px; color: #34303b; }
.notice-primary[open] { display: block; }
.notice-icon { display: grid; width: 14px; height: 14px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; font-weight: 700; text-decoration: none; }
.chevron { margin-left: auto; color: inherit; font-size: 17px; line-height: 1; transition: transform .18s ease; }
details[open] > summary .chevron { transform: rotate(180deg); }
.notice-secondary { justify-content: space-between; background: #f6f7f8; font-weight: 700; text-decoration: underline; }
.external-arrow { font-size: 15px; text-decoration: none; }

.content-column {
  width: min(100%, 320px);
  margin: 0 auto;
  border-right: 1px solid #f0f0f0;
  border-left: 1px solid #f0f0f0;
}

.intro { padding: 17px 20px 17px; }
h1 { margin: 0 0 15px; font-size: 27px; line-height: 1.28; letter-spacing: -.35px; }
.intro > p { margin: 0; color: #383838; font-size: 15px; line-height: 1.88; }

.scan-section, .how-to { padding: 15px 8px 18px; background: var(--pink); }
.scanner-frame {
  position: relative;
  height: 146px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid #191919;
  border-radius: 8px;
  background: #111;
}

#cameraVideo { display: none; width: 100%; height: 100%; object-fit: cover; }
#cameraVideo.active { display: block; }
.scan-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 16px;
  color: #fff;
  text-align: center;
  font-size: 12px;
}
.scan-symbol { width: 37px; height: 37px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.scan-line { position: absolute; left: 9%; right: 9%; top: 50%; display: none; height: 1px; background: #f26b61; box-shadow: 0 0 8px #ff6559; }
.scanner-frame.scanning .scan-line { display: block; animation: scan 2s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateY(-37px); } to { transform: translateY(37px); } }
.camera-status { min-height: 18px; margin: 7px 0 2px; color: #4f4a49; font-size: 10px; line-height: 1.4; }
.scan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.button { min-height: 38px; padding: 8px 12px; border: 1px solid transparent; border-radius: 3px; cursor: pointer; font-size: 12px; font-weight: 700; transition: background .15s ease, transform .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, .text-button:focus-visible, .dialog-decline:focus-visible { outline: 3px solid #2878b9; outline-offset: 2px; }
.button-dark { background: #222; color: #fff; }
.button-dark:hover { background: #3d3d3d; }
.button-outline { border-color: #272727; background: transparent; color: #222; }
.button-outline:hover { background: #fff8f6; }
.button-accent { background: var(--red); color: #fff; }
.button-accent:hover { background: #bd3029; }
.manual-form { margin-top: 14px; }
.manual-form label { display: block; margin-bottom: 5px; font-size: 11px; font-weight: 700; }
.manual-entry { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.manual-entry input { min-width: 0; height: 38px; padding: 7px 9px; border: 1px solid #bdb7b5; border-radius: 3px; background: #fff; font-size: 11px; }
.manual-entry .button { min-height: 38px; padding-inline: 10px; }
.field-error { min-height: 0; margin: 0; color: #a3201a; font-size: 11px; }
.field-error:not(:empty) { margin-top: 5px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

.how-to { padding-top: 0; }
h2 { font-size: 19px; line-height: 1.25; }
.how-to h2 { margin: 0 0 8px; }
.how-to > p { margin: 0; color: #444; font-size: 12px; line-height: 1.55; }
.package-example { min-height: 88px; width: min(100% - 30px, 222px); margin: 18px auto 4px; padding: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #222; color: #fff; }
.serial-example { display: flex; flex-direction: column; gap: 3px; font-family: "Courier New", monospace; font-size: 9px; letter-spacing: .2px; }
.serial-example span:first-child { color: #d4d4d4; font-family: Arial, sans-serif; font-size: 7px; letter-spacing: .7px; }
.serial-example strong { font-size: 13px; letter-spacing: .4px; }
.example-qr { width: 51px; height: 51px; flex: 0 0 51px; image-rendering: pixelated; }
.example-caption { position: relative; width: 135px; margin: 0 auto 13px !important; color: #555 !important; text-align: center; font-size: 9px !important; }
.caption-arrow { position: absolute; top: -14px; right: -13px; color: var(--red); font-size: 17px; }
.important-note { display: flex; gap: 8px; padding: 10px 9px; border-top: 1px solid #e7d4d1; color: #444; }
.important-note p { margin: 0; font-size: 10px; line-height: 1.55; }
.note-icon { width: 15px; height: 15px; flex: 0 0 15px; display: grid; place-items: center; border: 1px solid #d84038; border-radius: 50%; color: #b7312a; font-size: 10px; font-weight: 700; }

/* ---------- Resultado da verificação ---------- */
.result-panel {
  padding: 18px 18px 20px;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.result-head { display: flex; gap: 12px; align-items: flex-start; }
.result-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border: 2px solid #2a7b4d;
  border-radius: 50%;
  color: #2a7b4d;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.result-text { flex: 1; }
.result-panel h2 {
  margin: 0 0 4px;
  color: #252525;
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.result-panel p {
  margin: 0;
  color: #3b3b3b;
  font-size: 12px;
  line-height: 1.5;
}

/* estado: autêntico (verde) */
.result-panel.is-autentico {
  background: #fff;
  border-color: transparent;
}
.result-panel.is-autentico .result-icon { display: none; }
.result-panel.is-autentico .result-head { display: block; }
.result-panel.is-autentico h2 { color: #252525; }
.result-panel.is-autentico #resultMessage { display: none; }

/* estado: alerta / não encontrado (vermelho) */
.result-panel.is-alerta {
  background: #fdf2f1;
  border-color: #efd0cd;
}
.result-panel.is-alerta .result-icon { border-color: var(--red); color: var(--red); }
.result-panel.is-alerta h2 { color: #b7312a; }

/* estado: neutro / inválido / erro */
.result-panel.is-neutro {
  background: #f6f7f8;
  border-color: #dcdfe2;
}
.result-panel.is-neutro .result-icon { border-color: #6b7280; color: #4b5563; }

.product-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
  margin-top: 20px;
}
.product-visual {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.product-visual img {
  display: block;
  width: 100%;
  max-width: 360px;
  max-height: 230px;
  height: auto;
  object-fit: contain;
  filter: none;
}
.product-info {
  margin: 0;
  padding: 4px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: grid;
  gap: 0;
  min-height: 0;
}
.product-info div {
  display: grid;
  grid-template-columns: minmax(112px, 120px) minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid #e5e5e5;
}
.product-info div:last-child {
  border-bottom: 0;
}
.product-info dt {
  margin: 0;
  color: #4b5563;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.product-info dd {
  margin: 0;
  color: #202020;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.product-info div:first-child {
  display: block;
  padding: 0 0 12px;
  border-bottom: 0;
}
.product-info div:first-child dt {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.product-info div:first-child dd {
  font-size: 21px;
  line-height: 1.35;
}

.result-code-label {
  margin: 14px 0 4px !important;
  color: #4f4f4f !important;
  font-size: 9px !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.result-panel code {
  display: block;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: .02em;
  color: #1f1f1f;
  font-weight: 700;
  font-family: Arial, Helvetica, sans-serif;
}
.text-button {
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: #1c5c9c;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
}

.result-panel.is-autentico .result-code-label,
.result-panel.is-autentico #resultCode { display: none; }

@media (max-width: 420px) {
  .result-panel { padding-inline: 16px; }
  .result-panel h2 { font-size: 22px; }
  .product-visual img { max-height: 190px; }
  .product-info div { grid-template-columns: minmax(112px, 120px) minmax(0, 1fr); gap: 10px; }
  .product-info div:first-child dd { font-size: 20px; }
}

.support-details { border-top: 1px solid #dfd5d3; background: #fff; }
.support-details summary { min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; font-size: 10px; font-weight: 700; list-style: none; }
.support-details summary::-webkit-details-marker { display: none; }
.support-details .chevron { color: #333; }
.support-content { padding: 0 10px 10px; color: #454545; }
.support-content p { margin: 0 0 8px; font-size: 10px; line-height: 1.55; }
.support-content p:last-child { margin-bottom: 0; }

.site-footer { min-height: 64px; margin-top: 0; background: #222; color: #f6f6f6; }
.footer-inner { max-width: 1160px; min-height: 64px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: flex-end; }
.footer-wordmark { color: #c51d2d; font-size: 22px; }

.consent-dialog { width: min(420px, calc(100% - 32px)); padding: 28px 28px 22px; border: 0; border-radius: 3px; box-shadow: 0 18px 60px #0005; }
.consent-dialog::backdrop { background: #0008; }
.dialog-mark { color: var(--red); font-family: Georgia, serif; font-size: 22px; font-style: italic; font-weight: 700; }
.consent-dialog h2 { margin: 12px 0 8px; font-size: 20px; }
.consent-dialog p { margin: 0 0 17px; color: #444; font-size: 12px; line-height: 1.6; }
.dialog-button { width: 100%; }
.dialog-decline { display: block; margin: 12px auto 0; padding: 4px; border: 0; background: transparent; color: #444; cursor: pointer; font-size: 11px; text-decoration: underline; }
@media (max-width: 480px) {
  .site-header { padding-inline: 15px; }
  .notice { padding-inline: 8px; font-size: 10px; }
  .content-column { border: 0; }
  .footer-inner { padding-inline: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
