:root {
  color-scheme: light;
  --bg: #f5f8fa;
  --surface: #fff;
  --soft: #ebf1f5;
  --ink: #182f3e;
  --muted: #5e7482;
  --line: #dbe5eb;
  --accent: #6353b9;
  --tint: #eeebfa;
  --warn: #9c4819;
  --shadow: 0 12px 40px #203d4a08;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c161e;
  --surface: #13232d;
  --soft: #1b2e39;
  --ink: #e9f4f8;
  --muted: #9bb4c2;
  --line: #2a414e;
  --accent: #b7a9ff;
  --tint: #2c2648;
  --warn: #f5b783;
  --shadow: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 14px;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  min-height: 42px;
  padding: 9px 15px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
button:hover,
.file-button:hover {
  border-color: var(--accent);
}
button.primary {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
  font-weight: 650;
}
html[data-theme="dark"] button.primary {
  color: #17112f;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.file-button:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
header {
  max-width: 1380px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 40px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 750;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.brand span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 8px;
}
main {
  max-width: 1300px;
  margin: auto;
  padding: 0 40px;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 50px;
  padding: 42px 0 48px;
  align-items: center;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 750;
  color: var(--muted);
}
h1 {
  font-size: clamp(38px, 5vw, 64px);
  letter-spacing: -2.6px;
  line-height: 1.07;
  margin: 18px 0;
}
h1 em {
  font-style: normal;
  color: var(--accent);
}
.lede {
  max-width: 570px;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
}
.hero-note {
  position: relative;
  padding: 28px 34px;
  background: linear-gradient(140deg, var(--tint), var(--surface));
  border: 1px solid var(--line);
  border-radius: 24px;
  transform: rotate(3deg);
  box-shadow: none;
}
.hero-note strong {
  display: block;
  font-size: 23px;
  line-height: 1.3;
  letter-spacing: -0.7px;
}
.hero-note p {
  font-size: 13px;
  color: var(--muted);
}
.orbit {
  display: block;
  color: var(--accent);
  font-size: 36px;
  margin-bottom: 18px;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.badge {
  border-radius: 99px;
  background: var(--tint);
  color: var(--accent);
  padding: 6px 11px;
  font-size: 11px;
  font-weight: 700;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
}
.toolbar > span {
  font-size: 12px;
  color: var(--muted);
}
.privacy {
  font-size: 12px;
  color: var(--muted);
  max-width: 850px;
  margin: 16px 0 24px;
}
.file-button {
  position: relative;
  overflow: hidden;
}
.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.center-tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 8px 0 20px;
}
.center-tabs button {
  white-space: nowrap;
}
.center-tabs button[aria-pressed="true"] {
  background: var(--tint);
  border-color: var(--accent);
  color: var(--accent);
}
.workspace {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 650px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: none;
  overflow: hidden;
}
.sidebar {
  padding: 26px 18px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.sidebar nav {
  display: grid;
  gap: 8px;
  margin-top: 26px;
}
.sidebar nav button {
  justify-content: flex-start;
  background: transparent;
  border-color: transparent;
}
.sidebar nav button[aria-pressed="true"] {
  background: var(--tint);
  color: var(--accent);
  font-weight: 700;
}
.sidebar-note {
  padding: 24px 10px;
  margin-top: 55px;
  color: var(--muted);
  font-size: 12px;
}
.sidebar-note strong {
  font-size: 22px;
  color: var(--ink);
}
.panel {
  padding: 30px;
  min-width: 0;
}
h2 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.7px;
  margin: 0 0 12px;
}
h3 {
  font-size: 17px;
  line-height: 1.4;
  margin: 0 0 8px;
}
h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}
.muted {
  color: var(--muted);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 24px;
}
.section-head p {
  margin: 5px 0 0;
}
.field {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin: 14px 0;
}
.field input,
.field textarea,
.field select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 400;
}
.field textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
}
.field textarea.tall {
  min-height: 300px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.grid .wide {
  grid-column: 1/-1;
}
.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  margin: 16px 0;
}
.card p {
  margin: 8px 0;
}
.card .actions {
  margin-top: 16px;
}
.card small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.article-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
}
.empty {
  padding: 42px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
}
.notice {
  padding: 16px 20px;
  border: 1px solid var(--accent);
  background: var(--tint);
  border-radius: 12px;
  margin: 16px 0;
  overflow-wrap: anywhere;
}
.notice p {
  margin: 0 0 12px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  margin: 14px 0;
}
.check input {
  width: 18px;
  height: 18px;
}
.status {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
}
.details {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 24px;
}
.source-text {
  white-space: pre-wrap;
  max-height: 240px;
  overflow: auto;
  background: var(--bg);
  padding: 16px;
  font:
    12px/1.6 ui-monospace,
    monospace;
  border-radius: 8px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat {
  background: var(--soft);
  padding: 18px;
  border-radius: 12px;
}
.stat strong {
  display: block;
  font-size: 28px;
}
.stat span {
  font-size: 11px;
  color: var(--muted);
}
dialog {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  max-width: 720px;
  width: calc(100% - 32px);
  padding: 28px;
  max-height: 90vh;
}
dialog::backdrop {
  background: #07172199;
  backdrop-filter: blur(4px);
}
dialog .actions {
  margin-top: 24px;
  justify-content: flex-end;
}
#reader {
  max-width: 850px;
}
#reader-content {
  font-size: 16px;
}
#reader-content pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--soft);
  padding: 16px;
  border-radius: 10px;
}
#reader-content p {
  white-space: pre-wrap;
}
#reader-content h2 {
  font-size: 23px;
  margin-top: 30px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 0 50px;
  font-size: 11px;
  color: var(--muted);
}
.skip {
  position: absolute;
  top: -100px;
  left: 20px;
}
.skip:focus {
  top: 10px;
  padding: 12px;
  background: var(--surface);
  z-index: 20;
}
#print-content {
  display: none;
}
@media (max-width: 800px) {
  main {
    padding: 0 20px;
  }
  header {
    padding: 22px 20px;
  }
  .hero {
    grid-template-columns: 1fr 210px;
    gap: 25px;
  }
  .hero-note {
    padding: 22px;
  }
  .workspace {
    grid-template-columns: 150px minmax(0, 1fr);
  }
  .panel {
    padding: 22px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .brand span,
  .badge {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 20px 0 26px;
  }
  .hero-note {
    display: none;
  }
  .lede {
    font-size: 15px;
  }
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .toolbar .actions {
    gap: 6px;
  }
  .toolbar button,
  .toolbar .file-button {
    font-size: 11px;
    padding: 8px 10px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .sidebar {
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .eyebrow,
  .sidebar-note {
    display: none;
  }
  .sidebar nav {
    display: flex;
    margin: 0;
    gap: 5px;
    flex-wrap: wrap;
  }
  .sidebar nav button {
    font-size: 11px;
    padding: 7px 9px;
  }
  .panel {
    padding: 20px 16px;
  }
  .section-head {
    flex-direction: column;
  }
  .article-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .stat-grid {
    gap: 7px;
  }
  .stat {
    padding: 10px;
  }
  .stat strong {
    font-size: 23px;
  }
  footer {
    flex-direction: column;
  }
  .card {
    padding: 16px;
  }
  .brand {
    font-size: 18px;
  }
  h1 {
    letter-spacing: -1.6px;
  }
}
@media print {
  body {
    background: #fff;
    color: #172b39;
  }
  body > * {
    display: none !important;
  }
  #print-content {
    display: block !important;
    background: #fff;
    color: #172b39;
    padding: 12px;
    font: 14px/1.65 system-ui;
  }
  #print-content h1 {
    font-size: 32px;
    letter-spacing: -1px;
  }
  #print-content h2 {
    font-size: 20px;
    break-after: avoid;
  }
  #print-content p {
    white-space: pre-wrap;
  }
  #print-content pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  #print-content a {
    color: #172b39;
  }
}

.product-guide {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.guide {
  max-width: 960px;
}
.guide section {
  margin-top: 48px;
  scroll-margin-top: 24px;
}
.guide h1 {
  margin-top: 40px;
}
code {
  overflow-wrap: anywhere;
}
#release-selector {
  margin-bottom: 20px;
}
#release-selector .field {
  margin: 0;
  min-width: 200px;
}
dialog p {
  white-space: pre-wrap;
}
#panel:focus {
  outline: none;
}
#modal-content h2 {
  margin-top: 0;
}
.product-guide .card {
  margin: 8px 0;
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

.page-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; padding:24px 0; border-bottom:1px solid var(--line); margin-bottom:20px; }
.page-heading h1, .guide h1 { font-size:clamp(28px,3vw,40px); letter-spacing:-.8px; line-height:1.2; margin:0; overflow-wrap:anywhere; }
.page-heading p { margin:6px 0 0; color:var(--muted); }
.product-guide { margin-top:40px; padding-top:28px; }
.product-guide .card { border:0; border-radius:0; padding:12px 0; background:transparent; }
.field, .grid > *, .section-head > *, .actions > *, .page-heading > * { min-width:0; max-width:100%; }
h2, h3, button, .file-button, .brand, .badge { overflow-wrap:anywhere; }
button, .file-button { white-space:normal; }
@media(max-width:600px) { .page-heading { align-items:flex-start; } .badge { display:inline-block; } header { flex-wrap:wrap; } }
