:root {
  --bg: #f2f5f9;
  --ink: #1B245B;
  --accent: #2E4AA6;
  --line: #d5ddea;
  --error: #b91c1c;
  --card: #ffffff;
  --shadow: rgba(15, 23, 42, 0.14);
  --icon-highlight-bg: rgba(46, 74, 166, 0.1);
  --icon-highlight-border: rgba(46, 74, 166, 0.24);
  --icon-highlight-filter: brightness(0) saturate(100%) invert(24%) sepia(24%) saturate(1942%) hue-rotate(202deg) brightness(92%) contrast(92%);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 10%, rgba(46, 74, 166, 0.12) 0, rgba(46, 74, 166, 0) 35%),
    linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(135deg, rgba(46, 74, 166, 0.06) 0, rgba(46, 74, 166, 0) 55%),
    var(--bg);
  background-size: auto, 36px 36px, 36px 36px, auto, auto;
  color: var(--ink);
  padding: 24px;
}
.landing-shell {
  width: min(880px, 100%);
  align-self: center;
  position: relative;
  isolation: isolate;
}
.landing-graph-preview {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(1160px, calc(100vw - 24px));
  aspect-ratio: 1.58;
  background: url("/static/img/graph-light.svg") center / contain no-repeat;
  filter: blur(0.75px);
  opacity: 0.3;
  pointer-events: none;
  transform: translate(-50%, -48%);
}
.landing-graph-preview::after {
  content: "";
  position: absolute;
  inset: 18% 18%;
  border-radius: 28px;
  background: radial-gradient(ellipse at center, rgba(242, 245, 249, 0.82) 0, rgba(242, 245, 249, 0.5) 42%, rgba(242, 245, 249, 0) 72%);
  pointer-events: none;
}
.continue-study-link {
  position: absolute;
  z-index: 1;
  bottom: 14px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}
.continue-study-link:hover {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  transform: translateX(2px);
}
.continue-study-link:focus-visible {
  outline: none;
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
}
.continue-study-link img {
  width: 14px;
  height: 14px;
  display: block;
  pointer-events: none;
}
.continue-study-link span {
  display: inline-flex;
  transform: translateY(-1.2px);
}
.continue-study-link[hidden] {
  display: none;
}
.card {
  width: 100%;
  align-self: center;
  z-index: 1;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 44px var(--shadow);
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -55px;
  width: 230px;
  height: 230px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(46, 74, 166, 0.16) 0, rgba(46, 74, 166, 0) 66%);
  pointer-events: none;
}
.input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.input-shell {
  position: relative;
  flex: 1 1 auto;
}
.input-shell.is-file-dragging .file-drop-overlay {
  opacity: 1;
  pointer-events: auto;
}
.input-logo {
  width: 36px;
  height: 36px;
  display: block;
  flex: 0 0 auto;
}
.input-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex: 0 0 auto;
}
h1 {
  margin: 0 0 12px 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.08;
  text-align: left;
}
.typed-word-wrap {
  display: inline-flex;
  align-items: baseline;
  --typed-color: var(--accent);
}
.typed-word-slot {
  display: inline-grid;
  align-items: baseline;
}
.typed-word-slot > * {
  grid-area: 1 / 1;
}
.typed-live {
  display: inline-flex;
  align-items: baseline;
}
.typed-word-ghost {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
  color: transparent;
  font-weight: 700;
}
.typed-word-ghost::after {
  content: "";
  display: inline-block;
  width: 5px;
}
.typed-word {
  color: var(--typed-color);
  font-weight: 700;
  display: inline-block;
}
.typed-cursor {
  width: 2px;
  height: 0.92em;
  margin-left: 3px;
  background: var(--typed-color);
  display: inline-block;
  transform: translateY(0.08em);
  animation: typed-cursor-blink 1s steps(1, end) infinite;
}
@keyframes typed-cursor-blink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}
p {
  margin: 0 0 22px 0;
  color: #334155;
  font-size: 16px;
  line-height: 1.5;
  max-width: 760px;
}
.hint {
  margin-top: 4px;
  font-size: 13px;
  color: #475569;
  text-align: right;
}
.feature-carousel {
  margin-top: 10px;
  text-align: center;
}
.feature-carousel-body {
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
  text-align: center;
  width: min(440px, calc(100vw - 84px));
  margin: 0 auto;
}
.feature-carousel-controls {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  padding: 3px;
  border: none;
  border-radius: 999px;
  background: transparent;
  -webkit-user-select: none;
  user-select: none;
}
.feature-carousel-btn {
  min-width: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
  padding: 2px 1px 3px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 120ms ease;
}
.feature-carousel-btn span {
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 120ms ease;
}
.feature-carousel-btn[aria-pressed="true"] {
  color: var(--accent);
}
.feature-carousel-btn[aria-pressed="true"] span {
  text-decoration-style: solid;
  text-decoration-color: currentColor;
}
.feature-carousel-btn:focus-visible {
  outline: none;
  color: var(--accent);
  box-shadow: 0 1px 0 currentColor;
}
.feature-carousel-btn + .feature-carousel-btn::before {
  content: ".";
  margin-right: 8px;
  color: #94a3b8;
  font-weight: 500;
  transform: translateY(-4px);
}
@media (hover: hover) {
  .feature-carousel-btn:hover {
    color: var(--ink);
  }
  .feature-carousel-btn:hover span {
    text-decoration-color: currentColor;
  }
}
.hero-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  list-style: none;
}
.hero-list a {
  color: var(--ink);
}
.error {
  margin-top: 14px;
  font-size: 13px;
  color: var(--error);
  border: 1px solid rgba(185, 28, 28, 0.24);
  background: rgba(254, 242, 242, 0.9);
  border-radius: 10px;
  padding: 8px 10px;
}
.page-footer {
  align-self: end;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.page-footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.page-footer-social a {
  width: 36px;
  height: 36px;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
}
.page-footer-social img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}
.page-footer-social a:hover {
  background: var(--icon-highlight-bg);
  border-color: var(--icon-highlight-border);
}
.page-footer-social a:hover img {
  filter: var(--icon-highlight-filter);
}
.page-footer-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.page-footer-links span,
.page-footer-links a {
  font-size: 12px;
  line-height: 1;
  color: #64748b;
  text-decoration: none;
}
.page-footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.url-input {
  width: 100%;
  border: 1px solid #a3b2c8;
  border-radius: 12px;
  padding: 15px 104px 15px 18px;
  font-size: 18px;
  font-family: "IBM Plex Mono", "Fira Code", monospace;
  background: #fff;
  color: #0f172a;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.url-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46, 74, 166, 0.16);
}
.file-upload-chip {
  position: absolute;
  right: 49px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 10px;
  color: #475569;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.file-upload-chip img {
  width: 40px;
  height: 40px;
  display: block;
  pointer-events: none;
}
.file-upload-chip:hover {
  background: rgba(46, 74, 166, 0.1);
  transform: translateY(calc(-50% - 1px));
}
.file-upload-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 74, 166, 0.2);
}
.pgn-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.file-drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent);
  font-size: 18px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}
.input-submit {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: #fff;
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.input-submit:hover {
  background: rgba(46, 74, 166, 0.12);
  transform: translateY(calc(-50% - 1px));
}
.input-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 74, 166, 0.2);
}
.input-submit img {
  width: 40px;
  height: 40px;
  display: block;
  pointer-events: none;
}
@media (max-width: 640px) {
  body {
    padding: 16px;
  }
  .card {
    padding: 22px;
  }
  .landing-graph-preview {
    display: none;
  }
  .feature-carousel-body {
    min-height: 42px;
  }
  .input-logo {
    width: 32px;
    height: 32px;
  }
}

html[data-theme="dark"] {
  --bg: #0e1424;
  --ink: #e5ebff;
  --accent: #8fb1ff;
  --line: #425075;
  --error: #ffb4b4;
  --card: #1b2741;
  --shadow: rgba(2, 6, 23, 0.48);
}
html[data-theme="dark"] body {
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 10%, rgba(143, 177, 255, 0.16) 0, rgba(143, 177, 255, 0) 38%),
    linear-gradient(rgba(177, 193, 224, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(177, 193, 224, 0.14) 1px, transparent 1px),
    linear-gradient(rgba(120, 142, 187, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 142, 187, 0.09) 1px, transparent 1px),
    linear-gradient(135deg, rgba(30, 58, 138, 0.22) 0, rgba(30, 58, 138, 0) 58%),
    var(--bg);
  background-size: auto, 36px 36px, 36px 36px, 180px 180px, 180px 180px, auto, auto;
  background-repeat: no-repeat, repeat, repeat, repeat, repeat, no-repeat, no-repeat;
}
html[data-theme="dark"] .card {
  background: rgba(27, 39, 65, 0.8);
  border-color: var(--line);
}
html[data-theme="dark"] .landing-graph-preview {
  background-image: url("/static/img/graph-dark.svg");
  opacity: 0.3;
}
html[data-theme="dark"] .landing-graph-preview::after {
  background: radial-gradient(ellipse at center, rgba(14, 20, 36, 0.78) 0, rgba(14, 20, 36, 0.5) 42%, rgba(14, 20, 36, 0) 72%);
}
html[data-theme="dark"] h1,
html[data-theme="dark"] .hint {
  color: #dbe6ff;
}
html[data-theme="dark"] .continue-study-link {
  color: #b7c5e7;
}
html[data-theme="dark"] .continue-study-link:hover,
html[data-theme="dark"] .continue-study-link:focus-visible {
  background: transparent;
  border-color: transparent;
  color: #dbe6ff;
}
html[data-theme="dark"] .continue-study-link img {
  filter: brightness(0) saturate(100%) invert(90%) sepia(13%) saturate(503%) hue-rotate(189deg) brightness(103%) contrast(103%);
}
html[data-theme="dark"] .feature-carousel-body {
  color: #b7c5e7;
}
html[data-theme="dark"] .feature-carousel-controls {
  background: transparent;
}
html[data-theme="dark"] .feature-carousel-btn {
  color: #b7c5e7;
}
html[data-theme="dark"] .feature-carousel-btn[aria-pressed="true"] {
  color: #dbe6ff;
}
html[data-theme="dark"] .feature-carousel-btn + .feature-carousel-btn::before {
  color: #6f7f9f;
}
@media (hover: hover) {
  html[data-theme="dark"] .feature-carousel-btn:hover {
    color: #dbe6ff;
  }
}
html[data-theme="dark"] .page-footer-social a {
  background: transparent;
  border-color: transparent;
}
html[data-theme="dark"] .page-footer-social img {
  filter: brightness(0) invert(1) saturate(0.35) contrast(1.05);
}
html[data-theme="dark"] .page-footer-social a:hover {
  background: #243454;
  border-color: #8fb1ff;
}
html[data-theme="dark"] .page-footer-social a:hover img {
  filter: brightness(0) invert(1) saturate(0.35) contrast(1.05);
}
html[data-theme="dark"] .page-footer-links a {
  color: #b7c5e7;
}
html[data-theme="dark"] .page-footer-links a:hover {
  color: #dbe6ff;
}
html[data-theme="dark"] .url-input {
  background: #1b2741;
  color: #eef4ff;
  border-color: #5e719b;
}
html[data-theme="dark"] .url-input::placeholder {
  color: #9cb0d9;
}
html[data-theme="dark"] .url-input:focus {
  border-color: #8fb1ff;
  box-shadow: 0 0 0 3px rgba(143, 177, 255, 0.22);
}
html[data-theme="dark"] .file-upload-chip {
  background: transparent;
  color: #b7c5e7;
}
html[data-theme="dark"] .file-upload-chip:hover {
  background: rgba(143, 177, 255, 0.15);
}
html[data-theme="dark"] .file-upload-chip img {
  filter: brightness(0) saturate(100%) invert(90%) sepia(13%) saturate(503%) hue-rotate(189deg) brightness(103%) contrast(103%);
}
html[data-theme="dark"] .file-upload-chip:focus-visible {
  box-shadow: 0 0 0 3px rgba(143, 177, 255, 0.3);
}
html[data-theme="dark"] .file-drop-overlay {
  background: rgba(27, 39, 65, 0.96);
  color: #dbe6ff;
}
html[data-theme="dark"] .input-submit:hover {
  background: rgba(143, 177, 255, 0.15);
}
html[data-theme="dark"] .input-submit {
  color: #dbe6ff;
}
html[data-theme="dark"] .input-submit:focus-visible {
  box-shadow: 0 0 0 3px rgba(143, 177, 255, 0.3);
}
html[data-theme="dark"] .input-submit img {
  filter: brightness(0) saturate(100%) invert(90%) sepia(13%) saturate(503%) hue-rotate(189deg) brightness(103%) contrast(103%);
}
html[data-theme="dark"] .error {
  color: #ffd6d6;
  border-color: rgba(255, 180, 180, 0.35);
  background: rgba(93, 31, 41, 0.34);
}
html[data-theme="dark"] .input-logo {
  filter: brightness(0) saturate(100%) invert(90%) sepia(13%) saturate(503%) hue-rotate(189deg) brightness(103%) contrast(103%);
}
