:root {
  --ink: #111;
  --bubble: #111;
  --accent: #ff9d3c;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
}
body {
  font: 16px/1.5 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}
/* App (search) mode: scrolls vertically when there are many results. */
body.mode-app {
  overflow-x: hidden;
}
.view[hidden] {
  display: none;
}

/* ---------- Top nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 16px 26px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
}
.nav .nav-logo {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.3px;
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  padding: 4px 11px;
  border-radius: 9px;
}
.nav-right {
  margin-left: auto;
}
/* In app (search) mode the nav stays minimal and transparent. */
body.mode-app .nav {
  background: transparent;
  backdrop-filter: none;
}
body.mode-app .nav-left {
  display: none;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}
.nav-left {
  display: flex;
  gap: 26px;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.btn-signup {
  background: var(--ink);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 600;
}
.who {
  font-size: 14px;
  color: #444;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-login:hover,
.nav-left a:hover {
  text-decoration: underline;
}

/* ---------- Stage ---------- */
.stage {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 21vh 24px 72px;
}
.center {
  position: static;
  transform: none;
  width: min(92vw, 560px);
  text-align: center;
  z-index: 10;
}

/* AnnoTag speech-bubble logo */
.logo {
  display: inline-block;
  position: relative;
  background: var(--bubble);
  color: #fff;
  font-weight: 800;
  font-size: clamp(46px, 9vw, 84px);
  letter-spacing: 1px;
  line-height: 1;
  padding: 24px 40px 28px;
  border-radius: 28px;
  margin-bottom: 42px;
}
.logo::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  border-left: 26px solid transparent;
  border-right: 26px solid transparent;
  border-top: 26px solid var(--bubble);
}

.search-wrap {
  display: flex;
  justify-content: center;
}
.search {
  width: 100%;
  max-width: 460px;
  padding: 14px 20px;
  font-size: 17px;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.search:focus {
  border-color: #999;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.source {
  min-height: 18px;
  margin: 16px 0 0;
  font-size: 12.5px;
  color: #999;
}
.source a {
  color: #666;
}

/* ---------- Floating result bubbles ---------- */
.bubbles {
  position: static;
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 244px));
  gap: 18px 20px;
  align-items: start;
  justify-content: center;
  width: 100%;
  max-width: 1080px;
  margin: 44px auto 0;
  padding: 24px;
  background: #f4f5f7;
  border: 1px solid #e8eaed;
  border-radius: 22px;
}
.bubbles:empty {
  display: none;
}
.bubble {
  position: relative;
  width: 100%;
  scroll-margin: 92px 0 28px;
  background: var(--bubble);
  color: #fff;
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  pointer-events: auto;
  opacity: 1;
  animation: pop 0.28s cubic-bezier(0.2, 1.2, 0.35, 1);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.bubble::after {
  content: "";
  position: absolute;
  left: 26px;
  bottom: -9px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid var(--bubble);
}
.bubble:hover {
  transform: scale(1.04);
}
/* Keyboard nav can scroll a row under a stationary cursor, which would
   otherwise trigger a spurious :hover (scale-up + delete-X reveal) on
   whatever bubble ends up under the mouse. Suppressed until the mouse
   actually moves again (see the mousemove listener that removes this). */
body.kbd-nav .bubble:hover {
  transform: none;
}
body.kbd-nav .bubble:hover .b-del {
  opacity: 0;
  transform: scale(0.5);
}
.bubble {
  max-width: 260px;
}
.bubble .b-quote {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 400;
  font-style: italic;
  color: #d2d2d2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bubble .b-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-size: 11px;
  font-weight: 400;
  color: #b9b9b9;
}
.bubble .b-fav {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #fff;
  object-fit: contain;
}
.bubble .b-note {
  display: block;
}
.bubble .b-meta .b-site {
  flex: 1 1 auto;
}
.bubble .b-site {
  display: block;
  margin-top: 4px;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 400;
  color: #b9b9b9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bubble .b-time {
  margin-top: 4px;
  font-size: 11px;
  color: #8f8f8f;
  white-space: nowrap;
  text-align: right;
}
.bubble .b-time.b-time-left {
  text-align: left;
}
.bubble .b-time.b-time-right {
  text-align: right;
}
/* time sharing the URL/favicon line (b-meta is display:flex) */
.bubble .b-time.b-time-inline {
  margin-top: 0;
  flex: none;
}
.bubble .b-time.b-time-inline.b-time-right {
  margin-left: auto;
  padding-left: 8px;
}
.bubble .b-time.b-time-inline.b-time-left {
  margin-right: auto;
  padding-right: 8px;
}
.bubble mark {
  background: transparent;
  color: var(--accent);
  font-weight: 800;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 900px) {
  .bubbles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .bubbles {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===================== VIEW TOGGLE (gallery / orbit) ===================== */
/* Lives under the result-status row (it controls how results are shown, same
   as Recent/Relevant/Reminisce) rather than up in the account nav corner. */
.view-toggle {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  margin: 14px 0 0;
  background: #f0f1f4;
  border: 1px solid #e6e8ec;
  border-radius: 11px;
}
.vt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 27px;
  border: none;
  background: transparent;
  color: #9297a0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.vt-btn svg {
  width: 18px;
  height: 18px;
}
.vt-btn:hover {
  color: #565b64;
}
.vt-btn.on {
  background: #fff;
  color: #16161a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
body.theme-dark.mode-app .view-toggle {
  background: #202026;
  border-color: #34343c;
}
body.theme-dark.mode-app .vt-btn {
  color: #8a8f98;
}
body.theme-dark.mode-app .vt-btn.on {
  background: #3a3a42;
  color: #fff;
  box-shadow: none;
}

/* ===================== ORBIT VIEW (fun scatter) ===================== */
body.view-orbit.mode-app {
  overflow: hidden;
}
body.view-orbit .stage {
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
}
body.view-orbit #bubbles {
  position: fixed;
  inset: 0;
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  pointer-events: none;
  z-index: 5;
}
body.view-orbit #bubbles:empty {
  display: none;
}
body.view-orbit .bubble {
  position: absolute;
  width: auto;
  max-width: 188px;
  padding: 10px 17px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
  pointer-events: auto;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  animation: orbitEnter 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both,
    orbitFloat var(--float-dur, 4s) ease-in-out 0.55s infinite;
}
/* glide when rotating (added a frame after the entrance so it doesn't fly in) */
body.view-orbit .bubble.orbit-ready {
  transition: left 0.5s cubic-bezier(0.33, 0.9, 0.3, 1), top 0.5s cubic-bezier(0.33, 0.9, 0.3, 1);
}
body.view-orbit .bubble.orbit-focus {
  --oscale: 1.12;
  box-shadow: 0 0 0 2px var(--accent), 0 16px 36px rgba(0, 0, 0, 0.42);
  font-weight: 800;
}
body.view-orbit .bubble::after {
  display: none;
}
body.view-orbit .bubble .b-quote,
body.view-orbit .bubble .b-meta,
body.view-orbit .bubble .b-site,
body.view-orbit .bubble .b-time {
  display: none;
}
body.view-orbit .bubble .b-note {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 156px;
}
body.view-orbit .bubble:hover {
  animation-play-state: paused;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
}
body.view-orbit .bubble.active {
  box-shadow: 0 0 0 2px var(--accent), 0 12px 30px rgba(0, 0, 0, 0.4);
}
@keyframes orbitEnter {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(26px) scale(0.4);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) scale(var(--oscale, 1));
  }
}
@keyframes orbitFloat {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0) scale(var(--oscale, 1));
  }
  50% {
    transform: translate(-50%, -50%) translateY(-9px) scale(var(--oscale, 1));
  }
}

/* ===================== LIST VIEW (one line each) ===================== */
body.view-list .bubbles {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
  gap: 7px;
  padding: 18px;
}
body.view-list .bubble {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  padding: 10px 15px;
  max-width: none;
}
body.view-list .bubble::after {
  display: none;
}
body.view-list .bubble .b-note {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}
body.view-list .bubble .b-quote {
  display: none;
}
body.view-list .bubble .b-meta {
  order: 2;
  flex: none;
  margin: 0;
  max-width: 42%;
}
body.view-list .bubble .b-site {
  display: none;
}
body.view-list .bubble .b-time {
  order: 3;
  flex: none;
  margin: 0;
}

/* ===================== FEED VIEW (full tags stacked) ===================== */
body.view-feed .bubbles {
  grid-template-columns: minmax(0, 640px);
  justify-content: center;
  max-width: 700px;
  gap: 14px;
  padding: 22px;
}
body.view-feed .bubble {
  text-align: left;
  padding: 16px 20px;
  max-width: none;
}
body.view-feed .bubble .b-note {
  font-size: 16px;
  white-space: normal;
}
body.view-feed .bubble .b-quote {
  white-space: normal;
  font-size: 13px;
}
body.view-feed .bubble .b-site {
  white-space: normal;
}

/* ===================== SCATTER VIEW (free floating cards) ===================== */
body.view-scatter.mode-app {
  overflow: hidden;
}
body.view-scatter .stage {
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
}
body.view-scatter #bubbles {
  position: fixed;
  inset: 0;
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  pointer-events: none;
  z-index: 5;
}
body.view-scatter #bubbles:empty {
  display: none;
}
body.view-scatter .bubble {
  position: absolute;
  width: auto;
  max-width: 230px;
  pointer-events: auto;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  animation: orbitEnter 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both,
    orbitFloat var(--float-dur, 4s) ease-in-out 0.55s infinite;
}

/* ============================ LANDING ============================ */
.logo.big {
  font-size: clamp(52px, 10vw, 92px);
  padding: 26px 44px 30px;
  border-radius: 30px;
  margin-bottom: 34px;
}
.logo.big::after {
  border-left-width: 28px;
  border-right-width: 28px;
  border-top-width: 28px;
  bottom: -24px;
}
.logo.sm {
  font-size: 15px;
  padding: 4px 10px;
  border-radius: 8px;
}

.hero {
  max-width: 780px;
  margin: 0 auto;
  min-height: 78vh;
  padding: 90px 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.tagline {
  font-size: clamp(16px, 2.2vw, 20px);
  color: #555;
  max-width: 620px;
  margin: 0 auto 30px;
}
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 26px;
  border-radius: 30px;
}
.btn-primary:hover {
  opacity: 0.9;
}
.btn-ghost {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 22px;
  border-radius: 30px;
  border: 1px solid #ccc;
}
.btn-ghost:hover {
  border-color: var(--ink);
}

/* ---- demo tiles ---- */
.demo {
  max-width: 980px;
  margin: 30px auto 20px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
@media (max-width: 760px) {
  .demo {
    grid-template-columns: 1fr;
  }
}
.demo-card {
  margin: 0;
}
.demo-card figcaption {
  margin-top: 14px;
  color: #555;
  font-size: 14.5px;
  text-align: center;
}

.browser {
  border: 1px solid #e3e3e3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.1);
  background: #fff;
}
.browser-bar {
  background: #f2f2f3;
  padding: 11px 14px;
  display: flex;
  gap: 7px;
}
.browser-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d0d0d3;
}
.browser-body {
  position: relative;
  padding: 26px;
  min-height: 190px;
}
/* Option A reuses the demo-card markup, but at full option-frame width —
   height now comes from .frame's own 16:10 aspect-ratio via flex:1, not a
   fixed value here. */
.optA-demo {
  min-height: 0;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}
/* Option B reuses the search-demo card markup, which normally draws its
   own border/radius/shadow as a standalone card — redundant (and visually
   wrong, double-rounded corners) now that it sits inside .frame, which
   already provides that. */
.search-demo.optB-demo {
  border: none;
  border-radius: 0;
  box-shadow: none;
  min-height: 0;
}
/* Option C's demo mirrors A: a webpage mockup with a note pinned to it. */
.optC-demo {
  min-height: 0;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}
.mock-lines {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ml {
  height: 12px;
  border-radius: 6px;
  background: #ededf0;
}
.ml.w40 { width: 40%; }
.ml.w50 { width: 50%; }
.ml.w60 { width: 60%; }
.ml.w70 { width: 70%; }
.ml.w80 { width: 80%; }
.ml.w85 { width: 85%; }
.ml.w90 { width: 90%; }
.ml.w95 { width: 95%; }
.demo-note {
  position: absolute;
  right: 18%;
  top: 50%;
  transform: translateY(-50%);
  max-width: 190px;
  background: #111;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 15px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  /* Own keyframes, not the shared floaty — that one animates translateY(0)
     which would silently overwrite this element's translateY(-50%)
     centering (transform is replaced wholesale, not merged). */
  animation: floatyCentered 3.2s ease-in-out infinite;
}
@keyframes floatyCentered {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(calc(-50% - 6px)); }
}
.demo-note::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: -9px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #111;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.search-demo {
  position: relative;
  border: 1px solid #e3e3e3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.1);
  min-height: 264px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 30px;
  overflow: hidden;
}
.search-demo .logo {
  font-size: 24px;
  padding: 7px 15px;
  margin-bottom: 0;
  border-radius: 14px;
}
/* The base .logo::after speech-bubble tail is sized for the giant 84px
   hero wordmark (26px triangle) — left un-scaled here it towered over this
   24px pill, looking oversized and disconnected from it. */
.search-demo .logo::after {
  bottom: -9px;
  border-left-width: 9px;
  border-right-width: 9px;
  border-top-width: 9px;
}
.fake-search {
  width: 78%;
  max-width: 280px;
  padding: 10px 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  background: #fff;
}
.mini-bubble {
  position: absolute;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  animation: floaty 3.6s ease-in-out infinite;
}
.mini-bubble.b1 { top: 16px; left: 14px; animation-delay: 0s; }
.mini-bubble.b2 { bottom: 58px; right: 14px; animation-delay: 0.5s; }
.mini-bubble.b3 { bottom: 16px; left: 20px; animation-delay: 1s; }

/* ---- below-hero comparison: three redesign directions shown together on
   the live page (temporary — the plan is to pick one and remove the other
   two once a direction is chosen), each reusing the demo cards' own
   browser-chrome frame motif so they read as "this is your site." ---- */
.opt-compare {
  max-width: 1440px;
  margin: 56px auto;
  padding: 0 40px;
}
/* Enough vertical distance that each section reads as its own block at a
   glance (proximity) instead of blurring into the next one — 64px wasn't
   enough relative to how tall these cards are. A hairline divider (except
   before the very first section) reinforces the break without needing a
   heavy visual device. */
.option {
  margin-bottom: 140px;
  padding-top: 100px;
}
.option:first-child {
  padding-top: 0;
  border-top: none;
}
.option:not(:first-child) {
  border-top: 1px solid #e6e6e6;
}
body.theme-dark .option:not(:first-child) {
  border-top-color: #232328;
}
.option:last-child {
  margin-bottom: 72px;
}
/* Content card + demo frame sit side by side at full width instead of
   stacked — alternating which side the demo lands on per option via
   .reverse, so the eye doesn't fall into a single repeating pattern
   scrolling down the page. */
.option-cols {
  display: flex;
  align-items: center;
  gap: 48px;
}
.option-cols.reverse {
  flex-direction: row-reverse;
}
.option-cols > .opt-card,
.option-cols > .frame {
  flex: 1 1 0;
  min-width: 0;
  margin-bottom: 0;
}
@media (max-width: 900px) {
  .option-cols,
  .option-cols.reverse {
    flex-direction: column;
    align-items: stretch;
  }
  /* flex: 1 1 0 on the main axis (now height, since we're in a column)
     fights .frame's aspect-ratio — the two can't both resolve cleanly, and
     collapse the frame to almost nothing. A definite width instead of a
     flex-grow share lets aspect-ratio compute height from it cleanly. */
  .option-cols > .frame {
    flex: none;
    width: 100%;
  }
}
.option-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 6px;
}
.option-label .chip {
  display: inline-block;
  background: #ff9d3c;
  color: #16161a;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
}
.option-label h2 {
  margin: 0;
  font-size: 17px;
}
.option-desc {
  margin: 0 0 18px;
  color: #666;
  font-size: 14px;
  max-width: 560px;
}
body.theme-dark .option-desc {
  color: #9a9fa6;
}

.frame {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
  border: 1px solid #e3e3e3;
  /* A real MacBook display is ~16:10, not square — was reading as a plain
     app window instead of a laptop screen. */
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
}
.frame > *:not(.frame-bar) {
  flex: 1;
  min-height: 0;
}
.frame-bar {
  flex: none;
  background: #e9e9ec;
  padding: 9px 12px;
  display: flex;
  gap: 6px;
}
.frame-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.frame-bar span:nth-child(1) { background: #ff5f57; }
.frame-bar span:nth-child(2) { background: #febc2e; }
.frame-bar span:nth-child(3) { background: #28c840; }
/* Frame body is always dark regardless of page theme — a fixed product
   shot, same convention as the demo cards above it. */
.frame-body {
  background: #0d0d10;
  color: #eaeaea;
}
.frame-body .logo-pill,
.opt-card .logo-pill {
  display: inline-block;
  background: #fff;
  color: #111;
  font-weight: 800;
  font-size: 15px;
  padding: 5px 11px;
  border-radius: 8px;
}
/* Reused in enough different containers (frame-body, opt-card, and now
   the real site footer's CTA band) that scoping it to each one individually
   kept silently breaking — a standalone component instead. */
.btn.opt-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ff9d3c;
  color: #16161a;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}
.opt-card-cta {
  margin-top: 28px;
}
.opt-cta-btn.opt-card-cta-right {
  display: flex;
  width: fit-content;
  margin-left: auto;
}
.frame-body .icon,
.opt-card .icon { width: 18px; height: 18px; flex: none; }

/* Option A: icon rail, asymmetric */
.optA { padding: 64px 48px 56px; }
.optA .kicker {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
  color: #ff9d3c;
  margin: 0 0 12px;
}
.optA h3 {
  font-size: 28px;
  max-width: 480px;
  margin: 0 0 44px;
  letter-spacing: -0.01em;
}
.optA .rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  position: relative;
}
.optA .rail::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 0;
  right: 0;
  height: 1px;
  background: #2a2a30;
}
.optA .item { position: relative; padding-top: 50px; }
.optA .item .icon-badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #0d0d10;
  border: 1px solid #2a2a30;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff9d3c;
}
.optA .item h4 { margin: 0 0 6px; font-size: 15.5px; }
.optA .item p { margin: 0; color: #9a9fa6; font-size: 13.5px; }
/* A concrete example note instead of an abstract feature description —
   same look as the tag bubbles in the two demo cards above, so the whole
   page shows one consistent idea of what a "tag" actually looks like. */
.example-tag {
  display: inline-block;
  background: #fff;
  color: #16161a;
  font-weight: 700;
  font-size: 12.5px;
  padding: 6px 11px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.optA .cta {
  margin-top: 64px;
  padding: 40px 0 44px;
  border-top: 1px solid #2a2a30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.optA .cta h2 { font-size: 22px; margin: 0; }
.optA .foot {
  padding: 20px 0;
  border-top: 1px solid #2a2a30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: #9a9fa6;
}
.optA .foot a { color: #9a9fa6; text-decoration: none; margin-left: 14px; }

/* A standalone content card (not a screenshot inside .frame) — has its own
   rounded corners/shadow/background, since it isn't clipped by a parent
   frame the way .frame-body content is. Sits between the option's intro
   text and its demo frame below. */
.opt-card {
  border-radius: 14px;
  background: #0d0d10;
  color: #eaeaea;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
  margin-bottom: 20px;
}

/* Option B: minimal condensed list */
.optB { padding: 56px 48px 40px; }
.optB .kicker {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
  color: #ff9d3c;
  margin: 0 0 12px;
}
.optB h3 {
  font-size: 28px;
  max-width: 480px;
  margin: 0;
  letter-spacing: -0.01em;
}
.optB .list { margin-top: 30px; }
.optB .row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid #2a2a30;
}
.optB .row:last-child { border-bottom: 1px solid #2a2a30; }
.optB .row .icon-badge {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #17171b;
  border: 1px solid #2a2a30;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff9d3c;
}
.optB .row-text { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.optB .row-text h4 { margin: 0; font-size: 14.5px; flex: none; }
.optB .row-text p { margin: 0; color: #9a9fa6; font-size: 13.5px; }
.optB .cta {
  margin-top: 8px;
  padding: 36px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.optB .cta h2 { font-size: 18px; margin: 0; font-weight: 700; }
.optB .foot {
  padding: 16px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #9a9fa6;
}
.optB .foot a { color: #9a9fa6; text-decoration: none; margin-left: 14px; }

/* Option C: bold statement + chips */
.optC { padding: 70px 48px 8px; text-align: center; }
.optC .kicker {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 700;
  color: #ff9d3c;
  margin: 0 0 12px;
}
.optC h3 {
  font-size: 32px;
  max-width: 560px;
  margin: 0 auto 26px;
  letter-spacing: -0.015em;
}
.optC .chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 56px;
}
.optC .chip-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #17171b;
  border: 1px solid #2a2a30;
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  font-size: 13.5px;
  color: #eaeaea;
}
.optC .chip-item .icon { color: #ff9d3c; width: 16px; height: 16px; }
.optC .cta {
  background: #131316;
  margin: 0 -48px;
  padding: 48px 24px;
}
.optC .cta h2 { font-size: 24px; margin: 0 0 20px; }
.optC .foot {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 12.5px;
  color: #9a9fa6;
}
.optC .foot a { color: #9a9fa6; text-decoration: none; }

/* Light theme: the option cards are dark by default; flip them to a light
   surface with dark text so they match the light page instead of staying
   black. (Dark theme keeps the dark cards above.) */
body:not(.theme-dark) .opt-card {
  background: transparent;
  color: #16161a;
  border: none;
  box-shadow: none; /* no card container in light theme — content sits on the page */
}
body:not(.theme-dark) .optA .rail::before {
  background: #ececf0;
}
body:not(.theme-dark) .optB .row {
  border-top-color: #ececf0;
}
body:not(.theme-dark) .optB .row:last-child {
  border-bottom-color: #ececf0;
}
body:not(.theme-dark) .optA .item .icon-badge,
body:not(.theme-dark) .optB .row .icon-badge,
body:not(.theme-dark) .optC .chip-item {
  background: #f5f5f7;
  border-color: #e6e6ea;
}
body:not(.theme-dark) .optC .chip-item {
  color: #16161a;
}
body:not(.theme-dark) .optA .item p,
body:not(.theme-dark) .optB .row-text p {
  color: #6b7078;
}
/* The example "tag" bubble is white with a dark shadow to pop on a dark card;
   on a light card make it a light chip with a subtle border, no dark shadow. */
body:not(.theme-dark) .example-tag {
  background: #f4f4f6;
  color: #16161a;
  border: 1px solid #e6e6ea;
  box-shadow: none;
}

@media (max-width: 640px) {
  .optA .rail { grid-template-columns: 1fr; gap: 26px; }
  .optA .rail::before { display: none; }
  .optA, .optB, .optC { padding-left: 24px; padding-right: 24px; }
  .optC .cta { margin-left: -24px; margin-right: -24px; }
}

/* Real page footer's closing CTA — same look as option C's full-width
   panel, promoted to the actual site footer instead of living inside a
   demo card. */
.site-cta-band {
  text-align: center;
  padding: 48px 24px;
  background: #f6f6f7;
}
.site-cta-band h2 {
  font-size: clamp(22px, 3.4vw, 28px);
  margin: 0 0 20px;
}
.logo-pill {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  padding: 5px 11px;
  border-radius: 8px;
}
body.theme-dark .logo-pill {
  background: #fff;
  color: #111;
}

.site-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 24px;
  color: #999;
  font-size: 13px;
}
.foot-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.foot-links a {
  color: #666;
  text-decoration: none;
}
.foot-links a:hover {
  text-decoration: underline;
}

/* ============================ GET STARTED WIZARD ============================ */
#start .wizard {
  max-width: 560px;
  margin: 0 auto;
  padding: 120px 24px 80px;
  text-align: center;
}
#start .wizard h1 {
  font-size: clamp(28px, 4.5vw, 42px);
  margin: 26px 0 6px;
}
.wsub {
  color: #888;
  margin: 0 0 28px;
}

/* Slim progress bar + "Step X of 3" — a running sense of momentum instead of
   just three static cards with no notion of overall completion. */
.wprogress {
  margin: 0 0 28px;
}
.wprogress-track {
  height: 5px;
  border-radius: 999px;
  background: #eceef1;
  overflow: hidden;
}
.wprogress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.33, 0.9, 0.3, 1);
}
.wprogress-label {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #9aa0a8;
  letter-spacing: 0.02em;
}

.wsteps {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wstep {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 20px 22px;
  transition: opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, padding 0.2s ease, background 0.2s ease;
}
/* Locked (not-yet-reached) steps collapse to a minimal, dim, title-only row —
   showing the full instructions for a step you can't act on yet is just
   clutter competing with the one thing you can actually do right now. */
.wstep.locked {
  padding: 14px 22px;
  opacity: 0.55;
}
.wstep.locked .wbody p,
.wstep.locked .wactions {
  display: none;
}
.wstep.locked .wbody h3 {
  font-size: 16px;
  margin: 6px 0 0;
}
.wstep.active {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(255, 157, 60, 0.16);
}
/* Done steps also collapse — once it's finished you don't need the
   instructions anymore, just confirmation it happened. */
.wstep.done {
  padding: 14px 22px;
  background: #fafbfa;
}
.wnum {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.wstep.active .wnum {
  background: var(--accent);
}
.wstep.done .wnum {
  background: #16a34a;
  font-size: 0;
}
.wstep.done .wnum::after {
  content: "✓";
  font-size: 17px;
}
.wbody {
  flex: 1;
  min-width: 0;
}
.wbody h3 {
  margin: 3px 0 4px;
  font-size: 18px;
  transition: font-size 0.2s ease, margin 0.2s ease;
}
.wstep.done .wbody h3 {
  margin: 5px 0 0;
  font-size: 15px;
  color: #8b929c;
  font-weight: 500;
}
.wbody p {
  margin: 0 0 14px;
  color: #555;
  font-size: 15px;
}
.wactions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.wstep.locked .wactions,
.wstep.done .wactions {
  display: none;
}
.wlink {
  color: #666;
  text-decoration: none;
  font-size: 14px;
}
.wlink:hover {
  text-decoration: underline;
}
.wcheck {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: #16a34a;
  font-weight: 600;
  font-size: 13.5px;
}
.wstep.done .wcheck {
  display: flex;
}
.wcheck::before {
  content: "✓";
}

/* A brief closing beat instead of an instant hard-cut to the app — the steps
   fade out and this confirmation line fades in centered over the same
   space they occupied, rather than appearing below them (which would land
   off-screen, below the fold, for anyone who'd scrolled down to step 3). */
.wstage {
  position: relative;
}

/* Dark mode is a saved preference (applyPrefs runs on every load, not just
   in the signed-in app, and now defaults to the OS setting for first-time
   visitors) — so it needs to work on the landing page and onboarding view
   too, not just the signed-in app. */
body.theme-dark:not(.mode-app) {
  background: #0d0d10;
  color: #eaeaea;
}
body.theme-dark:not(.mode-app) .nav {
  background: rgba(13, 13, 16, 0.85);
}
body.theme-dark:not(.mode-app) .nav a {
  color: #eaeaea;
}
body.theme-dark .tagline {
  color: #a8adb4;
}
body.theme-dark .btn-ghost {
  color: #eaeaea;
  border-color: #3a3a42;
}
body.theme-dark .btn-ghost:hover {
  border-color: #6a6a74;
}
body.theme-dark .demo-card figcaption {
  color: #9a9fa6;
}
body.theme-dark .feature {
  background: #17171b;
  border-color: #2a2a30;
}
body.theme-dark .feature p {
  color: #a8adb4;
}
body.theme-dark .site-cta-band {
  background: #131316;
}
body.theme-dark .site-foot {
  color: #75797f;
}
body.theme-dark .foot-links a {
  color: #9a9fa6;
}
body.theme-dark #start .wizard h1 {
  color: #f0f0f2;
}
body.theme-dark .wsub {
  color: #8a8f98;
}
body.theme-dark .wprogress-track {
  background: #2a2a30;
}
body.theme-dark .wprogress-label {
  color: #75797f;
}
body.theme-dark .wstep {
  background: #1c1c22;
  border-color: #2c2c34;
}
body.theme-dark .wstep.done {
  background: #1a1a1f;
}
body.theme-dark .wstep.active {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(255, 157, 60, 0.1);
}
body.theme-dark .wbody h3 {
  color: #f0f0f2;
}
body.theme-dark .wstep.done .wbody h3 {
  color: #8a8f98;
}
body.theme-dark .wbody p {
  color: #a8adb4;
}
body.theme-dark .wlink {
  color: #9a9fa6;
}
body.theme-dark .wnum {
  background: #3a3a42;
  color: #f0f0f2;
}
body.theme-dark .wstep.active .wnum {
  background: var(--accent);
  color: #16161a;
}
body.theme-dark .wcheck {
  color: #34d374;
}

/* Welcome-back tip shown once, after the extension's tutorial banner sends
   someone back to annotag.io with ?tutorial=done. */
.tutorial-tip {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
  z-index: 500;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 90vw;
}
.tutorial-tip-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
body.theme-dark .tutorial-tip {
  background: var(--accent);
  color: #16161a;
}

/* Returning-user walkthrough (steps 4-5): a spotlight ring + a floating note
   that sits next to the search bar, then the first result. */
.rg-ring {
  position: fixed;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55), 0 0 0 3px var(--accent);
  pointer-events: none;
  z-index: 500;
  opacity: 0;
  transition: opacity 0.25s ease, left 0.2s ease, top 0.2s ease, width 0.2s ease,
    height 0.2s ease;
}
.rg-ring-show {
  opacity: 1;
}
.rg-note {
  position: fixed;
  max-width: min(340px, 90vw);
  background: #111;
  color: #fff;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  z-index: 502;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.rg-note-show {
  opacity: 1;
  transform: translateY(0);
}
.rg-note::after {
  content: "";
  position: absolute;
  left: var(--arrow-x, 24px);
  top: -6px;
  width: 12px;
  height: 12px;
  background: #111;
  transform: translateX(-50%) rotate(45deg);
}
.rg-note-above::after {
  top: auto;
  bottom: -6px;
}
.rg-note-noarrow::after {
  display: none;
}
.rg-step {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ff9d3c; /* same orange as the extension's step labels */
  margin-bottom: 5px;
}
.rg-restart {
  display: block;
  margin: 12px 0 0;
  padding: 0;
  background: none;
  border: none;
  color: #9a9a9a;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}
.rg-restart:hover {
  color: #fff;
}
/* Welcome shown before step 9: a dimmed backdrop + a centred intro card. */
.rg-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.rg-backdrop-show {
  opacity: 1;
  pointer-events: auto;
}
.rg-welcome {
  display: block;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 7px;
}
.rg-start {
  display: block;
  width: fit-content;
  margin: 16px 0 2px;
  background: #ff9d3c;
  color: #16161a;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 157, 60, 0.35);
  transition: background 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.rg-start:hover {
  background: #ffb257;
  transform: translateY(-1px);
  box-shadow: 0 7px 20px rgba(255, 157, 60, 0.5);
}
.rg-start:active {
  transform: translateY(0);
}

/* ============ SEARCH UX: status, keyboard, delete, undo ============ */
.result-status {
  min-height: 18px;
  margin: 14px 0 0;
  font-size: 13px;
  color: #777;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.result-status.show {
  opacity: 1;
  transform: none;
}
.result-status .dym {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}
.result-status .dym:hover {
  text-decoration: underline;
}
.result-status .rc-count {
  color: #9aa0a6;
}
.result-status .rc-btn {
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 7px;
  margin-left: 6px;
}
.result-status .rc-btn:hover {
  color: #16161a;
  background: #f1f3f6;
}
.result-status .rc-btn.on {
  color: #16161a;
  font-weight: 600;
}
body.theme-dark.mode-app .result-status .rc-count {
  color: #7f858e;
}
body.theme-dark.mode-app .result-status .rc-btn {
  color: #9297a0;
}
body.theme-dark.mode-app .result-status .rc-btn:hover {
  color: #fff;
  background: #26262c;
}
body.theme-dark.mode-app .result-status .rc-btn.on {
  color: #fff;
}

/* ===================== KEYBOARD SHORTCUTS (account modal tab) ===================== */
.sc-list {
  display: flex;
  flex-direction: column;
}
.sc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  color: #222;
}
.sc-row:last-child {
  border-bottom: none;
}
.sc-keys {
  display: inline-flex;
  gap: 5px;
  flex: none;
}
.sc-list kbd,
.sc-foot kbd {
  font: 600 12px/1 -apple-system, "SF Mono", Menlo, monospace;
  min-width: 22px;
  padding: 4px 7px;
  text-align: center;
  background: #f3f4f6;
  border: 1px solid #e2e4e8;
  border-bottom-width: 2px;
  border-radius: 6px;
  color: #16161a;
}
.sc-foot {
  margin: 16px 0 0;
  font-size: 12px;
  color: #8b929c;
  line-height: 1.6;
}
.sc-foot kbd {
  padding: 2px 5px;
  min-width: 0;
  font-size: 11px;
}
body.theme-dark .sc-row {
  color: #e8e8e8;
  border-bottom-color: #2a2a30;
}
body.theme-dark .sc-list kbd,
body.theme-dark .sc-foot kbd {
  background: #26262c;
  border-color: #3a3a42;
  color: #f0f0f2;
}
body.theme-dark .sc-foot {
  color: #8a8f98;
}

/* domain never shrinks; the page title (b-site) truncates */
.bubble .b-dom {
  flex: none;
}

/* keyboard-highlighted result */
.bubble.active {
  transform: scale(1.04);
  box-shadow: 0 0 0 2px var(--accent), 0 14px 32px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

/* delete button (hover-reveals) */
.bubble .b-del {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: #333;
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.bubble:hover .b-del,
.bubble.active .b-del {
  opacity: 1;
  transform: scale(1);
}
.bubble .b-del:hover {
  background: #e5484d;
  transform: scale(1.15);
}

/* removal animation */
.bubble.removing {
  animation: bubbleOut 0.2s ease forwards;
  pointer-events: none;
}
@keyframes bubbleOut {
  to {
    opacity: 0;
    transform: scale(0.85);
  }
}

/* undo toast */
.undo-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: #111;
  color: #fff;
  border-radius: 12px;
  padding: 12px 12px 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}
.undo-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.undo-toast button {
  background: transparent;
  border: none;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
}
.undo-toast button:hover {
  text-decoration: underline;
}

/* ================= ACCOUNT: greeting, avatar, dropdown, modal ================= */
#nav-auth {
  position: relative;
  gap: 12px;
}
.hello {
  font-size: 14px;
  color: #444;
}
body.mode-app .hello {
  color: #333;
}
.avatar-btn {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  line-height: 0;
  border-radius: 50%;
}
.avatar,
.avatar-lg {
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid #e3e3e3;
}
.avatar { width: 34px; height: 34px; }
.avatar-lg { width: 42px; height: 42px; }
.avatar-btn:hover .avatar {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}
.avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  border: none;
}
.avatar.avatar-initials { font-size: 13px; }
.avatar-lg.avatar-initials { font-size: 16px; }

/* dropdown */
.acct-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 262px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.18);
  padding: 6px;
  z-index: 100;
}
.acct-menu[hidden] { display: none; }
.acct-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 14px;
}
.acct-menu-name { font-weight: 600; font-size: 14px; color: #111; }
.acct-menu-email { font-size: 12.5px; color: #888; }
.acct-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  border-radius: 9px;
  text-align: left;
}
.acct-menu-item:hover { background: #f5f5f5; }
.acct-menu-item svg { color: #999; flex: none; }

/* modal */
.acct-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.acct-modal[hidden] { display: none; }
.acct-modal-panel {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 1120px;
  height: 720px;
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  color: #111;
  text-align: left;
}
.acct-side {
  width: 250px;
  flex: none;
  background: #fafafa;
  border-right: 1px solid #eee;
  padding: 26px 20px;
}
.acct-side-title { font-size: 19px; font-weight: 700; }
.acct-side-sub { font-size: 13px; color: #888; margin: 4px 0 22px; }
.acct-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
}
.acct-tab.active { background: #f0f0f0; font-weight: 600; }
.acct-tab-ico { width: 16px; height: 16px; flex: none; color: #8a8a8a; }
.acct-tab.active .acct-tab-ico { color: #111; }
.acct-main {
  flex: 1;
  padding: 26px 44px 32px;
  position: relative;
  overflow-y: auto;
  scrollbar-gutter: stable; /* reserve the scrollbar's width up front so content
    that grows just past the fold (e.g. opening delete-confirm) doesn't reflow
    the whole panel sideways when the bar appears */
  scrollbar-width: thin;
  scrollbar-color: #d7d7db transparent;
}
.acct-main::-webkit-scrollbar {
  width: 9px;
}
.acct-main::-webkit-scrollbar-track {
  background: transparent;
}
.acct-main::-webkit-scrollbar-thumb {
  background: #d7d7db;
  border-radius: 8px;
}
.acct-main::-webkit-scrollbar-thumb:hover {
  background: #c5c5ca;
}
.acct-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 15px;
  color: #8b929c;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.acct-close:hover {
  background: #f1f2f4;
  color: #333;
}
.acct-close:active {
  background: #e6e8eb;
}
.acct-h { font-size: 19px; margin: 0 0 8px; }
.acct-sub2-top {
  margin-top: 4px;
  margin-bottom: 20px;
  font-size: 13px;
}

/* a sub-section title with its descriptor stacked directly underneath, instead
   of side by side (matches the page-level acct-h + description pattern) */
.sec-head {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid #f0f0f0;
}
.sec-head-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.sec-title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #555;
}
.sec-desc {
  margin-top: 4px;
  font-size: 13px;
  color: #8b929c;
}
.acct-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid #f0f0f0;
}
.acct-row:last-child {
  border-bottom: none;
}
.acct-label { width: 150px; flex: none; color: #555; font-size: 14px; }
.acct-val { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #222; }
.acct-fullname { font-weight: 500; }
.acct-name-input {
  flex: 1;
  min-width: 0;
  max-width: 260px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  color: #222;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.acct-name-input:hover {
  background: #f5f6f8;
}
.acct-name-input:focus {
  outline: none;
  background: #fff;
  border-color: #ccc;
}
.acct-badge {
  background: #eee;
  color: #666;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 600;
}
.acct-sub { color: #888; }

.acct-uid {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: #6b7280;
}
.acct-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  margin-left: 8px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #9aa0a8;
  cursor: pointer;
}
.acct-copy-btn:hover {
  background: #f1f2f4;
  color: #333;
}
.acct-copy-btn.copied {
  color: #1a9c53;
}

@media (max-width: 640px) {
  .acct-side { display: none; }
  .acct-modal-panel { height: auto; }
  .hello { display: none; }
}

/* ================= ACCOUNT SETTINGS: tabs, danger, appearance ================= */
.acct-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  color: #333;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 2px;
}
.acct-tab.active { background: #f0f0f0; font-weight: 600; }
.acct-tab:hover { background: #f3f3f3; }

/* danger zone */
.acct-danger {
  margin-top: 30px;
  border: 1px solid #f0d0d0;
  background: #fdf6f6;
  border-radius: 12px;
  padding: 16px 18px;
}
.acct-danger-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c23b3b;
  margin-bottom: 12px;
}
.acct-danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.acct-danger-h { font-size: 14px; font-weight: 600; color: #222; }
.acct-danger-sub { font-size: 12.5px; color: #888; margin-top: 2px; }
.acct-danger-btn {
  flex: none;
  border: none;
  background: #e5484d;
  color: #fff;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.acct-danger-btn:hover { background: #cf3a3f; }
.acct-danger-btn:disabled { opacity: 0.6; cursor: default; }
.acct-confirm-actions { display: flex; gap: 10px; }
.acct-cancel {
  border: 1px solid #ccc;
  background: #fff;
  color: #333;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* appearance controls */
.seg {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: #f1f3f6;
  border: 1px solid #e6e8ec;
  border-radius: 10px;
}
.seg-btn {
  border: none;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 7px;
  cursor: pointer;
}
.seg-btn.on { background: #fff; color: #111; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }
.swatches { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.acct-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  transition: transform 0.12s ease;
}
.acct-swatch:hover { transform: scale(1.14); }
/* one unified selected state — a clean ring with a gap — for every swatch */
.acct-swatch.sel {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #14161a;
}
/* "no accent" — neutral circle with a diagonal slash */
.acct-swatch.none { background: #f3f4f6; }
.acct-swatch.none::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    to top right,
    transparent calc(50% - 1.5px),
    #9aa0a6 calc(50% - 1.5px),
    #9aa0a6 calc(50% + 1.5px),
    transparent calc(50% + 1.5px)
  );
}
/* custom color — a rainbow wheel that opens the native picker */
.acct-swatch.custom {
  background: conic-gradient(from 90deg, #ff5a5f, #ffb03a, #ffe14d, #3ecf6a, #2fb6ff, #7c5cff, #ff5ac2, #ff5a5f);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.acct-swatch.custom input[type="color"] {
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  border: none;
  padding: 0;
}
#spots-range {
  --range-fill: 0%;
  -webkit-appearance: none;
  appearance: none;
  width: 150px;
  height: 17px;
  background: transparent;
  cursor: pointer;
}
#spots-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, #6b6b6b var(--range-fill), #d3d6db var(--range-fill));
}
#spots-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 17px;
  height: 17px;
  margin-top: -6.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  border: none;
}
#spots-range::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: #d3d6db;
}
#spots-range::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: #6b6b6b;
}
#spots-range::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  border: none;
}
.spots-val { font-weight: 600; min-width: 18px; }

/* ---- Tag card settings: two columns (fields | live preview) ---- */
.card-reset-btn {
  flex: none;
  border: 1px solid #d8dade;
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #3f454e;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
}
.card-reset-btn:hover {
  background: #f5f6f8;
  color: #16161a;
  text-decoration: underline;
}
.card-row-sub {
  background: #fafbfc;
}
.card-row-sub .cr-name {
  font-weight: 400;
  color: #6b7280;
}
.tpp-lr-inline {
  flex: none;
  padding: 2px;
  gap: 2px;
  margin-right: 4px;
}
.tpp-lr-inline .seg-btn {
  padding: 4px 9px;
  font-size: 11.5px;
}
.card-cfg {
  display: flex;
  gap: 44px;
  padding: 22px 0 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.card-cfg-left {
  flex: 1.15 1 320px;
  min-width: 280px;
}
.card-cfg-right {
  flex: 1 1 280px;
  min-width: 260px;
  max-width: 320px;
}
.card-group-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9aa0a8;
  margin-bottom: 10px;
}
.card-group-title-sp {
  margin-top: 22px;
}
.card-group-title-tight {
  margin-bottom: 2px;
}
.card-group-hint {
  display: block;
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #b7bcc3;
}

.card-preview {
  display: flex;
  min-height: 108px;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  margin-bottom: 6px;
  background: radial-gradient(120% 140% at 30% 0%, #fbfbfc 0%, #f1f2f5 100%);
  border: 1px solid #eceef1;
  border-radius: 16px;
}

.card-rows {
  border: 1px solid #eceef1;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #f2f3f5;
  transition: background 0.12s ease;
}
.card-row:hover {
  background: #fafbfc;
}
.card-row:last-child {
  border-bottom: none;
}
.card-row.off {
  opacity: 0.55;
}
.card-row.off .cr-name {
  color: #9aa0a8;
}

.cr-move {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  flex: none;
}
.cr-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  color: #b6bac1;
  width: 16px;
  height: 12px;
  padding: 0;
  border-radius: 3px;
}
.cr-btn svg {
  width: 10px;
  height: 10px;
}
.cr-btn:hover:not(:disabled) {
  color: #16161a;
  background: #eef0f3;
}
.cr-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.cr-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #f0f1f4;
  color: #6b7280;
}
.cr-ico svg {
  width: 14px;
  height: 14px;
}
.card-row.off .cr-ico {
  color: #b7bcc3;
  background: #f5f6f8;
}

.cr-name {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
  color: #2b2f36;
}

.card-switch {
  flex: none;
  width: 36px;
  height: 21px;
  border-radius: 999px;
  border: none;
  background: #d3d6db;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease;
}
.card-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s ease;
}
.card-switch.on {
  background: #6b6b6b;
}
.card-switch.on::after {
  transform: translateX(15px);
}

/* timestamp-position quadrant picker: a mini card silhouette with a clickable
   dot at each corner, replacing two disconnected Top/Bottom + Left/Right rows */
.tpp-wrap {
  margin-top: 4px;
}
.tpp-frame {
  position: relative;
  width: 100%;
  max-width: 210px;
  height: 62px;
  margin: 4px auto 2px;
  border: 1.5px dashed #d7dae0;
  border-radius: 10px;
  background: #fbfbfc;
}
.tpp-card {
  position: absolute;
  inset: 14px 34px;
  border-radius: 5px;
  background: #e7e9ed;
}
.tpp-dot {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid #c7cbd2;
  background: #fff;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.tpp-dot:hover {
  transform: scale(1.15);
}
.tpp-dot.on {
  border-color: var(--accent);
  background: var(--accent);
}
.tpp-tl { top: -7px; left: -7px; }
.tpp-tr { top: -7px; right: -7px; }
.tpp-bl { bottom: -7px; left: -7px; }
.tpp-br { bottom: -7px; right: -7px; }

/* the live preview forces the default full-card look regardless of the active
   result view, and pops on each change */
#card-preview .bubble {
  position: static;
  transform: none;
  animation: none;
  display: block;
  width: auto;
  max-width: 236px;
  margin: 0;
  text-align: left;
  border-radius: 18px;
  padding: 12px 18px;
  font-size: 15px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}
#card-preview .bubble::after {
  display: none;
}
#card-preview .bubble .b-note {
  display: block;
  -webkit-line-clamp: unset;
  max-width: none;
  font-size: 15px;
  font-weight: 600;
  white-space: normal;
}
#card-preview .bubble .b-quote {
  display: block;
  white-space: normal;
}
#card-preview .bubble .b-meta {
  display: flex;
  order: 0;
}
#card-preview .bubble .b-site,
#card-preview .bubble .b-time {
  display: block;
  order: 0;
}
#card-preview .bubble.card-anim {
  animation: cardPop 0.26s ease;
}
@keyframes cardPop {
  from {
    opacity: 0.35;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

body.theme-dark .card-reset-btn {
  border-color: #3a3a42;
  background: transparent;
  color: #cfd0d2;
}
body.theme-dark .card-reset-btn:hover {
  background: #26262c;
  color: #fff;
}
body.theme-dark .card-row-sub {
  background: #202024;
}
body.theme-dark .card-row-sub .cr-name {
  color: #9297a0;
}
body.theme-dark .sec-head {
  border-top-color: #26262c;
}
body.theme-dark .sec-title {
  color: #999;
}
body.theme-dark .sec-desc {
  color: #8a8f98;
}
body.theme-dark .card-group-title {
  color: #75797f;
}
body.theme-dark .card-group-hint {
  color: #565a60;
}
body.theme-dark .card-preview {
  background: radial-gradient(120% 140% at 30% 0%, #1e1e24 0%, #17171b 100%);
  border-color: #2c2c34;
}
body.theme-dark .card-rows {
  background: #1a1a1e;
  border-color: #2c2c34;
}
body.theme-dark .card-row {
  border-bottom-color: #26262c;
}
body.theme-dark .card-row:hover {
  background: #202024;
}
body.theme-dark .card-row.off .cr-name {
  color: #6f747c;
}
body.theme-dark .cr-name {
  color: #e0e1e3;
}
body.theme-dark .cr-ico {
  background: #26262c;
  color: #b0b4ba;
}
body.theme-dark .card-row.off .cr-ico {
  background: #202024;
  color: #55585e;
}
body.theme-dark .cr-btn {
  color: #7a7e85;
}
body.theme-dark .cr-btn:hover:not(:disabled) {
  color: #fff;
  background: #2c2c34;
}
body.theme-dark .card-switch {
  background: #3a3a42;
}
body.theme-dark .card-switch.on {
  background: #9a9a9a;
}
body.theme-dark .tpp-frame {
  border-color: #34343c;
  background: #1a1a1e;
}
body.theme-dark .tpp-card {
  background: #2a2a30;
}
body.theme-dark .tpp-dot {
  border-color: #45454d;
  background: #202024;
}
body.theme-dark .tpp-dot.on {
  border-color: var(--accent);
  background: var(--accent);
}

/* ================= DARK THEME (scoped to the signed-in search view) ================= */
body.theme-dark.mode-app {
  --bubble: #1d1d22;
  background: #0d0d10;
  color: #eaeaea;
}
body.theme-dark.mode-app .nav {
  background: transparent;
}
body.theme-dark.mode-app .nav .nav-logo {
  border: 1px solid #333;
}
body.theme-dark.mode-app .hello {
  color: #cfcfcf;
}
body.theme-dark.mode-app .search {
  background: #191920;
  border-color: #33333c;
  color: #eee;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
body.theme-dark.mode-app .search::placeholder {
  color: #777;
}
body.theme-dark.mode-app .search:focus {
  border-color: #555;
}
body.theme-dark.mode-app .result-status {
  color: #9a9a9a;
}
body.theme-dark.mode-app .bubbles {
  background: #131318;
  border-color: #26262d;
}
body.theme-dark.mode-app .bubble {
  border: 1px solid #2c2c34;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6);
}
/* keep the accent selection-ring in dark mode (the rule above would otherwise
   override .bubble.active's box-shadow by specificity) */
body.theme-dark.mode-app .bubble.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 14px 32px rgba(0, 0, 0, 0.6);
}
body.theme-dark.mode-app .avatar,
body.theme-dark.mode-app .avatar-lg {
  border-color: #333;
}

/* dropdown + account modal follow the dark theme too */
body.theme-dark .acct-menu {
  background: #1a1a1e;
  border-color: #2c2c34;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.6);
}
body.theme-dark .acct-menu-name { color: #f0f0f0; }
body.theme-dark .acct-menu-email { color: #999; }
body.theme-dark .acct-menu-item { color: #ddd; }
body.theme-dark .acct-menu-item:hover { background: #26262c; }

.acct-modal-panel {
  transition: background 0.2s ease, color 0.2s ease;
}
body.theme-dark .acct-modal-panel {
  background: #17171b;
  color: #e8e8e8;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}
body.theme-dark .acct-side {
  background: #121216;
  border-right-color: #2a2a30;
}
body.theme-dark .acct-side-sub { color: #888; }
body.theme-dark .acct-main {
  scrollbar-color: #3a3a42 transparent;
}
body.theme-dark .acct-main::-webkit-scrollbar-thumb {
  background: #3a3a42;
}
body.theme-dark .acct-main::-webkit-scrollbar-thumb:hover {
  background: #45454d;
}
body.theme-dark .acct-tab { color: #cfcfcf; }
body.theme-dark .acct-tab.active { background: #26262c; }
body.theme-dark .acct-tab:hover { background: #202026; }
body.theme-dark .acct-tab-ico { color: #9a9a9a; }
body.theme-dark .acct-tab.active .acct-tab-ico { color: #fff; }
body.theme-dark .acct-close { color: #8a8f98; }
body.theme-dark .acct-close:hover {
  background: #26262c;
  color: #eee;
}
body.theme-dark .acct-close:active {
  background: #303038;
}
body.theme-dark .acct-row { border-bottom-color: #2a2a30; }
body.theme-dark .acct-label { color: #999; }
body.theme-dark .acct-val { color: #e8e8e8; }
body.theme-dark .acct-name-input {
  color: #f0f0f2;
}
body.theme-dark .acct-name-input:hover {
  background: #202024;
}
body.theme-dark .acct-name-input:focus {
  background: #17171b;
  border-color: #45454d;
}
body.theme-dark .acct-badge { background: #2c2c34; color: #bbb; }
body.theme-dark .acct-sub { color: #888; }
body.theme-dark .acct-uid { color: #9297a0; }
body.theme-dark .acct-copy-btn { color: #8a8f98; }
body.theme-dark .acct-copy-btn:hover { background: #26262c; color: #eee; }
body.theme-dark .acct-copy-btn.copied { color: #34d374; }
body.theme-dark .seg { background: #26262c; border-color: #3a3a42; }
body.theme-dark .seg-btn { background: transparent; color: #9a9aa2; }
body.theme-dark .seg-btn.on { background: #4a4a52; color: #fff; box-shadow: none; }
body.theme-dark .acct-swatch { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); }
body.theme-dark .acct-swatch.sel { box-shadow: 0 0 0 2px #17171b, 0 0 0 4px #f0f0f2; }
body.theme-dark .acct-swatch.none { background: #33333a; }
body.theme-dark #spots-range::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #9a9a9a var(--range-fill), #3a3a42 var(--range-fill));
}
body.theme-dark #spots-range::-moz-range-track { background: #3a3a42; }
body.theme-dark #spots-range::-moz-range-progress { background: #9a9a9a; }
body.theme-dark .acct-danger {
  background: #241618;
  border-color: #4a2626;
}
body.theme-dark .acct-danger-h { color: #eee; }
body.theme-dark .acct-danger-sub { color: #999; }
body.theme-dark .acct-cancel {
  background: #1f1f25;
  border-color: #444;
  color: #ddd;
}

/* ================= SECURITY tab ================= */
.acct-row.top { align-items: flex-start; }
.acct-muted { color: #999; }
.acct-device { display: flex; align-items: flex-start; gap: 14px; }
.dev-icon {
  flex: none;
  width: 44px;
  height: 30px;
  background: #eef0f3;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5b6270;
}
.dev-icon svg { width: 20px; height: 20px; }
.dev-info { line-height: 1.55; }
.dev-name { font-size: 14px; color: #222; display: flex; align-items: center; gap: 8px; }
.dev-sub { font-size: 12.5px; color: #888; }
.acct-del-link {
  border: none;
  background: none;
  padding: 0;
  color: #e5484d;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.acct-del-link:hover { text-decoration: underline; }
.acct-val-col {
  flex-direction: column;
  align-items: flex-start;
}
.dl-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.acct-outline-btn {
  border: 1px solid #d8dade;
  background: #fff;
  color: #16161a;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
}
.acct-outline-btn:hover {
  background: #f5f6f8;
}
.acct-sub2 {
  margin-top: 8px;
  font-size: 12px;
  color: #8b929c;
}
/* the "Delete my account" row before it's clicked: title + description on the
   left, a solid red action button on the right — matches the Notion/Clerk-style
   danger row (fixed colors, not tied to the user's accent). */
.danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border: 1px solid #f6d6d6;
  background: #fdf6f6;
  border-radius: 12px;
}
.danger-text {
  flex: 1;
  min-width: 0;
}
.danger-title {
  font-size: 14px;
  font-weight: 700;
  color: #b42318;
}
.danger-desc {
  margin-top: 4px;
  font-size: 12.5px;
  color: #8b929c;
  line-height: 1.5;
}

.del-box {
  border: 1px solid #f6d6d6;
  border-radius: 12px;
  padding: 16px 18px;
  background: #fdf6f6;
  max-width: 460px;
}
.del-h { font-size: 14px; font-weight: 700; color: #b42318; margin-bottom: 6px; }
.del-sub { font-size: 13px; color: #666; line-height: 1.55; }
.del-warn { color: #e5484d; font-weight: 600; }
.del-label { font-size: 13px; color: #333; margin: 14px 0 8px; }
.del-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: #fff;
}
.del-input:focus { border-color: #999; }
.del-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 14px; }

body.theme-dark .acct-muted { color: #888; }
body.theme-dark .dev-icon { background: #3a3a42; color: #e8e8ea; }
body.theme-dark .dev-name { color: #e8e8e8; }
body.theme-dark .dev-sub { color: #888; }
body.theme-dark .acct-del-link { color: #ff6b6b; }
body.theme-dark .acct-outline-btn {
  border-color: #3a3a42;
  background: transparent;
  color: #f0f0f2;
}
body.theme-dark .acct-outline-btn:hover {
  background: #26262c;
}
body.theme-dark .acct-sub2 { color: #8a8f98; }
body.theme-dark .danger-row {
  background: rgba(229, 72, 77, 0.08);
  border-color: rgba(229, 72, 77, 0.28);
}
body.theme-dark .danger-title { color: #ff6b6b; }
body.theme-dark .danger-desc { color: #8a8f98; }
body.theme-dark .del-box {
  background: rgba(229, 72, 77, 0.08);
  border-color: rgba(229, 72, 77, 0.28);
}
body.theme-dark .del-h { color: #ff6b6b; }
body.theme-dark .del-sub { color: #aaa; }
body.theme-dark .del-label { color: #ddd; }
body.theme-dark .del-input { background: #17171b; border-color: #3a3a42; color: #eee; }

/* ===================== ANALYTICS TAB ===================== */
.an-empty {
  color: #8b929c;
  font-size: 14px;
  line-height: 1.6;
  padding: 6px 0 4px;
}
.an-empty-small {
  color: #9aa0a8;
  font-size: 12.5px;
  padding: 4px 0;
}
.an-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.an-stat {
  background: #f6f7f9;
  border: 1px solid #eceef1;
  border-radius: 14px;
  padding: 16px 15px;
}
.an-stat-val {
  font-size: 25px;
  font-weight: 800;
  color: #16161a;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.an-stat-label {
  margin-top: 5px;
  font-size: 12px;
  color: #8b929c;
}
.an-section {
  margin-bottom: 30px;
}
.an-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 92px;
  padding-top: 8px;
  border-bottom: 1px solid #eceef1;
}
.an-bar-col {
  flex: 1;
  display: flex;
  align-items: flex-end;
  height: 100%;
}
.an-bar {
  width: 100%;
  min-height: 3px;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  opacity: 0.78;
  transition: opacity 0.12s ease;
}
.an-bar-col:hover .an-bar {
  opacity: 1;
}
.an-cols {
  display: flex;
  gap: 44px;
  flex-wrap: wrap;
}
.an-col {
  flex: 1 1 280px;
  min-width: 250px;
}
.an-sites,
.an-opens {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.an-site-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.an-site-fav {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #eceef1;
}
.an-site-name {
  flex: none;
  width: 118px;
  color: #2b2f36;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.an-site-bar-track {
  flex: 1;
  height: 6px;
  background: #eceef1;
  border-radius: 999px;
  overflow: hidden;
}
.an-site-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}
.an-site-count {
  flex: none;
  width: 20px;
  text-align: right;
  font-size: 12px;
  color: #8b929c;
  font-variant-numeric: tabular-nums;
}
.an-open-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 13px;
  background: #f6f7f9;
  border-radius: 10px;
  font-size: 13px;
}
.an-open-title {
  flex: 1;
  min-width: 0;
  color: #2b2f36;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.an-open-count {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

@media (max-width: 640px) {
  .an-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.theme-dark .an-empty,
body.theme-dark .an-empty-small {
  color: #7f858e;
}
body.theme-dark .an-stat {
  background: #1a1a1e;
  border-color: #2c2c34;
}
body.theme-dark .an-stat-val {
  color: #f0f0f2;
}
body.theme-dark .an-stat-label {
  color: #8a8f98;
}
body.theme-dark .an-bars {
  border-bottom-color: #2c2c34;
}
body.theme-dark .an-site-fav {
  border-color: #2c2c34;
}
body.theme-dark .an-site-name,
body.theme-dark .an-open-title {
  color: #e0e1e3;
}
body.theme-dark .an-site-bar-track {
  background: #2c2c34;
}
body.theme-dark .an-site-count {
  color: #7f858e;
}
body.theme-dark .an-open-row {
  background: #1a1a1e;
}
