:root {
  --bg: #f6f7fb;
  --text: #141821;
  --muted: #5d6474;
  --line: rgba(15, 23, 42, 0.09);
  --card: #ffffff;
  --accent: #5b5bd6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f1115;
    --text: #eceef3;
    --muted: #9aa1b2;
    --line: rgba(255, 255, 255, 0.08);
    --card: #181b22;
    --accent: #8b8bff;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0f1115;
  --text: #eceef3;
  --muted: #9aa1b2;
  --line: rgba(255, 255, 255, 0.08);
  --card: #181b22;
  --accent: #8b8bff;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
a {
  color: inherit;
}
.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 19px;
  text-decoration: none;
  color: var(--accent);
}
.site nav {
  display: flex;
  gap: 4px;
}
.site nav a {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 550;
}
.site nav a:hover {
  background: var(--line);
  color: var(--text);
}
main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px 64px;
}
.hero {
  max-width: 760px;
  padding: 28px 0 24px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0 16px;
}
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
}
.seg button,
.ghost,
.file {
  appearance: none;
  border: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.seg button[aria-pressed='true'] {
  background: var(--accent);
  color: #fff;
}
.ghost,
.file {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
}
.file input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.file:focus-within {
  outline: 2px solid var(--accent);
}
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.viewer {
  height: min(78vh, 760px);
  min-height: 460px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -40px rgba(15, 23, 42, 0.35);
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.features article {
  padding: 20px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
}
.features h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.features p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
@media (max-width: 640px) {
  .viewer {
    height: 72vh;
    border-radius: 16px;
  }
  .site nav a:not(:first-child) {
    display: none;
  }
}
