:root {
  color-scheme: light;
  --ink: #24221e;
  --muted: #665f53;
  --paper: #f9f7f1;
  --panel: #fffdf7;
  --line: #ded8cb;
  --rust: #963e24;
  --rust-hover: #76301d;
  --rust-light: #ffb697;
  --dark: #24231f;
  --dark-panel: #302e28;
  --dark-line: #514c43;
  --dark-text: #f7f0e4;
  --dark-muted: #c7bead;
  --radius: 13px;
  --width: 1220px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  font-synthesis: none;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 28px; }
body { margin: 0; background: var(--paper); color: var(--ink); }
body, input, select, textarea, button { font: inherit; }
a { color: inherit; text-underline-offset: .19em; }
a:hover { text-decoration-thickness: 2px; }
button, select, summary { cursor: pointer; }
button:disabled { opacity: .75; cursor: wait; }
:focus-visible { outline: 3px solid #be582f; outline-offset: 3px; }
.workbench :focus-visible { outline-color: var(--rust-light); }
[hidden] { display: none !important; }
img, video { display: block; max-width: 100%; height: auto; }
figure, p, blockquote { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.13; letter-spacing: -.035em; }
h1 { font-weight: 760; font-size: clamp(2.45rem, 5.6vw, 4.7rem); }
h2 { font-weight: 700; font-size: clamp(1.38rem, 2.7vw, 2rem); }
h3 { font-size: 1.12rem; letter-spacing: -.016em; }
p { color: var(--muted); }
.wrap { width: min(calc(100% - 52px), var(--width)); margin-inline: auto; }
.skip { position: absolute; z-index: 5; left: 16px; top: -100px; background: var(--panel); padding: 12px; }
.skip:focus { top: 12px; }
.topbar { border-bottom: 1px solid var(--line); background: var(--panel); }
.nav-row { display: flex; gap: 26px; min-height: 70px; align-items: center; }
.wordmark { display: inline-flex; gap: 10px; align-items: center; color: var(--ink); font-size: 1.42rem; font-weight: 780; line-height: 1; letter-spacing: -.055em; text-decoration: none; width: max-content; }
.brand-mark { width: 26px; height: 26px; flex: 0 0 auto; }
.nav, .nav-account { display: flex; gap: 21px; align-items: center; }
.nav { margin-left: auto; font-weight: 590; }
.nav > a, .nav-account .language { text-decoration: none; }
.nav > a:hover, .language:hover { text-decoration: underline; }
.nav-tools { position: relative; }
.nav-tools summary { list-style: none; }
.nav-tools summary::-webkit-details-marker { display: none; }
.nav-tools summary::after { content: "⌄"; margin-inline-start: 4px; }
.nav-menu { position: absolute; z-index: 2; top: calc(100% + 8px); left: -9px; min-width: 172px; display: grid; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px; box-shadow: 0 9px 22px #30251718; }
.nav-menu a { display: block; padding: 7px 9px; white-space: nowrap; border-radius: 4px; text-decoration: none; }
.nav-menu a:hover { background: #eee7dc; }
.nav-account { gap: 16px; font-size: .91rem; }
.button {
  display: inline-flex; gap: 10px; align-items: center; justify-content: center; color: #fffaf3;
  background: var(--rust); border: 1px solid var(--rust); border-radius: 7px; font-weight: 660;
  padding: .62rem 1.04rem; min-height: 44px; line-height: 1.25; text-decoration: none; text-align: center;
}
.button:hover { background: var(--rust-hover); border-color: var(--rust-hover); }
.button-small { padding: .49rem .77rem; min-height: 38px; font-size: .89rem; }
.button-line { background: transparent; color: var(--ink); border-color: #bfb7a7; }
.button-line:hover { background: #efe8dc; border-color: #a19582; }
.link-button { border: 0; background: none; text-decoration: underline; padding: 6px 0; color: inherit; }
.text-link { color: var(--rust); font-weight: 675; }
.actions { display: flex; gap: 14px 19px; align-items: center; flex-wrap: wrap; }
.hero { display: grid; grid-template-columns: .98fr 1.02fr; gap: clamp(30px, 6vw, 84px); align-items: center; padding-block: clamp(30px, 4vw, 53px) 34px; }
.hero-copy p, .page-heading p { font-size: clamp(1.03rem, 2vw, 1.22rem); margin-top: 18px; max-width: 61ch; }
.hero-copy .actions { margin-top: 25px; }
.hero-frame { width: 100%; max-width: 520px; justify-self: end; border: 1px solid var(--line); padding: 8px; background: #fcfaf3; border-radius: var(--radius); }
.hero-frame picture, .hero-frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 7px; }
.hero-frame figcaption { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 15px; padding: 10px 4px 3px; color: var(--muted); font-size: .88rem; }
.hero-frame figcaption > span { font-weight: 650; color: var(--ink); }
.page-heading { padding-block: 49px 28px; }
.page-heading h1 { font-size: clamp(2.1rem, 5vw, 3.66rem); max-width: 26ch; overflow-wrap: anywhere; }
.page-heading p { margin-top: 11px; max-width: 69ch; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 13px 22px; margin-bottom: 17px; }
.section-heading p { margin-top: 5px; }
.studio-area { margin-bottom: 49px; }
.workbench { background: var(--dark); color: var(--dark-text); border: 1px solid #292722; border-radius: var(--radius); overflow: hidden; }
.mode-nav { display: flex; gap: 4px 19px; flex-wrap: wrap; padding: 11px 22px; align-items: stretch; border-bottom: 1px solid var(--dark-line); }
.mode-nav a { padding: 6px 0; text-decoration: none; color: var(--dark-muted); font-weight: 660; font-size: .9rem; }
.mode-nav a:hover { text-decoration: underline; }
.mode-nav [aria-current] { color: var(--rust-light); text-decoration: underline; text-decoration-thickness: 2px; }
.workbench-grid { display: grid; min-width: 0; grid-template-columns: minmax(0, 1.5fr) minmax(0, .85fr); }
.workbench-form { padding: 22px; }
.workbench-aside { padding: 22px; background: #2b2923; border-left: 1px solid var(--dark-line); }
.workbench-aside h2 { font-size: 1.31rem; }
.workbench-aside p { color: var(--dark-muted); margin: 7px 0 16px; }
.output-figure { position: relative; overflow: hidden; margin-bottom: 12px; border-radius: 7px; background: #1b1b18; }
.output-figure img { object-fit: cover; width: 100%; aspect-ratio: 16 / 9; }
.output-figure figcaption { position: absolute; left: 8px; bottom: 8px; color: #fff4e4; background: #171612e8; border-radius: 3px; padding: 3px 7px; font-size: .78rem; }
.workbench-link { color: var(--rust-light); font-size: .92rem; font-weight: 620; }
.field { display: grid; gap: 6px; margin-bottom: 15px; min-width: 0; color: var(--dark-text); }
.field > span { min-width: 0; font-weight: 650; font-size: .86rem; }
.prompt-field > span { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.counter, .optional { font-size: .78rem; font-weight: 450; color: var(--dark-muted); }
.field select, .field input[type="number"], .field textarea, .field input[type="file"] {
  border: 1px solid #655e50; background: var(--dark-panel); color: var(--dark-text); padding: 8px 10px; border-radius: 6px; width: 100%; min-width: 0;
}
.field select { min-height: 42px; }
.field textarea { min-height: 104px; resize: vertical; line-height: 1.45; }
.field textarea::placeholder { color: #bcb3a2; }
.field input::file-selector-button { font: inherit; font-size: .84rem; color: var(--dark-text); background: #494236; border: 1px solid #786b58; border-radius: 4px; padding: 4px 8px; margin-right: 8px; cursor: pointer; }
.settings-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.still-grid, .reference-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.reference-list .field { margin-bottom: 6px; }
.switch { display: flex; align-items: center; gap: 7px; width: fit-content; margin: 0 0 17px; font-size: .9rem; }
.switch input { inline-size: 17px; block-size: 17px; accent-color: var(--rust); }
.form-action { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; }
.workbench .button { background: #ecab88; border-color: #ecab88; color: #271a13; }
.workbench .button:hover { background: #ffc3a5; }
.quote { display: flex; gap: 12px; align-items: baseline; font-size: .9rem; font-weight: 640; }
.quote a { color: var(--dark-muted); font-weight: 500; }
.form-hint { color: var(--dark-muted); font-size: .79rem; margin: 9px 0 0; }
.form-error, .notice { border-radius: 7px; border: 1px solid #bc7656; background: #f8ede1; color: #653320; padding: 11px 13px; margin-bottom: 16px; }
.workbench .form-error, .workbench .notice { background: #472d25; color: #ffe4d6; }
.workbench .text-link { color: var(--rust-light); }
.public-section { padding-block: 2px 38px; }
.study-grid, .jobs-grid, .price-grid, .article-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.study-card, .panel, .job, .article-list article, .empty, .prompt-sheet {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.study-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 16px; }
.card-body a, .article-list h2 a { text-decoration: none; }
.card-body a:hover, .article-list h2 a:hover { text-decoration: underline; }
.card-body p, .article-list article p { margin-top: 7px; }
.card-body h3 a span, .article-list h2 a span { color: var(--rust); }
.reading { max-width: 790px; }
.end-space { padding-bottom: 60px; }
.text-block, .faq, .source-list, .related { margin-block: 24px; }
.text-block h2, .faq h2, .source-list h2, .related h2 { margin-bottom: 10px; }
.faq details { border-top: 1px solid var(--line); padding: 11px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { font-weight: 650; }
.faq details p { padding-top: 7px; }
.source-list a, .related a { color: var(--rust); }
.related { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 5px; justify-items: start; }
.related h2 { margin-bottom: 5px; font-size: 1.23rem; }
.example-page { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: start; gap: 21px; }
.sample-video { overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.sample-video video { width: 100%; aspect-ratio: 16 / 9; background: #1b1b18; }
.sample-video figcaption { font-size: .88rem; padding: 9px 14px; color: var(--muted); }
.prompt-sheet, .panel, .job, .article-list article, .empty { padding: 19px; }
.prompt-sheet blockquote { margin-block: 11px 15px; color: var(--muted); }
.copy-status { color: var(--muted); font-size: .91rem; }
.article-list h2 { font-size: 1.25rem; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; background: var(--panel); }
caption { text-align: left; font-weight: 700; font-size: 1.21rem; padding-bottom: 9px; }
th, td { padding: 11px 15px; border: 1px solid var(--line); }
.price-group { margin-bottom: 26px; }
.price-group > h2 { margin-bottom: 11px; }
.price { font-size: clamp(1.35rem, 4vw, 2.2rem); color: var(--ink); font-weight: 710; }
.plan form { margin-top: 12px; }
.plan p { margin-top: 4px; }
.empty p, .panel p { margin-block: 8px 15px; }
.history-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin-bottom: 17px; }
.pill-nav { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.pill-nav > * { padding: 6px 9px; border-radius: 4px; }
.pill-nav [aria-current] { color: var(--ink); background: #eee5d7; text-decoration: none; font-weight: 650; }
.job { display: flex; flex-direction: column; gap: 8px; word-break: break-word; }
.job-header { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 5px 9px; }
.job-header h2 { font-size: 1.22rem; }
.job-state { color: #563711; background: #f4e7d0; border-radius: 5px; padding: 2px 6px; font-size: .8rem; font-weight: 700; }
.job-state.done { background: #e5edde; color: #2f502f; }
.job-state.failed { background: #f7e7dd; color: #7c3622; }
.job-prompt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.job-meta, .job-delete, .auth-terms { font-size: .83rem; }
.job-delete { margin-top: auto; }
.pagination, .order { margin-top: 13px; }
.order { overflow-wrap: anywhere; }
.footer { border-top: 1px solid var(--line); background: #f1ece2; }
.footer-inner { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 21px; padding-block: 29px 26px; }
.footer-inner > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.footer-inner h2 { font-size: 1rem; letter-spacing: -.01em; margin-bottom: 3px; }
.footer-inner a:not(.wordmark) { font-size: .9rem; }
.footer-brand p { max-width: 28ch; margin-top: 6px; }
.footline { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-block: 11px; color: var(--muted); font-size: .84rem; }
.site-error {
  color-scheme: dark;
  --paper: #08070c;
  --panel: #121018;
  --ink: #f9f8fc;
  --muted: #c5c0ce;
  --line: #302839;
  --rust: #c4f82a;
  --rust-hover: #d8ff69;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.site-error main { display: grid; flex: 1 0 auto; place-items: center; }
.site-error .footer { background: var(--panel); }
.site-error .nav { flex-wrap: wrap; }
.site-error .nav-menu a:hover, .site-error .button-line:hover { background: #241d32; }
.site-error :focus-visible { outline-color: var(--rust); }
.site-error .button:not(.button-line) { color: var(--paper); }
.site-error .button-line { border-color: #585064; }
.error-content { padding-block: clamp(3.2rem, 9vw, 8rem); text-align: center; }
.error-content h1 { font-size: clamp(1.95rem, 5vw, 3rem); }
.error-code {
  display: block;
  margin-bottom: .25em;
  font-size: clamp(5.5rem, 17vw, 10rem);
  line-height: .9;
  letter-spacing: -.075em;
  color: #c291ff;
  background: linear-gradient(120deg, #c291ff 25%, #f66dd0 75%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.error-content p { max-width: 55ch; margin: 1rem auto 0; }
.error-content .actions { margin-top: 1.8rem; justify-content: center; }
@media (max-width: 930px) {
  .nav-row { gap: 15px; }
  .nav, .nav-account { gap: 12px; }
  .wrap { width: calc(100% - 39px); }
  .workbench-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .75fr); }
  .study-grid, .jobs-grid, .price-grid, .article-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reference-list { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 690px) {
  .wrap { width: calc(100% - 30px); }
  .nav-row { flex-wrap: wrap; padding-block: 11px 8px; gap: 10px 12px; justify-content: space-between; min-height: auto; }
  .nav { order: 3; flex: 1 0 100%; margin-left: 0; padding-block: 6px 2px; gap: clamp(12px, 6.1vw, 26px); border-top: 1px solid var(--line); }
  .nav-account { gap: 10px; }
  .wordmark { font-size: 1.24rem; gap: 7px; }
  .brand-mark { transform: scale(.92); transform-origin: left center; }
  .hero, .workbench-grid, .example-page { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-block: 34px 22px; gap: 20px; }
  .hero-copy p { margin-top: 9px; }
  .hero-copy .actions { margin-top: 15px; }
  .hero-frame { justify-self: start; }
  .workbench-aside { border-left: 0; border-top: 1px solid var(--dark-line); }
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-nav { padding: 9px 14px; gap: 2px 14px; }
  .workbench-form, .workbench-aside { padding: 15px; }
  .public-section { padding-bottom: 22px; }
  .page-heading { padding-block: 31px 20px; }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 490px) {
  .study-grid, .jobs-grid, .price-grid, .article-list { grid-template-columns: minmax(0, 1fr); }
  .hero figure { padding: 6px; }
  .actions { gap: 9px 13px; }
  .nav-account .button { padding-inline: 7px; }
}
