/* src/theme/lothal-theme.css */
.lothal-surface {
  --paper: #f7f8fa;
  --paper-deep: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --ink: #0e1626;
  --ink-90: rgba(14, 22, 38, 0.9);
  --ink-mute: #4b586f;
  --ink-soft: #5d6d87;
  --ink-quiet: #8695ac;
  --ink-faint: rgba(14, 22, 38, 0.2);
  --border: #dfe4ec;
  --border-strong: #c2cbda;
  --accent-1: #1b4ed8;
  --accent-2: #1a7cc4;
  --accent-3: #0e9db4;
  --accent: #1870b2;
  --accent-soft: rgba(24, 112, 178, 0.1);
  --accent-ink: #14639e;
  --accent-fg: #ffffff;
  --accent-grad-2: #1979c0;
  --accent-grad:
    linear-gradient(
      96deg,
      var(--accent-1),
      var(--accent-grad-2));
  --accent-grad-fg: #ffffff;
  --warn: #9a5f0d;
  --success: #2c7a51;
  --danger: #d41e24;
  --danger-soft: rgba(212, 30, 36, 0.1);
  --scrim: rgba(14, 22, 38, 0.45);
  --state-draft: var(--ink-soft);
  --state-ratified: #598bc8;
  --state-in-progress: #b0802b;
  --state-in-verification: #bd6dac;
  --state-verified: #4d9768;
  --state-failed: #d6584a;
  --state-invalidated: #be792d;
  --minimap-mask: rgba(14, 22, 38, 0.07);
  --shadow: 0 1px 2px rgb(14 22 38 / 0.06), 0 8px 24px -12px rgb(14 22 38 / 0.18);
  --display:
    "Inter Tight",
    "Inter",
    ui-sans-serif,
    system-ui,
    sans-serif;
  --serif: var(--display);
  --sans:
    "Inter",
    ui-sans-serif,
    system-ui,
    sans-serif;
  --mono:
    "JetBrains Mono",
    ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  --pad: 16px;
  --gap: 12px;
  --row-h: 36px;
  --radius-sm: 7px;
  --radius: 10px;
  --radius-lg: 14px;
  position: relative;
  height: 100%;
  color-scheme: light;
  scrollbar-color: var(--ink-faint) transparent;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.lothal-surface[data-theme=dark] {
  --paper: #0b1220;
  --paper-deep: #070d18;
  --surface: #121b2c;
  --surface-2: #18243a;
  --ink: #e8edf6;
  --ink-90: rgba(232, 237, 246, 0.92);
  --ink-mute: #a5b2c8;
  --ink-soft: #7d8da8;
  --ink-quiet: #5d6e8c;
  --ink-faint: rgba(232, 237, 246, 0.2);
  --border: #22314d;
  --border-strong: #33456a;
  --accent-1: #2563f0;
  --accent-2: #2e93e6;
  --accent-3: #1fd2e8;
  --accent: #2e93e6;
  --accent-soft: rgba(46, 147, 230, 0.16);
  --accent-ink: #7cc2f2;
  --accent-fg: #06101f;
  --accent-grad-2: #1878c8;
  --warn: #d9a036;
  --success: #4e9b6a;
  --danger: #e85f63;
  --danger-soft: rgba(232, 95, 99, 0.16);
  --scrim: rgba(2, 6, 14, 0.62);
  --state-ratified: #5b8dc9;
  --state-in-progress: #cf9a3a;
  --state-in-verification: #c074b0;
  --state-verified: #4e9a6a;
  --state-failed: #d6584a;
  --state-invalidated: #d08738;
  --minimap-mask: rgba(0, 0, 0, 0.42);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 8px 24px -12px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}
.lothal-surface[data-density=compact] {
  --pad: 12px;
  --gap: 8px;
  --row-h: 30px;
}
.lothal-surface[data-density=comfy] {
  --pad: 22px;
  --gap: 16px;
  --row-h: 42px;
}
.lothal-surface__content {
  position: relative;
  z-index: 1;
  height: 100%;
}
.lothal-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(
      900px 620px at 88% -6%,
      color-mix(in srgb, var(--accent-3) 10%, transparent),
      transparent 62%),
    radial-gradient(
      780px 560px at 4% 8%,
      color-mix(in srgb, var(--accent-1) 12%, transparent),
      transparent 64%);
  z-index: 0;
}
.lothal-surface:not([data-theme=dark])::before {
  opacity: 0.55;
}
.lothal-surface--plain::before {
  display: none;
}
.lothal-surface :is(h1, h2, h3, h4) {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
.lothal-surface h1 {
  font-weight: 700;
  letter-spacing: -0.025em;
}
.lothal-surface .lothal-rule {
  height: 1px;
  border: 0;
  background:
    linear-gradient(
      90deg,
      var(--border) 0 47%,
      transparent 47% 53%,
      var(--border) 53% 100%);
}
.lothal-surface ::selection {
  background: var(--accent-soft);
  color: var(--ink);
}
.lothal-surface *::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.lothal-surface *::-webkit-scrollbar-track {
  background: transparent;
}
.lothal-surface *::-webkit-scrollbar-thumb {
  background: var(--ink-faint);
  border-radius: 5px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.lothal-surface *::-webkit-scrollbar-thumb:hover {
  background: var(--ink-soft);
  background-clip: content-box;
  border: 2px solid transparent;
}
.lothal-surface .mono {
  font-family: var(--mono);
  font-variant-ligatures: none;
}
.lothal-surface .serif {
  font-family: var(--serif);
}
.lothal-surface .label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lothal-surface .lothal-btn--primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.lothal-surface .lothal-btn--accent {
  background: var(--accent-grad);
  color: var(--accent-grad-fg);
  border-color: transparent;
}
.lothal-surface .lothal-btn--secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}
.lothal-surface .lothal-btn--ghost {
  background: transparent;
  color: var(--ink-mute);
  border-color: transparent;
}
.lothal-surface .lothal-btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.lothal-surface .lothal-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.lothal-surface .lothal-btn--accent:hover:not(:disabled) {
  filter: brightness(1.12);
}
.lothal-surface .lothal-btn--primary:hover:not(:disabled) {
  background: var(--ink-90);
  border-color: var(--ink-90);
}
.lothal-surface .lothal-btn--secondary:hover:not(:disabled),
.lothal-surface .lothal-btn--outline:hover:not(:disabled) {
  border-color: var(--accent);
}
.lothal-surface .lothal-btn--ghost:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--ink);
}
.lothal-surface .lothal-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  color: var(--ink-mute);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px 5px 6px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.45s ease;
}
.lothal-surface .lothal-theme-toggle:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}
.lothal-surface .lothal-theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.lothal-surface .lothal-theme-fill {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex: none;
}
.lothal-surface .lothal-theme-fill::after {
  content: "";
  position: absolute;
  left: -25%;
  right: -25%;
  bottom: 0;
  height: 22%;
  background:
    linear-gradient(
      180deg,
      var(--accent-3),
      var(--accent-1));
  transition: height 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.lothal-surface[data-theme=dark] .lothal-theme-fill::after {
  height: 78%;
}
@keyframes lothal-blink {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}
.lothal-surface .caret::after {
  content: "\258d";
  color: var(--accent);
  margin-left: 2px;
  animation: lothal-blink 1s steps(2, end) infinite;
  font-weight: 400;
}
@keyframes lothal-pulse-soft {
  0%, 100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}
.lothal-surface .pulse {
  animation: lothal-pulse-soft 1.4s ease-in-out infinite;
}
@keyframes lothal-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.lothal-surface .fade-up {
  animation: lothal-fade-in-up 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .lothal-surface .pulse,
  .lothal-surface .caret::after {
    animation: none;
  }
  .lothal-surface .pulse {
    opacity: 1;
  }
  .lothal-surface .fade-up {
    animation-duration: 0.01ms;
  }
  .lothal-surface .lothal-theme-fill::after,
  .lothal-surface .lothal-theme-toggle,
  .lothal-surface .lothal-btn,
  .lothal-surface .lothal-file-row,
  .lothal-surface .lothal-artifact-nav-item,
  .lothal-surface .lothal-composer-send,
  .lothal-surface .lothal-iconbtn,
  .lothal-surface .lothal-input {
    transition-duration: 0.01ms;
  }
}
.lothal-d2-canvas {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--paper-deep);
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.lothal-d2-canvas:active {
  cursor: grabbing;
}
.lothal-d2-holder {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}
.lothal-d2-holder svg {
  display: block;
  width: 100%;
  height: 100%;
}
.lothal-d2-controls {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
}
.lothal-d2-controls button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  background: var(--surface);
  color: var(--ink-mute);
  border: none;
  cursor: pointer;
}
.lothal-d2-controls button + button {
  border-top: 1px solid var(--border);
}
.lothal-d2-controls button:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.lothal-artifact-nav {
  width: 208px;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--paper);
  padding: 10px 8px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lothal-artifact-nav-filter {
  margin: 0 4px 8px;
  padding: 5px 9px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
}
.lothal-artifact-nav-section {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 10px;
}
.lothal-artifact-nav-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 8px 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.lothal-artifact-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 5px 8px;
  font-size: 12.5px;
  text-align: left;
  border: none;
  border-left: 2px solid transparent;
  border-radius: 0 7px 7px 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.lothal-artifact-nav-item:hover {
  color: var(--ink);
  background: var(--surface-2);
}
.lothal-artifact-nav-item.is-active {
  color: var(--ink);
  background: var(--surface);
  border-left-color: var(--accent);
}
.lothal-artifact-nav-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lothal-artifact-nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.lothal-cap-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.lothal-cap-card.is-focused {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
}
.lothal-cap-chip {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink-soft);
  white-space: nowrap;
}
.lothal-adr-scroll {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  background: var(--paper);
}
.lothal-adr {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px var(--pad) 48px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
}
.lothal-adr > :first-child {
  margin-top: 0;
}
.lothal-adr h1,
.lothal-adr h2,
.lothal-adr h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.25;
  margin: 1.4em 0 0.5em;
}
.lothal-adr h1 {
  font-size: 1.7em;
}
.lothal-adr h2 {
  font-size: 1.32em;
}
.lothal-adr h3 {
  font-size: 1.12em;
}
.lothal-adr p,
.lothal-adr ul,
.lothal-adr ol,
.lothal-adr blockquote,
.lothal-adr table {
  margin: 0 0 0.9em;
}
.lothal-adr ul,
.lothal-adr ol {
  padding-left: 1.4em;
}
.lothal-adr li {
  margin: 0.25em 0;
}
.lothal-adr a {
  color: var(--accent);
  text-decoration: underline;
}
.lothal-adr code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 5px;
}
.lothal-adr pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  overflow-x: auto;
  margin: 0 0 0.9em;
}
.lothal-adr pre code {
  background: none;
  padding: 0;
}
.lothal-adr blockquote {
  border-left: 3px solid var(--border);
  padding-left: 14px;
  color: var(--ink-soft);
}
.lothal-adr table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}
.lothal-adr th,
.lothal-adr td {
  border: 1px solid var(--border);
  padding: 6px 10px;
  text-align: left;
}
.lothal-adr th {
  background: var(--surface-2);
}
.lothal-composer {
  position: relative;
  border-top: 1px solid var(--border);
  background: var(--paper);
  padding: 12px var(--pad) 14px;
}
.lothal-command-menu {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: calc(100% - 12px);
  z-index: 20;
  margin: 0 0 6px;
  padding: 4px;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}
.lothal-command-menu li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-soft);
}
.lothal-command-menu li .mono {
  flex: 0 0 auto;
  color: var(--ink);
}
.lothal-command-menu li[aria-selected=true] {
  background: var(--surface-2);
}
.lothal-composer-box {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
}
.lothal-composer-editor {
  flex: 1;
  min-height: 24px;
  max-height: 160px;
  overflow-y: auto;
  outline: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  padding: 4px;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: anywhere;
}
.lothal-composer-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-soft);
  pointer-events: none;
}
.lothal-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0 1px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  white-space: nowrap;
  user-select: none;
  cursor: default;
}
.lothal-composer-send {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-fg);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lothal-composer-send:hover:not(:disabled) {
  filter: brightness(1.12);
}
.lothal-composer-send:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.lothal-composer-send:disabled {
  background: var(--surface-2);
  color: var(--ink-soft);
  cursor: not-allowed;
}
.lothal-composer-hint {
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--ink-soft);
}
.lothal-surface {
  --diff-font-family: var(--mono);
  --diff-background-color: transparent;
  --diff-text-color: var(--ink-90);
  --diff-code-insert-background-color: color-mix( in srgb, var(--state-verified) 22%, transparent );
  --diff-code-insert-text-color: var(--ink);
  --diff-code-delete-background-color: color-mix( in srgb, var(--state-failed) 19%, transparent );
  --diff-code-delete-text-color: var(--ink);
  --diff-code-insert-edit-background-color: color-mix( in srgb, var(--state-verified) 34%, transparent );
  --diff-code-insert-edit-text-color: var(--ink);
  --diff-code-delete-edit-background-color: color-mix( in srgb, var(--state-failed) 30%, transparent );
  --diff-code-delete-edit-text-color: var(--ink);
  --diff-gutter-insert-background-color: color-mix( in srgb, var(--state-verified) 24%, transparent );
  --diff-gutter-insert-text-color: var(--ink-mute);
  --diff-gutter-delete-background-color: color-mix( in srgb, var(--state-failed) 22%, transparent );
  --diff-gutter-delete-text-color: var(--ink-mute);
  --diff-code-selected-background-color: var(--accent-soft);
  --diff-code-selected-text-color: var(--ink);
  --diff-gutter-selected-background-color: var(--accent-soft);
  --diff-gutter-selected-text-color: var(--ink);
  --diff-selection-background-color: var(--accent-soft);
  --diff-selection-text-color: var(--ink);
  --diff-omit-gutter-line-color: var(--border-strong);
}
.lothal-surface .diff {
  font-size: 11.5px;
  line-height: 1.55;
}
.lothal-surface .diff-gutter {
  padding: 0 8px;
  min-width: 34px;
  text-align: right;
  color: var(--ink-soft);
  user-select: none;
}
.lothal-surface .diff-gutter-insert,
.lothal-surface .diff-gutter-delete {
  color: var(--ink-mute);
}
.lothal-surface .diff-code {
  padding: 0 10px;
  white-space: pre-wrap;
  word-break: break-word;
}
.lothal-surface .diff-code-normal {
  color: var(--ink-mute);
}
.lothal-surface .diff-code-insert,
.lothal-surface .diff-code-delete {
  color: var(--ink);
}
.lothal-surface .diff-hunk-header {
  background: var(--surface-2);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 3px 10px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.lothal-surface .monaco-editor,
.lothal-surface .monaco-editor .monaco-editor-background,
.lothal-surface .monaco-editor .margin,
.lothal-surface .monaco-editor-background {
  background-color: var(--paper-deep);
}
.lothal-surface .monaco-editor .line-numbers {
  color: var(--ink-soft);
}
.lothal-surface .monaco-editor .current-line ~ .line-numbers,
.lothal-surface .monaco-editor .active-line-number {
  color: var(--ink-mute);
}
.lothal-surface .monaco-editor .decorationsOverviewRuler {
  background-color: transparent;
}
.lothal-file-row {
  transition: background 0.12s ease;
}
.lothal-file-row:hover:not([data-active=true]) {
  background: var(--surface-2) !important;
}
.lothal-file-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.lothal-surface .lothal-input {
  min-height: var(--row-h);
  padding: 8px 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lothal-surface .lothal-input::placeholder {
  color: var(--ink-soft);
}
.lothal-surface .lothal-input:hover:not(:disabled):not(:focus) {
  border-color: var(--ink-faint);
}
.lothal-surface .lothal-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.lothal-surface .lothal-input--sm {
  min-height: calc(var(--row-h) - 8px);
  padding: 5px 8px;
  font-size: 12.5px;
}
.lothal-surface .lothal-input--lg {
  min-height: calc(var(--row-h) + 4px);
  font-size: 14px;
}
.lothal-surface .lothal-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.lothal-surface .lothal-input[aria-invalid=true] {
  border-color: var(--danger);
}
.lothal-surface .lothal-input[aria-invalid=true]:focus {
  box-shadow: 0 0 0 3px var(--danger-soft);
}
.lothal-surface .lothal-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-mute);
  cursor: pointer;
  transition:
    background 0.12s ease,
    color 0.12s ease,
    border-color 0.12s ease;
}
.lothal-surface .lothal-iconbtn:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--ink);
}
.lothal-surface .lothal-iconbtn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.lothal-surface .lothal-iconbtn[aria-pressed=true],
.lothal-surface .lothal-iconbtn.is-active {
  background: var(--accent-soft);
  color: var(--ink);
  border-color: var(--accent);
}
.lothal-surface .lothal-iconbtn[aria-pressed=true]:hover:not(:disabled),
.lothal-surface .lothal-iconbtn.is-active:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}
.lothal-surface .lothal-iconbtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.lothal-surface .lothal-reveal {
  opacity: 0;
  transition: opacity 0.12s ease;
}
.lothal-surface .lothal-reveal-host:hover .lothal-reveal,
.lothal-surface .lothal-reveal-host:focus-within .lothal-reveal,
.lothal-surface .lothal-reveal:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .lothal-surface .lothal-reveal {
    opacity: 1;
  }
}
.lothal-surface .lothal-scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--scrim);
}
.lothal-surface .lothal-dialog {
  width: 100%;
  max-width: 460px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: var(--pad);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.lothal-surface .lothal-step {
  background: transparent;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.lothal-surface .lothal-step[data-clickable=true]:hover {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.lothal-surface .lothal-step:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.lothal-surface .lothal-title {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
.lothal-surface .lothal-title--page {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.lothal-surface .lothal-title--pane {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.lothal-surface .lothal-title--modal {
  font-size: 19px;
}
.lothal-surface .lothal-title--section {
  font-size: 15px;
  letter-spacing: -0.01em;
}

/* src/landing.css */
html {
  scroll-padding-top: 76px;
}
body {
  margin: 0;
  background: #f7f8fa;
}
.lothal-surface.landing {
  height: auto;
  min-height: 100vh;
}
.landing a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.landing p code,
.landing h3 code {
  font-family: var(--mono);
  font-size: 0.9em;
  font-variant-ligatures: none;
  color: var(--ink);
  white-space: nowrap;
}
.landing-wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 28px;
}
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}
.landing-nav-inner {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.landing-nav-inner > a:first-child {
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.landing-nav nav {
  display: flex;
  gap: 4px;
}
.landing-nav nav a {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--ink-mute);
  text-decoration: none;
}
.landing-nav nav a:hover {
  color: var(--ink);
  background: var(--surface-2);
}
.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.landing-brand-product {
  padding-left: 10px;
  border-left: 1px solid var(--border-strong);
  color: var(--ink-mute);
  font-weight: 500;
}
.landing-hero {
  padding: 84px 0 76px;
}
.landing-hero h1 {
  font-size: clamp(38px, 5.2vw, 58px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 860px;
  text-wrap: balance;
}
.landing-lede {
  margin: 20px 0 0;
  font-size: 17.5px;
  line-height: 1.65;
  color: var(--ink-mute);
  max-width: 62ch;
}
.landing-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.landing-figure {
  margin: 60px 0 0;
}
.landing-frame {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0b1220;
  box-shadow: 0 1px 2px rgb(14 22 38 / 0.06), 0 24px 48px -24px rgb(14 22 38 / 0.22);
}
.landing-frame .lothal-surface {
  height: auto;
}
.landing-figure figcaption {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 0 28px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.landing-figure figcaption span:last-child {
  max-width: 68ch;
}
.why-window {
  font-size: 13px;
}
.why-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.why-bar-title {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.why-bar-crumb {
  margin-left: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}
.why-bar-state {
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 11px;
  color: var(--accent-ink);
}
.why-pane-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--ink-soft);
}
.why-pane-head .label {
  font-size: 10.5px;
}
.why-source {
  margin: 0;
  padding: 10px 0 12px;
  list-style: none;
  border-bottom: 1px solid var(--border);
  font: 12.5px/1.65 var(--mono);
  font-variant-ligatures: none;
  overflow-x: auto;
}
.why-source li {
  display: flex;
  padding: 0 18px;
  white-space: pre;
  color: var(--ink-mute);
}
.why-source li.is-asked {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
  color: var(--ink);
}
.why-ln {
  width: 28px;
  flex: none;
  color: var(--ink-quiet);
  user-select: none;
}
.why-source code {
  font: inherit;
}
.why-answer {
  margin: 0;
  padding: 14px 18px 18px;
  overflow-x: auto;
  font: 12.5px/1.65 var(--mono);
  font-variant-ligatures: none;
  white-space: pre;
  color: var(--ink-mute);
}
.why-cmd {
  color: var(--ink-soft);
}
.why-head {
  color: var(--ink);
  font-weight: 600;
}
.why-code {
  color: var(--ink);
}
.why-key {
  color: var(--accent-ink);
}
.why-prompt {
  color: var(--ink-90);
}
.landing-section {
  padding-block: 88px;
  border-top: 1px solid var(--border);
}
.landing-section h2 {
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.025em;
  line-height: 1.12;
  max-width: 680px;
  text-wrap: balance;
}
.landing-eyebrow {
  display: block;
  margin-bottom: 12px;
}
.landing-intro {
  margin: 14px 0 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-mute);
  max-width: 60ch;
}
.landing-grid {
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 36px 32px;
}
.landing-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.landing-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.landing-grid li {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.landing-number {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.landing-grid h3 {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.3;
}
.landing-grid p,
.landing-columns p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-mute);
}
.landing-grid .landing-term {
  margin-top: auto;
}
.landing-grid p + .landing-term {
  margin-top: 16px;
}
.landing-grid--3 p {
  flex: 1;
}
.landing-install {
  margin-top: 28px;
}
.landing-install .landing-code {
  padding: 14px 16px;
  font-size: 13px;
}
.landing-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}
.lothal-surface.landing-term {
  height: auto;
  background: none;
  border-radius: var(--radius);
}
.landing-code {
  margin: 0;
  padding: 11px 14px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font: 12.5px/1.65 var(--mono);
  font-variant-ligatures: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.landing-code code {
  font: inherit;
}
.landing-comment {
  color: var(--ink-soft);
}
.landing-columns {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px;
}
.landing-columns article {
  min-width: 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-strong);
}
.landing-columns h3 {
  font-size: 16.5px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.landing-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 40px;
}
.landing-footer .landing-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.landing-footer .landing-brand {
  font-size: 14px;
}
.landing-footer-meta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
}
.landing-footer-meta a {
  color: var(--ink-mute);
}
.landing-footer-meta a:hover {
  color: var(--ink);
}
.landing-footer .mono {
  font-size: 12px;
  color: var(--ink-soft);
}
@media (max-width: 1000px) {
  .landing-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  .landing-nav nav {
    display: none;
  }
  .landing-hero {
    padding-top: 56px;
  }
  .landing-section {
    padding-block: 64px;
  }
  .landing-grid--3,
  .landing-columns {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .landing-figure figcaption {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .why-bar-crumb {
    display: none;
  }
}
@media (max-width: 560px) {
  .landing-grid--4 {
    grid-template-columns: 1fr;
  }
  .landing-wrap {
    padding-inline: 20px;
  }
  .landing-figure {
    margin-top: 44px;
  }
  .why-source,
  .why-answer {
    font-size: 11.5px;
  }
}
