@font-face {
  font-family: "Lato Innpulso";
  src: url("../fonts/red-innpulso/Lato-Regular.122dd68d69fe.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Lato Innpulso";
  src: url("../fonts/red-innpulso/Lato-Bold.24b516c266d7.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

@font-face {
  font-family: "Lato Innpulso";
  src: url("../fonts/red-innpulso/Lato-Black.d83ab24f5cf2.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 900;
}

:root {
  --ink: #211f1d;
  --muted: #68625e;
  --surface: #ffffff;
  --background: #f7f4f1;
  --line: #eadfd6;
  --brand: #eb6500;
  --brand-dark: #eb6500;
  --brand-hover: #cf5700;
  --brand-light: #f7b27e;
  --brand-soft: #fff3ea;
  --danger: #a82b31;
  --danger-dark: #812027;
  --warning: #fff5d7;
  --shadow: 0 16px 40px rgba(58, 42, 31, .09);
  --shadow-soft: 0 6px 18px rgba(58, 42, 31, .07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 3%, rgba(235, 101, 0, .09), transparent 26rem),
    radial-gradient(circle at 94% 24%, rgba(247, 178, 126, .13), transparent 30rem),
    var(--background);
  font-family: "Lato Innpulso", Lato, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.55;
}

a { color: var(--brand); }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header { position: relative; z-index: 2; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); box-shadow: 0 4px 24px rgba(58, 42, 31, .05); }
.header-inner, .footer-inner { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 700;
}
.brand-logo { display: block; width: min(100%, 1000px); height: auto; }
.main-content { min-height: calc(100vh - 178px); padding-block: 52px 72px; }
.site-footer { color: #fff; background: var(--brand); font-size: .9rem; }
.site-footer a { color: #fff; text-underline-offset: 4px; }
.footer-inner { min-height: 82px; }

h1, h2 { margin: 0; line-height: 1.14; letter-spacing: -.025em; }
h1 { color: var(--brand); font-size: clamp(2.1rem, 5vw, 3.35rem); font-weight: 900; }
h2 { color: var(--brand); font-size: 1.35rem; font-weight: 700; }
p { margin: .75rem 0; }
.lead { max-width: 46rem; color: var(--muted); font-size: 1.08rem; margin: 16px 0 30px; }
.eyebrow {
  display: block;
  margin-bottom: 13px;
  color: #a34400;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.narrow-card, .content-card { border: 1px solid rgba(234, 223, 214, .9); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.narrow-card { width: min(610px, 100%); margin: 24px auto; padding: clamp(30px, 5vw, 52px); }
.wide-card { width: min(760px, 100%); }
.hero-card { margin-top: clamp(16px, 5vh, 58px); }
.content-card { padding: 30px; }
.stack-form { display: grid; gap: 21px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--ink); font-weight: 700; }
.field input[type="text"], .field input[type="password"], .field input[type="file"] {
  width: 100%;
  border: 1px solid #ded5ce;
  border-radius: 12px;
  background: #fffdfb;
  box-shadow: inset 0 1px 2px rgba(58, 42, 31, .04);
  padding: 16px;
  color: var(--ink);
  font: inherit;
}
.field input:focus { outline: 4px solid rgba(235, 101, 0, .14); border-color: var(--brand); }
.field small, .privacy-note { color: var(--muted); font-size: .88rem; }
.privacy-note { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.field-error, .errorlist { color: var(--danger); margin: 0; font-size: .9rem; }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 22px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(235, 101, 0, .18);
  transition: background .18s, box-shadow .18s, color .18s, transform .18s;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 11px 24px rgba(235, 101, 0, .23); }
.button:focus-visible, a:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 3px; }
.button-primary { color: #fff; background: var(--brand); }
.button-primary:hover { background: var(--brand-hover); }
.button-secondary, .button-ghost { color: #fff; border-color: var(--brand); background: var(--brand); }
.button-secondary:hover, .button-ghost:hover { color: #fff; background: var(--brand-hover); }
.button-danger { color: #fff; background: #343434; }
.button-danger:hover { background: #1f1f1f; box-shadow: 0 11px 24px rgba(31, 31, 31, .2); }
.button-danger-outline { color: var(--danger); border-color: var(--danger); background: #fff; }
.button-danger-outline:hover { color: #fff; background: var(--danger); box-shadow: 0 11px 24px rgba(168, 43, 49, .16); }
.button-ghost { box-shadow: none; }
.button-small { min-height: 40px; padding: 8px 15px; border-radius: 10px; font-size: .88rem; }
.button-full { width: 100%; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; }

.state-panel { display: flex; gap: 15px; align-items: flex-start; padding: 20px; border: 1px solid #f7d3b9; border-radius: 16px; background: var(--brand-soft); }
.state-panel p { color: var(--muted); margin: 4px 0 0; }
.status-dot { flex: 0 0 auto; width: 12px; height: 12px; margin-top: 7px; border-radius: 50%; background: #d49a10; }
.state-closed .status-dot { background: var(--muted); }
.choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.choice-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
  transition: border-color .18s, background .18s, color .18s, transform .18s;
}
.choice-card:hover { border-color: var(--brand-light); background: var(--brand-soft); transform: translateY(-2px); }
.choice-card:has(input:checked) { border-color: var(--brand); background: var(--brand); color: #fff; }
.choice-card input { accent-color: var(--brand); width: 18px; height: 18px; }
.selection-summary { margin: 12px 0 24px; border-radius: 16px; padding: 20px; background: var(--brand); color: #fff; font-size: 1.3rem; font-weight: 700; }
.warning-box { margin: 19px 0 25px; border: 1px solid #edcf81; border-radius: 14px; padding: 16px 18px; background: var(--warning); }
.result-card { text-align: center; }
.result-card .button { margin-top: 16px; }
.success-mark, .info-mark { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 24px; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(235, 101, 0, .2); font-size: 2rem; font-weight: 900; }
.info-mark { background: var(--brand-soft); color: var(--brand-dark); font-family: Georgia, serif; }

.message-list { display: grid; gap: 9px; margin-bottom: 24px; }
.message { border: 1px solid #f7d3b9; border-radius: 14px; padding: 14px 17px; background: var(--brand-soft); }
.message-success { border-color: var(--brand-light); color: #a34400; }
.message-error { border-color: #edb9bc; background: #fae8e8; color: #842323; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading .eyebrow { color: var(--muted); }
.heading-status { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.status-badge, .pill { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 999px; padding: 7px 12px; background: var(--brand-soft); color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.status-open, .pill-success { color: #fff; background: var(--brand); }
.status-draft { color: #72540c; background: var(--warning); }
.status-closed { color: #fff; background: var(--muted); }
.live-indicator { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: .82rem; font-weight: 700; }
.live-indicator > span { width: 10px; height: 10px; border-radius: 50%; background: #2fa56f; box-shadow: 0 0 0 5px rgba(47, 165, 111, .16); animation: live-pulse 2s infinite; }
.live-indicator.live-error > span { background: var(--danger); box-shadow: none; animation: none; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 9px rgba(47, 165, 111, 0); } }
.live-updated { margin: 16px 2px 0; color: var(--muted); font-size: .8rem; text-align: right; }
.refresh-dashboard-button { min-width: 142px; }
.refresh-dashboard-button:disabled { cursor: wait; opacity: .68; transform: none; }
.public-live-status {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: .82rem;
}
.public-live-status::before {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #2fa56f;
  box-shadow: 0 0 0 4px rgba(47, 165, 111, .14);
  content: "";
}
.public-live-status.live-error { color: var(--danger); }
.public-live-status.live-error::before { background: var(--danger); box-shadow: none; }
.result-card .public-live-status { margin-inline: auto; }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 20px; }
.metric { border: 1px solid var(--line); border-radius: 18px; padding: 24px; background: #fff; box-shadow: var(--shadow-soft); }
.metric:nth-child(2) { background: #fffaf6; }
.metric:nth-child(3) { background: var(--brand-soft); }
.metric span { display: block; color: var(--muted); font-size: .84rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.metric strong { display: block; margin-top: 7px; color: var(--brand-dark); font-size: 2.25rem; line-height: 1; }
.control-panel { display: flex; align-items: center; justify-content: space-between; gap: 26px; margin-bottom: 20px; }
.control-panel p { color: var(--muted); margin-bottom: 0; }
.report-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; background: #fff; box-shadow: var(--shadow-soft); }
.report-bar strong, .report-bar span { display: block; }
.report-bar strong { color: var(--brand-dark); }
.report-bar span { margin-top: 2px; color: var(--muted); font-size: .86rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 19px; }
.section-heading span { color: var(--muted); font-size: .88rem; }
.table-scroll { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: left; }
tbody tr:hover { background: #fff8f3; }
tbody tr:last-child td { border-bottom: 0; }
th { position: sticky; top: 0; background: var(--brand-soft); color: #a34400; font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; }
.number { text-align: right; }
.empty-state { padding: 32px 0; color: var(--muted); text-align: center; }
.check-field { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.check-field input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }
.validation-errors { margin: 21px 0; border: 1px solid #edb9bc; border-radius: 14px; padding: 17px 19px; background: #fae8e8; color: #842323; }
.validation-errors ul { margin-bottom: 0; padding-left: 20px; }
code { padding: 3px 7px; background: var(--brand-soft); color: var(--brand-dark); font-size: .9em; }

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

@media (max-width: 760px) {
  .container { width: min(100% - 28px, 1180px); }
  .main-content { padding-block: 34px 54px; }
  .header-inner { min-height: 88px; }
  .choice-list, .metric-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .control-panel, .page-heading { align-items: flex-start; flex-direction: column; }
  .report-bar { align-items: stretch; flex-direction: column; }
  .report-bar .button-row, .report-bar .button { width: 100%; }
  .control-panel .button-row, .control-panel form, .control-panel .button { width: 100%; }
  .narrow-card, .content-card { padding: 25px; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: 5px; padding-block: 16px; }
  h1 { font-size: 2.2rem; }
  .header-inner { align-items: stretch; flex-direction: column; gap: 12px; padding-block: 16px; }
  .header-inner form { align-self: flex-end; }
  .brand-logo { width: 100%; }
}
