:root { color-scheme: light; font-family: Arial, Helvetica, sans-serif; color: #171b18; background: #f9faf7; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; }
:focus-visible { outline: 3px solid #51862c; outline-offset: 4px; }

header, footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin: 0 5%; }
header { padding: 28px 0; border-bottom: 1px solid #d9ded5; }
footer { border-top: 1px solid #d9ded5; padding: 22px 0; font-size: 12px; color: #65705f; line-height: 1.5; }
footer span:first-child { letter-spacing: 1.5px; font-weight: 700; }
.brand { color: inherit; text-decoration: none; font-size: 26px; font-weight: 800; letter-spacing: -1.4px; }
.brand span { font-weight: 400; }
.brand .period { color: #467323; font-weight: 800; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; font-size: 14px; }
.nav-form { display: inline; margin: 0; }
nav a, footer a, main a:not(.primary) { color: inherit; text-underline-offset: 4px; }

main { width: min(680px, 90%); margin: 64px auto 50px; flex: 1; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 2px; margin: 0 0 20px; color: #4e5e43; }
h1 { font-size: clamp(38px, 6vw, 58px); line-height: 1.04; letter-spacing: -2.4px; font-weight: 700; margin: 0; }
.intro { color: #596055; font-size: 18px; margin: 20px 0 38px; line-height: 1.5; }
#message, #request-error { font-size: 14px; line-height: 1.6; color: #714221; }
#message { min-height: 22px; margin: 14px 0 20px; }
#request-error { margin: 16px 5% 0; }
.privacy-note { font-size: 13px; line-height: 1.6; color: #596055; }

label { font-size: 15px; font-weight: 700; }
.field-label { display: block; }
textarea, .field-label input { width: 100%; border: 1px solid #9ba591; background: #fff; color: inherit; font: inherit; font-weight: 400; }
textarea { resize: vertical; min-height: 150px; border-radius: 5px; padding: 20px; line-height: 1.5; }
.field-label textarea { display: block; margin: 10px 0 18px; min-height: 100px; }
.field-label input { display: block; margin-top: 10px; padding: 12px; border-radius: 4px; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; line-height: 1.5; font-size: 14px; font-weight: 400; cursor: pointer; }
.consent input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: #467323; }
.submit-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 14px; }
#allowance { font-size: 14px; line-height: 1.5; color: #596055; margin: 0; }

button { font: inherit; cursor: pointer; }
.primary { display: inline-block; border: 1px solid #171b18; border-radius: 4px; padding: 14px 22px; background: #c9fb68; color: #171b18; font-size: 15px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.primary:hover:enabled { background: #b9ed56; }
.primary:disabled { cursor: default; background: #e4e9de; color: #535d4b; border-color: #c7cfbf; }
.text-button { color: inherit; background: none; border: none; padding: 8px 0; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
/* htmx marks a form with .htmx-request while its request is in flight. */
.busy, .htmx-request .idle { display: none; }
.htmx-request .busy { display: inline; }

.verdicts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tones { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.verdict, .tone { border: 1px solid #d1d8c9; border-radius: 4px; padding: 16px; display: flex; flex-direction: column; gap: 7px; }
.tone { background: #fff; }
.verdict strong, .tone strong { font-size: 20px; letter-spacing: -.5px; }
.verdict.selected, .tone.selected { background: #c9fb68; border: 2px solid #243a18; padding: 15px; }
.verdict.selected[data-verdict="run"] { background: #ffd9ca; border-color: #8b3421; }
.probability { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 8px; }
.attribution { color: #596055; font-size: 13px; overflow-wrap: anywhere; margin: 12px 0 20px; }
.publication-tag { display: inline-block; margin: 0 0 16px; padding: 6px 10px; border: 1px solid #d1d8c9; border-radius: 4px; font-size: 13px; font-weight: 700; }
.publication-tag[data-idea-publication="approved"] { background: #eaface; }

.panel-form { margin-top: 30px; border-top: 1px solid #d9ded5; padding-top: 24px; }
.panel-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.panel-form legend { font-weight: 700; font-size: 18px; margin-bottom: 16px; }
.panel-form .primary { white-space: normal; }
.feedback-quote { margin: 0 0 24px; padding: 20px; border: 1px solid #d1d8c9; border-left: 4px solid #c9fb68; border-radius: 5px; background: #f9faf7; overflow-wrap: anywhere; }
.feedback-quote blockquote { margin: 0; line-height: 1.6; white-space: pre-wrap; }
.feedback-quote blockquote p { margin: 0; }
.feedback-quote figcaption { margin-top: 14px; font-size: 14px; color: #596055; }
.feedback-quote figcaption:first-child { margin-top: 0; }
.feedback-quote cite { font-style: normal; font-weight: 700; }
.countdown { font-variant-numeric: tabular-nums; }
.allowance { border-top: 1px solid #d9ded5; padding-top: 28px; }
.allowance .eyebrow { margin-bottom: 10px; }
.allowance-clock { margin: 0 0 18px; font-size: clamp(40px, 8vw, 64px); font-weight: 700; letter-spacing: -1.5px; line-height: 1; }
.allowance-note { margin: 0; color: #596055; line-height: 1.6; }
.allowance-note a { margin-left: 4px; color: #171b18; font-weight: 700; }
.result-next { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin-top: 36px; padding-top: 24px; border-top: 1px solid #d9ded5; }
.result-next p { margin: 0; color: #596055; }
.result-next .countdown { margin-left: 4px; color: #171b18; font-weight: 700; }
main a.quiet-link { font-size: 14px; color: #596055; }

.history-entry { margin-bottom: 28px; padding: 24px; border: 1px solid #d1d8c9; border-radius: 5px; background: #fff; }
.history-entry h2 { font-size: 18px; margin: 0 0 16px; }
.history-idea { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.history-result { font-weight: 700; }
.entry-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.leaderboard-category { margin: 32px 0; }
.leaderboard-category h2 { font-size: 26px; letter-spacing: -.5px; }
.leaderboard-category ol { padding-left: 28px; }
.leaderboard-idea { padding: 20px; margin: 14px 0; border: 1px solid #d1d8c9; border-radius: 5px; background: #fff; }
.leaderboard-idea::marker { font-weight: 700; }
.leaderboard-idea > strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.admin-user { padding: 14px 0; border-bottom: 1px solid #d1d8c9; overflow-wrap: anywhere; }
.admin-user .consent { font-size: 15px; }
.privacy-page h2 { font-size: 22px; margin-top: 32px; }
.privacy-page p { line-height: 1.7; }

@media (max-width: 520px) {
  main { margin-top: 42px; }
  h1 { letter-spacing: -1.7px; }
  .intro { margin-bottom: 28px; }
  .submit-row { align-items: stretch; flex-direction: column; gap: 14px; }
  .verdicts { grid-template-columns: repeat(2, 1fr); }
  .verdict { padding: 14px; }
  .verdict.selected { padding: 13px; }
  footer { align-items: flex-start; }
  footer span:last-child { text-align: right; }
}
