/* ========================================================================
   mesut.uk — Design System
   Apple-inspired · Minimal · Mobile-first
   ======================================================================== */

/* ---------- Design Tokens ------------------------------------------------ */
:root {
  --bg:             #ffffff;
  --bg-alt:         #f5f5f7;
  --text:           #1d1d1f;
  --text-secondary: #86868b;
  --accent:         #0071e3;
  --accent-hover:   #0077ed;
  --green:          #34c759;
  --orange:         #ff9500;
  --blue:           #007aff;
  --border:         rgba(0, 0, 0, 0.08);
  --shadow-sm:      0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md:      0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-lg:      0 12px 40px rgba(0, 0, 0, 0.08);
  --radius-sm:      12px;
  --radius-md:      20px;
  --radius-lg:      28px;
  --font:           -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
                    'Helvetica Neue', Helvetica, Arial, sans-serif;
  --max-w:          1080px;
  --max-w-narrow:   720px;
  --gutter:         24px;
  --transition:     200ms ease;
}

/* ---------- Reset -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; padding: 0; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Container ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow { max-width: var(--max-w-narrow); }

/* ---------- Section ------------------------------------------------------ */
.section {
  padding: 80px 0;
}
.section--alt {
  background: var(--bg-alt);
}

/* ---------- Header ------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.header__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}
.header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.header__nav a {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
}
.header__nav a:hover {
  color: var(--text);
  background: var(--bg-alt);
}
.header__nav a[aria-current="page"] {
  color: var(--text);
  background: var(--bg-alt);
  font-weight: 600;
}

/* ---------- Footer ------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer__links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--accent); }
.footer__copy {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ---------- Hero --------------------------------------------------------- */
.hero {
  padding: 100px 0 60px;
  text-align: center;
}
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}
.hero__title {
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.hero__subtitle {
  margin-top: 16px;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}
.hero__actions {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Section Title ------------------------------------------------ */
.section-title {
  margin-bottom: 40px;
}
.section-title__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}
.section-title__heading {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-title__subtitle {
  margin-top: 8px;
  color: var(--text-secondary);
  max-width: 56ch;
}

/* ---------- Page Intro text ---------------------------------------------- */
.page-intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 40px;
  max-width: 56ch;
  line-height: 1.6;
}

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}
.btn--secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--border);
}
.btn--secondary:hover {
  border-color: var(--accent);
  background: rgba(0, 113, 227, 0.04);
}
.btn--sm {
  padding: 8px 16px;
  font-size: 0.84rem;
}

/* ---------- Badges ------------------------------------------------------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.badge--live {
  background: rgba(52, 199, 89, 0.12);
  color: #248a3d;
}
.badge--coming-soon {
  background: rgba(255, 149, 0, 0.12);
  color: #c25700;
}
.badge--in-development {
  background: rgba(0, 122, 255, 0.12);
  color: #0055d4;
}

/* ---------- App Card ----------------------------------------------------- */
.app-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.app-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.app-card__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.app-card__icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}
.app-card__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.app-card__name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.app-card__desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 18px;
}
.app-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.app-card__links {
  display: flex;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.app-card__links a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.app-card__links a:hover { color: var(--accent); }

/* ---------- App Grid ----------------------------------------------------- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.app-grid__empty {
  color: var(--text-secondary);
  text-align: center;
  padding: 60px 0;
}

/* ---------- App Hero (detail page) --------------------------------------- */
.app-hero {
  padding: 80px 0 40px;
}
.app-hero__inner {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.app-hero__icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
  object-fit: cover;
}
.app-hero__content {
  flex: 1;
  min-width: 0;
}
.app-hero__name {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 8px 0 6px;
}
.app-hero__subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.app-hero__desc {
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 60ch;
  margin-bottom: 24px;
}
.app-hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Screenshot Gallery ------------------------------------------- */
.gallery {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 0;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery__track {
  display: flex;
  gap: 16px;
}
.gallery__item {
  flex-shrink: 0;
  width: 220px;
}
.gallery__img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  aspect-ratio: 1290 / 2796;
  object-fit: cover;
  background: var(--bg-alt);
}

/* ---------- Feature Grid ------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.feature {
  padding: 24px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
}
.feature__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.feature__desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ---------- FAQ ---------------------------------------------------------- */
.faq__item {
  border-bottom: 1px solid var(--border);
}
.faq__item:first-child {
  border-top: 1px solid var(--border);
}
.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 0;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  color: var(--text);
}
.faq__chevron {
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq__item--open .faq__chevron {
  transform: rotate(180deg);
}
.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease, padding 300ms ease;
}
.faq__item--open .faq__answer {
  max-height: 400px;
  padding-bottom: 18px;
}
.faq__answer p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- Legal (Privacy / Support) ------------------------------------ */
.legal {
  padding: 20px 0;
}
.legal__back {
  display: inline-block;
  font-size: 0.88rem;
  color: var(--accent);
  margin-bottom: 24px;
  transition: opacity var(--transition);
}
.legal__back:hover { opacity: 0.7; }
.legal__title {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.legal__date {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.legal__intro {
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 60ch;
}
.legal__aside {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-bottom: 40px;
}
.legal__aside h2 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}
.legal__aside ul {
  list-style: disc;
  padding-left: 20px;
}
.legal__aside li {
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-size: 0.92rem;
}
.legal__body {
  margin-bottom: 40px;
}
.legal__section {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.legal__section:last-child {
  border-bottom: none;
}
.legal__heading {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.legal__text {
  color: var(--text-secondary);
  line-height: 1.65;
}
.legal__list {
  list-style: disc;
  padding-left: 20px;
  margin-top: 12px;
}
.legal__list li {
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.55;
}
.legal__footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ---------- Support FAQ -------------------------------------------------- */
.support-faq {
  margin-bottom: 40px;
}
.support-faq h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
}
.support-faq__item {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.support-faq__item:last-child { border-bottom: none; }
.support-faq__item h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.support-faq__item p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.support-contact {
  margin-bottom: 20px;
}
.support-contact h2 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.support-contact p {
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.support-contact a {
  color: var(--accent);
}

/* ---------- Link List (global privacy/support hubs) ---------------------- */
.link-list {
  margin-top: 32px;
}
.link-list__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.link-list__item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.link-list__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
}
.link-list__item div {
  flex: 1;
  min-width: 0;
}
.link-list__item strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 2px;
}
.link-list__item span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.link-list__item svg {
  flex-shrink: 0;
  color: var(--text-secondary);
}

/* ---------- About -------------------------------------------------------- */
.about__title {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.about__lead {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.about__content p {
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
}
.about__content h2 {
  font-size: 1.3rem;
  margin: 32px 0 12px;
}
.about__values {
  list-style: none;
  padding: 0;
  margin: 20px 0 28px;
}
.about__values li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  line-height: 1.55;
}
.about__values li:first-child {
  border-top: 1px solid var(--border);
}
.about__values li strong {
  color: var(--text);
}
.about__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* ---------- Intro Block (home) ------------------------------------------- */
.intro-block {
  text-align: center;
  padding: 20px 0;
}
.intro-block__heading {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}
.intro-block__text {
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 48ch;
  margin: 0 auto 28px;
}

/* ---------- Contact ------------------------------------------------------ */
.contact__title {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.contact__intro {
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.6;
}
.contact__methods {
  display: grid;
  gap: 24px;
}
.contact__method {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.contact__method h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.contact__method p {
  color: var(--text-secondary);
  line-height: 1.55;
}
.contact__method a {
  color: var(--accent);
  transition: opacity var(--transition);
}
.contact__method a:hover { opacity: 0.7; }
.contact__email {
  font-size: 1.05rem;
  font-weight: 500;
}

/* ---------- Responsive --------------------------------------------------- */

/* Tablet */
@media (max-width: 768px) {
  :root {
    --gutter: 20px;
  }

  .section { padding: 56px 0; }
  .hero { padding: 72px 0 48px; }
  .app-hero { padding: 56px 0 32px; }

  .app-hero__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .app-hero__icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
  }
  .app-hero__actions { justify-content: center; }
  .app-hero__desc { margin-left: auto; margin-right: auto; }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .gallery__item {
    width: 180px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  :root {
    --gutter: 16px;
  }

  .header__inner { height: 48px; }
  .header__name { display: none; }
  .header__nav a {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  .section { padding: 44px 0; }
  .hero { padding: 56px 0 40px; }

  .btn { padding: 10px 18px; font-size: 0.86rem; }
  .btn--sm { padding: 7px 12px; font-size: 0.8rem; }

  .app-card { padding: 20px; }
  .app-card__icon { width: 56px; height: 56px; border-radius: 14px; }

  .gallery__item { width: 160px; }

  .feature { padding: 18px; }

  .legal__title { margin-bottom: 6px; }

  .footer__links { gap: 16px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- OLED Dark Mode ----------------------------------------------- */
/* Auto: follows system preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:             #000000;
    --bg-alt:         #0a0a0a;
    --text:           #f5f5f7;
    --text-secondary: #98989d;
    --accent:         #2997ff;
    --accent-hover:   #40a9ff;
    --green:          #30d158;
    --orange:         #ff9f0a;
    --blue:           #0a84ff;
    --border:         rgba(255, 255, 255, 0.08);
    --shadow-sm:      0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md:      0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-lg:      0 12px 40px rgba(0, 0, 0, 0.5);
  }
}
/* Manual override: force dark */
:root[data-theme="dark"] {
  --bg:             #000000;
  --bg-alt:         #0a0a0a;
  --text:           #f5f5f7;
  --text-secondary: #98989d;
  --accent:         #2997ff;
  --accent-hover:   #40a9ff;
  --green:          #30d158;
  --orange:         #ff9f0a;
  --blue:           #0a84ff;
  --border:         rgba(255, 255, 255, 0.08);
  --shadow-sm:      0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md:      0 4px 14px rgba(0, 0, 0, 0.4);
  --shadow-lg:      0 12px 40px rgba(0, 0, 0, 0.5);
}

/* Dark-mode component overrides (applies to both auto and manual) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .header { background: rgba(0, 0, 0, 0.82); }
  :root:not([data-theme="light"]) .header__logo { background: #f5f5f7; color: #000; }
  :root:not([data-theme="light"]) .badge--live { background: rgba(48, 209, 88, 0.15); color: #30d158; }
  :root:not([data-theme="light"]) .badge--coming-soon { background: rgba(255, 159, 10, 0.15); color: #ff9f0a; }
  :root:not([data-theme="light"]) .badge--in-development { background: rgba(10, 132, 255, 0.15); color: #0a84ff; }
  :root:not([data-theme="light"]) .btn--primary:hover { box-shadow: 0 4px 12px rgba(41, 151, 255, 0.3); }
  :root:not([data-theme="light"]) .btn--secondary:hover { background: rgba(41, 151, 255, 0.08); }
  :root:not([data-theme="light"]) .app-card { background: #0a0a0a; }
  :root:not([data-theme="light"]) .app-card:hover { box-shadow: 0 4px 14px rgba(255, 255, 255, 0.04); }
  :root:not([data-theme="light"]) .feature { background: #0a0a0a; }
  :root:not([data-theme="light"]) .gallery__img { background: #0a0a0a; }
  :root:not([data-theme="light"]) .legal__aside { background: #0a0a0a; }
  :root:not([data-theme="light"]) img.app-hero__icon,
  :root:not([data-theme="light"]) img.app-card__icon { box-shadow: 0 2px 8px rgba(255, 255, 255, 0.06); }
}

:root[data-theme="dark"] .header { background: rgba(0, 0, 0, 0.82); }
:root[data-theme="dark"] .header__logo { background: #f5f5f7; color: #000; }
:root[data-theme="dark"] .badge--live { background: rgba(48, 209, 88, 0.15); color: #30d158; }
:root[data-theme="dark"] .badge--coming-soon { background: rgba(255, 159, 10, 0.15); color: #ff9f0a; }
:root[data-theme="dark"] .badge--in-development { background: rgba(10, 132, 255, 0.15); color: #0a84ff; }
:root[data-theme="dark"] .btn--primary:hover { box-shadow: 0 4px 12px rgba(41, 151, 255, 0.3); }
:root[data-theme="dark"] .btn--secondary:hover { background: rgba(41, 151, 255, 0.08); }
:root[data-theme="dark"] .app-card { background: #0a0a0a; }
:root[data-theme="dark"] .app-card:hover { box-shadow: 0 4px 14px rgba(255, 255, 255, 0.04); }
:root[data-theme="dark"] .feature { background: #0a0a0a; }
:root[data-theme="dark"] .gallery__img { background: #0a0a0a; }
:root[data-theme="dark"] .legal__aside { background: #0a0a0a; }
:root[data-theme="dark"] img.app-hero__icon,
:root[data-theme="dark"] img.app-card__icon { box-shadow: 0 2px 8px rgba(255, 255, 255, 0.06); }

/* ---------- Toggle Buttons ----------------------------------------------- */
.header__controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}
.toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  cursor: pointer;
  flex-shrink: 0;
}
.toggle-btn:hover {
  color: var(--text);
  background: var(--bg-alt);
  border-color: var(--text-secondary);
}
.toggle-btn__icon { display: block; }

/* Theme toggle: show sun in dark, moon in light */
.toggle-btn__icon--moon { display: block; }
.toggle-btn__icon--sun  { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .toggle-btn__icon--moon { display: none; }
  :root:not([data-theme="light"]) .toggle-btn__icon--sun  { display: block; }
}
:root[data-theme="dark"] .toggle-btn__icon--moon { display: none; }
:root[data-theme="dark"] .toggle-btn__icon--sun  { display: block; }
:root[data-theme="light"] .toggle-btn__icon--moon { display: block; }
:root[data-theme="light"] .toggle-btn__icon--sun  { display: none; }
