/* Tiny Vote — quiet ballot utility.
   Ported verbatim (selectors, values, breakpoints) from the shared Domain
   Studio module CSS's .tv* rules — see ../recovered-source/. Confirmed by
   computed-style probe against production: h1/body copy is plain Arial,
   small labels are the generic `monospace` stack (not IBM Plex Mono) —
   no web fonts are actually consumed by this product despite Space
   Grotesk/IBM Plex Mono being preloaded site-wide on Domain Studio for
   other products. Matching that exactly (no Google Fonts import) keeps
   this port pixel-faithful and drops an external dependency. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { -webkit-font-smoothing: antialiased; }
/* .tvBuilder / .tvTemplates both set `display: grid` at the same
   specificity as the UA stylesheet's `[hidden] { display: none }` — without
   this, toggling the `hidden` attribute via JS silently does nothing and
   every section renders stacked at once. */
[hidden] { display: none !important; }

.tvShell { min-height: 100vh; background: #f8f7f2; color: #172327; font-family: Arial, sans-serif; }
.tvShell button, .tvShell input, .tvShell textarea, .tvShell select { font: inherit; }

.tvHeader { min-height: 70px; padding: 0 32px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #bac1bd; }
.tvHeader > a { color: inherit; text-decoration: none; font-weight: 900; letter-spacing: -.04em; display: flex; align-items: center; gap: 10px; }
.tvHeader i { width: 19px; height: 19px; border-radius: 50%; background: #f24c36; box-shadow: 0 0 0 5px #f24c3620; }
.tvHeader nav { display: flex; gap: 20px; }
.tvHeader nav a, .tvHeader nav button { border: 0; background: none; color: inherit; font: 700 .72rem monospace; text-transform: uppercase; text-decoration: none; cursor: pointer; }

.tvBuilder { max-width: 1180px; margin: auto; min-height: calc(100vh - 70px); display: grid; grid-template-columns: .5fr 1.5fr; gap: 70px; align-items: center; padding: 70px 25px; }
.tvBuilder aside { align-self: stretch; border-right: 1px solid #bac1bd; display: grid; align-content: space-between; padding: 20px 45px 20px 0; }
.tvBuilder aside > span { color: #f24c36; font: 700 .7rem monospace; }
.tvBuilder aside p { font: 900 clamp(2.4rem, 4vw, 4.6rem)/.9 Arial; letter-spacing: -.06em; }
.tvBuilder aside small { font: .72rem/1.5 monospace; color: #5d6d6b; }

.tvForm { display: grid; gap: 24px; }
.tvForm > p { margin: 0; font: 700 .7rem monospace; letter-spacing: .12em; }
.tvForm label { display: grid; gap: 8px; font: 700 .7rem monospace; text-transform: uppercase; }
.tvForm textarea, .tvForm input, .tvForm select { background: transparent; border: 0; border-bottom: 2px solid #172327; border-radius: 0; padding: 13px 0; color: inherit; outline: none; text-transform: none; }
.tvForm textarea { resize: vertical; font: 700 clamp(2rem, 4vw, 4rem)/1 Arial; letter-spacing: -.04em; }
.tvForm label > small { text-align: right; color: #74817d; font-weight: 400; }
.tvOptionPair { display: grid; grid-template-columns: 1fr 50px 1fr; gap: 15px; align-items: end; }
.tvOptionPair > span { width: 38px; height: 38px; background: #172327; color: white; border-radius: 50%; display: grid; place-items: center; font: 700 .65rem monospace; }
.tvOptionPair input { font: 700 1.5rem Arial; }
.tvSettings { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 25px; }
.tvCheck { display: flex !important; grid-template-columns: 20px 1fr; align-items: center; flex-direction: row; padding-bottom: 12px; }
.tvCheck input { width: 18px; height: 18px; }
.tvCreate { border: 0; background: #f24c36; color: #fff; min-height: 60px; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; font-weight: 800; cursor: pointer; width: 100%; }
.tvCreate span { font-size: 1.5rem; }
.tvNotice { font: .75rem monospace; color: #b02d20; }

.tvTemplates { background: #172327; color: #eef1ec; padding: 90px max(25px, calc((100vw - 1180px) / 2)); display: grid; grid-template-columns: .55fr 1.45fr; gap: 60px; }
.tvTemplates > div:first-child > p { color: #f24c36; font: 700 .7rem monospace; }
.tvTemplates h2 { font-size: clamp(2.5rem, 5vw, 5rem); line-height: .9; letter-spacing: -.06em; margin: 12px 0 0; }
.tvTemplateGrid { display: grid; grid-template-columns: 1fr 1fr; }
.tvTemplateGrid button { border: 0; border-bottom: 1px solid #60706a; background: transparent; color: inherit; min-height: 100px; text-align: left; padding: 18px; display: grid; grid-template-columns: 35px 1fr; gap: 5px; cursor: pointer; }
.tvTemplateGrid button:hover { background: #243531; }
.tvTemplateGrid span { grid-row: 1 / 3; color: #f24c36; font: .65rem monospace; }
.tvTemplateGrid b { font-size: 1rem; }
.tvTemplateGrid small { color: #95a49f; font: .7rem monospace; }

.tvBallot { max-width: 980px; margin: auto; min-height: calc(100vh - 70px); padding: 50px 25px; }
.tvBallotTop { display: flex; justify-content: space-between; font: .68rem monospace; color: #5d6d6b; }
.tvBallotTop button { border: 1px solid; background: transparent; padding: 7px 10px; cursor: pointer; color: inherit; }
.tvQuestion { text-align: center; margin: 70px auto 55px; }
.tvQuestion p { color: #f24c36; font: 700 .67rem monospace; letter-spacing: .12em; margin: 0; }
.tvQuestion h1 { font-size: clamp(3rem, 7vw, 6.5rem); line-height: .9; letter-spacing: -.07em; margin: 18px 0; }
.tvChoices { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid #172327; }
.tvChoices button { min-height: 260px; border: 0; background: transparent; color: inherit; padding: 30px; display: grid; align-content: space-between; text-align: left; cursor: pointer; }
.tvChoices button:first-child { border-right: 2px solid #172327; }
.tvChoices button:hover:not(:disabled) { background: #f24c36; color: white; }
.tvChoices button:disabled { cursor: default; }
.tvChoices span { font: 700 .7rem monospace; }
.tvChoices b { font-size: 2rem; }
.tvChoices strong { font-size: 4rem; letter-spacing: -.07em; }
.tvChoices .tvChosen { background: #f24c36; color: white; }
.tvBallotFooter { display: grid; grid-template-columns: 1fr 1fr auto; gap: 25px; padding: 20px 0; font: .68rem/1.5 monospace; color: #5d6d6b; }
.tvBallotFooter p { margin: 0; }
.tvBallotFooter button { background: none; border: 0; text-decoration: underline; cursor: pointer; color: inherit; }
.tvFooterActions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: flex-end; }
.tvToast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); background: #172327; color: white; padding: 12px 18px; font: .72rem monospace; }

@media (max-width: 900px) {
  .tvBuilder, .tvTemplates { grid-template-columns: 1fr; }
  .tvBuilder aside { min-height: 230px; border-right: 0; border-bottom: 1px solid; padding-right: 0; }
  .tvBuilder aside p { margin: 20px 0; }
  .tvTemplates { gap: 25px; }
}

@media (max-width: 600px) {
  .tvHeader { padding: 0 16px; }
  .tvBuilder { padding: 35px 18px; gap: 35px; }
  .tvBuilder aside { min-height: 180px; }
  .tvBuilder aside p { font-size: 2.7rem; }
  .tvOptionPair, .tvSettings, .tvTemplateGrid, .tvChoices, .tvBallotFooter { grid-template-columns: 1fr; }
  .tvOptionPair > span { display: none; }
  .tvTemplates { padding: 60px 18px; }
  .tvChoices button:first-child { border-right: 0; border-bottom: 2px solid; }
  .tvChoices button { min-height: 170px; }
  .tvBallotFooter { gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .tvShell * { scroll-behavior: auto !important; transition: none !important; }
}
