@font-face {
  font-family: "DM Sans";
  src: url("/dm-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Petrona";
  src: url("/petrona-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #1d2021;
  --surface: #282828;
  --ink: #ebdbb2;
  --muted: #a89984;
  --line: #504945;
  --green: #b8bb26;
  --red: #fb4934;
  --serif: "Petrona", Georgia, "Times New Roman", serif;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  scrollbar-color: var(--line) var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; }
button, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
a { color: inherit; text-underline-offset: 4px; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--green); outline-offset: 5px; }
::selection { background: #504945; color: #fbf1c7; }
[hidden] { display: none !important; }
.topbar { width: min(1120px, calc(100% - 80px)); margin-inline: auto; display: flex; justify-content: space-between; align-items: center; }
.topbar { padding-block: 30px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 19px; letter-spacing: -0.035em; text-decoration: none; }
.sound { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 2px 8px 12px; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.sound:hover { color: var(--ink); }
.sound[aria-pressed="false"] svg { opacity: 0.4; }
main { width: min(650px, calc(100% - 40px)); margin: 35px auto 60px; flex: 1; }
.intro { text-align: center; }
.verdict-marks { display: flex; justify-content: center; height: 63px; margin-bottom: 24px; }
.verdict-marks span { width: 63px; height: 63px; display: grid; place-items: center; font-weight: 800; font-size: 18px; border-radius: 50%; }
.yes-mark { background: var(--green); color: var(--paper); transform: rotate(-13deg); z-index: 1; }
.no-mark { background: var(--red); color: var(--paper); transform: rotate(13deg); margin-left: -9px; }
h1 { font-family: var(--serif); font-size: clamp(58px, 9vw, 88px); line-height: 1.07; letter-spacing: -0.04em; margin: 0; font-weight: 400; }
h1 em { font-style: normal; color: var(--green); }
.intro > p { color: var(--muted); margin: 21px 0 38px; font-size: 17px; line-height: 1.65; }
label { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 650; }
.input-wrap { position: relative; }
textarea { display: block; width: 100%; min-height: 170px; resize: vertical; padding: 21px 23px 42px; background: var(--surface); border: 1px solid #928374; border-radius: 14px; line-height: 1.65; color: var(--ink); caret-color: var(--green); font-size: 17px; outline: none; }
textarea::placeholder { color: var(--muted); }
textarea:focus { border-color: var(--green); outline: 2px solid var(--green); outline-offset: 2px; }
textarea:read-only { opacity: 0.7; }
#count { position: absolute; right: 18px; bottom: 14px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; pointer-events: none; }
.form-bottom { display: flex; justify-content: flex-end; margin-top: 14px; }
.submit { display: inline-flex; align-items: center; justify-content: center; gap: 24px; flex-shrink: 0; background: var(--green); color: var(--paper); border: 0; border-radius: 10px; min-height: 52px; padding: 14px 22px; font-size: 15px; font-weight: 600; transition: background 150ms, transform 150ms; }
.submit:hover { background: #fabd2f; }
.submit:active { transform: translateY(1px); }
button:disabled { cursor: wait; opacity: 0.55; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; font-size: 12px; }
.examples button { background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; min-height: 36px; font-size: 12px; transition: border-color 150ms, background 150ms; }
.examples button:hover { border-color: var(--muted); background: var(--surface); }
#result { text-align: center; margin-top: 36px; padding: 28px 22px; border-radius: 14px; background: var(--surface); }
#verdict { font-family: var(--serif); font-size: clamp(68px, 12vw, 92px); font-weight: 400; letter-spacing: -0.04em; line-height: 1; margin: 0 0 14px; color: var(--green); }
#result[data-verdict="no"] #verdict { color: var(--red); }
h2 { font-family: var(--serif); font-size: 25px; letter-spacing: -0.02em; margin: 0 0 8px; font-weight: 400; }
#result-detail { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
#error { background: var(--surface); color: #fabd2f; border-radius: 10px; padding: 16px 20px; line-height: 1.6; font-size: 14px; margin-top: 24px; }
#confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 10; }
.confetti-piece { position: absolute; top: -20px; width: 9px; height: 15px; }
@media (max-width: 600px) {
  .topbar { width: calc(100% - 40px); }
  .topbar { padding-block: 19px; }
  main { margin-top: 27px; }
  .intro > p { font-size: 15px; margin: 17px 0 30px; }
  .verdict-marks { margin-bottom: 20px; }
  textarea { font-size: 16px; padding: 17px 18px 40px; min-height: 168px; }
  .submit { width: 100%; }
  .examples { justify-content: center; gap: 7px; margin-top: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
