:root {
  color-scheme: light;
  --ink: #292820;
  --muted: #77756d;
  --paper: #f7f4ef;
  --surface: #fffefa;
  --line: #e7e1d7;
  --accent: #8b765d;
  --accent-dark: #6d5b47;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}
a { color: inherit; }
.site-header {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  text-decoration: none;
  font-size: 1.35rem;
  letter-spacing: .12em;
}
.brand span { color: var(--accent); font-style: italic; }
nav { display: flex; gap: 28px; }
nav a, .text-link {
  font-family: Arial, sans-serif;
  font-size: .82rem;
  text-decoration: none;
}
nav a { color: var(--muted); }
nav a:hover, .text-link:hover { color: var(--accent-dark); }
.hero {
  min-height: 560px;
  padding: 112px 24px 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font: 600 .68rem/1.4 Arial, sans-serif;
  letter-spacing: .2em;
}
h1, h2, h3, h4, p { margin-top: 0; }
h1 {
  margin-bottom: 22px;
  font-size: clamp(3rem, 8vw, 6.4rem);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.055em;
}
h1 em { color: var(--accent); font-weight: 400; }
.hero-copy {
  max-width: 470px;
  margin-bottom: 28px;
  color: var(--muted);
  font: 1rem/1.8 Arial, sans-serif;
}
.text-link { color: var(--accent-dark); border-bottom: 1px solid #b9aa96; padding-bottom: 5px; }
.text-link span { margin-left: 8px; }
.garter-section {
  padding: 92px 24px 110px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.section-heading { max-width: 650px; margin: 0 auto 42px; text-align: center; }
h2 { margin-bottom: 10px; font-size: clamp(2.3rem, 5vw, 3.8rem); font-weight: 400; letter-spacing: -.04em; }
.section-heading > p:last-child { color: var(--muted); font: .95rem/1.7 Arial, sans-serif; }
.ranking-panel, .contribution-panel {
  width: min(650px, 100%);
  margin: 0 auto;
  padding: 28px;
  border: 1px solid var(--line);
  background: #fff;
}
.ranking-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.ranking-title h3, .contribution-panel h3 { margin-bottom: 0; font-size: 1.35rem; font-weight: 400; }
.live-indicator { color: var(--muted); font: .7rem Arial, sans-serif; }
.live-indicator span { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #779477; }
.state-message { padding: 24px 0 10px; color: var(--muted); font: .88rem Arial, sans-serif; }
.ranking-list { margin: 0; padding: 0; list-style: none; }
.ranking-list li { display: flex; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); font: .92rem Arial, sans-serif; }
.ranking-list .position { width: 24px; color: var(--accent); }
.contribution-panel { margin-top: 18px; text-align: center; }
.contribution-panel > p:not(.eyebrow) { margin: 8px 0 22px; color: var(--muted); font: .88rem/1.7 Arial, sans-serif; }
.contribution-form { max-width: 420px; margin: 26px auto 0; text-align: left; }
.contribution-form label, .pix-result label {
  display: block;
  margin: 17px 0 7px;
  color: var(--ink);
  font: 600 .78rem Arial, sans-serif;
}
.contribution-form input, .pix-result textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 13px 14px;
  background: #fffefa;
  color: var(--ink);
  font: .9rem Arial, sans-serif;
}
.contribution-form input:focus, .pix-result textarea:focus {
  outline: 2px solid #c9b9a4;
  outline-offset: 2px;
}
.form-hint { margin: 7px 0 18px; color: var(--muted); font: .72rem Arial, sans-serif; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 13px 22px;
  background: var(--accent);
  color: white;
  font: 600 .8rem Arial, sans-serif;
  cursor: pointer;
}
.button:hover:not(:disabled) { background: var(--accent-dark); }
.button:disabled { opacity: .55; cursor: wait; }
.contribution-form .button { width: 100%; }
.button-secondary { width: 100%; margin-top: 12px; background: #fff; color: var(--accent-dark); }
.button-secondary:hover:not(:disabled) { background: var(--paper); }
.form-message { min-height: 18px; margin: 12px 0 0; color: var(--muted); font: .78rem/1.5 Arial, sans-serif; }
.pix-result {
  max-width: 420px;
  margin: 30px auto 0;
  padding-top: 25px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.pix-result h4 { margin-bottom: 6px; font-size: 1.25rem; font-weight: 400; text-align: center; }
.pix-result > p { color: var(--muted); font: .82rem/1.6 Arial, sans-serif; text-align: center; }
.pix-qr-image { display: block; width: min(240px, 100%); height: auto; margin: 18px auto; }
.pix-result textarea { resize: vertical; overflow-wrap: anywhere; }
.pix-ticket-link { display: inline-block; margin-top: 18px; }
.payment-note { margin-top: 20px; font-size: .72rem !important; }
[hidden] { display: none !important; }
footer { padding: 35px 24px; text-align: center; color: var(--muted); }
footer span { color: var(--ink); letter-spacing: .15em; }
footer p { margin: 8px 0 0; font: .75rem Arial, sans-serif; }
@media (max-width: 600px) {
  .site-header { width: min(100% - 32px, 1120px); min-height: 70px; }
  nav { gap: 14px; }
  nav a { font-size: .7rem; }
  .hero { min-height: 490px; padding: 90px 20px; }
  .garter-section { padding: 72px 16px 80px; }
  .ranking-panel, .contribution-panel { padding: 21px; }
  .ranking-title { align-items: flex-start; flex-direction: column; gap: 5px; }
}

/* Opções de valor da gravata digital */
.amount-fieldset {
  min-width: 0;
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}
.amount-fieldset legend {
  margin-bottom: 11px;
  color: var(--ink);
  font: 600 .78rem Arial, sans-serif;
}
.amount-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.amount-option {
  position: relative;
  display: flex;
  min-height: 76px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  margin: 0 !important;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fffefa;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.amount-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.amount-option:has(input:checked) {
  border-color: var(--accent);
  background: #f5f0e9;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.amount-option:focus-within {
  outline: 2px solid #c9b9a4;
  outline-offset: 2px;
}
.amount-value {
  color: var(--ink);
  font: 600 .96rem Arial, sans-serif;
}
.amount-caption {
  color: var(--muted);
  font: .72rem Arial, sans-serif;
}
.amount-option-custom { grid-column: 1 / -1; min-height: 62px; }
.custom-amount-container { margin-top: 16px; }
.custom-amount-container label {
  display: block;
  margin: 0 0 7px;
  color: var(--ink);
  font: 600 .78rem Arial, sans-serif;
}
.custom-amount-container input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 13px 14px;
  background: #fffefa;
  color: var(--ink);
  font: .9rem Arial, sans-serif;
}
.custom-amount-container input:focus {
  outline: 2px solid #c9b9a4;
  outline-offset: 2px;
}
@media (max-width: 380px) {
  .amount-options { grid-template-columns: 1fr; }
  .amount-option-custom { grid-column: auto; }
}
