/* artled showcase. Painted style, palette from the easel painting: night ink, cream light, amber clouds. */
@font-face { font-family: "Plus Jakarta Sans"; src: url("../examples/_shared/fonts/plus-jakarta-var.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../examples/_shared/fonts/jetbrains-mono-var.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --ink: #101418; --surface: #1A2029; --raised: #222A35;
  --cream: #F3EBDD;   /* 15.62:1 on ink */
  --muted: #B4B8BD;   /* 9.28:1 on ink, 7.26:1 on raised */
  --amber: #F2A65A;   /* 9.14:1 on ink; ink on amber 9.14:1 */
  --line: rgba(243, 235, 221, .12); --line-2: rgba(243, 235, 221, .24);
  --glass: rgba(16, 20, 24, .6);
  --sans: "Plus Jakarta Sans", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--ink); color: var(--cream); font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; }
h2 { font-size: clamp(2.2rem, 4.6vw, 4rem); text-wrap: balance; }
h3 { font-size: 1.3rem; letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
code, pre, .mono { font-family: var(--mono); }
code { font-size: .88em; }
p code, li code, dd code { background: rgba(243, 235, 221, .08); border: 1px solid var(--line); border-radius: 6px; padding: .06em .36em; }
a[href], button, summary, label[for], input[type="range"] { cursor: pointer; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 80; background: var(--cream); color: var(--ink); padding: 0 18px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: .88rem; }
.center { text-align: center; }
.ph { font-size: 1.15em; vertical-align: -0.15em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

/* Header */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; border-bottom: 1px solid transparent; transition: background-color 220ms var(--ease), border-color 220ms var(--ease); }
.nav.solid, .nav.open { background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; min-height: 80px; gap: 24px; max-width: 1360px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.45rem; letter-spacing: -0.04em; min-height: 44px; flex: none; }
.logo .mark { width: 30px; height: 30px; flex: none; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0 auto; padding: 0; }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.nav-links a:hover { background: rgba(243, 235, 221, .1); }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-right .menu-btn { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent; font: 700 1rem var(--sans); text-decoration: none; white-space: nowrap; transition: transform 160ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #F7B978; }
.btn-ghost { border-color: var(--line-2); color: var(--cream); background: rgba(16, 20, 24, .55); }
.btn-ghost:hover { background: rgba(16, 20, 24, .8); border-color: rgba(243, 235, 221, .4); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: .95rem; }
.icon-btn { width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--cream); }
.icon-btn:hover { background: rgba(243, 235, 221, .1); }
.actions, .actions-left { display: flex; flex-wrap: wrap; gap: 12px; }
.actions { justify-content: center; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; overflow: hidden; isolation: isolate; padding: 120px 24px 120px; }
.hero .art { position: absolute; inset: 0 0 auto; height: max(100%, 43vw); z-index: -2;
  -webkit-mask-image: linear-gradient(180deg, #000 74%, transparent); mask-image: linear-gradient(180deg, #000 74%, transparent); }
@media (min-aspect-ratio: 16/11) { .hero .art { height: 43vw; } }
.hero .art img { width: 100%; height: 110%; object-fit: cover; object-position: 60% 0%; will-change: transform; }
.hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 150px; z-index: -1; background: linear-gradient(180deg, rgba(16, 20, 24, .7), rgba(16, 20, 24, 0)); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 52% 30% at 50% 40%, rgba(16, 20, 24, .66), rgba(16, 20, 24, .3) 60%, transparent 85%),
              radial-gradient(ellipse 46% 26% at 50% 66%, rgba(16, 20, 24, .8), rgba(16, 20, 24, .45) 60%, transparent 85%),
              linear-gradient(180deg, transparent 60%, rgba(16, 20, 24, .86) 92%, var(--ink) 100%); }
.hero-inner { max-width: 1100px; display: grid; justify-items: center; gap: 24px; }
.hero h1 { font-size: clamp(2.9rem, 7.4vw, 7rem); letter-spacing: -0.045em; line-height: .98; text-wrap: balance; max-width: 12ch; text-shadow: 0 2px 30px rgba(16, 20, 24, .55); }
.hero .sub { font-size: clamp(1.1rem, 1.6vw, 1.35rem); max-width: 42ch; text-wrap: balance; text-shadow: 0 1px 18px rgba(16, 20, 24, .85); }
.hero-note { color: var(--muted); font-size: .95rem; max-width: 60ch; }
.livebar { margin-top: 6px; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border: 1px solid var(--line-2); max-width: 100%; }
.livebar .seg { display: grid; gap: 1px; padding: 2px 16px; text-align: left; min-width: 0; }
.livebar .k { font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.livebar .v { font: 500 .98rem var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Sections */
section { position: relative; padding: 130px 0; }
.head { display: grid; gap: 18px; margin-bottom: 52px; max-width: 760px; }
.head.center { margin-left: auto; margin-right: auto; text-align: center; justify-items: center; }
.head p { color: var(--muted); font-size: 1.18rem; max-width: 58ch; }
.kicker { font: 600 .85rem var(--mono); color: var(--amber); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.glass { background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border: 1px solid var(--line-2); border-radius: 20px; }

/* Styles */
.style-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.style-tabs [role="tab"] { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--cream); font: 700 1rem var(--sans); }
.style-tabs [role="tab"]:hover { background: rgba(243, 235, 221, .08); }
.style-tabs [role="tab"][aria-selected="true"] { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.sw { width: 28px; height: 28px; border-radius: 50%; flex: none; border: 1px solid rgba(0, 0, 0, .15); }
.sw-painted { background: conic-gradient(#0B1A22 0 50%, #FF8A65 0 75%, #9ED9CF 0); }
.sw-woodblock { background: conic-gradient(#24406B 0 50%, #EDE3CF 0 80%, #A8361F 0); }
.sw-gouache { background: conic-gradient(#EEF1E4 0 50%, #3E7B47 0 75%, #F2C94C 0); }
.sw-poster { background: conic-gradient(#13161C 0 50%, #E8B84A 0 80%, #E25A3A 0); }
.style-panel { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); overflow: hidden; }
.style-panel .shot { display: block; background: var(--raised); }
.style-panel .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; aspect-ratio: 16 / 10; transition: transform 400ms var(--ease); }
.style-panel .shot:hover img { transform: scale(1.015); }
.style-info { padding: 30px; display: grid; gap: 16px; align-content: start; }
.style-info h3 { font-size: 1.9rem; letter-spacing: -0.03em; }
.style-info .lead { color: var(--cream); font-size: 1.08rem; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: .95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.prompt { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); }
.prompt .k { font: 500 .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); flex: none; }
.prompt code { flex: 1; min-width: 0; color: var(--amber); font-size: .9rem; overflow-wrap: anywhere; }

/* Compare */
.artband { background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(242, 166, 90, .08), transparent 70%); }
.compare-controls { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 20px; }
.seg-toggle { display: inline-flex; flex-wrap: wrap; padding: 4px; gap: 4px; border-radius: 999px; background: rgba(243, 235, 221, .06); border: 1px solid var(--line); }
.seg-toggle button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 700 .95rem var(--sans); }
.seg-toggle button:hover { color: var(--cream); }
.seg-toggle button[aria-checked="true"] { background: var(--cream); color: var(--ink); }
.compare { margin: 0; padding: 10px; }
.cmp-stage { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--raised); user-select: none; }
.cmp-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.cmp-before-wrap { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp-stage::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--cream); box-shadow: 0 0 0 1px rgba(16, 20, 24, .4); pointer-events: none; }
.cmp-handle { position: absolute; top: 50%; left: var(--pos); width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: var(--cream); color: var(--ink); display: grid; place-items: center; z-index: 2; pointer-events: none; box-shadow: 0 4px 16px rgba(0, 0, 0, .35); }
.cmp-label { position: absolute; top: 12px; z-index: 2; padding: 4px 12px; border-radius: 999px; background: rgba(16, 20, 24, .8); color: var(--cream); font: 600 .8rem var(--mono); pointer-events: none; }
.cmp-label.l { left: 12px; } .cmp-label.r { right: 12px; }
.cmp-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; z-index: 3; cursor: ew-resize; }
.cmp-range:focus-visible + * , .cmp-stage:focus-within { outline: 2px solid var(--amber); outline-offset: 3px; }
.compare figcaption { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; align-items: center; padding: 14px 8px 4px; font-size: .95rem; }
.compare .audit { font: 500 .85rem var(--mono); color: var(--muted); }
.compare .audit b { color: var(--amber); font-weight: 600; }
.compare .links a { color: var(--amber); font-weight: 600; display: inline-flex; min-height: 44px; align-items: center; }
.artband .fine.center { margin-top: 16px; }

/* Choose */
.levels { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.levels li { padding: 26px; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 18px; align-content: start; }
.levels .lv { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font: 600 1.1rem var(--mono); color: var(--amber); }
.levels h3 { margin-bottom: 6px; }
.levels p { color: var(--muted); margin-bottom: 14px; }
.levels pre { margin: 0; padding: 14px 16px; border-radius: 12px; background: rgba(16, 20, 24, .7); border: 1px solid var(--line); overflow-x: auto; font-size: .86rem; line-height: 1.7; color: var(--cream); }

/* Rules */
.rules-grid, .copy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.tiers { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tiers li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tiers b { color: var(--amber); font-weight: 600; font-size: .95rem; }
.tiers span { color: var(--muted); }
.gate { overflow: hidden; }
.gate .chrome { padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.gate pre { margin: 0; padding: 20px; overflow-x: auto; font-size: .9rem; line-height: 1.9; }
.gate .ok { color: #8EDBA8; }
.gate .fine { padding: 0 20px 18px; }

/* Copy */
.pairs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pairs li { display: grid; gap: 4px; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.pairs s { color: var(--muted); text-decoration-color: rgba(242, 166, 90, .8); }
.checker { padding: 22px; display: grid; gap: 12px; }
.chk-label { font-weight: 700; }
.checker textarea { width: 100%; min-height: 160px; resize: vertical; border-radius: 12px; border: 1px solid var(--line-2); background: var(--raised); color: var(--cream); font: 400 1rem/1.6 var(--sans); padding: 14px; }
.checker textarea::placeholder { color: #8E949B; }
.chk-out ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chk-out li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.chk-out .rule { font: 600 .85rem var(--mono); color: var(--amber); }
.chk-out .clean { color: #8EDBA8; font-weight: 600; }

/* Install */
.install { padding: 10px; }
.code-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; }
.code-tabs [role="tab"] { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font: 700 .95rem var(--sans); }
.code-tabs [role="tab"]:hover { color: var(--cream); }
.code-tabs [role="tab"][aria-selected="true"] { background: var(--cream); color: var(--ink); }
.ip { padding: 14px 14px 6px; display: grid; gap: 12px; }
.ip p { color: var(--muted); }
.install > .hf { margin: 18px 14px 10px; color: var(--muted); }
.install > .cmdline { margin: 0 14px; }
.install > .hf.muted { margin-top: 12px; font-size: .92rem; }
.cmdline { display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px 12px 16px; border-radius: 12px; background: rgba(16, 20, 24, .82); border: 1px solid var(--line); }
.cmdline code { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; padding-top: 10px; color: var(--cream); }
.copied { font: 500 .85rem var(--mono); color: var(--amber); min-height: 1.6em; padding: 6px 14px 8px; }

/* FAQ */
.faq { max-width: 860px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 700; font-size: 1.12rem; padding: 14px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ph { color: var(--amber); transition: transform 200ms var(--ease); flex: none; }
.faq details[open] summary .ph { transform: rotate(45deg); }
.faq .a { padding: 0 0 24px; color: var(--muted); max-width: 70ch; }

/* Final */
.final { min-height: 72svh; display: grid; place-items: center; text-align: center; overflow: hidden; isolation: isolate; padding: 140px 24px; }
.final .art { position: absolute; inset: 0; z-index: -2; }
.final .art img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 40%; }
.final::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--ink) 0%, rgba(16, 20, 24, .55) 25%, rgba(16, 20, 24, .6) 75%, var(--ink) 100%), radial-gradient(ellipse 50% 40% at 50% 50%, rgba(16, 20, 24, .55), transparent 75%); }
.final .inner { display: grid; gap: 22px; justify-items: center; max-width: 800px; }
.final h2 { font-size: clamp(2.6rem, 6vw, 5.2rem); letter-spacing: -0.045em; text-shadow: 0 2px 30px rgba(16, 20, 24, .6); }
.final p { font-size: 1.2rem; text-shadow: 0 1px 16px rgba(16, 20, 24, .9); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 56px 0 64px; }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.foot h4 { margin: 0 0 12px; font: 600 .78rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot ul a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.foot ul a:hover { color: var(--amber); }
.foot .small { color: var(--muted); font-size: .92rem; margin-top: 12px; max-width: 42ch; }

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .rise { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 32%; }
    @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .style-panel { grid-template-columns: 1fr; }
  .rules-grid, .copy-grid { grid-template-columns: 1fr; }
  .levels { grid-template-columns: minmax(0, 1fr); }
  section { padding: 104px 0; }
}
@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 12px; right: 12px; flex-direction: column; padding: 10px; border-radius: 20px; background: rgba(16, 20, 24, .97); border: 1px solid var(--line); }
  .nav.open .nav-links { display: flex; }
  .nav-right .menu-btn { display: inline-flex; }
  .livebar .hide-sm { display: none; }
}
@media (max-width: 700px), (orientation: portrait) and (max-width: 1100px) {
  .hero .art { inset: 22svh 0 auto; height: 100%; -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 72%, transparent); mask-image: linear-gradient(180deg, transparent, #000 14%, #000 72%, transparent); }
  .hero .art img { object-position: 50% 0%; }
  .hero::after { background: linear-gradient(180deg, transparent 55%, rgba(16, 20, 24, .86) 90%, var(--ink) 100%); }
  .hero .livebar { background: rgba(16, 20, 24, .88); }
}
@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  section { padding: 84px 0; }
  .hero { padding: 16svh 16px 90px; align-items: start; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 3.6rem); }
  .livebar { flex-wrap: wrap; justify-content: center; border-radius: 22px; padding: 10px; }
  .livebar .seg { text-align: center; width: 100%; }
  .livebar .v { white-space: normal; overflow-wrap: anywhere; }
  .livebar .btn { width: 100%; }
  .style-tabs [role="tab"] { flex: 1 1 calc(50% - 8px); justify-content: flex-start; }
  .style-info { padding: 22px 18px; }
  .levels li { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; }
  .tiers li { grid-template-columns: 1fr; gap: 4px; }
  .compare figcaption { flex-direction: column; align-items: flex-start; }
  .foot .wrap { grid-template-columns: 1fr; }
  .final .btn { width: 100%; }
  .final .actions { width: 100%; }
}
@media (max-width: 480px) {
  .nav-right .btn-ghost:not(.menu-btn) span, .nav-right a.btn-ghost { padding: 0 14px; }
  .menu-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .menu-btn { width: 44px; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
