/* =========================================================
   niky.py — styles (matches niky.dev / niky.docs)
   ========================================================= */
:root {
  --bg: #0d1117;
  --bg-2: #161b22;
  --bg-3: #010409;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.1);
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #7ee787;
  --accent-2: #79c0ff;
  --accent-3: #d2a8ff;
  --py-blue: #4b8bbe;
  --py-yellow: #ffd43b;
  --ok: #3fb950;
  --err: #ff7b72;
  --warn: #d29922;
  --radius: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "JetBrainsMono NFM", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --top: 56px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f6f8fa;
  --bg-2: #ffffff;
  --bg-3: #ffffff;
  --surface: rgba(0, 0, 0, 0.025);
  --surface-2: rgba(0, 0, 0, 0.055);
  --border: rgba(0, 0, 0, 0.1);
  --text: #1f2328;
  --muted: #59636e;
  --accent: #1a7f37;
  --accent-2: #0969da;
  --accent-3: #8250df;
  --ok: #1a7f37;
  --err: #cf222e;
  --warn: #9a6700;
  color-scheme: light;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

svg.lucide {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

kbd {
  font-family: var(--font);
  font-size: 0.68rem;
  padding: 0 0.35rem;
  border: 1px solid currentColor;
  border-radius: 4px;
  opacity: 0.55;
}

code {
  font-family: var(--font);
  font-size: 0.92em;
  padding: 0.05rem 0.35rem;
  border-radius: 5px;
  background: var(--surface-2);
}

/* =========================================================
   Top bar
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--top);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

.brand__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: #10161d;
  background: linear-gradient(135deg, var(--py-blue), var(--py-yellow));
}

.brand__muted {
  color: var(--muted);
  font-weight: 400;
}

.progress {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.progress__track {
  width: 140px;
  height: 7px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.6s var(--ease);
}

.progress__text {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
  animation: blink 1.2s infinite;
}

.status[data-state="ready"] .status__dot {
  background: var(--ok);
  animation: none;
}

.status[data-state="running"] .status__dot {
  background: var(--accent-2);
}

.status[data-state="error"] .status__dot {
  background: var(--err);
  animation: none;
}

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

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: var(--surface-2);
  color: var(--accent);
}

.icon-btn--sm {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  margin-left: auto;
}

.menu-btn {
  display: none;
}

/* =========================================================
   Layout
   ========================================================= */
.app {
  display: grid;
  grid-template-columns: 250px minmax(320px, 420px) minmax(0, 1fr);
  height: calc(100dvh - var(--top));
}

.sidebar,
.task {
  overflow-y: auto;
  scrollbar-width: thin;
  border-right: 1px solid var(--border);
}

.sidebar {
  padding: 1rem 0.7rem 2rem;
}

/* Exercise list */
.ex-search {
  position: sticky;
  top: -1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: -1rem -0.7rem 0.6rem;
  padding: 0.8rem 0.9rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.ex-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
}

.chapter {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.55rem 0.6rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.chapter:hover {
  background: var(--surface-2);
}

.chapter svg.lucide {
  width: 15px;
  height: 15px;
  color: var(--accent-2);
}

.chapter__count {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
}

.chapter .chapter__chev {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: rotate 0.2s;
}

.chapter.is-open .chapter__chev {
  rotate: 90deg;
}

.chapter__bar {
  grid-column: 1 / -1;
  height: 3px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}

.chapter__bar span {
  display: block;
  height: 100%;
  background: var(--ok);
}

.chapter__items {
  padding: 0.1rem 0 0.5rem;
}

.notes {
  margin-top: 1.2rem;
  border: 1px solid color-mix(in srgb, var(--accent-2) 30%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent-2) 6%, transparent);
  overflow: hidden;
}

.notes summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  color: var(--accent-2);
  list-style: none;
}

.notes summary::-webkit-details-marker {
  display: none;
}

.notes > :not(summary) {
  margin: 0 0.9rem 0.8rem;
}

.notes pre {
  font-family: var(--font);
  font-size: 0.78rem;
  line-height: 1.55;
  padding: 0.7rem 0.9rem;
  border-radius: 9px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  overflow-x: auto;
}

.example--single {
  grid-template-columns: 1fr;
}

.ex-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}

.ex-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.ex-link.is-active {
  background: color-mix(in srgb, var(--accent-2) 14%, transparent);
  color: var(--text);
}

.ex-link__num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 0.7rem;
  border: 1.5px solid var(--border);
}

.ex-link.is-solved .ex-link__num {
  border-color: var(--ok);
  background: var(--ok);
  color: var(--bg);
}

.ex-link.is-solved .ex-link__num svg.lucide {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}

.ex-link__title {
  flex: 1;
  line-height: 1.3;
}

.dots {
  display: inline-flex;
  gap: 3px;
}

.dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--surface-2);
}

.dots i.on {
  background: var(--accent-3);
}

/* =========================================================
   Task panel
   ========================================================= */
.task {
  padding: 1.6rem 1.5rem 3rem;
}

.crumb {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.task h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0.3rem 0 0.6rem;
}

.task__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.55rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  font-size: 0.72rem;
}

.badge--solved {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 45%, transparent);
  background: color-mix(in srgb, var(--ok) 10%, transparent);
}

.badge svg.lucide {
  width: 13px;
  height: 13px;
}

.task__body > * + * {
  margin-top: 0.85rem;
}

.task__body p,
.task__body li {
  color: color-mix(in srgb, var(--text) 85%, var(--muted));
}

.task__body ul {
  padding-left: 1.2rem;
}

.task__body pre {
  font-family: var(--font);
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 0.7rem 0.9rem;
  border-radius: 9px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  overflow-x: auto;
}

.sample {
  color: var(--accent);
}

.example {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.example span {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.example pre {
  height: calc(100% - 1.4rem);
}

.concept {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 30%, transparent);
  background: color-mix(in srgb, var(--accent-2) 7%, transparent);
}

.concept b {
  color: var(--accent-2);
}

.concept > * + * {
  margin-top: 0.5rem;
}

.tip {
  font-size: 0.82rem;
  padding-left: 0.8rem;
  border-left: 3px solid var(--py-yellow);
}

table.mini {
  border-collapse: collapse;
  font-size: 0.85rem;
}

table.mini th,
table.mini td {
  text-align: left;
  padding: 0.3rem 0.9rem 0.3rem 0;
  border-bottom: 1px solid var(--border);
}

table.mini th {
  color: var(--muted);
  font-weight: 500;
}

/* Hints & solution */
.help {
  margin-top: 1.6rem;
  display: grid;
  gap: 0.7rem;
}

.help__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.help__btn:hover:not(:disabled) {
  color: var(--py-yellow);
  border-color: var(--py-yellow);
}

.help__btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.help__btn.is-nudge {
  color: var(--py-yellow);
  border-color: var(--py-yellow);
  animation: nudge 0.6s 2;
}

@keyframes nudge {
  50% {
    transform: translateX(4px);
  }
}

.hints {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.hints li {
  display: flex;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border-radius: 9px;
  background: color-mix(in srgb, var(--py-yellow) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--py-yellow) 25%, transparent);
  animation: pop 0.35s var(--ease);
}

.hints li svg.lucide {
  color: var(--py-yellow);
  margin-top: 2px;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.solution {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.solution summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  color: var(--muted);
  list-style: none;
}

.solution summary::-webkit-details-marker {
  display: none;
}

.solution summary:hover {
  color: var(--text);
}

.solution pre {
  margin: 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--border) !important;
  border-radius: 0 !important;
}

.solution__actions {
  padding: 0.5rem 0.7rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 2rem;
}

.pager a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.82rem;
}

.pager a:hover {
  color: var(--text);
  border-color: var(--accent-2);
}

.pager a:last-child {
  margin-left: auto;
}

/* =========================================================
   Workspace
   ========================================================= */
.work {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--bg-3);
}

.work__bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem 0.45rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.file {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.file svg.lucide {
  color: var(--py-yellow);
}

.actions {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}

.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.8rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, opacity 0.15s;
}

.btn:hover:not(:disabled) {
  border-color: var(--accent-2);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn svg.lucide {
  width: 15px;
  height: 15px;
}

.btn--primary {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  border-color: var(--ok);
  filter: brightness(1.1);
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn--ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--border);
}

.btn--sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
}

.editor {
  position: relative;
  flex: 1 1 58%;
  min-height: 180px;
}

.editor__loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  grid-auto-flow: column;
  gap: 0.6rem;
  align-items: center;
  color: var(--muted);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    rotate: 1turn;
  }
}

/* Bottom panel */
.panel {
  flex: 1 1 42%;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

.panel__tabs {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.ptab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
}

.ptab svg.lucide {
  width: 15px;
  height: 15px;
}

.ptab:hover {
  color: var(--text);
}

.ptab.is-active {
  color: var(--text);
  background: var(--surface-2);
}

.pill {
  font-size: 0.68rem;
  padding: 0 0.4rem;
  border-radius: 99px;
  background: var(--surface-2);
}

.pill.is-ok {
  background: var(--ok);
  color: #fff;
}

.pill.is-fail {
  background: var(--err);
  color: #fff;
}

.panel__body {
  flex: 1;
  overflow: auto;
  padding: 0.8rem 1rem;
  min-height: 0;
}

.panel__body textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 0.6rem 0.8rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  font-size: 0.85rem;
  outline: none;
}

.panel__body textarea:focus {
  border-color: var(--accent-2);
}

.panel__note {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Console */
.console {
  font-size: 0.85rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.console .line {
  min-height: 1.3em;
}

.console .stderr {
  color: var(--err);
}

.console .input {
  color: var(--accent-2);
}

.console .input::before {
  content: "⌨ ";
  opacity: 0.7;
}

.console .sys {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: italic;
}

.console .sys.ok {
  color: var(--ok);
}

.console .sys.bad {
  color: var(--err);
}

.console .sys + .line:not(.sys) {
  margin-top: 0.35rem;
}

.console .line:not(.sys) + .sys {
  margin-top: 0.5rem;
}

.empty {
  color: var(--muted);
  font-size: 0.82rem;
}

/* Tests */
.summary {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.summary__bar {
  flex: 1;
  max-width: 220px;
  height: 6px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--err) 35%, transparent);
  overflow: hidden;
}

.summary__bar span {
  display: block;
  height: 100%;
  background: var(--ok);
}

.test {
  border: 1px solid var(--border);
  border-radius: 9px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  animation: pop 0.3s var(--ease) backwards;
}

.test__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.84rem;
}

.test.pass .test__head svg.lucide {
  color: var(--ok);
}

.test.fail {
  border-color: color-mix(in srgb, var(--err) 40%, transparent);
}

.test.fail .test__head {
  background: color-mix(in srgb, var(--err) 8%, transparent);
}

.test.fail .test__head svg.lucide {
  color: var(--err);
}

.test__head small {
  margin-left: auto;
  color: var(--muted);
}

.test__detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid var(--border);
}

.test__detail span {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.test__detail pre {
  font-family: var(--font);
  font-size: 0.8rem;
  padding: 0.4rem 0.6rem;
  border-radius: 7px;
  background: var(--bg-3);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.test__detail .full {
  grid-column: 1 / -1;
}

.test__detail pre.err {
  color: var(--err);
}

.win {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  margin-bottom: 0.9rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent);
  background:
    radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--ok) 18%, transparent), transparent 60%),
    var(--surface);
  animation: pop 0.4s var(--ease);
}

.win__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--ok);
  color: #fff;
}

.win b {
  display: block;
  font-size: 1rem;
}

.win p {
  font-size: 0.8rem;
  color: var(--muted);
}

.win .btn {
  margin-left: auto;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .menu-btn {
    display: grid;
  }

  .app {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    z-index: 25;
    top: var(--top);
    left: 0;
    bottom: 0;
    width: min(280px, 85vw);
    background: var(--bg);
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
  }

  .sidebar.is-open {
    transform: none;
  }

  .overlay {
    position: fixed;
    inset: var(--top) 0 0 0;
    z-index: 20;
    background: rgb(0 0 0 / 0.45);
  }
}

@media (max-width: 800px) {
  .app {
    display: block;
    height: auto;
  }

  .task {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 1rem 1.5rem;
  }

  .work {
    height: calc(100dvh - var(--top));
  }

  .progress__track {
    width: 70px;
  }

  .btn kbd,
  .brand__text,
  #resetBtn span {
    display: none;
  }

  .example,
  .test__detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .status #pyStatusText {
    display: none;
  }

  .topbar {
    gap: 0.6rem;
  }
}

/* Beginners should see every character: no ligatures like := → ≔ */
code,
pre,
.console,
.test__head,
textarea {
  font-variant-ligatures: none;
  font-feature-settings: "calt" 0, "liga" 0;
}

.example > div {
  min-width: 0;
}

.example--stack {
  grid-template-columns: 1fr;
}

/* =========================================================
   AdBlock Modal (Polite / Themed)
   ========================================================= */
.adblock-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}

.adblock-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.adblock-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  width: 100%;
  max-width: 520px;
  padding: 2rem 2.2rem;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border);
  text-align: center;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s var(--ease);
  position: relative;
}

.adblock-backdrop.is-visible .adblock-card {
  transform: translateY(0) scale(1);
}

.adblock-icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  background: rgba(255, 212, 59, 0.12);
  border: 1px solid rgba(255, 212, 59, 0.3);
  color: var(--py-yellow);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.adblock-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.adblock-body {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  text-align: left;
}

.adblock-body p + p {
  margin-top: 0.75rem;
}

.adblock-body b {
  color: var(--text);
}

.adblock-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  text-align: left;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.adblock-callout-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.adblock-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.adblock-btn-primary {
  width: 100%;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #0d1117;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.adblock-btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.adblock-btn-secondary {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.15s ease;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.adblock-btn-secondary:hover {
  color: var(--text);
}
