/* klryz.com — poll */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Outfit:wght@400;500;600&display=swap");

:root {
  --ink: #0b1714;
  --deep: #122821;
  --moss: #1e3f35;
  --leaf: #3f8f74;
  --mist: #c5d9d0;
  --paper: #eef3ef;
  --cream: #f7faf8;
  --line: #2a4a40;
  --warn: #c45c4a;
  --ok: #4a9e78;
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Outfit", system-ui, sans-serif;
  --radius: 10px;
  --max: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  background:
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(63, 143, 116, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 0% 100%, rgba(18, 40, 33, 0.9), transparent 50%),
    var(--ink);
  color: var(--paper);
  line-height: 1.55;
  font-size: 17px;
}

a { color: var(--leaf); }
a:hover { color: var(--mist); }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--cream); color: var(--ink); padding: 10px 14px; z-index: 50;
}
.skip:focus { left: 8px; top: 8px; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand span { color: var(--leaf); }
.top nav a {
  color: var(--mist);
  text-decoration: none;
  font-size: 0.95rem;
  margin-left: 16px;
}
.top nav a:hover { color: var(--cream); }

.hero {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 28px;
  animation: rise 0.7s ease both;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.85rem);
  line-height: 1.12;
  margin: 0 0 14px;
  color: var(--cream);
  font-weight: 700;
}
.hero p {
  margin: 0;
  max-width: 38ch;
  color: var(--mist);
  font-size: 1.05rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 80px;
  animation: rise 0.7s ease 0.12s both;
}

.note {
  font-size: 0.9rem;
  color: var(--mist);
  margin: 0 0 28px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.q {
  margin: 0 0 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.q:last-of-type { border-bottom: none; }
.q-label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--cream);
  margin-bottom: 6px;
  font-weight: 600;
}
.q-hint {
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--mist) 80%, transparent);
  margin: 0 0 12px;
}
.req {
  color: var(--leaf);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 6px;
}
.opt {
  color: color-mix(in srgb, var(--mist) 70%, transparent);
  font-size: 0.75rem;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--cream);
  font: inherit;
}
textarea { min-height: 100px; resize: vertical; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--mist) 55%, transparent); }

.scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.scale label {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--deep);
  color: var(--mist);
  font-size: 0.92rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale label:has(input:checked),
.scale label:hover {
  background: var(--moss);
  border-color: var(--leaf);
  color: var(--cream);
}

.checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}
.checks label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--mist);
  cursor: pointer;
}
.checks label:has(input:checked) {
  border-color: var(--leaf);
  color: var(--cream);
}
.checks input { margin-top: 3px; accent-color: var(--leaf); }

.stars {
  display: flex;
  gap: 6px;
}
.stars button {
  appearance: none;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--line);
  cursor: pointer;
  padding: 0 2px;
}
.stars button.on,
.stars button:hover { color: #d4a574; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--deep);
  color: var(--cream);
  font: inherit;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
}
.btn.primary {
  background: var(--leaf);
  border-color: var(--leaf);
  color: var(--ink);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn:hover { border-color: var(--leaf); }

.status {
  font-size: 0.95rem;
  color: var(--mist);
}
.status.err { color: #e8a090; }
.status.ok { color: var(--ok); }

.thanks {
  display: none;
  padding: 40px 0;
  animation: rise 0.5s ease both;
}
.thanks h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0 0 10px;
}
.thanks p { color: var(--mist); max-width: 40ch; }

/* Admin */
.admin-login, .admin-dash { width: min(1100px, calc(100% - 40px)); margin: 32px auto 80px; }
.admin-dash[hidden], .admin-login[hidden] { display: none !important; }
.charts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.chart-block {
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.chart-block h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 10px;
  color: var(--cream);
}
.chart-block canvas { width: 100% !important; max-height: 220px; }
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.table-wrap { overflow-x: auto; margin-top: 28px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { color: var(--mist); font-weight: 500; }
.suggestions li { margin-bottom: 10px; color: var(--mist); }

@media (max-width: 600px) {
  .hero { padding-top: 36px; }
  .checks { grid-template-columns: 1fr 1fr; }
}
