@font-face {
  font-family: Inter;
  src: url("/assets/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  font: 16px/1.55 Inter, system-ui, sans-serif;
  color: #18243b;
  background: #f5f7fc;
  --blue: #2743a5;
  --deep: #18327f;
  --muted: #566379;
  --line: #dce2ef;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
a { color: var(--deep); text-underline-offset: .18em; }
button, input, select { font: inherit; }
button, .button, select {
  min-height: 42px;
  border: 1px solid #cbd4e8;
  border-radius: 9px;
  padding: 8px 13px;
  background: #fff;
  color: #18243b;
  font-size: .9rem;
  font-weight: 630;
}
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-decoration: none; text-align: center; }
button:hover, .button:hover { background: #eef2fa; }
button:disabled { opacity: .55; cursor: not-allowed; }
button[aria-pressed="true"] { border-color: #8195cc; background: #e9efff; color: #18327f; }
.primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.primary:hover { background: var(--deep); }
.subtle { border: 0; color: var(--deep); margin-top: 6px; background: transparent; padding-inline: 0; }
input:not([type="checkbox"]) {
  border: 1px solid #cbd4e8;
  border-radius: 8px;
  min-height: 42px;
  padding: 7px 10px;
  min-width: 0;
  color: #18243b;
  background: white;
}
:focus-visible { outline: 3px solid #3150c5; outline-offset: 3px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 4; top: 10px; left: 10px; background: #fff; padding: 12px; border-radius: 6px; }
.container { width: min(1620px,calc(100% - 2 * clamp(18px,4.6vw,80px))); margin-inline: auto; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-row, .top nav, footer, footer nav, .brand { display: flex; align-items: center; }
.top-row { min-height: 64px; justify-content: space-between; gap: 16px; }
.top nav, footer nav { gap: clamp(13px,2.5vw,30px); flex-wrap: wrap; }
.top nav a, footer a { color: #45536b; font-weight: 620; text-decoration: none; font-size: .9rem; }
.top nav a:hover, footer a:hover { text-decoration: underline; }
.brand { gap: 9px; color: #14203b; font-size: 1.18rem; text-decoration: none; font-weight: 790; letter-spacing: -.05em; }
.brand span { color: var(--blue); margin-left: -8px; }
.hero { padding: clamp(28px,4.7vw,72px) 0 clamp(21px,3.2vw,38px); }
h1, h2, h3, p, figure { margin: 0; }
h1 { font-size: clamp(2.5rem,7vw,5rem); line-height: .99; letter-spacing: -.081em; font-weight: 780; }
.hero p { margin-top: 16px; color: var(--muted); font-size: clamp(1.02rem,2vw,1.25rem); }
h2 { font-weight: 730; letter-spacing: -.039em; line-height: 1.23; }
h3 { font-size: 1.03rem; letter-spacing: -.024em; }
.start-grid { display: grid; grid-template-columns: minmax(0,1.03fr) minmax(0,1fr); gap: clamp(14px,2.5vw,32px); align-items: stretch; }
.open-card, .panel { border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.open-card { padding: clamp(20px,4vw,48px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.open-card.dragged { border-color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.open-card h2 { margin-top: 14px; font-size: clamp(1.57rem,3vw,2.15rem); }
.open-card p, .drive-panel p { margin-top: 10px; color: var(--muted); max-width: 43ch; }
.control-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.open-card > .control-row, .drive-panel .control-row { margin-top: 19px; }
.url-options { margin-top: 20px; width: 100%; color: var(--deep); font-size: .9rem; }
.url-options summary { cursor: pointer; font-weight: 610; }
.url-form { margin-top: 10px; }
.url-form label { display: block; margin-bottom: 4px; }
.url-form input { flex: 1 1 165px; }
.url-form p { font-size: .83rem; }
.sample { position: relative; border-radius: 16px; overflow: hidden; background: #c9dfd9; min-height: clamp(235px,29vw,385px); isolation: isolate; }
.sample img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sample figcaption { position: absolute; left: 14px; bottom: 14px; }
.sample button { border: 0; color: #14243c; background: #ffffffee; box-shadow: 0 0 1px 1px #10243638; }
.formats-preview { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 19px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px 24px; }
.formats-preview h2 { font-size: .99rem; }
.formats-preview p { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.formats-preview a { grid-column: 1 / -1; width: fit-content; font-size: .89rem; font-weight: 620; }
.drive-panel { max-width: 680px; padding: clamp(20px,4vw,38px); }
.drive-panel p { max-width: 54ch; }
.messages { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.messages p { border-radius: 8px; padding: 9px 12px; margin: 9px 0; font-size: .9rem; flex: 1; background: #edf3ff; color: #203574; }
#problem { background: #fff2ed; color: #772808; }
.file-strip { display: flex; gap: 7px; overflow: auto; margin: 8px 0 12px; padding: 3px; }
.file-strip button { flex: 0 0 auto; white-space: nowrap; max-width: 285px; overflow: hidden; text-overflow: ellipsis; display: block; }
.file-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; margin-bottom: 14px; }
.file-bar h2 { overflow-wrap: anywhere; font-size: clamp(1.08rem,2.7vw,1.65rem); }
.file-bar p { color: var(--muted); font-size: .88rem; margin-top: 3px; }
.viewer-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,320px); align-items: start; gap: 14px; }
.workspace { background: #162137; border: 1px solid #18243b; border-radius: 13px; overflow: hidden; min-width: 0; }
.toolbar { padding: 8px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; background: #fff; }
.toolbar button { padding: 6px 10px; min-height: 37px; }
.zoom output { color: #45536b; min-width: 46px; text-align: center; font-size: .86rem; }
.frames { font-size: .86rem; }
.frames input { width: 58px; min-height: 35px; padding: 4px 6px; }
.stage { overflow: auto; height: clamp(330px,56vh,950px); }
.stage:focus-visible { outline-offset: -4px; outline-color: #adbcfc; }
#stage-inner {
  display: grid;
  place-items: center;
  min-width: 100%;
  min-height: 100%;
  background-color: #1a253d;
  background-image: conic-gradient(#202d46 25%,#1a253d 0 50%,#202d46 0 75%,#1a253d 0);
  background-size: 24px 24px;
}
#stage-inner img, #stage-inner canvas { display: block; max-width: none; object-fit: fill; }
.inspector { display: grid; gap: 10px; }
.inset { padding: 14px; border-radius: 12px; }
.inset h3 { margin-bottom: 9px; }
.inset dl { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 7px 10px; margin: 0; font-size: .86rem; }
.inset dl dt { color: var(--muted); }
.inset dl dd { margin: 0; overflow-wrap: anywhere; }
.small, .raw-note { font-size: .82rem; color: var(--muted); margin: 9px 0; }
.raw-controls { display: grid; grid-template-columns: 1fr minmax(90px,1fr); gap: 6px; align-items: center; font-size: .87rem; }
.raw-controls :is(select,input):not([type="checkbox"]) { min-height: 37px; padding: 5px 6px; }
.raw-controls .check, .raw-controls .control-row { grid-column: 1 / -1; }
.raw-controls .check { display: flex; align-items: center; gap: 6px; }
footer { border-top: 1px solid var(--line); margin-top: clamp(32px,5vw,70px); min-height: 68px; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 14px 0; font-size: .89rem; color: var(--muted); }
.help { padding: clamp(18px,4vw,42px); max-width: 1020px; }
.help h2:not(:first-child) { margin-top: 24px; }
.help p, .help ul, .help ol { margin-top: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.table th, .table td { text-align: left; vertical-align: top; padding: 8px 10px; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.table code { white-space: normal; }
.table-wrap { overflow: auto; }
@media (max-width: 880px) {
  .viewer-grid { grid-template-columns: 1fr; }
  .inspector { grid-template-columns: repeat(auto-fit,minmax(min(100%,255px),1fr)); align-items: start; }
}
@media (max-width: 660px) {
  .start-grid, .formats-preview { grid-template-columns: 1fr; }
  .sample { min-height: 195px; }
  .formats-preview { padding-top: 14px; margin-top: 18px; gap: 13px; }
  .file-bar { align-items: flex-start; flex-direction: column; }
  .stage { height: clamp(270px,48vh,510px); }
  .table th, .table td { padding: 7px 5px; }
}
