/* The Political Affiliation Quiz. Colors and type follow the 2016 WordPress theme (rufe/scss); redesign can come later.
   Oct 2026: the page blue and accent were deepened (2016: #3DAAE3, #227BCB) so white and accent text pass WCAG AA (4.5:1). */
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url(/fonts/source-sans-3-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 {
  --bg: #197BAE;        /* page blue */
  --accent: #1F75C2;    /* buttons, selected answers */
  --deep: #146A81;      /* headings on white */
  --soft: #6EBFEC;
  --chart: #CCC;
  --card: #FFF;
  --ink: #2B2B2B;
  --muted: #6B6B6B;
  --gold: #DA9D06;
  --radius: 10px;
  --font: 'Source Sans 3', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.5 var(--font); }
main { max-width: 860px; margin: 0 auto; padding: 24px 16px 48px; }
h1, h2, h3 { line-height: 1.2; }
a { color: var(--accent); }
img { max-width: 100%; }
.noscript, .center { text-align: center; color: #FFF; }

/* home */
.hero { text-align: center; color: #FFF; padding: 12vh 0 8vh; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 300; margin: 0 0 .5em; }
.hero .lead { font-size: 1.25rem; font-weight: 300; max-width: 640px; margin: 0 auto 2em; }
.hero .sub { margin-top: 2em; font-weight: 300; }

.btn, .btn-go, .btn-submit { display: inline-block; border: 0; border-radius: 999px; cursor: pointer; font: 700 1.1rem var(--font); text-decoration: none; padding: .8em 2em; }
.btn-go { background: #FFF; color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.btn-go:hover { background: var(--gold); color: #FFF; }
.btn, .btn-submit { background: var(--accent); color: #FFF; }
.btn-submit:disabled { opacity: .6; cursor: wait; }
.btn-link { background: none; border: 0; padding: 0; cursor: pointer; font: 700 1rem var(--font); color: var(--accent); text-decoration: none; }
.share { display: inline-grid; place-items: center; width: 2.2em; height: 2.2em; margin: 0 .2em; border-radius: 50%; background: #FFF; color: var(--accent); font-weight: 700; text-decoration: none; vertical-align: middle; }
.share:hover { background: var(--gold); color: #FFF; }

/* home: how it works + questions (static HTML, readable by search engines) */
.card h2 { color: var(--deep); text-align: center; font-size: 1.5rem; margin: .2em 0 .8em; }
.how ol { margin: 0; padding-left: 1.4em; }
.how li { margin: 0 0 .6em; }
.faq details { border-top: 1px solid #EEE; padding: 12px 0; }
.faq details:last-child { border-bottom: 1px solid #EEE; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--deep); }
.faq details p { margin: .6em 0 0; }

/* question pages */
.page-head { text-align: center; color: #FFF; }
.page-head h1 { font-weight: 300; font-size: clamp(1.8rem, 5vw, 2.6rem); margin: .4em 0 .2em; }
.page-head p { font-weight: 300; margin: 0 0 .4em; }
.page-head .part { font-weight: 700; margin-bottom: 1.5em; }
.q { border: 0; margin: 0 0 18px; padding: 22px 20px 12px; background: var(--card); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(0,0,0,.08); transition: opacity .3s; min-width: 0; }
.q.locked { opacity: .35; }
.q legend { float: left; width: 100%; padding: 0; margin-bottom: 16px; font-size: 1.25rem; font-weight: 700; color: var(--deep); text-align: center; }
.q legend + * { clear: both; }
.optional { font-weight: 400; font-size: .9rem; color: var(--muted); }
.opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.opt { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer; font-size: .85rem; color: var(--muted); padding: 6px 2px; border-radius: 8px; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .dot { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--chart); transition: all .15s; }
.opt:hover .dot { border-color: var(--soft); }
.opt input:checked + .dot { border-color: var(--accent); background: radial-gradient(var(--accent) 45%, #FFF 50%); }
.opt input:checked ~ .lbl { color: var(--accent); font-weight: 700; }
.opt input:focus-visible + .dot { outline: 3px solid var(--gold); outline-offset: 2px; }
.q-foot { text-align: right; font-size: .85rem; color: var(--muted); margin-top: 8px; }
.submit-area { text-align: center; padding: 12px 0 24px; }

/* results */
.type-name { text-align: center; color: #FFF; font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 0 0 18px; text-transform: capitalize; }
.card { background: var(--card); border-radius: var(--radius); padding: 24px 22px; margin: 0 0 18px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.card h3 { color: var(--deep); text-align: center; margin: .2em 0 .8em; }
.card h3 span { text-transform: uppercase; }
.card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid #EEE; margin-top: 18px; padding-top: 14px; }
.summary p, .explainer p { margin: 0 0 1em; }
.explainer { border-top: 1px solid #EEE; margin-top: 16px; padding-top: 12px; }
.explainer h3 { text-align: left; font-size: 1.1rem; }

.chart-wrap { display: grid; grid-template-columns: auto minmax(0, 300px); justify-content: center; gap: 12px; align-items: stretch; }
.axis-x { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; text-transform: uppercase; color: var(--deep); margin-bottom: 4px; }
.axis-y { display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding-top: 22px; font-size: .8rem; font-weight: 700; text-transform: uppercase; color: var(--deep); }
.axis-y h3 { font-size: .9rem; margin: 0; writing-mode: vertical-rl; transform: rotate(180deg); }
.chart { position: relative; margin: 0; aspect-ratio: 1; width: 100%; background: var(--chart); text-transform: uppercase;
  background-image: linear-gradient(to right, transparent calc(50% - 1px), #FFF calc(50% - 1px), #FFF calc(50% + 1px), transparent calc(50% + 1px)),
                    linear-gradient(to bottom, transparent calc(50% - 1px), #FFF calc(50% - 1px), #FFF calc(50% + 1px), transparent calc(50% + 1px)); }
.quad { position: absolute; width: 50%; height: 50%; display: grid; place-items: center; font-weight: 700; color: #FFF; font-size: .9rem; letter-spacing: .04em; }
.quad.tl { left: 0; top: 0; } .quad.tr { right: 0; top: 0; } .quad.bl { left: 0; bottom: 0; } .quad.br { right: 0; bottom: 0; }
.you { position: absolute; transform: translate(-50%, -100%); }
.you b { display: block; background: var(--gold); color: #FFF; font-size: .75rem; padding: 3px 8px; border-radius: 6px; position: relative; text-transform: uppercase; }
.you b::after { content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 6px solid transparent; border-bottom: 0; border-top-color: var(--gold); }

.tiles { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; text-align: center; }
.tiles li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .9rem; font-weight: 700; color: var(--deep); }
.tiles img { max-height: 120px; object-fit: contain; }
.tiles a { display: flex; flex-direction: column; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.tiles a:hover span { color: var(--accent); text-decoration: underline; }
.next-card p { text-align: center; margin: 0 0 1em; }
.amazon { display: flex; align-items: center; justify-content: center; gap: 10px; }
.amazon img { height: 28px; width: auto; }
.share-card .shares { text-align: center; }
.share-card .share { width: 3em; height: 3em; background: var(--accent); color: #FFF; font-size: 1.1rem; }

dialog { max-width: 640px; width: calc(100% - 32px); border: 0; border-radius: var(--radius); padding: 24px; }
dialog::backdrop { background: rgba(0,0,0,.5); }
dialog h3 { color: var(--deep); margin-top: 0; }

.site-footer { text-align: center; color: #FFF; padding: 24px 16px 40px; font-weight: 300; }
.wordmark { display: block; color: #FFF; text-decoration: none; font-size: 1.2rem; margin-bottom: 6px; }
.wordmark span { font-weight: 700; text-transform: uppercase; }

@media (max-width: 600px) {
  body { font-size: 17px; }
  .opts { grid-template-columns: repeat(3, 1fr); row-gap: 12px; }
  .chart-wrap { grid-template-columns: auto minmax(0, 1fr); }
  .card { padding: 20px 16px; }
}
