/* yourtime.to: one stylesheet for every page. Mobile first; light and dark
   themes from prefers-color-scheme; motion only where it helps, and none
   under prefers-reduced-motion. */

:root {
  color-scheme: light dark;
  --bg: #fbf4ea;
  --dots: #eadfcf;
  --surface: #fffdf8;
  --sunk: #f3e8d8;
  --ink: #2a201d;
  --soft: #6a5a52;
  --line: #2a201d;
  --rule: #e2d3bf;
  --shadow: #2a201d;
  --accent: #b0245c;
  --accent-hover: #8f1c4a;
  --on-accent: #ffffff;
  --accent-soft: #fbe4ec;
  --err: #a3202f;
  --on-err: #ffffff;
  --err-bg: #fdeaea;
  --backdrop: rgb(42 32 29 / 0.55);
  --radius: 1.25rem;
  --radius-sm: 0.875rem;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1614;
    --dots: #2a221f;
    --surface: #28201d;
    --sunk: #221b18;
    --ink: #f7eee6;
    --soft: #c6b5aa;
    --line: #a8978c;
    --rule: #4a3d36;
    --shadow: #0b0807;
    --accent: #ff86b0;
    --accent-hover: #ffa7c6;
    --on-accent: #2a0c18;
    --accent-soft: #47202f;
    --err: #ff9a9a;
    --on-err: #2a0c18;
    --err-bg: #3d1d1f;
    --backdrop: rgb(0 0 0 / 0.65);
  }
}

/* ---- Base ---------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dots) 1.2px, transparent 1.6px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.75rem, 6.5vw, 2.5rem);
  font-weight: 800;
  margin: 0.5rem 0 0.75rem;
}

h2 {
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 0.14em;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

[tabindex="-1"]:focus {
  outline: none;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

.visually-hidden {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -10rem;
  left: 1rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--bg);
}

/* ---- Header, main, footer ------------------------------------------------ */

.site-header {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: 0.75rem 1rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}

.wordmark {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.wordmark a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.wordmark a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.wordmark-verb {
  color: var(--accent);
}

.site-nav {
  min-height: 44px;
}

/* The legal pages read without JavaScript; their nav says what needs it. */
.site-nav .lead {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  font-size: 1rem;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.85rem;
  border: 2px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.nav-link:hover {
  background: var(--sunk);
  color: var(--ink);
}

.nav-link[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.35em;
}

.nav-add,
.nav-login {
  border-color: var(--line);
  background: var(--surface);
}

.nav-name {
  font-family: var(--mono);
  font-weight: 700;
}

@media (max-width: 30rem) {
  .site-header {
    column-gap: 0.5rem;
  }

  .nav-link {
    padding: 0 0.5rem;
    font-size: 0.92rem;
  }
}

main {
  flex: 1;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
  overflow-x: clip;
}

main:focus {
  outline: none;
}

/* One quiet line: "© 2026 yourtime.to", then Privacy and Terms; on narrow
   screens the links wrap to a line of their own. */
.site-footer {
  padding: 1rem 1rem 1.25rem;
  color: var(--soft);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  white-space: nowrap;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.35rem;
  color: inherit;
}

.site-footer a:hover {
  color: var(--accent-hover);
}

.site-footer a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--accent);
}

@media (max-width: 36rem) {
  .site-footer {
    padding-inline: 0.75rem;
    font-size: 0.85rem;
  }

  .footer-links {
    display: block;
  }

  .footer-sep {
    display: none;
  }
}

/* ---- Privacy and terms ----------------------------------------------------- */

.legal ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 0.6rem;
}

.legal li::marker {
  color: var(--accent);
}

/* Cookie settings, under the analytics line when analytics is configured. */
.legal .consent-settings {
  display: flex;
  width: fit-content;
  margin-top: 0.5rem;
}

/* ---- Text bits ------------------------------------------------------------ */

.lead {
  color: var(--soft);
  font-size: 1.1rem;
}

.quiet {
  color: var(--soft);
}

.verb,
.name {
  font-family: var(--mono);
  letter-spacing: -0.02em;
}

h1 .verb,
h1 .name {
  color: var(--accent);
}

.empty-note {
  font-size: 1.2rem;
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

/* ---- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.55rem 1.35rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 3px 3px 0 var(--shadow);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 90ms ease-out, box-shadow 90ms ease-out, background-color 120ms;
}

.btn:hover {
  color: var(--ink);
  background: var(--sunk);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--shadow);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.btn-big {
  min-height: 56px;
  padding-inline: 2rem;
  font-size: 1.15rem;
}

.btn-small {
  min-height: 44px;
  padding: 0.4rem 1rem;
  font-size: 0.95rem;
}

.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
  box-shadow: 3px 3px 0 var(--shadow);
}

/* Save toggles: an empty star, filled once saved (not color alone). */
.btn-save::before {
  content: "\2606" / "";
  font-weight: 400;
}

.btn-save[aria-pressed="true"] {
  background: var(--accent-soft);
}

.btn-save[aria-pressed="true"]::before {
  content: "\2605" / "";
  color: var(--accent);
}

/* Small round icon buttons: the Just seen strip's Save (a star) and Share,
   so they never pass for the buttons of the site on screen, and the Share
   of the owner's profile rows. Their labels are read out but not shown. */
.btn-star,
.btn-icon {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-star::before {
  font-size: 1.35rem;
  line-height: 1;
}

.btn-icon::before {
  font-size: 1.15rem;
  line-height: 1;
}

.btn-star:hover,
.btn-icon:hover {
  background: var(--sunk);
}

.btn-star[aria-pressed="true"],
.btn-star[aria-pressed="true"]:hover {
  background: var(--accent-soft);
}

.btn-star[aria-disabled="true"] {
  opacity: 0.6;
  cursor: progress;
}

.btn-star .btn-label,
.btn-icon .btn-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.btn-share::before {
  content: "\21aa" / "";
  font-weight: 400;
}

.btn-back::before {
  content: "\2190" / "";
  font-weight: 400;
}

.btn-danger.is-armed {
  background: var(--err);
  color: var(--on-err);
}

.btn-danger.is-armed::before {
  content: "!" / "";
  font-weight: 900;
}

.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--soft);
  font: inherit;
  font-size: 0.95rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.link-button:hover {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

/* ---- Messages ------------------------------------------------------------- */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

/* The text can hold a long unbroken yourtime.to/{verb}; let it shrink and
   wrap instead of widening the page at 320 px. */
.notice > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.notice::before {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.05rem;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
}

.notice-error {
  background: var(--err-bg);
}

.notice-error::before {
  content: "!" / "";
  background: var(--err);
  color: var(--on-err);
}

.notice-ok {
  background: var(--accent-soft);
  font-weight: 650;
}

.notice-ok::before {
  content: "\2713" / "";
  background: var(--accent);
  color: var(--on-accent);
}

.field-error {
  margin: 0.4rem 0 0;
  padding-left: 1.75rem;
  position: relative;
  color: var(--ink);
  font-weight: 650;
}

.field-error::before {
  content: "!" / "";
  position: absolute;
  left: 0;
  top: 0.1rem;
  display: inline-grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--err);
  color: var(--on-err);
  font-size: 0.8rem;
  font-weight: 900;
}

.field-error p {
  margin: 0 0 0.25rem;
}

.form-error .notice,
.form-result .notice {
  margin: 0 0 1rem;
}

/* ---- Forms ---------------------------------------------------------------- */

.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.35rem;
}

label {
  font-weight: 700;
}

.hint {
  margin: 0;
  color: var(--soft);
  font-size: 0.92rem;
}

.count.is-low {
  color: var(--ink);
  font-weight: 700;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.9rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.45;
}

input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

::placeholder {
  color: var(--soft);
  opacity: 1;
}

[aria-invalid="true"] {
  border-color: var(--err);
  box-shadow: inset 0 0 0 1px var(--err);
}

/* A text input with a fixed "yourtime.to/" in front of it. */
.url-field {
  display: flex;
  align-items: stretch;
  min-width: 0;
  min-height: 48px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-weight: 400;
  cursor: text;
}

.url-field:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.url-field:has([aria-invalid="true"]) {
  border-color: var(--err);
  box-shadow: inset 0 0 0 1px var(--err);
}

.url-prefix {
  display: flex;
  align-items: center;
  padding-left: 0.85rem;
  color: var(--soft);
  font-family: var(--mono);
  white-space: nowrap;
}

.url-field input {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding-left: 0.1rem;
  border: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: transparent;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  box-shadow: none;
}

.url-field input:focus-visible {
  outline: none;
}

/* ---- Home ----------------------------------------------------------------- */

.hero {
  margin: 1.5rem 0 1.75rem;
}

.hero-title {
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  font-size: clamp(2.6rem, 13.5vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  white-space: nowrap;
}

.hero-title::after {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.82em;
  margin-left: 0.06em;
  vertical-align: -0.06em;
  border-radius: 0.06em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-lead {
  margin: 0;
  color: var(--soft);
  font-size: clamp(1.1rem, 4vw, 1.3rem);
}

.verb-list {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.verb-card {
  position: relative;
  display: block;
  min-height: 3.75rem;
  padding: 0.85rem 3rem 0.85rem 1.1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 3px 3px 0 var(--shadow);
  color: var(--soft);
  font-family: var(--mono);
  font-size: clamp(1.05rem, 5vw, 1.4rem);
  letter-spacing: -0.03em;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: transform 110ms ease-out, box-shadow 110ms ease-out;
}

.verb-card::after {
  content: "\2192" / "";
  position: absolute;
  top: 50%;
  right: 1.1rem;
  transform: translateY(-50%);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 700;
}

.verb-card .verb {
  color: var(--accent);
  font-weight: 800;
}

.verb-card:hover {
  color: var(--soft);
  transform: translate(-2px, -2px) rotate(-0.6deg);
  box-shadow: 5px 5px 0 var(--shadow);
}

.verb-list li:nth-child(even) .verb-card:hover {
  transform: translate(-2px, -2px) rotate(0.6deg);
}

.verb-form {
  margin: 2rem 0 1.75rem;
}

.verb-label {
  display: block;
  margin-bottom: 0.4rem;
}

.verb-row {
  display: flex;
  gap: 0.6rem;
}

.verb-row .combo {
  flex: 1;
}

/* The verb combobox (home and add): the listbox opens under the field, over
   what follows it, as wide as the field. */
.combo {
  position: relative;
  min-width: 0;
}

.combo-list {
  position: absolute;
  z-index: 5;
  top: calc(100% + 0.35rem);
  right: 0;
  left: 0;
  margin: 0;
  padding: 0.3rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--shadow);
  list-style: none;
}

.combo-option {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 0.75rem;
  min-height: 44px;
  padding: 0.3rem 0.75rem;
  border-radius: 0.6rem;
  cursor: pointer;
}

.combo-option:hover {
  background: var(--sunk);
}

/* The active option: a bar at its side as well as the color. */
.combo-option[aria-selected="true"] {
  background: var(--accent-soft);
  box-shadow: inset 4px 0 0 var(--accent);
}

.combo-verb {
  min-width: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.combo-count {
  color: var(--soft);
  font-size: 0.9rem;
  white-space: nowrap;
}

@media (forced-colors: active) {
  .combo-option[aria-selected="true"] {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
}

/* ---- The card ------------------------------------------------------------- */

/* Two cards peek out from under the one on the table. */
.deck {
  position: relative;
  isolation: isolate;
  margin: clamp(0.75rem, 5vh, 2.75rem) 0.4rem 0;
}

.deck::before,
.deck::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--sunk);
}

.deck::before {
  transform: rotate(-2.4deg) translate(-3px, 7px);
}

.deck::after {
  transform: rotate(1.6deg) translate(5px, 4px);
  background: var(--accent-soft);
}

.card {
  position: relative;
  padding: clamp(1.25rem, 5.5vw, 2.25rem);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--shadow);
}

.card.is-dealt {
  animation: deal 180ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

/* Dealt from the upper left: a start position past the right edge would leave
   the page sideways-scrollable until the next layout. */
@keyframes deal {
  from {
    opacity: 0;
    transform: translate(-1rem, -0.75rem) rotate(-3deg);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

main[aria-busy="true"] .card {
  opacity: 0.6;
  transition: opacity 150ms;
}

.card-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.65rem, 6.5vw, 2.4rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.9rem;
  margin: 0 0 1.25rem;
  color: var(--soft);
  font-size: 0.97rem;
}

.host {
  font-family: var(--mono);
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

.by a,
.person {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--accent);
}

.card-reason {
  position: relative;
  margin: 0 0 1.75rem;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 4px solid var(--accent);
  font-size: clamp(1.1rem, 4.2vw, 1.3rem);
  line-height: 1.45;
}

.card-reason p,
.entry-reason p,
.report-note p {
  margin: 0;
}

.card-reason p::before,
.entry-reason p::before,
.report-note p::before {
  content: "\201c" / "";
}

.card-reason p::after,
.entry-reason p::after,
.report-note p::after {
  content: "\201d" / "";
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-open {
  flex: 1 1 100%;
  min-height: 60px;
  font-size: 1.25rem;
}

.btn-open::after {
  content: "\2197" / "";
}

.card-actions .btn:not(.btn-open) {
  flex: 1 1 0;
}

.card-status {
  margin: 1rem 0 0;
  font-weight: 650;
}


.reported {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  color: var(--soft);
  font-size: 0.95rem;
}

@media (min-width: 30rem) {
  .btn-open {
    flex: 2 1 auto;
  }

  .card-actions .btn:not(.btn-open) {
    flex: 1 1 auto;
  }
}

/* The vote prompt. */
.ask-kicker {
  margin: 0;
  color: var(--soft);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ask-site {
  margin: 0.15rem 0 1.25rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ask-site a {
  display: inline-block;
  padding: 0.6rem 0;
  color: var(--ink);
  text-decoration-color: var(--accent);
}

.ask-site a::after {
  content: "\2197" / "";
  display: inline-block;
  margin-left: 0.3rem;
  color: var(--soft);
}

.ask-title {
  margin: 0 0 1.25rem;
  font-size: clamp(2.1rem, 9vw, 3.2rem);
  line-height: 1.02;
}

.ask-login {
  margin: -0.5rem 0 1.25rem;
  color: var(--soft);
  font-size: 1.1rem;
}

.vote-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.btn-vote {
  min-height: 64px;
  padding-inline: 0.75rem;
  font-size: 1.3rem;
}

/* A recorded answer looks pressed in, not only colored: a check mark, an
   inner ring, no drop shadow, and nudged into its place. Once No is pressed,
   Yes goes plain. */
.btn-vote[aria-pressed="true"],
.btn-vote[aria-pressed="true"]:hover,
.btn-vote[aria-pressed="true"]:active {
  transform: translate(3px, 3px);
  box-shadow: inset 0 0 0 3px var(--surface);
}

.btn-vote[aria-pressed="true"]::before {
  content: "\2713" / "";
}

.btn-no[aria-pressed="true"],
.btn-no[aria-pressed="true"]:hover {
  background: var(--ink);
  color: var(--surface);
}

.vote-row:has(.btn-no[aria-pressed="true"]) .btn-yes {
  background: var(--surface);
  color: var(--ink);
}

.vote-row:has(.btn-no[aria-pressed="true"]) .btn-yes:hover {
  background: var(--sunk);
}

.btn-next-card {
  width: 100%;
  min-height: 56px;
  margin-top: 0.85rem;
  font-size: 1.1rem;
}

.btn-next-card::after {
  content: "\2192" / "";
  font-weight: 400;
}

.ask-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px dashed var(--line);
}

.btn-save-later {
  width: 100%;
  min-height: 56px;
  margin-top: 0.85rem;
  font-size: 1.1rem;
}

.ask-more .btn {
  min-height: 44px;
  padding: 0.4rem 1.1rem;
}

.ask-more > :last-child:not(:first-child) {
  margin-left: auto;
}

/* Loading. */
.loading-title {
  margin: 0 0 1.25rem;
  color: var(--soft);
  font-size: 1.1rem;
  font-weight: 700;
}

.skeleton {
  display: grid;
  gap: 0.75rem;
}

.skeleton span {
  display: block;
  height: 1.1rem;
  border-radius: 0.5rem;
  background: var(--sunk);
  animation: pulse 1.2s ease-in-out infinite alternate;
}

.skeleton span:first-child {
  width: 80%;
  height: 2rem;
}

.skeleton span:nth-child(2) {
  width: 45%;
}

.skeleton span:last-child {
  height: 3.5rem;
  margin-top: 0.75rem;
  border-radius: 999px;
}

@keyframes pulse {
  to {
    opacity: 0.45;
  }
}

/* No card: no_sites, seen_all, errors, unknown paths. The dashed outline is
   the empty spot on the table where a card would go. */
.empty {
  margin-top: clamp(0.75rem, 5vh, 2.75rem);
  padding: clamp(1.25rem, 5.5vw, 2.25rem);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
}

.empty .actions {
  margin-bottom: 0;
}

.empty h1 {
  font-size: clamp(1.75rem, 7vw, 2.6rem);
}

.others .verb-list {
  margin-top: 0.5rem;
}

/* ---- Lists: saved, profile, admin ---------------------------------------- */

.entries {
  display: grid;
  gap: 1.1rem;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}

.entry {
  padding: 1rem 1.25rem 1.1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--shadow);
}

.entry-title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.entry-title a,
.entry-title span {
  display: inline-block;
  padding: 0.6rem 0;
  color: var(--ink);
  text-decoration-color: var(--accent);
}

.entry-title a::after {
  content: "\2197" / "";
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--soft);
  font-size: 0.9em;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.9rem;
  margin: 0 0 0.5rem;
  color: var(--soft);
  font-size: 0.92rem;
}

.verb-ref {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--soft);
  font-family: var(--mono);
  letter-spacing: -0.02em;
  text-decoration-color: var(--accent);
}

.verb-ref .verb {
  color: var(--accent);
  font-weight: 700;
}

.verb-ref:hover {
  color: var(--ink);
}

/* Inside a sentence the link stays inline. */
.notice .verb-ref,
.field-error .verb-ref {
  display: inline;
  min-height: 0;
}

/* A long yourtime.to/{verb} that fills the line wraps after the slash, not
   inside the verb. An inline block does that, but drops the link's underline,
   so it draws its own. */
.notice .verb-ref .verb,
.field-error .verb-ref .verb {
  display: inline-block;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.entry-reason {
  margin: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
}

.entry-gone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0.2rem 0.75rem;
  border: 2px dashed var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 650;
}

.entry-gone::before {
  content: "\2715" / "";
  font-weight: 900;
}

.entry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.entry-actions .field-error {
  margin: 0;
}

.entry-url {
  margin: 0 0 0.25rem;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.6rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-dead {
  border-style: dashed;
}

.report-count {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
}

.reports {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report {
  padding: 0.6rem 0.85rem;
  border-radius: 0.6rem;
  background: var(--sunk);
}

.report-reason {
  margin: 0 0 0.2rem;
  font-weight: 750;
}

.report-note {
  margin: 0;
}

.report-note.is-empty {
  color: var(--soft);
  font-style: italic;
}

.report-meta {
  margin: 0.2rem 0 0;
  color: var(--soft);
  font-size: 0.88rem;
}

/* ---- Settings and share --------------------------------------------------- */

.panel {
  margin: 1.25rem 0;
  padding: 1.1rem 1.25rem 0.35rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.panel .actions {
  margin: 0.25rem 0 1rem;
}

.panel .field-error {
  margin-bottom: 1rem;
}

/* A panel's heading with the small "?" button right after it. */
.panel-head {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: -0.4rem 0 0.35rem;
}

.panel-head h2 {
  margin: 0;
}

/* The "?" button: a 44 px target around a small ring. */
.help-btn {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.help-mark {
  display: inline-grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
}

.help-btn:hover .help-mark {
  background: var(--sunk);
}

/* The profile's two switches, under the name form. */
.switches {
  margin-top: 0.25rem;
  padding-top: 0.75rem;
  border-top: 2px dashed var(--sunk);
}

.switch-field .field-error {
  margin: -0.5rem 0 1rem;
}

.dialog-text p {
  margin: 0 0 0.75rem;
}

.dialog-text {
  margin: 0.75rem 0 1.25rem;
}

.email {
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

.add-form {
  margin-top: 1.5rem;
}

.name-url {
  font-family: var(--mono);
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* A checkbox styled as a switch (the settings page's votes switch). The
   whole label is the target, at least 44 px tall; the knob's side, not
   only its color, says on or off. */
.switch {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 48px;
  margin: 0.25rem 0 1rem;
  cursor: pointer;
  line-height: 1.3;
}

.switch-input {
  flex: none;
  position: relative;
  width: 3.25rem;
  height: 2rem;
  margin: 0;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--sunk);
  cursor: pointer;
  appearance: none;
  transition: background-color 150ms ease-out, border-color 150ms ease-out;
}

.switch-input::before {
  content: "";
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: var(--soft);
  transition: transform 150ms ease-out, background-color 150ms ease-out;
}

.switch-input:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.switch-input:checked::before {
  background: var(--on-accent);
  transform: translateX(1.25rem);
}

.switch-input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.switch:hover .switch-input:not(:checked) {
  background: var(--bg);
}

@media (forced-colors: active) {
  .switch-input::before {
    background: CanvasText;
  }

  .switch-input:checked {
    background: Highlight;
  }

  .switch-input:checked::before {
    background: HighlightText;
  }
}

/* ---- Dialogs -------------------------------------------------------------- */

.dialog {
  width: min(28rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 1.5rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 8px 8px 0 var(--shadow);
  color: var(--ink);
}

.dialog[open] {
  animation: pop 160ms ease-out;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(0.5rem) scale(0.98);
  }
}

.dialog::backdrop {
  background: var(--backdrop);
}

.dialog-title {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
}

.dialog-lead {
  color: var(--soft);
}

.dialog .notice {
  margin: 0 0 1rem;
}

/* A dialog whose heading is the legend of its fieldset (the Report dialog's
   question and its radio group). */
.dialog-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.dialog-group legend {
  padding: 0;
}

.choices {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

/* One radio choice: the whole row is the target, at least 44 px tall. */
.choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.45rem 0.9rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}

.choice:hover {
  background: var(--sunk);
}

.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.choice input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--accent);
}

.choice-note {
  margin: 0.25rem 0 0;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ---- Logging in ----------------------------------------------------------- */

/* The login choices, in the dialog and on the login page alike: full-width
   buttons, a quiet "or" after Google, the forms, then the small print. */
.login-options {
  margin: 1rem 0 0.5rem;
}

/* On the login page the choices sit on a card of their own, as in the dialog. */
.login-page .notice,
.login-page-options {
  max-width: 28rem;
}

.login-page-options {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--shadow);
}

@media (max-width: 30rem) {
  .login-page-options {
    padding-inline: 1rem;
  }
}

.btn-block {
  width: 100%;
}

/* A plain text button: Google's own button art can replace it later. */
.btn-google {
  font-size: 1.05rem;
}

.login-or {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.25rem 0;
  color: var(--soft);
  font-size: 0.95rem;
}

.login-or::before,
.login-or::after {
  content: "";
  flex: 1;
  border-top: 2px dotted var(--line);
  opacity: 0.45;
}

.login-form .field {
  margin-bottom: 0.85rem;
}

.login-form + .login-form,
.login-email + .login-form {
  margin-top: 1.25rem;
}

/* The dev stub's form, set apart so it never passes for a real way in. */
.login-dev {
  padding: 0.85rem 1rem 1rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
}

.login-sent {
  padding: 1rem 1.1rem 1.1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.login-sent-text {
  margin-bottom: 0.9rem;
}

.login-sent-text strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 1.15rem;
}

.login-address {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.login-closed {
  color: var(--soft);
  font-size: 1.1rem;
}

.login-fine {
  margin: 1.25rem 0 0;
  color: var(--soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

.login-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0 0 0 -0.35rem;
  color: var(--soft);
  font-size: 0.88rem;
}

.login-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.35rem;
  color: inherit;
}

.login-links a:hover {
  color: var(--accent-hover);
}

/* ---- Just seen ------------------------------------------------------------ */

.just-seen {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin: 0.25rem 0.4rem 1rem;
  padding: 0.35rem 0.4rem 0.35rem 1rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.js-text {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--soft);
  font-size: 0.95rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.js-title {
  color: var(--ink);
  font-weight: 700;
}

.js-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.just-seen .btn-small {
  padding-inline: 0.85rem;
}

.js-dismiss {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--soft);
  font: inherit;
  font-size: 1.05rem;
  cursor: pointer;
}

.js-dismiss:hover {
  background: var(--sunk);
  color: var(--ink);
}

/* ---- Frame view ------------------------------------------------------------ */

/* The site fills the viewport under the toolbar; the page itself never scrolls. */
body.is-framed {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body.is-framed .site-header,
body.is-framed .site-footer {
  display: none;
}

body.is-framed main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: none;
  padding: 0;
}

body.is-framed .just-seen {
  margin: 0;
  padding: 0.15rem 0.5rem 0.15rem 0.85rem;
  border-width: 0 0 2px;
  border-style: solid;
  border-radius: 0;
  background: var(--sunk);
}

/* On the sunk strip the round icons light up on hover instead. */
body.is-framed .just-seen .btn-star:not([aria-pressed="true"]):hover,
body.is-framed .just-seen .btn-icon:hover {
  background: var(--surface);
}

.toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 56px;
  padding: 0.3rem 0.75rem;
  border-bottom: 2px solid var(--line);
  background: var(--surface);
}

.toolbar[aria-busy="true"] .tb-actions {
  opacity: 0.6;
}

.tb-head {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.tb-wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.tb-wordmark:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.tb-wordmark .verb {
  color: var(--accent);
}

.tb-site {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 0.85rem;
  border-left: 2px solid var(--sunk);
}

.tb-title {
  margin: 0;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-wrap: nowrap;
}

.tb-line {
  margin: 0;
  overflow: hidden;
  color: var(--soft);
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tb-reason::before {
  content: " \00b7 \201c" / "";
}

.tb-reason::after {
  content: "\201d" / "";
}

.tb-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.8rem;
  border: 2px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tb-btn:hover {
  background: var(--sunk);
  color: var(--ink);
}

.tb-btn::before {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1;
}

.tb-btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: default;
}

/* Yes, No, Next and Save are the toolbar's regular buttons: bordered, on
   the surface, with a drop shadow, and labelled at every width. */
.tb-yes,
.tb-no,
.tb-next,
.tb-save {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 2px 2px 0 var(--shadow);
}

.tb-yes {
  background: var(--accent);
  color: var(--on-accent);
}

.tb-yes:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.tb-yes:active,
.tb-no:active,
.tb-next:active,
.tb-save:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--shadow);
}

.tb-yes::before {
  content: "\2713" / "";
  font-weight: 800;
}

.tb-no::before {
  content: "\2715" / "";
}

.tb-next::after {
  content: "\2192" / "";
  font-weight: 400;
}

/* The recorded answer looks pressed in: an inner ring, no drop shadow,
   nudged into place, filled (not color alone). Once No is pressed, Yes
   goes plain. */
.tb-yes[aria-pressed="true"],
.tb-no[aria-pressed="true"] {
  transform: translate(2px, 2px);
  box-shadow: inset 0 0 0 2px var(--surface);
}

.tb-no[aria-pressed="true"],
.tb-no[aria-pressed="true"]:hover {
  background: var(--ink);
  color: var(--surface);
}

.tb-vote:has(.tb-no[aria-pressed="true"]) .tb-yes {
  background: var(--surface);
  color: var(--ink);
}

.tb-vote:has(.tb-no[aria-pressed="true"]) .tb-yes:hover {
  background: var(--sunk);
}

/* A saved site's Save looks pressed in too, with a filled star and the
   label "Saved" (not color alone). */
.tb-save::before {
  content: "\2606" / "";
}

.tb-save[aria-pressed="true"],
.tb-save[aria-pressed="true"]:hover {
  background: var(--accent-soft);
  transform: translate(2px, 2px);
  box-shadow: inset 0 0 0 2px var(--surface);
}

.tb-save[aria-pressed="true"]::before {
  content: "\2605" / "";
  color: var(--accent);
}

/* Save keeps one width as it toggles: its label reserves the room "Saved"
   needs, so the buttons after it never move. */
.tb-save .btn-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.tb-save .btn-label::after {
  content: "Saved" / "";
  height: 0;
  overflow: hidden;
  visibility: hidden;
}

.tb-share::before {
  content: "\21aa" / "";
}

.tb-report::before {
  content: "\2691\fe0e" / "";
}

.tb-open::before {
  content: "\2197" / "";
}

.tb-more::before {
  content: "\25be" / "";
  font-size: 1.2rem;
}

.tb-more[aria-expanded="true"]::before {
  content: "\25b4" / "";
}

.tb-more .btn-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.tb-actions,
.tb-tools {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.3rem;
}

.tb-vote {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.3rem;
}

.tb-question {
  margin-right: 0.15rem;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.tb-details {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  padding: 1rem max(1rem, calc((100% - 44rem) / 2)) 1.1rem;
  border-top: 2px dashed var(--sunk);
  border-bottom: 2px solid var(--line);
  background: var(--surface);
  box-shadow: 0 4px 0 var(--shadow);
}

.tb-details-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.9rem;
  margin: 0 0 0.5rem;
  color: var(--soft);
  font-size: 0.95rem;
}

.tb-details .card-reason {
  margin: 0;
}

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
}

.stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.stage-wait {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--soft);
  font-family: var(--mono);
}

.stage.is-dealt {
  animation: deal-frame 180ms cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes deal-frame {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
}

/* Report and Open are icons, and so is Share below 80rem; their labels stay
   as accessible names, and a tooltip says what they do. */
.tb-report .btn-label,
.tb-open .btn-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.tb-report,
.tb-open {
  padding: 0;
}

@media (max-width: 79.99rem) {
  .tb-share .btn-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .tb-share {
    padding: 0;
  }
}

/* Below 75rem Yes, No, Next and Save drop their glyphs (pressed or not) and
   some padding, and the wordmark shrinks, so "Worth your time?" stays in
   view from 60rem up and the title keeps its room. */
@media (max-width: 74.99rem) {
  .tb-yes::before,
  .tb-no::before,
  .tb-next::after,
  .tb-save::before,
  .tb-save[aria-pressed="true"]::before {
    content: none;
  }

  .tb-yes,
  .tb-no,
  .tb-next,
  .tb-save {
    padding: 0 0.6rem;
  }

  .tb-wordmark {
    font-size: 0.95rem;
  }
}

/* Narrow: the wordmark and title on top, the reason on demand, and the
   actions on their own row: Yes, No, Next and Save first, then Share,
   Report and Open at the end, on a row of their own when the first is full. */
@media (max-width: 59.99rem) {
  .toolbar {
    flex-wrap: wrap;
    row-gap: 0.15rem;
    padding: 0.25rem 0.5rem 0.4rem;
  }

  .tb-head {
    flex: 1 1 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .tb-wordmark {
    align-self: flex-start;
  }

  .tb-site {
    padding: 0;
    border: 0;
  }

  .tb-line {
    display: none;
  }

  .tb-actions {
    flex: 1 1 100%;
    flex-wrap: wrap;
    row-gap: 0.3rem;
  }

  /* "Worth your time?" stays only as the name of the Yes and No group. */
  .tb-question {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .tb-vote {
    gap: 0.3rem;
    margin-right: 0;
  }

  .tb-tools {
    margin-left: auto;
  }

  .tb-yes,
  .tb-no,
  .tb-next,
  .tb-save {
    padding: 0 0.5rem;
  }

  /* Just seen stays one line: the title shortens, its actions are icons. */
  .just-seen .btn-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .just-seen .btn {
    width: 44px;
    padding: 0;
  }
}

/* At the narrowest widths the strip's text gets a line of its own above
   its actions, except in the frame view, where height is scarce. */
@media (max-width: 22.5rem) {
  body:not(.is-framed) .just-seen {
    flex-wrap: wrap;
  }

  body:not(.is-framed) .js-text {
    flex-basis: 100%;
  }

  body:not(.is-framed) .js-actions {
    margin-left: auto;
  }
}

/* ---- Profile ----------------------------------------------------------------- */

/* The name, and Share at the end of the same row while it fits. */
.profile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
}

.profile-head h1 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  margin: 1rem 0 1.25rem;
  overflow-x: auto;
  border-bottom: 2px solid var(--line);
  scrollbar-width: none;
}

.tab {
  flex: none;
  min-height: 44px;
  margin-bottom: -2px;
  padding: 0 1rem;
  border: 2px solid transparent;
  border-bottom: 0;
  border-radius: 0.75rem 0.75rem 0 0;
  background: none;
  color: var(--soft);
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected="true"] {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.tab:focus-visible {
  outline-offset: -4px;
}

/* A page turn scrolls the panel to the top, with the tabs still in view. */
.tab-panel {
  scroll-margin-top: 4.5rem;
}

.tab-panel:focus-visible {
  outline-offset: 6px;
  border-radius: var(--radius-sm);
}

/* Private votes (spec 6.17): the line others see under the one tab, and
   the owner's note on top of each vote tab. */
.private-votes {
  margin: -0.5rem 0 1.25rem;
}

.private-note {
  margin: 0 0 1rem;
  color: var(--soft);
  font-size: 0.95rem;
}

/* The owner's lists: one bordered panel of compact rows with thin lines
   between them. A row is the title (one line) over "shared by" and the day,
   then the verb link and the small Share and Remove buttons on the right.
   The title link covers its whole text block, a target at least 44 px
   tall. Narrow screens put the verb and the buttons on a second line. */
.owner-rows {
  gap: 0;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--shadow);
}

.owner-rows > li + li {
  border-top: 1px solid var(--rule);
}

.owner-rows .entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(10rem) auto;
  grid-template-areas:
    "text verb actions"
    "error error error";
  align-items: center;
  column-gap: 0.6rem;
  padding: 0.2rem 0.35rem 0.2rem 0.9rem;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.owner-rows .entry-text {
  position: relative;
  display: flex;
  grid-area: text;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 0.25rem 0;
}

.owner-rows .entry-title {
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-wrap: nowrap;
  overflow-wrap: normal;
}

.owner-rows .entry-title a,
.owner-rows .entry-title span {
  display: inline;
  padding: 0;
}

.owner-rows .entry-title a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0.5rem;
}

.owner-rows .entry-title a:focus-visible {
  outline: none;
}

.owner-rows .entry-title a:focus-visible::before {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.owner-rows .entry-sub {
  margin: 0;
  color: var(--soft);
  font-size: 0.82rem;
  line-height: 1.35;
}

.owner-rows .by::after {
  content: "\00b7" / "";
  margin: 0 0.4rem;
}

.owner-rows .entry-date {
  white-space: nowrap;
}

.owner-rows .entry-verb {
  grid-area: verb;
  min-width: 0;
  font-size: 0.85rem;
  line-height: 1.25;
}

/* A verb link too long for its column wraps after the slash. An inline block
   does that, but drops the link's underline, so it draws its own. */
.owner-rows .entry-verb .verb {
  display: inline-block;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.owner-rows .entry-actions {
  grid-area: actions;
  flex-wrap: nowrap;
  gap: 0.15rem;
  margin: 0;
}

.owner-rows .entry-error {
  grid-area: error;
  margin: 0 0 0.6rem;
}

/* Remove: a small outlined pill, unlike Share's bare icon; the button around
   it keeps the 44 px target. */
.btn-remove {
  display: inline-grid;
  flex: none;
  place-items: center;
  min-height: 44px;
  padding: 0 0.2rem;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-remove .btn-label {
  padding: 0.2rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  line-height: 1.2;
}

.btn-remove:hover .btn-label {
  background: var(--sunk);
}

.btn-remove:focus-visible {
  outline: none;
}

.btn-remove:focus-visible .btn-label {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn-remove[aria-disabled="true"] {
  opacity: 0.6;
  cursor: progress;
}

@media (max-width: 35.99rem) {
  .owner-rows .entry {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "text text"
      "verb actions"
      "error error";
    padding: 0.2rem 0.35rem 0.1rem 0.75rem;
  }

  .owner-rows .entry-verb {
    justify-self: start;
  }
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.pager-where {
  margin: 0;
  color: var(--soft);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

/* On a phone "Page 2 of 3" gets a line of its own above Previous and Next. */
@media (max-width: 30rem) {
  .pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pager-where {
    grid-row: 1;
    grid-column: 1 / -1;
  }
}

.pager-prev::before,
.stack-prev::before {
  content: "\2190" / "";
  font-weight: 400;
}

.pager-next::after,
.stack-next::after {
  content: "\2192" / "";
  font-weight: 400;
}

/* A pager or stack button with nowhere to go: faded and flat, but still
   focusable, so focus stays put at either end. */
.pager .btn[aria-disabled="true"],
.pager .btn[aria-disabled="true"]:hover,
.stack-nav .btn[aria-disabled="true"],
.stack-nav .btn[aria-disabled="true"]:hover {
  opacity: 0.45;
  background: var(--surface);
  box-shadow: none;
  transform: none;
  cursor: default;
}

/* Everyone else's view: one card at a time, on a small deck. */
.stack .deck {
  margin-top: 0.75rem;
}

.stack-pos {
  margin: 0 0 0.35rem;
  color: var(--soft);
  font-size: 0.85rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.stack-card .card-title {
  margin: 0 0 0.25rem;
  font-size: clamp(1.45rem, 5.5vw, 2rem);
}

.stack-card .card-title a {
  display: inline-block;
  padding: 0.6rem 0;
  color: var(--ink);
  text-decoration-color: var(--accent);
}

.stack-card .card-title a::after {
  content: "\2197" / "";
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--soft);
  font-size: 0.75em;
}

.stack-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 2px dashed var(--line);
}

.stack-nav .btn {
  min-width: 0;
  padding-inline: 0.75rem;
}

/* At the narrowest widths Previous and Next drop their arrows to fit the card. */
@media (max-width: 22.5rem) {
  .stack-prev::before,
  .stack-next::after {
    content: none;
  }
}

/* On a phone the three tabs share the row; a long label wraps inside its tab. */
@media (max-width: 30rem) {
  .tab {
    flex: 1 1 auto;
    padding: 0.2rem 0.45rem;
    font-size: 0.9rem;
    line-height: 1.15;
    white-space: normal;
  }

  /* A private profile's lone Added tab keeps its own width. */
  .tab:only-child {
    flex-grow: 0;
    padding: 0.2rem 1rem;
  }
}

/* ---- Cookie bar ------------------------------------------------------------ */

/* The bar comes right after the skip link in the page, so the keyboard
   reaches it before the page and before a framed site. It is the body's last
   flex item all the same (order) and sticks to the bottom of the viewport, so
   it takes its own room at the end of the page: it never hides the last
   content, and in the frame view the frame gives up that room, not the
   toolbar. */
.consent {
  position: sticky;
  bottom: 0;
  z-index: 3;
  order: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  padding: 0.75rem 1rem;
  border-top: 2px solid var(--line);
  background: var(--surface);
}

.consent-text {
  flex: 1 1 22rem;
  max-width: 46rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Two equal columns: both choices are the same size. */
.consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

.consent-privacy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 0.5rem;
  font-size: 0.95rem;
}

/* Keyboard focus that scrolls into view stays clear of the bar. */
html:has(.consent:not([hidden])) {
  scroll-padding-bottom: 7rem;
}

@media (max-width: 30rem) {
  .consent {
    padding: 0.6rem 0.75rem 0.75rem;
  }

  .consent-actions {
    flex: 1 1 100%;
    grid-template-columns: 1fr 1fr;
  }

  .consent-choice {
    padding-inline: 0.5rem;
  }

  .consent-privacy {
    grid-column: 1 / -1;
  }

  html:has(.consent:not([hidden])) {
    scroll-padding-bottom: 12rem;
  }
}

/* ---- Flash messages -------------------------------------------------------- */

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  z-index: 20;
  margin: 0;
  padding: 0.6rem 1.1rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 3px 3px 0 var(--shadow);
  color: var(--bg);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.75rem);
  transition: opacity 150ms ease-out, transform 150ms ease-out;
}

.toast.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---- Motion --------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
