/* Candy Club v2 homepage. Desktop frame is 1240 wide.
   Hover, focus, active, responsive layout, and dark mode are suggested, not designed. */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/outfit-800-latin.woff2") format("woff2");
  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;
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/fonts/dm-sans-latin.woff2") format("woff2");
  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;
}

@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/space-mono-400-latin.woff2") format("woff2");
  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;
  --candy-bg: #e9ddff;
  --candy-text: #34205b;
  --candy-card: #fffaff;
  --candy-control: #f2ecff;
  --candy-action: #fd7246;
  --candy-on-action: #2e163f;
  --candy-fill: #34205b;
  --candy-on-fill: #ffffff;
  --candy-rule: #baa4d5;
  --candy-logo: #34205b;
  --candy-focus: #34205b;
  --candy-chip: #e9ddff;
  --candy-chip-text: #34205b;
  --candy-shadow: 0 8px 0 rgba(56, 26, 94, 0.10);
  --candy-muted: #34205b;
  --code-bg: #f4eeff;
  --code-fg: #34205b;
  --code-muted: #7d6a99;
  --code-keyword: #4a1d8c;
  --code-string: #8a3b22;
  --code-comment: #7d6a99;
  --code-border: #e4d8f5;
  --code-btn-bg: #fffaff;
  --code-btn-border: #d4c4ea;
  --code-btn-fg: #34205b;
  --code-font: "Space Mono", ui-monospace, monospace;
  --code-size: 13.5px;
  --code-lh: 1.65;
  --code-pad-y: 14px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --candy-bg: #140c22;
  --candy-text: #f6f0ff;
  --candy-card: #2a1844;
  --candy-control: #4a356f;
  --candy-action: #fd7246;
  --candy-on-action: #2e163f;
  --candy-fill: #efe6ff;
  --candy-on-fill: #24143d;
  --candy-chip: #efe6ff;
  --candy-chip-text: #24143d;
  --candy-rule: #8a76a8;
  --candy-logo: #f6f0ff;
  --candy-focus: #f6f0ff;
  --candy-shadow: 0 8px 0 rgba(0, 0, 0, 0.55);
  --candy-muted: #f6f0ff;
  --code-bg: #1a102c;
  --code-fg: #f6f0ff;
  --code-muted: #a894c4;
  --code-keyword: #d2b4ff;
  --code-string: #ffc2a8;
  --code-comment: #a894c4;
  --code-border: #4a356f;
  --code-btn-bg: #2a1844;
  --code-btn-border: #6b548c;
  --code-btn-fg: #f6f0ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--candy-bg);
  color: var(--candy-text);
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 14;
  font-synthesis: none;
}

.frame {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.frame a {
  color: inherit;
  text-decoration: none;
}

.frame a:hover {
  text-decoration: underline;
}

.masthead {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 0;
  padding: 24px 56px;
}

.masthead-id {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0;
  min-width: 0;
}

.masthead-name {
  display: block;
  flex: none;
  width: 408px;
  color: var(--candy-logo);
  line-height: 0;
}

.logo { display: block; width: 141px; height: 35px; }

.masthead-tagline {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  min-width: 40px;
  height: 40px;
  margin: 0 -9px 0 0; /* the glyph, not the 40px box, sits on the margin */
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: 22px/1 "DM Sans", sans-serif;
  cursor: pointer;
}

.masthead-home {
  justify-content: flex-end;
  padding-bottom: 0;
}

.unit,
.caption,
.ticker,
.result-meta,
.footer-mark {
  font-family: "Space Mono", ui-monospace, monospace;
  font-weight: 400;
  font-size: 11px;
  line-height: 16px;
  font-variation-settings: normal;
  letter-spacing: 0;
}

.frame > .hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 8px 56px 48px;
  text-align: center;
}

.wordmark,
.section-heading {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-variation-settings: normal;
  letter-spacing: 0;
}

.wordmark {
  margin: 0;
  line-height: 0;
  color: var(--candy-logo);
}

.wordmark-logo { display: block; width: 494px; height: 123px; }

.tagline {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 32px;
}

.ticker {
  display: flex;
  align-items: center;
  height: 40px;
  margin: 0;
  padding: 0 56px;
  background: var(--candy-fill);
  color: var(--candy-on-fill);
  white-space: pre;
  overflow: hidden;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 32px 56px 0;
}

.card {
  background: var(--candy-card);
  border-radius: 24px;
  box-shadow: var(--candy-shadow);
  padding: 32px;
}

.input-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.input-title {
  width: 184px;
  flex: none;
  padding-top: 24px;
}

.caption,
.footer-mark {
  margin: 0;
}

.caption { white-space: pre; }

.heading-slot {
  display: flex;
  align-items: center;
  height: 48px;
}

.section-heading {
  margin: 0;
  font-size: 28px;
  line-height: 32px;
}

.input-controls {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  flex: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-flavor { width: 224px; }
.field-count { width: 208px; }
.field-action {
  width: 192px;
  align-items: flex-end;
}

.label-row {
  display: flex;
  align-items: center;
  height: 16px;
}

.field-label,
.count-label {
  font-weight: 700;
  font-size: 12px;
  line-height: 16px;
}

.field-count .label-row { justify-content: space-between; width: 100%; }
.field-action .label-row { justify-content: flex-end; width: 100%; }

.select-wrap {
  position: relative;
  width: 224px;
  height: 48px;
  color: var(--candy-text);
}

.select-wrap select {
  appearance: none;
  width: 100%;
  height: 48px;
  margin: 0;
  border: 0;
  border-radius: 24px;
  background: var(--candy-control);
  color: var(--candy-text);
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 16px;
  font-variation-settings: "opsz" 14;
  padding: 0 48px 0 24px;
  cursor: pointer;
}

.select-wrap .chevron {
  position: absolute;
  top: 16px;
  right: 24px;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.seg {
  display: flex;
  gap: 8px;
}

.seg button,
.yeet,
.btn-small {
  border: 0;
  cursor: pointer;
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 16px;
  font-variation-settings: "opsz" 14;
}

.seg button {
  width: 64px;
  height: 48px;
  padding: 0;
  border-radius: 24px;
  background: var(--candy-control);
  color: var(--candy-text);
}

.seg button.active {
  background: var(--candy-fill);
  color: var(--candy-on-fill);
}

.yeet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 192px;
  height: 48px;
  padding: 0 24px;
  border-radius: 24px;
  background: var(--candy-action);
  color: var(--candy-on-action);
}

.field-action .caption {
  width: 100%;
  text-align: right;
}

.btn-icon,
.chevron {
  display: block;
  width: 16px;
  height: 16px;
  flex: none;
}

.card-output {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.title-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.heading-row,
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.heading-row,
.action-row { height: 40px; min-width: 0; }

.output-text {
  margin: 0;
  max-width: 1064px;
  font-size: 22px;
  font-weight: 400;
  line-height: 32px;
}

.result-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 176px;
  height: 40px;
  flex: none;
  border-radius: 20px;
  background: var(--candy-chip);
  color: var(--candy-chip-text);
  white-space: nowrap;
}

.btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 24px;
  border-radius: 20px;
  background: var(--candy-fill);
  color: var(--candy-on-fill);
  white-space: nowrap;
}

.copy { width: auto; min-width: 152px; }

.select-wrap:hover select,
.seg button:hover,
.yeet:hover,
.btn-small:hover {
  filter: brightness(0.92);
}

.seg button:active,
.yeet:active,
.btn-small:active {
  transform: translateY(1px);
}

.frame :focus-visible {
  outline: 3px solid var(--candy-focus);
  outline-offset: 3px;
}

.frame :focus:not(:focus-visible) {
  outline: none;
}

.feedback {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
}

.feedback:empty { display: none; }

.page-footer {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px 56px 48px;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 32px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--candy-rule);
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
}

.footer-credit {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bar a {
  color: inherit;
  text-decoration: none;
}

.footer-bar a:hover { text-decoration: underline; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .frame > .hero,
  .ticker,
  .cards,
  .page-footer { padding-left: 32px; padding-right: 32px; }
  .masthead { padding: 24px 32px; }
  .masthead-home { padding-bottom: 0; }
  .masthead-name { width: auto; margin-right: 32px; }
  .wordmark-logo { width: 424px; height: 105px; }
  .input-layout,
  .input-controls { gap: 24px; }
}

@media (max-width: 900px) {
  .input-layout { flex-direction: column; gap: 24px; }
  .input-title { width: auto; padding-top: 0; }
  .input-controls {
    flex: none;
    flex-wrap: wrap;
    width: 100%;
    gap: 24px 32px;
  }
  .field-flavor { flex: 1 1 224px; width: auto; min-width: 0; }
  .select-wrap { width: 100%; }
  .field-count { flex: 0 0 auto; }
  .field-action { flex: 1 1 100%; width: auto; align-items: stretch; }
  .yeet { width: 100%; }
  .card-input { position: relative; }
  .card-input .field-action .label-row {
    position: absolute;
    top: 32px;
    right: 32px;
    width: auto;
    height: 16px;
  }
  .output-text { max-width: none; }
  .heading-row { gap: 16px; }
  .result-meta { width: auto; min-width: 176px; padding: 0 16px; }

  .btn-small { position: relative; }
  .btn-small::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 44px;
    transform: translateY(-50%);
  }
  .footer-bar { flex-direction: column; align-items: flex-start; }
  .footer-links { gap: 0 16px; }
  .footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (max-width: 640px) {
  .masthead,
  .frame > .hero,
  .ticker,
  .cards,
  .page-footer { padding-left: 16px; padding-right: 16px; }
  .ticker {
    height: 40px;
    min-height: 40px;
    padding-top: 0;
    padding-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
  }
  .masthead { padding: 16px; }
  .masthead-home { padding-bottom: 0; }
  .masthead-id { flex-direction: column; align-items: flex-start; gap: 6px; }
  .masthead-name { margin-right: 0; }
  .masthead-tagline { margin: 0; font-size: 14px; line-height: 20px; }
  .frame > .hero { padding: 8px 16px 40px; gap: 12px; }
  .wordmark-logo { width: 280px; height: 70px; }
  .tagline { font-size: 18px; line-height: 28px; }
  .input-layout { gap: 16px; }
  .input-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .field-flavor,
  .field-count,
  .field-action {
    flex: 0 0 auto;
    width: 100%;
  }
  .select-wrap,
  .yeet { width: 100%; }
  .card-input { position: relative; }
  .card-input .field-action .label-row {
    position: absolute;
    top: 24px;
    right: 24px;
    width: auto;
    height: 16px;
  }
  .field-count,
  .seg { width: 100%; }
  .seg button { flex: 1 1 0; width: auto; min-width: 44px; }
  .heading-row,
  .action-row { height: auto; min-height: 40px; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .copy { width: auto; min-width: 152px; }
  .card { padding: 24px; }
}

/* Interior pages. Long-form type is a suggested extension of Candy Club v2:
   the Figma frame only designs the homepage. Body is DM Sans 18/28 inside a
   card, capped near 68ch. Headings are Outfit 800. */

.ticker { min-width: 0; }

.sheet {
  margin: 32px 56px 0;
  padding: 32px;
  background: var(--candy-card);
  border-radius: 24px;
  box-shadow: var(--candy-shadow);
  min-width: 0;
  max-width: none;
}

.sheet h1,
.sheet h2,
.sheet h3,
.sheet .section-title,
.sheet .cta p {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-variation-settings: normal;
  letter-spacing: 0;
}

.sheet h1 {
  margin: 0;
  max-width: 18em;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
}

.sheet h1 .hl { color: var(--candy-action); }

.sheet h2,
.sheet .section-title {
  margin: 0 0 16px;
  font-size: 28px;
  line-height: 32px;
}

.sheet h3 {
  margin: 24px 0 8px;
  font-size: 20px;
  line-height: 28px;
}

.sheet .hero { padding: 0 0 8px; }

.sheet .subtitle,
.sheet .lead,
.sheet .updated,
.sheet .section p,
.sheet .section li,
.sheet .content p,
.sheet .content li,
.sheet .answer p,
.sheet .prose p,
.sheet .prose li {
  max-width: 68ch;
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
}

.sheet .subtitle,
.sheet .lead {
  margin: 16px 0 0;
}

.sheet .subtitle { margin-bottom: 32px; }

.sheet .updated {
  margin: 24px 0 0;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px;
  line-height: 16px;
  font-variation-settings: normal;
}

.sheet p.eyebrow,
.sheet p.date {
  margin: 0 0 12px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-weight: 400;
  font-size: 11px;
  line-height: 16px;
  font-variation-settings: normal;
  letter-spacing: 0;
}

.sheet .date { margin: 16px 0 0; }

.sheet nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0 0 24px;
}

.sheet nav a,
.sheet a.back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  font-weight: 700;
  font-size: 12px;
  line-height: 16px;
  text-decoration: none;
}

.sheet nav a:hover,
.sheet a.back:hover { text-decoration: underline; }

.sheet .section {
  border-top: 1px solid var(--candy-rule);
  padding: 32px 0;
}

.sheet .section-faq { border-top: 0; padding: 0 0 32px; }

.sheet .section-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.sheet .section ul,
.sheet .section ol,
.sheet .content ul,
.sheet .content ol,
.sheet .prose ul,
.sheet .prose ol {
  max-width: 68ch;
  margin: 0 0 16px;
  padding-left: 1.25em;
}

.sheet .section li,
.sheet .content li,
.sheet .prose li { margin: 0 0 8px; }

.sheet .section a,
.sheet .content a,
.sheet .answer a,
.sheet .prose a,
.sheet .lead a,
.sheet .subtitle a,
.sheet .more a {
  color: var(--candy-text);
  text-decoration-line: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.sheet .section a:hover,
.sheet .content a:hover,
.sheet .answer a:hover,
.sheet .prose a:hover,
.sheet .lead a:hover,
.sheet .subtitle a:hover,
.sheet .more a:hover {
  color: var(--candy-action);
}

.sheet .content { max-width: 68ch; padding: 8px 0 0; }
.sheet .prose { max-width: 68ch; }

.sheet .more {
  margin: 32px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--candy-rule);
}

.sheet .cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 8px 0 0;
  padding: 8px 0 0;
}

.sheet p.cta { margin: 28px 0 0; }

.sheet.doc p.cta { margin: 28px 0 48px; }

.sheet.doc .content { padding-top: 0; }

/* One centered column in the card. The measure is the prose's 68ch, so the
   headline, breadcrumb, lede and body share the same edges. */
.sheet.doc {
  padding-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sheet.doc .col {
  width: min(100%, 68ch);
  max-width: 68ch;
}

.sheet.doc h1 { max-width: none; }

.sheet.doc .crumbs {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
}

.sheet .cta p {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
}

.sheet .cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 24px;
  background: var(--candy-action);
  color: var(--candy-on-action);
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 16px;
  font-variation-settings: "opsz" 14;
  text-decoration: none;
}

.sheet .cta a:hover {
  filter: brightness(0.92);
  color: var(--candy-on-action);
  text-decoration: none;
}

.sheet .cta a:active { transform: translateY(1px); }

.sheet .questions { border-bottom: 1px solid var(--candy-rule); }

.sheet details { border-top: 1px solid var(--candy-rule); }

.sheet summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 18px;
  line-height: 28px;
}

.sheet summary::-webkit-details-marker { display: none; }

.sheet .question-mark {
  display: block;
  width: 44px;
  height: 44px;
  position: relative;
  justify-self: end;
}

.sheet .question-mark::before,
.sheet .question-mark::after {
  content: "";
  position: absolute;
  background: var(--candy-text);
}

.sheet .question-mark::before { width: 18px; height: 2px; top: 21px; left: 13px; }
.sheet .question-mark::after { width: 2px; height: 18px; left: 21px; top: 13px; }
.sheet details[open] .question-mark::after { display: none; }

.sheet .answer {
  margin: 0 0 24px;
  padding: 20px 24px;
  background: var(--candy-control);
  border-left: 4px solid var(--candy-action);
  border-radius: 16px;
}

.sheet .answer p { margin: 0 0 10px; }
.sheet .answer p:last-child { margin-bottom: 0; }

.sheet .client-card {
  margin: 0 0 16px;
  padding: 20px 24px;
  background: var(--candy-control);
  border-radius: 16px;
}

.sheet .client-card h3 { margin: 0 0 8px; }

.sheet code {
  padding: 0 0.35em;
  border-radius: 6px;
  background: var(--candy-control);
  font-family: var(--code-font);
  font-size: 0.85em;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.sheet table.params {
  width: 100%;
  max-width: 68ch;
  margin: 0 0 16px;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 24px;
}

.sheet table.params th,
.sheet table.params td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--candy-rule);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.sheet table.params th { font-weight: 700; }

.sheet a.card {
  display: block;
  margin: 0;
  padding: 24px 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--candy-rule);
  text-decoration: none;
}

.sheet a.card h2 { margin: 0 0 8px; }
.sheet a.card p { margin: 0; }
.sheet a.card:hover { text-decoration: none; }
.sheet a.card:hover h2 { text-decoration: underline; }

.sheet .callout {
  margin: 28px 0;
  padding: 24px;
  background: var(--candy-control);
  border-left: 4px solid var(--candy-action);
  border-radius: 16px;
}

.sheet .callout p:last-child { margin-bottom: 0; }

.page-footer .footer-hunch {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
  margin: 0;
  font-weight: 400;
  letter-spacing: 0;
}

.page-footer .footer-hunch-copy {
  max-width: 68ch;
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

.page-footer .footer-hunch-lead { font-weight: 700; }

.page-footer .footer-hunch-form { margin: 8px 0 0; }

.page-footer .footer-hunch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  margin: 0;
}

.page-footer .footer-hunch-row[hidden] { display: none; }

.page-footer .footer-hunch-row:focus-within {
  outline: 3px solid var(--candy-focus);
  outline-offset: 3px;
}

.page-footer .footer-hunch-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-footer .footer-hunch-input {
  box-sizing: border-box;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: 48px;
  margin: 0;
  padding: 0 24px;
  border: 0;
  border-radius: 24px;
  background: var(--candy-control);
  color: var(--candy-text);
  font: 400 16px/16px "DM Sans", sans-serif;
  letter-spacing: normal;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

.page-footer .footer-hunch-input::placeholder {
  color: var(--candy-text);
  opacity: 0.5;
}

.page-footer .footer-hunch-bet {
  box-sizing: border-box;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0 24px;
  border: 0;
  border-radius: 24px;
  background: var(--candy-action);
  color: var(--candy-on-action);
  font: 700 16px/16px "DM Sans", sans-serif;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.page-footer .footer-hunch-bet:hover { filter: brightness(0.92); }

.page-footer .footer-hunch-bet:active { transform: translateY(1px); }

.page-footer .footer-hunch-bet:focus,
.page-footer .footer-hunch-bet:focus-visible { outline: none; }

.page-footer .footer-hunch-bet[aria-busy="true"] {
  opacity: 0.6;
  cursor: progress;
}

.page-footer .footer-hunch-msg {
  margin: 0;
  font: 400 16px/24px "DM Sans", sans-serif;
}

.page-footer .footer-hunch-msg:empty { display: none; }

.page-footer .footer-hunch-msg.is-error { color: var(--candy-action); }

.page-footer .footer-hunch-msg.is-success {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  color: var(--candy-text);
  font-weight: 700;
}

.page-footer .footer-hunch-msg.is-success::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--candy-action);
}

.page-footer .footer-hunch-note {
  display: block;
  margin: 0;
  color: var(--candy-text);
  opacity: 0.7;
  font-size: 12px;
  line-height: 16px;
}

@media (max-width: 339.98px) {
  .page-footer .footer-hunch-row {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .page-footer .footer-hunch-input,
  .page-footer .footer-hunch-bet { width: 100%; }
}

/* Code blocks. Line numbers and the copy button come from code-block.js.
   A bare pre still reads when JavaScript is off. */
code { overflow-wrap: anywhere; }

body pre {
  box-sizing: border-box;
  max-width: 100%;
  margin: 0 0 16px;
  padding: var(--code-pad-y) 16px;
  overflow-x: auto;
  background: var(--code-bg);
  color: var(--code-fg);
  border: 1px solid var(--code-border);
  border-radius: 16px;
  font-family: var(--code-font);
  font-size: var(--code-size);
  line-height: var(--code-lh);
  white-space: pre;
  tab-size: 2;
}

body pre code {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  white-space: inherit;
  overflow-wrap: normal;
}

.code-frame {
  position: relative;
  max-width: 100%;
  margin: 0 0 16px;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 16px;
}

.code-scroll {
  display: flex;
  align-items: stretch;
  max-width: 100%;
  overflow-x: auto;
  border-radius: inherit;
}

.code-frame pre {
  flex: none;
  width: max-content;
  max-width: none;
  margin: 0;
  padding: var(--code-pad-y) 56px var(--code-pad-y) 12px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.code-gutter {
  position: sticky;
  left: 0;
  z-index: 1;
  flex: none;
  margin: 0;
  padding: var(--code-pad-y) 14px var(--code-pad-y) 16px;
  background: var(--code-bg);
  color: var(--code-muted);
  font-family: var(--code-font);
  font-size: var(--code-size);
  line-height: var(--code-lh);
  text-align: right;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  counter-reset: code-line;
}

.code-gutter-line {
  display: block;
  min-width: 2ch;
  min-height: calc(var(--code-size) * var(--code-lh));
}

.code-gutter-line::before {
  content: counter(code-line);
  counter-increment: code-line;
}

.code-frame pre code {
  display: block;
  white-space: normal;
}

.code-line {
  display: block;
  min-height: calc(var(--code-size) * var(--code-lh));
  white-space: pre;
}

body pre .token.keyword,
body pre .token.boolean,
body pre .token.null,
body pre .token.builtin,
body pre .token.property,
body pre .token.method,
body pre .token.request-line {
  color: var(--code-keyword);
}

body pre .token.string,
body pre .token.url,
body pre .token.attr-value {
  color: var(--code-string);
}

body pre .token.comment { color: var(--code-comment); }

button.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  background: var(--code-btn-bg);
  color: var(--code-btn-fg);
  border: 1px solid var(--code-btn-border);
  border-radius: 22px;
  box-shadow: none;
  cursor: pointer;
  font: 400 14px/1 "DM Sans", sans-serif;
}

button.code-copy-btn svg { display: block; }

button.code-copy-btn:hover { filter: brightness(0.92); }

button.code-copy-btn:active { transform: translateY(1px); }

button.code-copy-btn[data-state="copied"] {
  color: var(--candy-on-action);
  background: var(--candy-action);
  border-color: var(--candy-action);
}

.code-copy-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .sheet { margin-left: 32px; margin-right: 32px; }
}

@media (max-width: 640px) {
  .sheet { margin-left: 16px; margin-right: 16px; padding: 24px; }
  .sheet .answer { margin-left: 0; margin-right: 0; }
  .sheet .cta a { width: 100%; }
  .sheet summary {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
  }
}


