/* Hosted page: phone first at 390 px, one column up to 720 px. Colours come from tokens.css. */
.ic { width: 1.25em; height: 1.25em; flex: none; }
.hp-root { min-height: 100svh; display: flex; flex-direction: column; }
.hp-bar { border-bottom: 1px solid var(--line); background: var(--paper); padding-top: var(--sai-t); }
.hp-bar .col { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.hp-bar .share-btn { margin-right: -0.6rem; }
.share-btn { display: none; }
.js .share-btn { display: inline-flex; }
.is-embed .share-btn { display: none; }

/* Compact sticky bar: appears once the title has scrolled away */
.stick { --stick-h: 52px; position: fixed; top: 0; left: 0; right: 0; z-index: 20; padding-top: var(--sai-t);
  background: color-mix(in srgb, var(--paper) 84%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--line); transform: translateY(-100%); opacity: 0; visibility: hidden;
  transition: transform 0.3s var(--ease), opacity 0.2s ease, visibility 0s 0.3s; }
.stick.show { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.stick .col { display: flex; align-items: center; min-height: var(--stick-h); gap: 0.5rem; }
.stick-title { flex: 1; min-width: 0; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; font: 750 1.0625rem/1.2 var(--font); letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.stick .share-btn { margin-right: -0.6rem; flex: none; }
html:not(.js) .stick, .is-embed .stick { display: none; }
.logo-text { font-size: 1.125rem; }
.draft { background: var(--mark); color: #15171a; font-size: var(--fs-s); font-weight: 650; padding: 0.55rem 0; border-bottom: 1px solid #15171a; }
.hp-main { flex: 1; padding-top: 1.75rem; padding-bottom: calc(2.5rem + var(--sai-b)); }
/* Embedded in someone else's site: the page keeps its own paper surface, so text stays readable on any background. */
.is-embed { overscroll-behavior: contain; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.is-embed .hp-main { padding-top: 1rem; padding-bottom: 1rem; }

.hp-head { margin-bottom: 1.5rem; }
.hp-head .kicker { margin: 0 0 0.6rem; }
.hp-head h1 { font-size: clamp(1.9rem, 8.5vw, 3rem); overflow-wrap: anywhere; hyphens: auto; }
.hp-head .sub { font-size: var(--fs-l); line-height: 1.4; color: var(--ink-2); margin: 0.7rem 0 0; }
.hp-head .by { margin: 0.7rem 0 0; font-size: var(--fs-s); color: var(--ink-3); }

/* Tools: only visible with JavaScript */
.tools, .tools-empty { display: none; }
.js .tools { display: grid; gap: 0.6rem; margin: 0 0 1.25rem; }
.search { position: relative; display: block; }
.search .ic { position: absolute; left: 0.85rem; top: 50%; margin-top: -0.625em; color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 2.6rem; }
.select { appearance: none; -webkit-appearance: none; padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b8089' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 20px; }
.js .tools-empty:not([hidden]) { display: block; color: var(--ink-3); margin: 0 0 1rem; }
@media (min-width: 560px) { .js .tools { grid-template-columns: 1.4fr 1fr; } }

/* Cards */
.hp-cards { display: flex; flex-direction: column; gap: 1rem; }
.hc { position: relative; padding: 1.25rem 1.15rem 1.15rem; box-shadow: 0 1px 2px rgba(21, 23, 26, 0.05); scroll-margin-top: calc(4.25rem + var(--sai-t)); }
.hc-heading { font-size: var(--fs-xl); margin-top: 1.4rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--ink); scroll-margin-top: calc(4.25rem + var(--sai-t)); overflow-wrap: anywhere; }
.hc-heading:first-child { margin-top: 0; }
.hc-title { font-size: var(--fs-l); margin: 0 0 0.7rem; overflow-wrap: anywhere; }
.hc-body { font-size: var(--fs); line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.hc-body p { margin: 0 0 0.8em; }
.hc-body p:last-child { margin-bottom: 0; }
.hc-body ul, .hc-body ol { margin: 0.2em 0 0.8em; padding-left: 1.35em; }
.hc-body li { margin: 0.25em 0; }
.hc-text .hc-body { background: var(--paper-2); border-radius: var(--radius-s); padding: 0.9rem 1rem; }
.hc-text .hc-body p + ul, .hc-text .hc-body p + ol { margin-top: 0.4em; }
.hc.hl::after { content: ""; position: absolute; inset: -5px; border-radius: calc(var(--radius-l) + 5px); border: 3px solid var(--mark); background: color-mix(in srgb, var(--mark) 20%, transparent); pointer-events: none; opacity: 0; animation: pulse 1.8s ease-out; }
@keyframes pulse { 0% { opacity: 0; transform: scale(0.985); } 14% { opacity: 1; transform: scale(1); } 60% { opacity: 1; } 100% { opacity: 0; } }
.hc-heading.hl { animation: headpulse 1.8s ease-out; }
@keyframes headpulse { 0%, 60% { background: var(--mark); } 100% { background: transparent; } }

/* Long texts: CSS checkbox toggle; with JS the open height is measured so the change eases. */
.toggle { position: absolute; opacity: 0; pointer-events: none; }
.toggle:not(:checked) ~ .hc-body { max-height: 12.5rem; overflow: hidden; }
.toggle ~ .hc-body { transition: max-height 0.4s var(--ease); }
.toggle:checked ~ .hc-body { max-height: var(--full, none); }
.hc-text .toggle ~ .hc-body::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5rem; background: linear-gradient(transparent, var(--paper-2)); pointer-events: none; transition: opacity 0.3s ease; }
.hc-text .toggle:checked ~ .hc-body::after { opacity: 0; }
.hc-text .toggle ~ .hc-body { position: relative; }
.more { display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: var(--tap); margin: 0.6rem 0 0; border: 1.5px solid var(--line-2); border-radius: var(--radius); font-weight: 650; font-size: var(--fs-s); cursor: pointer; }
.more:hover { border-color: var(--ink-3); }
.more .ic { transition: transform 0.3s var(--ease); }
.toggle:checked ~ .more .ic { transform: rotate(180deg); }
.toggle:checked ~ .more .more-a, .toggle:not(:checked) ~ .more .more-b { display: none; }
.toggle:focus-visible ~ .more { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Actions, copy and AI buttons */
.actions { display: grid; gap: 0.6rem; margin-top: 1rem; }
.actions .btn { width: 100%; min-height: 54px; font-size: 1.0625rem; }
.copy-btn .l-done { display: none; }
.copy-btn .ico { position: relative; display: inline-flex; width: 1.2em; height: 1.2em; }
.copy-btn .ico .ic { position: absolute; inset: 0; width: 100%; height: 100%; }
.copy-btn .ck { opacity: 0; }
.copy-btn .ck path { stroke-dasharray: 1; stroke-dashoffset: 1; }
html:not(.js) .copy-btn { display: none; }
html:not(.js) .hc-text .actions { margin-top: 0.6rem; }
.is-copied .copy-btn { background: var(--mark); color: #15171a; border-color: #15171a; animation: bump 0.4s var(--spring); }
.is-copied .copy-btn .ic-copy { opacity: 0; transform: scale(0.6); transition: opacity 0.15s, transform 0.2s; }
.is-copied .copy-btn .ck { opacity: 1; }
.is-copied .copy-btn .ck path { animation: draw 0.34s 0.05s var(--ease) forwards; }
.is-copied .copy-btn .l-copy { display: none; }
.is-copied .copy-btn .l-done { display: inline; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes bump { 0% { transform: scale(0.96); } 55% { transform: scale(1.035); } 100% { transform: scale(1); } }
.js .ai-row { display: none; }
.js .is-copied .ai-row { display: grid; gap: 0.6rem; }
.js .is-copied .ai-row .btn { animation: grow 0.34s var(--ease) both; }
.js .is-copied .ai-row .btn:nth-child(2) { animation-delay: 0.05s; }
.js .is-copied .ai-row .btn:nth-child(3) { animation-delay: 0.1s; }
.js .is-copied .ai-row .btn:nth-child(n+4) { animation-delay: 0.15s; }
.ai-row { display: grid; gap: 0.6rem; }
@keyframes grow { from { opacity: 0; transform: translateY(-8px) scale(0.97); } to { opacity: 1; transform: none; } }
.note { display: none; margin: 0.8rem 0 0; padding: 0.7rem 0.9rem; border-radius: var(--radius-s); background: var(--mark-soft); font-size: var(--fs-s); line-height: 1.45; }
.is-copied .note-ok { display: block; animation: grow 0.34s 0.1s var(--ease) both; }
.is-failed .note-err { display: block; animation: grow 0.3s var(--ease) both; background: var(--danger-soft); color: var(--danger); }

/* Contact */
.who { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.9rem; }
.who-ic { width: 2.6rem; height: 2.6rem; padding: 0.55rem; border-radius: 50%; background: var(--paper-2); }
.who .hc-title { margin: 0; }
.role { margin: 0.15rem 0 0; color: var(--ink-3); font-size: var(--fs-s); }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.rows a { display: flex; align-items: center; gap: 0.85rem; min-height: var(--tap); padding: 0.55rem 0; text-decoration: none; overflow-wrap: anywhere; }
.rows a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.rows small { display: block; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.2; }
.rows .ic { color: var(--ink-2); }

/* Feedback and sign-up */
.stars { display: flex; gap: 0.35rem; margin: 0 0 1rem; }
.stars button { transition: transform 0.22s var(--ease), border-color 0.18s, background-color 0.18s; }
.stars button { flex: 1; max-width: 64px; min-width: 48px; min-height: 52px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--line-2); border-radius: var(--radius); background: var(--card); color: var(--ink-2); cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
.stars button .star { width: 1.7rem; height: 1.7rem; }
.stars button.on { border-color: var(--ink); color: var(--ink); }
.stars button .star { transition: fill 0.2s ease, stroke 0.2s ease; }
.stars button.on .star { fill: var(--mark); stroke: var(--ink); animation: starpop 0.42s var(--spring) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes starpop { 0% { transform: scale(0.6); } 100% { transform: scale(1); } }
.hc-feedback form .btn, .hc-signup form .btn { width: 100%; min-height: 54px; }
.hp-wrap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.consent { font-size: var(--fs-xs); line-height: 1.45; color: var(--ink-2); margin: 0 0 0.7rem; }
.thanks { animation: fadein 0.32s var(--ease) both; display: flex; align-items: flex-start; gap: 0.6rem; margin: 0; padding: 0.85rem 1rem; background: var(--ok-soft); color: var(--ok); border-radius: var(--radius-s); font-weight: 600; font-size: var(--fs-s); }
.thanks[hidden] { display: none !important; }
.devlink { margin: 0.7rem 0 0; font-size: var(--fs-s); }
.hc .error { font-size: var(--fs-s); margin: 0.6rem 0 0; }

/* Help and footer */
.help { margin-top: 1.75rem; border-top: 1px solid var(--line); padding-top: 0.25rem; }
.help summary { display: flex; -webkit-user-select: none; user-select: none; align-items: center; gap: 0.55rem; min-height: var(--tap); cursor: pointer; font-weight: 650; font-size: var(--fs-s); list-style: none; }
.help summary::-webkit-details-marker { display: none; }
.help summary span { flex: 1; }
.help .chev { transition: transform 0.3s var(--ease); }
.help[open] .chev { transform: rotate(180deg); }
.help p { font-size: var(--fs-s); line-height: 1.5; margin: 0 0 0.6rem; }
.hp-foot { margin-top: 2rem; padding-bottom: var(--sai-b); padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: var(--fs-s); color: var(--ink-3); }
.hp-foot p { margin: 0 0 0.5rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.hp-foot .wordmark { font-size: 1rem; }
.hp-foot .links { gap: 1.25rem; }
.hp-foot a { color: var(--ink-2); }
.hp-foot .wordmark { color: var(--ink); text-decoration: none; }
.wordmark-inline { font-weight: 800; color: var(--ink); }
.is-embed .hp-foot { border-top: 0; margin-top: 1rem; padding-top: 0; }

/* Password gate */
.gate { max-width: 520px; padding-top: calc(2rem + var(--sai-t)); padding-bottom: calc(3rem + var(--sai-b)); display: flex; flex-direction: column; gap: 1.25rem; min-height: 100svh; justify-content: center; }
.gate h2 { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }

@media (min-width: 560px) {
  .hc { padding: 1.5rem 1.5rem 1.4rem; }
  .actions { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}
.hc-body + form { margin-top: 1rem; }

/* Own anchors: an empty element inside the card, so #alias works without JavaScript */
.anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; scroll-margin-top: calc(4.25rem + var(--sai-t)); }
.hc-heading { position: relative; }

/* Poll */
.opts { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; min-height: 52px; padding: 0.55rem 1rem; border: 1.5px solid var(--line-2); border-radius: var(--radius); background: var(--card); color: var(--ink); font: 650 1.0625rem/1.25 var(--font); text-align: left; cursor: pointer; overflow: hidden; touch-action: manipulation; transition: transform 0.22s var(--ease), border-color 0.18s, background-color 0.18s; }
.opt:active { transform: scale(0.98); transition-duration: 0.06s; }
.opt-bar { position: absolute; inset: 0; background: var(--line); transform: scaleX(0); transform-origin: left center; transition: transform 0.7s var(--ease); }
.opt-label, .opt-num { position: relative; z-index: 1; }
.opt-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.opt-num { flex: none; font-size: var(--fs-s); font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.opt .ck { position: relative; z-index: 1; display: none; flex: none; }
.opt.pending { opacity: 0.6; }
.hc-poll.voted .opt { cursor: default; background: var(--card); color: var(--ink); opacity: 1; }
.hc-poll.voted .opt:active { transform: none; }
.hc-poll.voted .opt.mine { border-color: var(--ink); }
.hc-poll.voted .opt.mine .opt-bar { background: var(--mark); }
.hc-poll.voted .opt.mine .ck { display: block; }
.hc-poll.voted .opt.mine .ck path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.35s 0.1s var(--ease) forwards; }
.hc-poll:not(.has-results) .opt-bar { display: none; }
.hc-poll.voted:not(.has-results) .opt:not(.mine) { opacity: 0.55; }
.hc-poll.voted:not(.has-results) .opt.mine { background: var(--mark); color: #15171a; }
.hc-poll .total { margin: 0.8rem 0 0; font-size: var(--fs-s); color: var(--ink-3); animation: fadein 0.3s var(--ease) both; }
.hc-poll .total[hidden] { display: none; }
.hc-poll .thanks { margin-top: 0.8rem; }
html:not(.js) .opt { border-style: dashed; cursor: default; pointer-events: none; font-weight: 500; }

/* Flashcards */
.hc-flash .hc-body { margin-bottom: 0.2rem; }
.deck { display: none; margin-top: 1rem; outline: none; }
.js .deck { display: block; }
.deck:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: var(--radius); }
.deck-plain { margin-top: 0.8rem; }
.js .deck-plain { display: none; }
.deck-plain details { border-bottom: 1px solid var(--line); }
.deck-plain summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 650; cursor: pointer; padding: 0.4rem 0; }
.deck-plain p { margin: 0 0 0.8rem; color: var(--ink-2); }
.deck-stage { perspective: 1100px; overflow: hidden; padding: 8px 8px 16px; margin: -8px -8px -16px; }
.fc { position: relative; height: clamp(15rem, 52vh, 21rem); cursor: pointer; touch-action: pan-y; -webkit-user-select: none; user-select: none; will-change: transform; outline: none; }
.fc.drag { cursor: grabbing; }
.fc:focus-visible .fc-inner { outline: 3px solid var(--focus); outline-offset: 3px; }
.fc-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.55s var(--ease); border-radius: var(--radius-l); }
.fc.flipped .fc-inner { transform: rotateY(180deg); }
.fc.noflip .fc-inner { transition: none; }
.fc-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1.25rem 1.1rem 2.2rem; border: 1.5px solid var(--line-2); border-radius: var(--radius-l); background: var(--card); box-shadow: var(--shadow); -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden; }
.fc-back { transform: rotateY(180deg); background: var(--paper-2); }
.fc-text { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; overflow-wrap: anywhere; white-space: pre-line; -webkit-user-select: text; user-select: text; }
.fc-back .fc-text { font-weight: 550; }
.fc-text.scrolls { padding-bottom: 2rem; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.fc-hint { position: absolute; left: 0; right: 0; bottom: 0.8rem; font-size: var(--fs-xs); font-weight: 650; color: var(--ink-3); opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.deck.first .fc-hint { opacity: 1; animation: nudge 2.4s 0.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.deck-prog { height: 4px; margin: 1rem 0 0.2rem; border-radius: 4px; background: var(--line); overflow: hidden; }
.deck-prog span { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left center; transition: transform 0.35s var(--ease); }
.deck-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.deck-nav .icon-btn { border: 1.5px solid var(--line-2); }
.deck-count { flex: 1; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.deck-nav .d-shuf { order: 0; }

/* Survey */
.sv .q { border: 0; padding: 0; margin: 0 0 1.35rem; min-width: 0; }
.sv legend { padding: 0; margin: 0 0 0.6rem; font-weight: 700; font-size: var(--fs); line-height: 1.3; }
.pills { display: grid; gap: 0.5rem; }
.pill { min-height: 52px; padding: 0.55rem 1rem; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--ink); font: 600 1.0625rem/1.25 var(--font); text-align: left; cursor: pointer; transition: transform 0.22s var(--ease), border-color 0.18s, background-color 0.18s; touch-action: manipulation; overflow-wrap: anywhere; }
.pill:active { transform: scale(0.98); transition-duration: 0.06s; }
.pill.on { border-color: var(--ink); background: var(--mark); color: #15171a; }
.seg { display: grid; grid-template-columns: repeat(5, 1fr); border: 1.5px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.seg button { min-height: 52px; border: 0; border-left: 1.5px solid var(--line-2); background: transparent; color: var(--ink); font: 700 1.125rem/1 var(--font); cursor: pointer; touch-action: manipulation; transition: background-color 0.18s, transform 0.2s var(--ease); }
.seg button:first-child { border-left: 0; }
.seg button:active { background: var(--paper-2); }
.seg button.on { background: var(--mark); color: #15171a; }
.seg-lab { display: flex; justify-content: space-between; margin-top: 0.35rem; font-size: var(--fs-xs); color: var(--ink-3); }
.hc-survey .btn { width: 100%; min-height: 54px; }
@media (min-width: 560px) { .pills { grid-template-columns: 1fr 1fr; } }

/* E-mail template */
.hc-email .hc-body.mail { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1rem; }
.subj { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0 0 0.7rem; padding: 0.5rem 0.4rem 0.5rem 1rem; border: 1.5px solid var(--line-2); border-radius: var(--radius); background: var(--card); }
.subj-main { min-width: 0; }
.subj-main small { display: block; font-size: var(--fs-xs); font-weight: 650; color: var(--ink-3); line-height: 1.2; }
.subj-text { display: block; font-weight: 650; overflow-wrap: anywhere; }
.subj .icon-btn { flex: none; }
html:not(.js) .subj-copy { display: none; }

/* Premium: the presenter's own logo image in the header */
.logo-img { display: inline-flex; align-items: center; min-width: 0; max-width: 60%; }
.logo-img img { display: block; height: 32px; width: auto; max-width: 100%; object-fit: contain; }

/* File card */
.file-row { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.7rem; }
.file-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 3.1rem; height: 3.1rem; border-radius: var(--radius); background: var(--paper-2); color: var(--ink); }
.file-ic .ic { width: 1.6rem; height: 1.6rem; }
.file-main { min-width: 0; }
.hc-file .hc-title { margin: 0 0 0.15rem; }
.file-name { margin: 0; font-weight: 600; font-size: var(--fs-s); overflow-wrap: anywhere; }
.file-meta { margin: 0.1rem 0 0; font-size: var(--fs-s); color: var(--ink-3); }
.hc-file .hc-body { margin-bottom: 0.2rem; }
.hc-file-empty { border-style: dashed; box-shadow: none; background: transparent; }
.hc-file-empty .file-row { margin: 0; }
