:root {
  --bg: #18222d;
  --deep: #101821;
  --panel: #202c38;
  --cream: #f3eadc;
  --muted: #aeb6bd;
  --accent: #84919b;
  --accent-light: #a8b2b9;
  --line: rgba(243, 234, 220, 0.16);
  --soft-line: rgba(243, 234, 220, 0.08);
  --ok: #92b4a7;
  --warn: #d6a095;
  --max: 1200px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 280px; background: var(--bg); color: var(--cream); font: 16px/1.55 Inter, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 78% 2%, rgba(255,255,255,.055), transparent 28%), linear-gradient(118deg, transparent 0 62%, rgba(255,255,255,.018) 62% 76%, transparent 76%); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 90; padding: 10px 14px; background: var(--cream); color: var(--deep); }
.skip-link:focus { top: 16px; }

.lib-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--soft-line); background: rgba(16,24,33,.92); backdrop-filter: blur(16px); }
.lib-nav { min-height: 72px; display: flex; align-items: center; gap: 28px; }
.lib-brand { display: inline-flex; align-items: center; gap: 11px; margin-right: auto; font-size: 13px; font-weight: 800; letter-spacing: .1em; }
.lib-brand-mark { position: relative; width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 50%; }
.lib-brand-mark::before, .lib-brand-mark::after { content: ""; position: absolute; top: 50%; height: 2px; background: var(--accent); transform: translateY(-50%); }
.lib-brand-mark::before { left: 5px; width: 6px; }
.lib-brand-mark::after { right: 4px; width: 9px; }
.lib-brand small { color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .15em; }
.lib-links { display: flex; align-items: center; gap: 22px; }
.lib-links a { color: var(--muted); font-size: 13px; }
.lib-links a:hover, .lib-links a[aria-current="page"] { color: var(--cream); }
.lib-studio-link { padding-bottom: 2px; border-bottom: 1px solid var(--accent); color: var(--cream) !important; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: transparent; color: var(--cream); cursor: pointer; }
.menu-toggle::before, .menu-toggle::after { content: ""; display: block; width: 18px; height: 1px; margin: 5px auto; background: currentColor; }

.eyebrow { margin: 0 0 18px; color: var(--accent-light); font-size: 11px; font-weight: 780; letter-spacing: .16em; text-transform: uppercase; }
.hero { padding: clamp(78px, 10vw, 132px) 0 76px; border-bottom: 1px solid var(--soft-line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(330px, .72fr); gap: clamp(42px, 8vw, 108px); align-items: end; }
.display { max-width: 830px; margin: 0; font-size: clamp(3.4rem, 7.7vw, 7.4rem); font-weight: 620; letter-spacing: -.06em; line-height: .91; }
.display em { color: var(--accent-light); font-style: normal; }
.lead { max-width: 680px; margin: 30px 0 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); }
.hero-note { padding: 26px 0 8px 28px; border-left: 1px solid var(--line); }
.hero-note strong { display: block; margin-bottom: 10px; font-size: 1.2rem; }
.hero-note p { margin: 0; color: var(--muted); font-size: 14px; }
.status-line { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; color: var(--muted); font-size: 12px; }
.status-line::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(146,180,167,.1); }

.search-section { padding: 54px 0 84px; }
.search-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px; align-items: end; }
.field { display: grid; gap: 8px; }
.field label { color: var(--muted); font-size: 12px; }
.search-input, .filter-select { min-height: 52px; width: 100%; border: 1px solid var(--line); border-radius: 0; background: var(--deep); color: var(--cream); }
.search-input { padding: 0 18px; font-size: 17px; }
.filter-select { min-width: 170px; padding: 0 38px 0 14px; cursor: pointer; }
.search-input::placeholder { color: #7f8992; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 18px; border: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--cream); font-size: 13px; font-weight: 720; cursor: pointer; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.button:hover { border-color: var(--cream); transform: translateY(-2px); }
.button--primary { border-color: var(--accent); background: var(--accent); color: var(--deep); }
.button--primary:hover { border-color: var(--accent-light); background: var(--accent-light); }
.button[disabled] { cursor: not-allowed; opacity: .55; transform: none; }
.search-meta { display: flex; justify-content: space-between; gap: 18px; margin: 22px 0 20px; color: var(--muted); font-size: 13px; }
.clear-search { border: 0; border-bottom: 1px solid var(--accent); padding: 0 0 2px; background: transparent; color: var(--cream); cursor: pointer; }

.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.catalog-card { min-width: 0; border: 1px solid var(--line); background: var(--deep); transition: transform .25s ease, border-color .25s ease; }
.catalog-card:hover { transform: translateY(-4px); border-color: rgba(243,234,220,.34); }
.catalog-cover { aspect-ratio: 16 / 9; position: relative; overflow: hidden; padding: 26px; background: var(--panel); border-bottom: 1px solid var(--line); }
.catalog-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-shape { position: absolute; right: -12%; top: -18%; width: 56%; aspect-ratio: 1; border: 26px solid var(--accent); border-radius: 50%; opacity: .82; }
.cover-index { position: relative; color: var(--accent-light); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; }
.cover-title { position: absolute; left: 26px; right: 26px; bottom: 26px; max-width: 12ch; font-size: clamp(1.45rem, 2.6vw, 2.5rem); line-height: .94; letter-spacing: -.04em; font-weight: 650; }
.catalog-body { padding: 24px; }
.catalog-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.tag { padding: 5px 8px; border: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.tag--free { color: var(--ok); border-color: rgba(146,180,167,.45); }
.tag--review { color: var(--warn); border-color: rgba(214,160,149,.45); }
.catalog-body h3 { margin: 0 0 10px; font-size: 1.45rem; font-weight: 610; letter-spacing: -.025em; }
.catalog-body p { min-height: 66px; margin: 0; color: var(--muted); font-size: 14px; }
.catalog-link { display: inline-flex; gap: 10px; margin-top: 18px; font-size: 13px; font-weight: 720; }
.catalog-link::after { content: "→"; color: var(--accent-light); transition: transform .2s ease; }
.catalog-link:hover::after { transform: translateX(4px); }
.empty-state { padding: 38px; border: 1px solid var(--line); background: var(--deep); }
.empty-state h3 { margin: 0 0 8px; font-size: 1.5rem; }
.empty-state p { max-width: 650px; margin: 0; color: var(--muted); }

.section { padding: clamp(76px, 9vw, 118px) 0; border-top: 1px solid var(--soft-line); }
.section--deep { background: var(--deep); }
.section-head { display: grid; grid-template-columns: .35fr 1fr; gap: 34px; margin-bottom: 48px; }
.section-title { max-width: 850px; margin: 0; font-size: clamp(2.3rem, 5vw, 4.6rem); line-height: .98; letter-spacing: -.05em; font-weight: 590; }
.section-copy { max-width: 680px; margin: 18px 0 0; color: var(--muted); }
.workflow { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.workflow article { min-height: 270px; padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.workflow span { color: var(--accent-light); font-size: 11px; letter-spacing: .14em; }
.workflow h3 { margin: 92px 0 10px; font-size: 1.35rem; font-weight: 610; }
.workflow p { margin: 0; color: var(--muted); font-size: 14px; }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.price-card { min-height: 390px; display: flex; flex-direction: column; padding: clamp(28px, 4vw, 48px); background: var(--bg); }
.price-card h3 { margin: 0; font-size: 1.6rem; }
.price { margin: 50px 0 4px; font-size: 4rem; line-height: 1; letter-spacing: -.05em; }
.price small { color: var(--muted); font-size: 1rem; letter-spacing: 0; }
.price-card p { color: var(--muted); }
.price-card .button { margin-top: auto; align-self: flex-start; }
.fine-print { margin-top: 20px; color: var(--muted); font-size: 12px; }

.lib-footer { padding: 34px 0; border-top: 1px solid var(--line); background: var(--deep); }
.footer-row { display: flex; justify-content: space-between; gap: 30px; color: var(--muted); font-size: 12px; }
.footer-row a:hover { color: var(--cream); }

.item-hero { padding: clamp(70px, 9vw, 118px) 0 66px; border-bottom: 1px solid var(--soft-line); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 42px; color: var(--muted); font-size: 12px; }
.breadcrumbs span::before { content: "/"; margin-right: 10px; }
.item-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: clamp(42px, 7vw, 90px); align-items: start; }
.item-title { margin: 0; font-size: clamp(3rem, 6.5vw, 6.5rem); line-height: .92; letter-spacing: -.06em; font-weight: 610; }
.item-summary { max-width: 720px; margin: 28px 0 0; color: var(--muted); font-size: 1.2rem; }
.item-side { padding: 26px; border: 1px solid var(--line); background: var(--deep); }
.item-side dl { margin: 0; }
.item-side div { display: flex; justify-content: space-between; gap: 22px; padding: 12px 0; border-bottom: 1px solid var(--soft-line); }
.item-side dt { color: var(--muted); font-size: 12px; }
.item-side dd { margin: 0; font-size: 13px; text-align: right; }
.item-side .button { width: 100%; margin-top: 22px; }
.preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.preview-card { margin: 0; border: 1px solid var(--line); background: var(--deep); }
.preview-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.preview-card figcaption { padding: 12px 14px; color: var(--muted); font-size: 12px; }
.outline-list { counter-reset: slide; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; padding: 1px; background: var(--line); }
.outline-list li { counter-increment: slide; min-height: 110px; padding: 22px; background: var(--bg); list-style: none; }
.outline-list li::before { content: counter(slide, decimal-leading-zero); display: block; margin-bottom: 20px; color: var(--accent-light); font-size: 10px; }
.not-found { min-height: 55vh; display: grid; place-items: center; text-align: center; }

@media (max-width: 900px) {
  .hero-grid, .item-layout { grid-template-columns: 1fr; }
  .hero-note { max-width: 620px; }
  .catalog-grid, .review-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow { grid-template-columns: 1fr; }
  .workflow article { min-height: 210px; }
  .workflow h3 { margin-top: 48px; }
  .search-panel { grid-template-columns: 1fr 1fr; }
  .search-panel .field:first-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .menu-toggle { display: block; }
  .lib-links { position: absolute; inset: 72px 0 auto; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 22px; border-bottom: 1px solid var(--line); background: var(--deep); }
  .lib-links.open { display: flex; }
  .lib-links a { min-height: 46px; display: flex; align-items: center; }
  .lib-studio-link { border: 0; }
  .display { font-size: clamp(3rem, 17vw, 5.4rem); }
  .hero { padding-top: 64px; }
  .search-panel, .catalog-grid, .review-grid, .pricing-grid, .preview-grid, .outline-list { grid-template-columns: 1fr; }
  .search-panel .field:first-child { grid-column: auto; }
  .section-head { grid-template-columns: 1fr; gap: 8px; }
  .catalog-body p { min-height: 0; }
  .footer-row, .search-meta { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
