@font-face {
  font-family: Onest;
  src: url(/fonts/onest-cyrillic.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Onest;
  src: url(/fonts/onest-latin.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #262626;
  --muted: #645b55;
  --cream: #f4f2f0;
  --line: #ded6ce;
  --accent: #736459;
  --gold: #a16e3d;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: linear-gradient(165deg, #efe9e3, #f9f7f4 54%, #f3eee9);
  font: 400 1rem/1.5 Onest, system-ui, sans-serif;
}

.widget {
  width: 100%;
  padding: clamp(14px, 4vw, 44px);
}

.card {
  width: min(100%, 680px);
  margin-inline: auto;
  padding: clamp(20px, 5.5vw, 50px);
  border: 1px solid #e8e1da;
  border-radius: clamp(18px, 4vw, 30px);
  background: #fff;
  box-shadow: 0 14px 48px rgb(62 40 25 / .075);
}

h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; }
a, button, label { -webkit-tap-highlight-color: rgb(115 100 89 / .16); }
a { color: inherit; text-underline-offset: .2em; }
a, button { touch-action: manipulation; }
:focus-visible { outline: 2px solid #85634e; outline-offset: 4px; }

.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only, .trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

.intro { text-align: center; }
.wordmark {
  display: inline-block;
  width: min(164px, 100%);
  text-decoration: none;
  margin-bottom: 23px;
}
.wordmark img { display: block; width: 100%; height: auto; }
h1, h2, .feedback > label { font-weight: 520; line-height: 1.15; letter-spacing: -.04em; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 5vw, 2.65rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.55rem); }
.intro p, .platforms p, #feedback-help { margin-top: 8px; color: var(--muted); }

fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.rating { margin-top: 16px; }
.stars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(3px, 1vw, 8px);
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}
.star {
  display: grid;
  place-items: center;
  width: clamp(44px, 11vw, 52px);
  height: 50px;
  border-radius: 10px;
  cursor: pointer;
}
.star svg { width: 35px; height: 35px; fill: #f4eee8; stroke: #9b7c61; stroke-width: 1.35; }
.star:has(input:focus-visible) { outline: 2px solid #85634e; outline-offset: 1px; }
.star:has(input:checked) svg, .star:has(~ .star input:checked) svg { fill: var(--gold); stroke: var(--gold); }
@media (hover: hover) {
  .stars:has(.star:hover) .star svg { fill: #f4eee8; stroke: #9b7c61; }
  .stars:has(.star:hover) .star:hover svg, .stars:has(.star:hover) .star:has(~ .star:hover) svg { fill: var(--gold); stroke: var(--gold); }
}

.result { text-align: center; color: var(--muted); font-weight: 550; }
.result:not(:empty) { margin-top: 12px; }
.feedback {
  margin-top: 22px;
  padding: clamp(16px, 4vw, 24px);
  border-radius: 16px;
  background: var(--cream);
}
.feedback > label { display: block; font-size: 1.25rem; }
.feedback textarea {
  display: block;
  width: 100%;
  min-height: 110px;
  margin-top: 12px;
  padding: 10px 12px;
  resize: vertical;
  border: 1px solid #a49589;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}
.feedback textarea[aria-invalid="true"] { border-color: #942e24; }
.feedback-note { margin-top: 8px; color: var(--muted); font-size: .82rem; }
.error { color: #942e24; font-size: .9rem; }
.error:not(:empty) { margin-top: 10px; }
.submit {
  min-height: 44px;
  max-width: 100%;
  margin-top: 14px;
  padding: 9px 20px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 550;
}
.submit:hover { background: #5d5047; }
.submit:disabled { opacity: .78; cursor: wait; }

.platforms { margin-top: 28px; padding-top: 23px; border-top: 1px solid var(--line); }
.platforms p { font-size: .9rem; }
.platforms h3 { margin-top: 15px; color: var(--muted); font-size: .82rem; font-weight: 600; }
.links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  min-height: 46px;
  height: 100%;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  text-decoration: none;
  overflow-wrap: anywhere;
  font-size: .9rem;
  font-weight: 550;
}
.links a:hover { background: var(--cream); border-color: var(--accent); }
.links svg { flex: none; width: 17px; height: 17px; color: var(--accent); }

@media (max-width: 460px) {
  .platforms { margin-top: 23px; padding-top: 19px; }
  .links a { padding-inline: 9px; }
}

@media (max-width: 330px) {
  .links { grid-template-columns: minmax(0, 1fr); }
}

@media (forced-colors: active) {
  .star svg { forced-color-adjust: none; fill: Canvas; stroke: CanvasText; }
  .star:has(input:checked) svg, .star:has(~ .star input:checked) svg { fill: Highlight; stroke: Highlight; }
  .submit { border-color: ButtonText; }
}
