:root {
  --page: #F4F1FF;
  --surface: #FFFFFF;
  --ink: #17123B;
  --muted: #5B557D;
  --line: #D8D1F3;
  --primary: #4B35FF;
  --primary-fill: #4B35FF;
  --on-fill: #FFFFFF;
  --sun: #FFD84A;
  --pink: #FF4F9A;
  --toast-bg: #17123B;
  --toast-fg: #F4F1FF;
  color-scheme: light;
  font-family: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #120E2B;
    --surface: #1D1740;
    --ink: #F1EEFF;
    --muted: #A9A3CF;
    --line: #342C66;
    --primary: #8F82FF;
    --primary-fill: #5B49F5;
    --on-fill: #FFFFFF;
    --toast-bg: #F1EEFF;
    --toast-fg: #120E2B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #120E2B;
  --surface: #1D1740;
  --ink: #F1EEFF;
  --muted: #A9A3CF;
  --line: #342C66;
  --primary: #8F82FF;
  --primary-fill: #5B49F5;
  --on-fill: #FFFFFF;
  --toast-bg: #F1EEFF;
  --toast-fg: #120E2B;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
h1, h2, h3, .logo { font-family: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif; letter-spacing: -0.02em; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
a { color: var(--ink); text-underline-offset: 3px; }
[hidden] { display: none !important; }

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

/* Skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
}
.skip:focus {
  left: 16px;
  top: 14px;
  background: var(--ink);
  color: var(--page);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

/* Header */
header { border-bottom: 1px solid var(--line); }
.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.logo {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.logo-dot {
  display: inline-block;
  width: 0.48em;
  height: 0.48em;
  margin-left: 0.18em;
  border-radius: 50%;
  background: var(--pink);
}
.icon-btn {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.icon-btn:hover { border-color: var(--primary); }

/* Hero */
h1 {
  font-weight: 800;
  font-size: clamp(2.05rem, 7vw, 3.05rem);
  line-height: 1.06;
  margin: 30px 0 10px;
}
.lede { color: var(--muted); font-size: 1.06rem; margin: 0 0 6px; }

/* Breadcrumb on the tool landing pages */
.crumbs { font-size: 0.82rem; color: var(--muted); margin: 4px 0 14px; }
.crumbs a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.crumbs a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.crumbs span[aria-hidden] { padding: 0 4px; }

/* The raw hashtag pool printed on the niche pages */
.tag-pool { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 0.86rem; line-height: 1.9; color: var(--ink); overflow-wrap: anywhere; }
h2 { font-weight: 700; font-size: 1.35rem; margin: 34px 0 12px; }

/* Tabs */
.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 22px;
}
.tab {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.tab:hover { border-color: var(--primary); }
.tab[aria-selected="true"] {
  background: var(--primary-fill);
  border-color: var(--primary-fill);
  color: var(--on-fill);
}

/* Pickers */
.pickers { margin: 4px 0 20px; }
.picker { margin: 0 0 16px; }
.picker-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--primary); }
.chip[aria-pressed="true"] {
  background: var(--primary-fill);
  border-color: var(--primary-fill);
  color: var(--on-fill);
  font-weight: 600;
}

/* Tool panels */
.panel { margin: 6px 0 8px; }
.panel:focus-visible { outline: 3px solid var(--primary); outline-offset: 6px; }
.field-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.filter-row { margin-top: 20px; }

.big-input {
  width: 100%;
  min-height: 132px;
  padding: 16px;
  font-family: inherit;
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 8px 8px 0 var(--sun);
  resize: vertical;
  overflow-wrap: anywhere;
}
.text-input {
  width: 100%;
  max-width: 360px;
  min-height: 48px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
}
.big-input::placeholder, .text-input::placeholder { color: var(--muted); opacity: 1; }

/* Result rows */
.rows { list-style: none; margin: 24px 0 0; padding: 0; }
.row {
  display: grid;
  gap: 4px 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.row--style .style-name { grid-area: 1 / 1; }
.row--style .result { grid-area: 2 / 1; }
.row--style .copy { grid-area: 1 / 2 / 3 / 3; }
.row--plain .result { grid-area: 1 / 1; }
.row--plain .copy { grid-area: 1 / 2 / 2 / 3; }
.style-name { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
/* Styles that a landing page leads with (see <body data-featured>) */
.row--featured { box-shadow: inset 3px 0 0 var(--primary); padding-left: 12px; }
.row--featured .style-name { color: var(--ink); }
.row--featured .style-name::after {
  content: "featured";
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--sun);
  color: #17123B;
  font-size: 0.62rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: 2px;
}
.result {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  font-family: system-ui, 'Segoe UI Symbol', 'Noto Sans Math', 'Noto Sans Symbols 2', 'Apple Symbols', 'Cambria Math', sans-serif;
}
#bio-list .result, #username-list .result { font-size: 1.15rem; }
#username-list .result { font-weight: 600; }
#tag-list .result { font-size: 1.05rem; line-height: 1.75; font-weight: 500; }

/* Buttons */
.btn {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:hover {
  background: var(--primary-fill);
  border-color: var(--primary-fill);
  color: var(--on-fill);
}
.btn:active { transform: translateY(1px); }
.btn.copied {
  background: var(--primary-fill);
  border-color: var(--primary-fill);
  color: var(--on-fill);
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.note {
  font-size: 0.92rem;
  color: var(--muted);
  border-left: 3px solid var(--line);
  padding-left: 14px;
  margin: 22px 0 0;
}
.note a { color: var(--ink); }

/* Ads */
.ad {
  max-width: 100%;
  overflow: hidden;
  margin: 34px auto;
  text-align: center;
}
.ad:empty { display: none; }
#ad-top { margin: 14px auto 0; }
#ad-mid { margin-top: 52px; }
.ad-preview {
  border: 2px dashed var(--muted);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 30px 12px;
}
.ad iframe { display: block; margin: 0 auto; max-width: 100%; }
.ad-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
  line-height: 1.2;
}
.ad-desktop { display: none; }
.ad-mobile { display: block; }
@media (min-width: 768px) {
  .ad-desktop { display: block; }
  .ad-mobile { display: none; }
}
@media (max-width: 767px) {
  /* full-bleed the slot so a 300px unit still fits a 320px phone with no sideways scroll */
  .ad, #ad-top { width: calc(100% + 40px); max-width: none; margin-left: -20px; }
}

/* Desktop side rails: live in the margins only at 1200px+, never crowd the 780px column */
.rail {
  position: fixed;
  top: 96px;
  width: 160px;
  max-width: 160px;
  overflow: hidden;
  display: none;
  z-index: 5;
}
.rail-left { left: 16px; }
.rail-right { right: 16px; }
.rail iframe { display: block; margin: 0 auto; max-width: 100%; }
@media (min-width: 1200px) {
  .rail { display: block; }
}

/* FAQ */
.faq { margin-top: 10px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin: 0 0 16px; color: var(--muted); }

/* Editorial / SEO content section */
.content { margin-top: 38px; border-top: 1px solid var(--line); padding-top: 4px; }
.content h2 { margin-bottom: 6px; }
.content h3 {
  font-family: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.16rem;
  margin: 30px 0 8px;
}
.content h4 { font-size: 1rem; font-weight: 600; margin: 20px 0 6px; }
.content p { margin: 0 0 14px; }
.content ol { margin: 0 0 16px; padding-left: 22px; }
.content ol li { margin-bottom: 9px; }
.content ul.plain { list-style: none; margin: 0 0 16px; padding: 0; }
.content ul.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); margin: 0; }
.examples { list-style: none; margin: 4px 0 16px; padding: 0; }
.examples li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.examples .style-name { flex: 0 0 132px; }
.example-text {
  font-size: 1.25rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  font-family: system-ui, 'Segoe UI Symbol', 'Noto Sans Math', 'Noto Sans Symbols 2', 'Apple Symbols', 'Cambria Math', sans-serif;
}
.cta-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--primary-fill);
  color: var(--on-fill);
  font-weight: 600;
  text-decoration: none;
  transition: transform .1s ease, opacity .15s ease;
}
.cta-link:hover { opacity: .92; }
.cta-link:active { transform: translateY(1px); }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  margin-top: 34px;
  padding-top: 22px;
  padding-bottom: calc(44px + env(safe-area-inset-bottom));
  font-size: 0.9rem;
  color: var(--muted);
}
.foot-inner { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; }
.foot-inner p { margin: 0; }
.foot-inner a { color: var(--ink); }

/* Occasional closeable promo popup (desktop only, at most once per 24h) */
#promo-popup {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(10, 6, 30, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.popup {
  width: 520px;
  max-width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}
.popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.popup-head .ad-label { margin-bottom: 0; }
.popup-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease;
}
.popup-close:hover { border-color: var(--primary); }
#ad-popup { margin: 0; }
@media (max-width: 767px) {
  #promo-popup { display: none !important; }
}

/* Toast */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translate(-50%, 10px);
  z-index: 50;
  max-width: calc(100vw - 32px);
  background: var(--toast-bg);
  color: var(--toast-fg);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  #toast { transform: translate(-50%, 0); }
}

@media (min-width: 768px) {
  body { font-size: 18px; }
}
