@font-face {
  font-family: Jakarta;
  src: url("/jakarta.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #0b110e;
  --panel: #111c16;
  --line: #284134;
  --text: #eef5ef;
  --muted: #aabdb1;
  --green: #aeefa3;
  --soft: #1b3528;
  --accent-text: #152217;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 85% 0, #14271c 0%, transparent 45%), var(--canvas);
  color: var(--text);
  font: 400 15px/1.55 Jakarta, system-ui, sans-serif;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .66; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
p, h1, h2, h3 { margin: 0; }
img { display: block; max-width: 100%; }
.shell { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.accent { color: var(--green); }
.topbar { border-bottom: 1px solid var(--line); background: #0d1710; }
.topbar-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; letter-spacing: -.055em; }
.brand-label { font-size: 11px; letter-spacing: .02em; color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; }
nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 27px); font-size: 13px; font-weight: 700; }
nav > a:first-child { color: var(--muted); }
nav > a:first-child:hover { color: var(--text); }
.button {
  min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 9px; border: 1px solid var(--line); padding: 8px 13px;
  background: #14251b; color: var(--text); font-weight: 700; font-size: 13px; white-space: nowrap;
}
.button:hover { background: #20382a; }
.button.primary { background: var(--green); border-color: var(--green); color: var(--accent-text); }
.button.primary:hover { background: #cbf7c1; }
.button.quiet { color: var(--muted); background: transparent; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.public-main { padding-top: clamp(38px, 6.5vw, 88px); }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 365px); align-items: end; gap: clamp(26px, 5vw, 70px); }
.eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 800; color: var(--green); letter-spacing: .115em; text-transform: uppercase;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 13px #aeefa36e; }
h1 { font-size: clamp(38px, 6vw, 79px); line-height: 1.01; letter-spacing: -.074em; font-weight: 800; margin-top: 13px; }
.lede { max-width: 520px; color: var(--muted); margin-top: 17px; font-size: 15px; }
.feed-card, .panel { border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.feed-card { padding: 21px; background: linear-gradient(155deg,#182a20,#111c16); }
.feed-heading, .list-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 800; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 999px; border: 1px solid var(--line); color: var(--green); background: var(--soft);
  font-weight: 800; font-size: 11px; white-space: nowrap;
}
.endpoint {
  display: block; margin: 14px 0 12px; padding: 10px 12px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--canvas); font-family: Consolas, monospace; font-size: 13px; white-space: nowrap;
}
.endpoint > span { color: var(--green); margin-right: 7px; }
.feed-card p { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.feed-card .copy-note { margin: 8px 0 0; color: var(--green); overflow-wrap: anywhere; }
.copy-note:empty { display: none; }
.collection { margin-top: clamp(40px, 6.5vw, 76px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 17px; }
h2 { font-size: 25px; letter-spacing: -.045em; line-height: 1.15; }
.section-heading h2 { margin-top: 4px; }
.poster-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 2vw, 22px); }
.series-card { min-width: 0; }
.cover { position: relative; width: 100%; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.score {
  position: absolute; right: 8px; top: 8px; background: #0d1a14f2; border: 1px solid #526a53;
  color: var(--text); font-weight: 800; font-size: 12px; border-radius: 6px; padding: 4px 6px;
}
.score span { color: var(--green); }
.series-card h3, .card-preview h3 { margin-top: 9px; font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
.series-card p, .card-preview p:not(.eyebrow) { margin-top: 5px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.empty-state { border: 1px dashed var(--line); padding: 28px; text-align: center; color: var(--muted); border-radius: 12px; }
.page-footer { margin-top: 38px; border-top: 1px solid var(--line); padding-block: 16px 24px; display: flex; justify-content: space-between; gap: 8px 22px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.page-footer > span { font-weight: 800; color: var(--text); }

.gate, .studio { padding-block: clamp(28px, 5vw, 57px) 45px; }
.gate .actions { margin-top: 22px; }
.studio-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }
.studio h1, .gate h1 { font-size: clamp(36px, 5vw, 58px); margin-top: 6px; }
.studio-heading .lede { margin-top: 9px; }
.editor-grid { display: grid; grid-template-columns: minmax(205px, 255px) minmax(0, 1fr); gap: 16px; align-items: start; }
.panel { min-width: 0; }
.entries, .form-panel { padding: 18px; }
.list-heading h2 { font-size: 19px; }
.add-entry { margin-top: 13px; width: 100%; }
.entry-list { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.entry {
  display: flex; width: 100%; align-items: center; gap: 9px; text-align: left;
  border: 1px solid transparent; background: transparent; color: var(--text); padding: 6px; border-radius: 8px;
}
.entry:hover, .entry[aria-pressed="true"] { background: var(--soft); border-color: var(--line); }
.entry strong, .entry small { display: block; overflow-wrap: anywhere; }
.entry strong { font-size: 13px; line-height: 1.25; }
.entry small { font-size: 11px; margin-top: 4px; color: var(--muted); }
.entry-cover { width: 30px; height: 45px; border-radius: 4px; overflow: hidden; flex: 0 0 auto; background: var(--line); }
.entry-cover img { width: 100%; height: 100%; object-fit: cover; }
.compose { display: grid; grid-template-columns: minmax(0, 1fr) minmax(135px, 186px); gap: 22px; margin-top: 16px; }
fieldset { padding: 0; margin: 0; min-width: 0; border: 0; display: grid; gap: 12px; }
.series-form label { display: grid; min-width: 0; gap: 5px; color: var(--text); font-size: 13px; font-weight: 700; }
.series-form input, .series-form textarea {
  width: 100%; min-width: 0; background: var(--canvas); color: var(--text);
  border-radius: 8px; border: 1px solid var(--line); padding: 8px 10px; min-height: 38px;
}
.series-form input::placeholder { color: #789083; }
.series-form textarea { resize: vertical; }
.series-form input[type="file"] { padding: 5px; font-size: 11px; }
.series-form input::file-selector-button {
  border-radius: 5px; padding: 5px 7px; margin-right: 8px; color: var(--text); background: var(--soft); border: 1px solid var(--line);
}
.series-form label small, .optional { font-size: 11px; color: var(--muted); font-weight: 500; }
.series-form label:has(.optional) { grid-template-columns: auto 1fr; align-items: center; }
.series-form label:has(.optional) input, .series-form label:has(.optional) textarea { grid-column: 1/-1; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.more-fields { border-block: 1px solid var(--line); padding-block: 8px; }
.more-fields summary { font-size: 13px; font-weight: 700; cursor: pointer; }
.more-fields label { margin-top: 10px; }
.form-note { color: var(--green); font-size: 13px; margin-top: 9px; }
.form-note.error { color: #ffaaa1; }
.form-note:empty { display: none; }
.card-preview .eyebrow { margin-bottom: 7px; }
.poster-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 5px; text-align: center; font-size: 12px; color: var(--muted); }

@media (max-width: 860px) {
  .shell { width: calc(100% - 44px); }
  .editor-grid { grid-template-columns: minmax(165px, 190px) minmax(0,1fr); gap: 12px; }
  .compose { gap: 14px; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 28px); }
  .topbar-inner { height: 60px; }
  .intro, .editor-grid { grid-template-columns: 1fr; }
  .intro { gap: 21px; }
  .feed-card { padding: 15px; }
  .poster-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .entries, .form-panel { padding: 13px; }
  .entry-list { max-height: 160px; overflow: auto; }
}
@media (max-width: 440px) {
  .brand-label { display: none; }
  .compose { display: flex; flex-direction: column-reverse; }
  .card-preview { max-width: 128px; }
  .series-card h3 { font-size: 13px; }
  .series-card p { font-size: 11px; }
  .score { font-size: 11px; right: 4px; top: 4px; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.help-text { color: var(--muted); font-size: 12px; margin: 10px 0; }
.catalog-filters, .genre-form, .studio-tools { display: flex; flex-wrap: wrap; align-items: start; gap: 10px; }
.catalog-filters { margin-bottom: 10px; }
.catalog-filters input { flex: 1; min-width: 200px; }
.catalog-filters select, .catalog-filters input, .genre-form input, .entry-search, .entry-filter, .series-form select { color: var(--text); background: var(--canvas); border: 1px solid var(--line); padding: 9px 10px; border-radius: 8px; max-width: 100%; }
.series-form select { width: 100%; min-width: 0; }
.studio-tools { justify-content: space-between; margin-bottom: 18px; }
.genre-manager { flex: 1; min-width: 220px; padding: 14px 18px; }
.genre-manager summary { font-weight: 700; cursor: pointer; }
.genre-form input { flex: 1; min-width: 120px; }
.genre-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.genre-picker { margin-top: 0; max-height: 170px; overflow: auto; padding: 2px; }
.genre-picker button { cursor: pointer; color: var(--muted); }
.genre-picker button[aria-pressed="true"] { background: var(--green); color: var(--accent-text); border-color: var(--green); }
.placement-fields { display: flex; flex-wrap: wrap; gap: 15px; padding: 12px; background: var(--soft); border-radius: 8px; }
.series-form .check-label { display: flex; align-items: center; gap: 8px; }
.series-form input[type="checkbox"] { width: 17px; min-height: 17px; accent-color: var(--green); }
.entry-search, .entry-filter { width: 100%; margin-top: 8px; font-size: 12px; }
.integration { max-width: 900px; padding-block: 42px; }
.integration h1 { font-size: clamp(34px, 5vw, 56px); margin-bottom: 22px; }
.integration h2 { margin-top: 30px; margin-bottom: 12px; }
.integration p, .integration li { color: var(--muted); margin-block: 10px; }
.integration pre { overflow: auto; white-space: pre; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; font-size: 12px; }
.integration code { overflow-wrap: anywhere; }
.integration table { width: 100%; border-collapse: collapse; font-size: 13px; }
.integration td, .integration th { border: 1px solid var(--line); padding: 10px; text-align: left; }

[hidden] { display: none !important; }
.login-form { display: grid; gap: 10px; max-width: 440px; margin-top: 24px; }
.login-form input { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--canvas); color: var(--text); }
.login-form button { justify-self: start; }
.genre-form { margin-top: 12px; }
.integration ol, .integration ul { padding-left: 22px; }
.integration .notice { padding: 16px; border: 1px solid var(--line); background: var(--soft); border-radius: 10px; }
.cover img[hidden] + .poster-placeholder { display: grid; }
