@font-face {
  font-family: "IBM Plex Sans SC";
  src: url("./assets/fonts/IBMPlexSansSC-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans SC";
  src: url("./assets/fonts/IBMPlexSansSC-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans SC";
  src: url("./assets/fonts/IBMPlexSansSC-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./assets/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("./assets/fonts/IBMPlexSans-Light.ttf") format("truetype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

:root,
body.converter-choice-page,
body.converter-gtk,
body.converter-kde,
body.converter-typora {
  color-scheme: light;
  --bg: #f4f4f4;
  --surface: #ffffff;
  --surface-alt: #f4f4f4;
  --fg: #161616;
  --muted: #525252;
  --faint: #6f6f6f;
  --line: #e0e0e0;
  --accent: #0f62fe;
  --accent-hover: #0043ce;
  --accent-soft: #edf5ff;
  --blue: #0f62fe;
  --blue-soft: #d0e2ff;
  --success: #24a148;
  --danger: #da1e28;
  --radius: 0;
  --pill: 0;
  --page: 99rem;
  --narrow: 66rem;
  --sans: "IBM Plex Sans", "IBM Plex Sans SC", "Noto Sans CJK SC",
    "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "Noto Sans Mono CJK SC", monospace;
  --shadow: none;
  --wordmark-filter: invert(1);
}

html {
  font-size: 16px;
  scroll-padding-top: 48px;
}

body {
  background: #f4f4f4;
  color: #161616;
  font-family: var(--sans);
  line-height: 1.5;
  letter-spacing: 0;
}

::selection {
  background: #0f62fe;
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid #0f62fe;
  outline-offset: 2px;
}

img {
  border-radius: 0;
}

a {
  color: #0f62fe;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: #0043ce;
}

button,
input,
select {
  border-radius: 0;
  font-family: var(--sans);
}

.shell {
  width: min(var(--narrow), calc(100% - 64px));
}

.shell.wide {
  width: min(var(--page), calc(100% - 64px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #393939 !important;
  background: #161616 !important;
  color: #f4f4f4;
}

.availability {
  padding: 8px 32px !important;
  background: #0f62fe !important;
  color: #ffffff !important;
  font-family: var(--mono);
  font-size: 12px;
  text-align: center;
}

.bar {
  width: min(var(--page), calc(100% - 32px)) !important;
  min-height: 48px !important;
  gap: 24px;
}

.brand {
  gap: 10px;
  padding: 0 16px;
  border-right: 1px solid #393939;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 600;
}

.brand-mark {
  display: block;
  width: 18px;
  height: 18px;
  background: #0f62fe;
}

.brand-name {
  color: #ffffff;
}

nav {
  gap: 0;
}

nav a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 0 14px;
  border-radius: 0 !important;
  color: #f4f4f4 !important;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
}

nav a:hover,
nav a[aria-current="page"] {
  background: #2c2c2c !important;
  color: #ffffff !important;
  box-shadow: inset 0 -2px 0 #0f62fe;
  text-decoration: none;
}

.button {
  min-height: 48px;
  padding: 0 48px 0 16px;
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  background: #393939 !important;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transform: none !important;
}

.button::after {
  position: absolute;
  right: 16px;
  content: "→";
}

.button:hover {
  background: #4c4c4c !important;
  color: #ffffff !important;
}

.button.primary,
.button.small {
  border-color: #0f62fe !important;
  background: #0f62fe !important;
  color: #ffffff !important;
}

.button.primary:hover,
.button.small:hover {
  border-color: #0043ce !important;
  background: #0043ce !important;
}

.converter-page,
.converter-choice-page {
  background: #f4f4f4;
}

.converter-hero,
.converter-choice-hero {
  padding: 64px 0 40px;
  text-align: left;
}

.converter-hero h1,
.converter-choice-hero h1,
.kde-hero h1 {
  margin: 0;
  color: #161616;
  font-family: var(--sans);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0;
}

.converter-hero .lead,
.converter-choice-hero .lead,
.kde-hero .lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: #525252;
  font-size: 18px;
  line-height: 1.6;
}

.converter-choice-icon {
  width: 48px;
  height: 48px;
  margin: 0 0 24px;
}

.eyebrow {
  margin-bottom: 16px;
  color: #0f62fe;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.32px;
}

.kde-hero {
  gap: 1px;
  padding: 64px 0 40px;
  border: 1px solid #e0e0e0;
  background: #e0e0e0;
}

.kde-hero-copy {
  padding: 40px;
  background: #ffffff;
}

.kde-art {
  min-height: 360px;
  border: 0;
  border-radius: 0;
  background: #161616 !important;
  box-shadow: none;
}

.kde-art-window,
.kde-art-panel,
.kde-facts span {
  border-radius: 0;
  box-shadow: none;
}

.kde-art-window {
  border-color: #6f6f6f;
}

.kde-art-dot {
  border-radius: 0;
}

.kde-facts span {
  border: 0;
  border-left: 3px solid #0f62fe;
  background: #f4f4f4;
  color: #161616;
  font-family: var(--mono);
}

.converter-choices {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding-top: 0;
  border: 1px solid #e0e0e0;
  background: #e0e0e0;
}

.converter-choice,
.gtk-choice,
.kde-choice,
.typora-choice {
  min-height: 520px;
  border: 0;
  border-radius: 0;
  background: #ffffff !important;
}

.converter-choice:hover {
  background: #edf5ff !important;
  box-shadow: none;
  transform: none;
}

.choice-label,
.kde-choice .choice-label,
.typora-choice .choice-label {
  padding: 6px 10px;
  border: 0;
  border-radius: 0;
  background: #161616;
  color: #ffffff;
  font-family: var(--mono);
}

.choice-window,
.choice-window-a,
.choice-window-b,
.gtk-choice .choice-window,
.kde-choice .choice-window,
.typora-choice .choice-window {
  border: 1px solid #6f6f6f;
  border-radius: 0;
  background: linear-gradient(#161616 0 24px, #ffffff 25px);
  box-shadow: none;
}

.choice-window::before,
.choice-window::after,
.kde-choice .choice-window::before,
.kde-choice .choice-window::after {
  border-radius: 0;
  background: #78a9ff;
}

.choice-accent,
.kde-choice .choice-accent,
.typora-choice .choice-accent {
  border-radius: 0;
  background: #0f62fe;
  box-shadow: none;
  transform: rotate(8deg);
}

.converter-choice strong {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
}

.converter-choice > span:not(.choice-label, .choice-visual) {
  color: #525252;
  font-size: 14px;
  line-height: 1.57;
}

.converter-choice em {
  color: #0f62fe;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
}

.converter-choice-note {
  padding: 24px 0 80px;
  color: #525252;
  font-size: 14px;
  text-align: left;
}

.supported-format {
  margin-top: 24px;
  padding: 8px 12px;
  border-radius: 0;
  background: #161616;
  color: #ffffff;
  font-family: var(--mono);
  font-size: 12px;
}

.converter-workspace {
  gap: 1px;
  border: 1px solid #e0e0e0;
  background: #e0e0e0;
}

.converter-card,
.supported-card,
.nota-preview {
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.converter-card-inner,
.supported-card {
  padding: 24px;
}

.drop-zone {
  min-height: 280px;
  border: 1px dashed #6f6f6f;
  border-radius: 0;
  background: #f4f4f4;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: #0f62fe;
  background: #edf5ff;
  transform: none;
}

.drop-icon {
  width: 48px;
  height: 48px;
  border-radius: 0;
  background: #0f62fe;
  color: #ffffff;
}

.drop-zone h2,
.result-head h3,
.supported-card h3 {
  color: #161616;
  font-weight: 600;
}

.drop-zone p,
.privacy-note,
.result-head p,
.supported-card p,
.example-links {
  color: #525252;
  font-size: 14px;
  line-height: 1.57;
}

.converter-status {
  border-left: 3px solid #8d8d8d;
  border-radius: 0;
  background: #f4f4f4;
  color: #525252;
  font-size: 14px;
}

.converter-status[data-kind="success"] {
  border-left-color: #24a148;
}

.converter-status[data-kind="error"] {
  border-left-color: #da1e28;
}

.mode-switch,
.output-switch {
  padding: 0;
  border: 1px solid #e0e0e0;
  border-radius: 0;
  background: transparent;
}

.mode-switch button,
.output-switch button {
  border-radius: 0;
  font-weight: 400;
}

.mode-switch button[aria-pressed="true"],
.output-switch button[aria-pressed="true"] {
  background: #0f62fe;
  color: #ffffff;
  box-shadow: none;
}

.token-chip {
  border-radius: 0;
}

.result-actions .button {
  flex: 0 1 220px;
}

.preview-chrome {
  height: 40px;
  border-color: #393939;
  background: #161616;
}

.preview-chrome i {
  border-radius: 0;
  background: #78a9ff;
}

.preview-chrome strong {
  color: #f4f4f4;
}

.preview-sidebar span,
.preview-toolbar i,
.preview-editor code {
  border-radius: 0;
}

footer {
  margin-top: 64px;
  padding: 24px max(32px, calc((100vw - var(--page)) / 2));
  border-top: 1px solid #393939;
  background: #161616;
  color: #c6c6c6;
  font-size: 14px;
}

footer a {
  color: #78a9ff;
}

@media (max-width: 1100px) {
  .converter-choices {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .converter-workspace,
  .kde-hero {
    grid-template-columns: 1fr;
  }

  .kde-hero {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .shell,
  .shell.wide,
  .bar {
    width: calc(100% - 32px) !important;
  }

  nav {
    display: none;
  }

  .converter-hero,
  .converter-choice-hero {
    padding-top: 40px;
  }

  .converter-hero h1,
  .converter-choice-hero h1,
  .kde-hero h1 {
    font-size: 38px;
  }

  .kde-hero-copy {
    padding: 24px;
  }
}
