/* The site's answer pages, /uninstall/ and /feedback/ (docs/ARCHITECTURE.md §18): the designer's
   variant 2 "one click" (docs/design/m18/index.html, .pg), in the style of site/welcome — dark
   blue header with the icon, a white card, light and dark theme, system fonts.
   body[data-step]: "ask" | "got" | "sent" (site/shared/count.js); without JS — "ask". */
:root {
  color-scheme: light dark;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1c2127;
  --muted: #59626c;
  --line: #dfe3e9;
  --tile: #ffffff;
  --tile-on: #e8f0fd;
  --tile-line-on: #0a62d0;
  --link: #0a62d0;
  --btn: #0a62d0;
  --btn-ink: #ffffff;
  --focus: #2f7cf6;
  --ok: #1f9d55;
  --shadow: 0 20px 50px rgba(10, 20, 40, 0.14);
  --hero: radial-gradient(120% 160% at 0% 0%, #22427f 0%, #0f1d3a 60%, #0a1428 100%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1320;
    --card: #151c2b;
    --text: #e7e9ec;
    --muted: #a6afb9;
    --line: #2a3446;
    --tile: #182133;
    --tile-on: #1b2c48;
    --tile-line-on: #8dbbff;
    --link: #8dbbff;
    --btn: #4d94ff;
    --btn-ink: #0b1320;
    --focus: #6aa8ff;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font:
    17px/1.55 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
/* Focus moved there by the script (a heading, the thanks block): no ring around plain text. */
[tabindex='-1']:focus {
  outline: none;
}

/* One step on the screen at a time. The steps share one grid cell and the hidden ones keep
   their place (visibility, not display), so the card is as tall as its tallest step on every
   step: nothing under the card moves under the pointer. Otherwise the second click of a double
   click on a reason landed on "Install again" below, which had risen to it (review of 18B).
   visibility: hidden also takes a step out of the tab order and the accessibility tree. */
body:not([data-step='ask']) .when-ask,
body:not([data-step='got']) .when-got,
body:not([data-step='sent']) .when-sent,
body[data-step='sent'] .lead,
body[data-step='sent'] .given {
  visibility: hidden;
}
.when-ask,
.when-got,
.when-sent {
  grid-area: 1 / 1;
  min-width: 0;
}

.hero {
  background: var(--hero);
  color: #fff;
  padding: 48px 24px 104px;
  text-align: center;
}
.hero img {
  width: 64px;
  height: 64px;
  display: block;
  margin: 0 auto 16px;
}
.hero h1 {
  font-size: 36px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.hero p {
  font-size: 18px;
  color: #c9d6ee;
  margin: 10px auto 0;
  max-width: 34em;
}
/* /feedback/: the stars given in the panel, under the title (only when the link is the
   panel's: feedback.js takes `hidden` off). `display` would override the attribute. */
.given {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 8px 0 -2px;
}
.given[hidden] {
  display: none;
}
.given svg {
  width: 22px;
  height: 22px;
  stroke: #c9d6ee;
  stroke-width: 1.6;
  fill: transparent;
}
.given svg.on {
  fill: #f5c242;
  stroke: #f5c242;
}

.card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(720px, calc(100% - 48px));
  margin: -72px auto 0;
  background: var(--card);
  border-radius: 20px;
  padding: 32px 40px;
  box-shadow: var(--shadow);
}
.q {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
}
.hint {
  color: var(--muted);
  font-size: 15px;
  margin-top: 4px;
}

/* the reasons: big buttons, one click sends */
.reasons {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}
.reason {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  width: 100%;
  padding: 10px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--tile);
  color: var(--text);
  font:
    16px/1.3 system-ui,
    sans-serif;
  text-align: start;
  cursor: pointer;
}
.reason:hover {
  border-color: var(--tile-line-on);
  background: var(--tile-on);
}
.reason svg {
  flex: none;
  width: 18px;
  height: 18px;
  stroke: var(--muted);
  stroke-width: 2;
  fill: none;
}
[dir='rtl'] .reason svg {
  transform: scaleX(-1);
}

/* the reason is in */
.got {
  scroll-margin: 16px; /* air above it when the script scrolls to it (count.js, U26) */
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.ok {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  margin-top: 2px;
}
.got h2 {
  font-size: 22px;
  line-height: 1.25;
}
.chosen {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--tile-on);
  font-size: 15px;
}
.change {
  display: inline-block;
  margin-inline-start: 8px;
  font-size: 15px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--link);
  font-weight: 600;
  cursor: pointer;
}
.change:hover {
  text-decoration: underline;
}
.lbl {
  display: block;
  margin-top: 24px;
  font-weight: 600;
  font-size: 16px;
}
.lbl .optional {
  font-weight: 400;
  color: var(--muted);
}
textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  min-height: 96px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--tile);
  color: var(--text);
  font:
    16px/1.45 system-ui,
    sans-serif;
  resize: vertical;
}
textarea::placeholder {
  color: var(--muted);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 18px;
}
.send {
  min-height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: 12px;
  background: var(--btn);
  color: var(--btn-ink);
  font:
    600 17px system-ui,
    sans-serif;
  cursor: pointer;
}
.send:disabled {
  opacity: 0.45;
  cursor: default;
}
.anon {
  color: var(--muted);
  font-size: 14px;
}

/* thanks */
.sent {
  align-self: center;
  text-align: center;
  padding: 12px 0;
}
.sent .ok {
  width: 44px;
  height: 44px;
  font-size: 22px;
  margin: 0 auto 12px;
}
.sent h2 {
  font-size: 26px;
}
.sent p {
  color: var(--muted);
  margin-top: 6px;
}

/* under the card: a quiet line, not a button */
.after {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  padding: 24px 24px 48px;
}
a {
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* narrow window (a phone, a small window) */
@media (max-width: 600px) {
  .hero {
    padding: 36px 20px 92px;
  }
  .hero h1 {
    font-size: 29px;
  }
  .hero p {
    font-size: 17px;
  }
  .card {
    width: auto;
    margin: -64px 12px 0;
    padding: 24px 18px;
    border-radius: 16px;
  }
  .q {
    font-size: 20px;
  }
  .send {
    width: 100%;
  }
}
