/* Baclivelef — main stylesheet. One file, no framework. Mobile-first. */
:root {
  --ink: #12131f;
  --ink-2: #3b3d52;
  --muted: #5d6078;
  --line: #e3e4ee;
  --paper: #ffffff;
  --paper-2: #f5f5fa;
  --paper-3: #eceef7;
  --night: #0f1020;
  --night-2: #181a33;
  --night-3: #23264a;
  --accent: #ff5c35;       /* decorative + button bg (dark text on it) */
  --accent-ink: #b83210;   /* accent for text/links on light bg (AA) */
  --accent-2: #7c5cff;
  --accent-3: #ffb547;
  --ok: #137a4b; --ok-bg: #e7f6ee;
  --warn: #8a5300; --warn-bg: #fff4dc;
  --err: #b3261e; --err-bg: #fdeceb;
  --info: #2b4bb3; --info-bg: #ebf0ff;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(18,19,31,.06), 0 8px 24px rgba(18,19,31,.06);
  --shadow-lg: 0 18px 50px rgba(18,19,31,.14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--paper); overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .14em; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; color: inherit; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 3.4vw, 2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 750; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--night); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }
.small { font-size: .9rem; } .muted { color: var(--muted); }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.2em; }
.icon-sm { width: 1em; height: 1em; vertical-align: -.12em; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .7em 1.3em; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.1; text-decoration: none; cursor: pointer; transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #1a0903; }
.btn-primary:hover { background: #ff7652; box-shadow: 0 6px 20px rgba(255,92,53,.35); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.16); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink-2); }
.btn-outline:hover { background: var(--paper-2); }
.btn-dark { background: var(--night); color: #fff; }
.btn-dark:hover { background: var(--night-3); }
.btn-sm { min-height: 40px; padding: .45em 1em; font-size: .92rem; }
.btn-lg { min-height: 54px; padding: .85em 1.6em; font-size: 1.05rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,.1); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(15,16,32,.96); color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(15,16,32,.86); backdrop-filter: blur(10px); } }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.28rem; letter-spacing: -.02em; }
.logo-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.logo-mark .icon { width: 22px; height: 22px; }
.logo-text span { color: var(--accent); }
.header-actions { margin-left: auto; display: flex; gap: 4px; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav a { color: #e9e9f5; text-decoration: none; font-weight: 600; font-size: .98rem; white-space: nowrap; }
.primary-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--accent); }
.nav-search { display: flex; align-items: center; background: rgba(255,255,255,.08); border-radius: 999px; padding-left: 14px; border: 1px solid rgba(255,255,255,.12); }
.nav-search input { background: transparent; border: 0; color: #fff; font: inherit; font-size: 16px; min-width: 0; flex: 1; padding: 10px 0; }
.nav-search input::placeholder { color: #aeb0c8; }
.nav-search input:focus { outline: none; }
.nav-search:focus-within { border-color: var(--accent); }
.nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: inline; }

@media (max-width: 1023px) {
  .js .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--night); border-bottom: 1px solid rgba(255,255,255,.1); padding: 8px var(--gutter) 20px; max-height: calc(100vh - var(--header-h)); overflow-y: auto; box-shadow: var(--shadow-lg); }
  .js .primary-nav.is-open { display: block; }
  .no-js .primary-nav { order: 3; width: 100%; padding-bottom: 12px; }
  .no-js .header-inner { flex-wrap: wrap; }
  .no-js .nav-toggle { display: none; }
  .primary-nav li a { display: block; padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 1.08rem; }
  .primary-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--accent); padding-left: 14px; }
  .nav-search { margin-top: 16px; }
}
@media (min-width: 1024px) {
  .header-inner { gap: 24px; }
  .primary-nav { display: flex; align-items: center; gap: 20px; flex: 1; }
  .primary-nav ul { display: flex; gap: 2px; }
  .primary-nav li a { display: block; padding: 20px 10px; }
  .nav-search, .nav-toggle { display: none; }
  .header-actions { margin-left: 0; }
}
@media (min-width: 1280px) {
  .nav-search { display: flex; margin-left: auto; width: 250px; }
  .header-actions { display: none; }
  .primary-nav li a { padding: 20px 12px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #c9cae0; padding: 56px 0 32px; margin-top: 0; font-size: .96rem; }
.site-footer a { color: #e9e9f5; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-top { display: grid; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand p { margin-top: 14px; max-width: 42ch; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.footer-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: #9fa2c0; margin-bottom: 12px; font-family: var(--font); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { padding: 5px 0; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 24px 0 8px; }
.footer-nav a { display: inline-block; padding: 8px 0; }
.copyright { margin: 12px 0 0; color: #9fa2c0; font-size: .9rem; }
@media (min-width: 768px) { .footer-top { grid-template-columns: 1.2fr 1fr; } }

/* ---------- Sections / heads ---------- */
.section { padding: clamp(40px, 7vw, 72px) 0; }
.section-alt { background: var(--paper-2); }
.section-dark { background: linear-gradient(160deg, var(--night) 0%, var(--night-2) 100%); color: #fff; }
.section-dark a { color: #fff; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.section-dark .section-head p { color: #b9bbd6; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; padding: 8px 0; }
.link-arrow:hover { text-decoration: underline; }

.page-hero { background: radial-gradient(1200px 400px at 85% -20%, rgba(124,92,255,.35), transparent 60%), radial-gradient(900px 300px at 0% 120%, rgba(255,92,53,.22), transparent 60%), var(--night); color: #fff; padding: 20px 0 clamp(32px, 6vw, 56px); }
.page-hero h1 { margin: 12px 0 12px; }
.page-hero .lead { color: #d3d4e8; max-width: 62ch; font-size: clamp(1.05rem, 2.2vw, 1.2rem); margin: 0; }
.page-hero .chips { margin-top: 24px; }
.lead { font-size: clamp(1.1rem, 2.4vw, 1.25rem); color: var(--ink-2); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0; padding: 0; font-size: .9rem; }
.breadcrumbs li { display: inline-flex; align-items: center; min-width: 0; }
.breadcrumbs li + li::before { content: "/"; margin: 0 8px; opacity: .5; }
.breadcrumbs a { color: inherit; opacity: .85; padding: 6px 0; }
.breadcrumbs [aria-current] { opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.page-hero .breadcrumbs, .artist-hero .breadcrumbs { color: #d3d4e8; }
.post-header .breadcrumbs { color: var(--muted); }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); text-decoration: none; font-weight: 600; font-size: .95rem; }
.chip:hover { background: rgba(255,255,255,.18); }
.chip[aria-current="page"] { background: var(--accent); color: #1a0903; border-color: var(--accent); }
.section .chip, .search-suggest .chip { background: var(--paper-2); color: var(--ink); border-color: var(--line); }
.section .chip:hover { background: var(--paper-3); }

/* ---------- Grid & cards ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card-title { font-size: 1.15rem; margin: 0 0 8px; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.card-title a:focus-visible { outline: none; }
.card:focus-within { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.tool-card { padding: 22px; }
.tool-card p { color: var(--muted); font-size: .96rem; margin-bottom: 16px; }
.tool-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, rgba(255,92,53,.14), rgba(124,92,255,.16)); color: var(--accent-ink); margin-bottom: 14px; }
.tool-icon .icon { width: 26px; height: 26px; }
.card-cta { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent-ink); font-size: .95rem; }
.card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--night-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.kicker { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-ink); margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.excerpt { color: var(--muted); font-size: .96rem; }
.meta { font-size: .86rem; color: var(--muted); margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--paper-3); color: var(--ink-2); }
.badge-demo { background: var(--warn-bg); color: var(--warn); }
.card-feature { display: grid; }
@media (min-width: 800px) {
  .card-feature { grid-template-columns: 1.2fr 1fr; }
  .card-feature .card-media { aspect-ratio: auto; min-height: 320px; }
  .card-feature .card-body { padding: 32px; justify-content: center; }
  .card-feature .card-title { font-size: clamp(1.4rem, 2.6vw, 2rem); }
}
.artist-card .card-media { aspect-ratio: 1; }
.artist-card .card-body { padding: 14px 16px 16px; }
.cat-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.cat-card h3 a { text-decoration: none; }
.cat-card p { color: #c3c5dc; font-size: .95rem; }
.cat-card ul { list-style: none; padding: 0; margin: 0 0 12px; }
.cat-card li a { display: block; padding: 6px 0; color: #e7e8f6; text-decoration: none; font-size: .96rem; }
.cat-card li a:hover { text-decoration: underline; }
.cat-card .link-arrow { margin-top: auto; color: var(--accent); }
.genre-card { display: flex; flex-direction: column; gap: 6px; min-height: 150px; padding: 22px; border-radius: var(--radius); color: #fff; text-decoration: none; background: linear-gradient(145deg, var(--night-3), var(--night)); position: relative; overflow: hidden; }
.genre-card::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 130px; height: 130px; border-radius: 50%; border: 18px solid rgba(255,255,255,.08); }
.genre-card:nth-child(4n+1) { background: linear-gradient(145deg, #3b1d4f, #ff5c35); }
.genre-card:nth-child(4n+2) { background: linear-gradient(145deg, #13254a, #7c5cff); }
.genre-card:nth-child(4n+3) { background: linear-gradient(145deg, #0e3036, #1b9c85); }
.genre-card:nth-child(4n+4) { background: linear-gradient(145deg, #3c1426, #d9437a); }
.genre-name { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; }
.genre-blurb { font-size: .92rem; opacity: .92; position: relative; z-index: 1; }
.genre-card:hover { transform: translateY(-2px); }
.resource { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--paper); }
.resource:hover { border-color: var(--accent); }
.resource > .icon { color: var(--accent-ink); margin-top: 3px; width: 26px; height: 26px; }
.resource strong { display: block; margin-bottom: 4px; }
.resource span span { color: var(--muted); font-size: .95rem; }
.empty-state { padding: 28px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--paper-2); text-align: center; }
.empty-state p { margin: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--night); color: #fff; padding: clamp(56px, 10vw, 112px) 0 clamp(56px, 9vw, 96px); isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.orb-1 { width: 520px; height: 520px; background: #7c5cff; top: -220px; right: -120px; }
.orb-2 { width: 420px; height: 420px; background: #ff5c35; bottom: -260px; left: -140px; opacity: .45; }
.eq { position: absolute; left: 0; right: 0; bottom: 0; height: 45%; display: flex; align-items: flex-end; gap: 1.2%; padding: 0 2%; opacity: .22; }
.eq i { flex: 1; height: var(--h); border-radius: 6px 6px 0 0; background: linear-gradient(to top, var(--accent), var(--accent-3)); transform-origin: bottom; }
@media (prefers-reduced-motion: no-preference) { .eq i { animation: eq 2.4s ease-in-out var(--d) infinite alternate; } }
@keyframes eq { from { transform: scaleY(.55); } to { transform: scaleY(1); } }
.hero-inner { max-width: 900px; margin-left: auto; margin-right: auto; text-align: center; }
.hero-kicker { display: inline-block; font-weight: 700; font-size: .9rem; letter-spacing: .04em; color: #ffd0c2; background: rgba(255,92,53,.14); border: 1px solid rgba(255,92,53,.35); padding: 6px 14px; border-radius: 999px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.1rem, 6.4vw, 4rem); margin-bottom: 20px; }
.hero-lead { font-size: clamp(1.08rem, 2.5vw, 1.3rem); color: #d7d8ec; max-width: 60ch; margin: 0 auto 32px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; list-style: none; padding: 0; margin: 36px 0 0; color: #b9bbd6; font-size: .95rem; }
.hero-stats strong { color: #fff; font-size: 1.15rem; }
@media (max-width: 479px) { .hero-ctas .btn { width: 100%; } }

/* ---------- Notices ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); margin: 0 0 20px; border: 1px solid; font-size: .96rem; }
.notice p { margin: 0; }
.notice .icon { margin-top: 2px; }
.notice-info { background: var(--info-bg); border-color: #c9d5ff; color: #1d2f6b; }
.notice-warn { background: var(--warn-bg); border-color: #f3d593; color: #5c3900; }
.notice a { color: inherit; font-weight: 700; }

/* ---------- Prose (articles, tool support) ---------- */
.prose { font-size: 1.08rem; line-height: 1.75; color: #22243a; }
.prose h2 { margin: 2em 0 .6em; font-size: clamp(1.4rem, 3vw, 1.75rem); }
.prose h3 { margin: 1.6em 0 .5em; font-size: 1.22rem; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent); color: var(--ink-2); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .96rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--paper-2); font-weight: 700; }
.prose code { background: var(--paper-3); padding: .1em .35em; border-radius: 5px; font-size: .92em; }
.prose .callout, .callout { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; margin: 0 0 1.4em; }
.prose .callout > :last-child { margin-bottom: 0; }
.prose .formula, .formula { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--night); color: #f1f1fb; padding: 14px 18px; border-radius: var(--radius-sm); overflow-x: auto; font-size: .95rem; margin: 0 0 1.4em; }

/* ---------- Posts ---------- */
.post-header { padding-top: 20px; padding-bottom: 8px; }
.post-header h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin-top: 16px; }
.post-intro { font-size: clamp(1.1rem, 2.4vw, 1.25rem); color: var(--ink-2); }
.post-intro p:last-child { margin-bottom: 12px; }
.post-meta a { color: var(--ink); font-weight: 600; }
.post-figure { margin: 16px auto 32px; max-width: 1080px; }
.post-figure img { width: 100%; height: auto; border-radius: var(--radius); aspect-ratio: 1200 / 630; object-fit: cover; }
.post-figure figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.post-layout { display: grid; gap: 40px; padding-bottom: 56px; }
.post-main { min-width: 0; max-width: 760px; }
@media (min-width: 1024px) {
  .post-layout { grid-template-columns: minmax(0, 1fr) 300px; max-width: 1140px; }
  .post-aside { position: relative; }
  .toc-sticky { position: sticky; top: calc(var(--header-h) + 20px); }
  .toc-inline { display: none; }
}
@media (max-width: 1023px) { .toc-sticky { display: none; } }
.toc { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 24px; font-size: .95rem; }
.toc-title, .aside-title { font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 10px; display: block; }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin: 4px 0; }
.toc a { color: var(--ink-2); text-decoration: none; display: inline-block; padding: 3px 0; }
.toc a:hover { color: var(--accent-ink); text-decoration: underline; }
.aside-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px; background: var(--paper); }
.aside-links { list-style: none; margin: 0; padding: 0; }
.aside-links a { display: flex; align-items: center; gap: 8px; padding: 9px 0; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
.aside-links li:last-child a { border-bottom: 0; }
.aside-links a:hover { color: var(--accent-ink); }
.aside-links .count { margin-left: auto; color: var(--muted); font-weight: 500; font-size: .9rem; }
.aside-popular { margin: 0; padding-left: 1.3em; }
.aside-popular li { margin: 8px 0; }
.aside-popular a { color: var(--ink); text-decoration: none; font-weight: 600; }
.aside-popular a:hover { text-decoration: underline; }
.review-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 0 28px; }
.review-info > div { background: var(--paper-2); padding: 12px 16px; }
.review-info dt { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.review-info dd { margin: 2px 0 0; font-weight: 600; }
.tool-cta { display: grid; gap: 14px; align-items: center; padding: 22px; margin: 32px 0; border-radius: var(--radius); background: linear-gradient(135deg, var(--night), var(--night-3)); color: #fff; }
.tool-cta p { margin: 0; color: #c8c9e0; font-size: .96rem; }
.tool-cta .tool-cta-k { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--accent); }
.tool-cta .tool-cta-t { font-size: 1.2rem; font-weight: 800; color: #fff; }
.tool-cta .tool-cta-t a { color: #fff; }
.tool-cta .tool-icon { margin: 0; background: rgba(255,255,255,.1); color: var(--accent); }
@media (min-width: 640px) { .tool-cta { grid-template-columns: auto 1fr auto; } }
.disclosure { font-size: .92rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
.author-box { display: flex; gap: 16px; padding: 20px; border-radius: var(--radius); background: var(--paper-2); border: 1px solid var(--line); margin: 28px 0; }
.author-avatar { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.author-box p { margin: 0 0 6px; font-size: .95rem; color: var(--ink-2); }
.author-box .author-name { font-weight: 800; color: var(--ink); font-size: 1.02rem; }
.author-links { font-size: .9rem; }
.post-nav { display: grid; gap: 12px; margin-top: 12px; }
.post-nav a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font-weight: 700; }
.post-nav a:hover { border-color: var(--accent); }
.post-nav a span { display: flex; align-items: center; gap: 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.post-nav-next { text-align: right; } .post-nav-next span { justify-content: flex-end; }
@media (min-width: 640px) { .post-nav { grid-template-columns: 1fr 1fr; } }

/* ---------- Blog ---------- */
.blog-layout { display: grid; gap: 40px; }
.blog-main { min-width: 0; }
.blog-h { margin: 40px 0 20px; }
@media (min-width: 1024px) { .blog-layout { grid-template-columns: minmax(0, 1fr) 300px; } .blog-aside { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; } }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-width: 0; }
.pagination ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 32px 0 0; }
.pagination a, .pagination span { display: inline-flex; align-items: center; gap: 4px; min-width: 44px; min-height: 44px; padding: 0 14px; justify-content: center; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; }
.pagination [aria-current] { background: var(--night); color: #fff; border-color: var(--night); }

/* ---------- Artist ---------- */
.artist-hero { padding-bottom: 40px; }
.artist-head { display: grid; gap: 24px; align-items: center; margin-top: 20px; }
.artist-photo { width: 160px; height: 160px; border-radius: 24px; box-shadow: var(--shadow-lg); }
.artist-head h1 { margin: 6px 0 12px; }
.artist-head .kicker { color: #ffb8a4; }
.artist-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.artist-facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: #9fa2c0; font-weight: 800; }
.artist-facts dd { margin: 0; font-weight: 600; }
.artist-facts a { color: #fff; }
.artist-img-note { margin: 14px 0 0; font-size: .85rem; color: #9fa2c0; }
@media (min-width: 700px) { .artist-head { grid-template-columns: 220px 1fr; } .artist-photo { width: 220px; height: 220px; } }
.artist-hero + .container { padding-top: 32px; }
.release-list { list-style: none; padding: 0 !important; }
.release-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.rl-title { font-weight: 700; }
.rl-meta { color: var(--muted); font-size: .95rem; }

/* ---------- Tool pages ---------- */
.tool-layout { display: grid; gap: 40px; padding-top: clamp(24px, 4vw, 40px); padding-bottom: 56px; }
.tool-main { min-width: 0; }
@media (min-width: 1024px) { .tool-layout { grid-template-columns: minmax(0, 1fr) 280px; } .tool-aside .toc { position: sticky; top: calc(var(--header-h) + 20px); } }
@media (max-width: 1023px) { .tool-aside { display: none; } }
.tool-intro { margin-bottom: 20px; max-width: 760px; }
.tool-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: clamp(18px, 4vw, 32px); margin-bottom: 14px; }
.privacy-note { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--muted); margin-bottom: 40px; }
.tool-support { max-width: 760px; }

/* Tool form primitives (shared by every tool) */
.tool-form { display: grid; gap: 18px; min-width: 0; }
.tool-form > *, .results > *, .tool-panel > * { min-width: 0; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field-label { font-weight: 700; font-size: .96rem; }
.field .hint, .tool-form .hint, .tool-panel .hint { font-size: .88rem; color: var(--muted); margin: 0; }
.field-row { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .field-row.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.input, .tool-panel input[type="text"], .tool-panel input[type="number"], .tool-panel input[type="date"], .tool-panel input[type="email"], .tool-panel select, .tool-panel textarea,
.search-page-form input, .search-row input, .contact-form input, .contact-form textarea, .contact-form select, .newsletter-form input {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1.5px solid #c9cbdb; border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.tool-panel textarea, .contact-form textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.tool-panel input:focus, .tool-panel select:focus, .tool-panel textarea:focus, .search-page-form input:focus, .contact-form :is(input, textarea, select):focus, .search-row input:focus, .newsletter-form input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 4px rgba(124,92,255,.18); }
.tool-panel [aria-invalid="true"], .contact-form [aria-invalid="true"], .newsletter-form [aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 3px rgba(179,38,30,.12); }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; background: var(--paper-2); border: 1.5px solid #c9cbdb; font-weight: 700; color: var(--muted); }
.input-group .addon:first-child { border-radius: 12px 0 0 12px; border-right: 0; }
.input-group .addon:last-child { border-radius: 0 12px 12px 0; border-left: 0; }
.input-group input { border-radius: 0 !important; }
.input-group input:first-child { border-radius: 12px 0 0 12px !important; }
.input-group .addon:first-child + input { border-radius: 0 12px 12px 0 !important; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 479px) { .tool-actions .btn { flex: 1 1 auto; } }
.form-error { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--err-bg); color: var(--err); border: 1px solid #f3c2bf; font-weight: 600; font-size: .95rem; }
.form-error:empty, .form-error[hidden] { display: none; }
.form-error::before { content: "⚠"; font-weight: 800; }
.form-warning { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); color: #5c3900; border: 1px solid #f3d593; font-weight: 600; font-size: .95rem; }
.form-warning::before { content: "!"; display: inline-grid; place-items: center; flex: none; width: 1.4em; height: 1.4em; border-radius: 50%; background: #5c3900; color: var(--warn-bg); font-weight: 800; font-size: .85em; }
.form-warning[hidden] { display: none; }
.form-success { padding: 12px 14px; border-radius: 12px; background: var(--ok-bg); color: var(--ok); border: 1px solid #bfe6d1; font-weight: 600; }
.results { margin-top: 22px; padding: clamp(16px, 3vw, 24px); border-radius: 16px; background: var(--paper-2); border: 1px solid var(--line); }
.results[hidden] { display: none; }
.results-title { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 12px; }
.result-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.stat-label { display: block; font-size: .82rem; color: var(--muted); font-weight: 700; }
.stat-value { display: block; font-family: var(--font-display); font-size: clamp(1.35rem, 4vw, 1.8rem); font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.stat-sub { display: block; font-size: .85rem; color: var(--muted); }
.stat-hero { grid-column: 1 / -1; background: var(--night); color: #fff; border-color: var(--night); }
.stat-hero .stat-label, .stat-hero .stat-sub { color: #b9bbd6; }
.stat-hero .stat-value { font-size: clamp(2rem, 7vw, 3rem); color: #fff; }
.result-table { width: 100%; border-collapse: collapse; font-size: .96rem; background: #fff; border-radius: 12px; overflow: hidden; }
.result-table th, .result-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.result-table th { background: var(--paper-3); font-size: .85rem; }
.result-table td.num, .result-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--line); }
.bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--paper-3); margin: 12px 0; }
.bar > span { display: block; height: 100%; }
.bar > span:nth-child(6n+1) { background: var(--accent); } .bar > span:nth-child(6n+2) { background: var(--accent-2); } .bar > span:nth-child(6n+3) { background: #1fb89a; }
.bar > span:nth-child(6n+4) { background: var(--accent-3); } .bar > span:nth-child(6n+5) { background: #e8437a; } .bar > span:nth-child(6n+6) { background: #3aa0ff; }
.output-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
@media (min-width: 560px) { .output-list.cols-2 { grid-template-columns: 1fr 1fr; } }
.output-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 8px 16px; font-weight: 700; font-size: 1.05rem; min-width: 0; }
.output-list li > span { overflow-wrap: anywhere; }
.copy-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper-2); font: inherit; font-size: .88rem; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.copy-btn:hover { background: var(--paper-3); }
.copy-btn.copied { background: var(--ok-bg); color: var(--ok); border-color: #bfe6d1; }
.dyn-rows { display: grid; gap: 12px; }
.dyn-row { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-2); }
.dyn-row .row-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: .9rem; color: var(--muted); }
.remove-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid #f3c2bf; background: #fff; color: var(--err); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.remove-btn:hover { background: var(--err-bg); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.seg legend { font-weight: 700; font-size: .96rem; margin-bottom: 8px; padding: 0; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg label span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px solid #c9cbdb; background: #fff; font-weight: 600; font-size: .95rem; cursor: pointer; }
.seg input:checked + span { background: var(--night); color: #fff; border-color: var(--night); }
.seg input:focus-visible + span { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 28px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: -8px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #fff; }
.timeline .tl-date { font-weight: 800; }
.timeline .tl-title { font-weight: 700; }
.timeline .tl-desc { color: var(--muted); font-size: .95rem; margin: 2px 0 0; }
.timeline li.is-past::after { background: #b8bacb; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.chord-out { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.15rem; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0; }
.tap-pad { display: grid; place-items: center; width: 100%; min-height: 200px; border: 0; border-radius: 24px; background: radial-gradient(circle at 50% 40%, #2c2f5e, var(--night)); color: #fff; font: inherit; font-family: var(--font-display); font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 800; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; box-shadow: inset 0 0 0 2px rgba(255,255,255,.08); transition: transform .06s ease; }
.tap-pad small { display: block; font-family: var(--font); font-size: .9rem; font-weight: 500; color: #b9bbd6; margin-top: 6px; }
.tap-pad.is-hit { transform: scale(.985); box-shadow: inset 0 0 0 3px var(--accent), 0 0 40px rgba(255,92,53,.35); }

/* ---------- FAQ ---------- */
.faq details { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: var(--paper); }
.faq summary { cursor: pointer; padding: 16px 48px 16px 18px; font-weight: 700; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--accent-ink); }
.faq details[open] summary::after { content: "–"; }
.faq-a { padding: 0 18px 8px; }

/* ---------- Newsletter ---------- */
.newsletter { background: linear-gradient(120deg, #1b1446, #3a1b4f 55%, #5b1f36); color: #fff; padding: clamp(40px, 7vw, 64px) 0; }
.newsletter-inner { display: grid; gap: 24px; align-items: center; }
.newsletter h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); margin-bottom: 8px; }
.newsletter p { color: #d7d0e8; margin: 0; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 10px; }
.newsletter-form input { flex: 1 1 220px; }
.newsletter-form .form-msg { flex-basis: 100%; margin: 0; font-size: .95rem; color: #ffe0d6; min-height: 1.4em; }
@media (min-width: 900px) { .newsletter-inner { grid-template-columns: 1.1fr 1fr; } }

/* ---------- Search ---------- */
.search-page-form { display: flex; gap: 10px; flex-wrap: wrap; }
.search-page-form input { flex: 1 1 240px; }
.search-status { margin: 20px 0 12px; color: var(--muted); }
.search-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.search-results li a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.search-results li a:hover { border-color: var(--accent); }
.search-results .sr-kind { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-ink); }
.search-results .sr-title { display: block; font-weight: 800; font-size: 1.1rem; margin: 2px 0 4px; }
.search-results .sr-desc { color: var(--muted); font-size: .95rem; }
.search-results mark { background: #ffe6a8; color: inherit; border-radius: 3px; }
.search-suggest { margin-top: 20px; }

/* ---------- Contact ---------- */
.contact-form { display: grid; gap: 16px; margin: 24px 0; padding: clamp(18px, 4vw, 28px); border: 1px solid var(--line); border-radius: 20px; background: var(--paper-2); }
.contact-form .field-error { color: var(--err); font-size: .9rem; font-weight: 600; margin: 0; }
.contact-form .field-error:empty { display: none; }

/* ---------- Sitemap ---------- */
.sitemap-cols { display: grid; gap: 8px 40px; }
@media (min-width: 768px) { .sitemap-cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .sitemap-cols { grid-template-columns: repeat(3, 1fr); } }
.sitemap-cols h2 { font-size: 1.2rem; margin-top: 1.4em; }
.sitemap-list { padding-left: 1.1em; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: clamp(56px, 12vw, 120px) 0; background: radial-gradient(700px 300px at 50% 0%, rgba(124,92,255,.14), transparent 70%); }
.nf-disc { display: inline-grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: var(--night); color: var(--accent); margin-bottom: 24px; }
.nf-disc .icon { width: 56px; height: 56px; }
@media (prefers-reduced-motion: no-preference) { .nf-disc .icon { animation: spin 6s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }
.not-found .hero-ctas { margin: 24px 0 32px; }
.not-found .search-page-form { max-width: 520px; margin: 0 auto; }

/* ---------- Ads (only render when enabled in config) ---------- */
.ad-slot { position: relative; display: grid; place-items: center; margin: 32px 0; min-height: 280px; background: var(--paper-2); border: 1px dashed var(--line); border-radius: 12px; }
.ad-sidebar { min-height: 600px; }
.ad-label { position: absolute; top: 6px; left: 10px; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }

@media print { .site-header, .site-footer, .newsletter, .tool-aside, .post-aside, .ad-slot { display: none !important; } }
