:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-soft: #eef4f2;
  --ink: #17211f;
  --muted: #687470;
  --line: #d9e0dc;
  --accent: #0f7b68;
  --accent-strong: #075f52;
  --warn: #9b5b00;
  --danger: #b62d3a;
  --good: #18703f;
  --shadow: 0 10px 30px rgba(20, 35, 30, 0.08);
  --code-font-size: 13px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
textarea,
a {
  font: inherit;
}

button {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

button:hover {
  border-color: #9cb8b1;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #163d37;
  color: #f5fbf8;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 19px;
  line-height: 1.1;
}

.brand p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.top-actions,
.inline-actions,
.tabs,
.view-actions,
.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tabs,
.view-actions {
  flex-wrap: wrap;
}

.icon-btn,
.inline-actions button,
.view-actions button,
.tab {
  padding: 0 12px;
}

.link-btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.case-menu {
  position: relative;
  display: inline-flex;
}

.case-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 128px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(24, 49, 44, 0.16);
}

.case-popover button {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  text-align: left;
}

.case-popover button:hover {
  background: #eef5f2;
}

.workspace {
  --input-width: 38%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(240px, var(--input-width)) 8px minmax(420px, 1fr);
  gap: 8px;
  padding: 12px;
}

.split-handle {
  align-self: stretch;
  border-radius: 999px;
  background: transparent;
  cursor: col-resize;
  position: relative;
}

.split-handle::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 3px;
  width: 2px;
  border-radius: 999px;
  background: #cfd9d5;
}

.split-handle:hover::before,
.split-handle.dragging::before {
  background: var(--accent);
}

.pane {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.result-pane {
  position: relative;
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
}

.pane-head {
  min-height: 54px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.pane-head h2 {
  font-size: 15px;
}

.pane-head span {
  display: inline-block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.result-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.result-meta-line .result-hint {
  color: #7a8582;
}

.result-meta-line .result-hint::before {
  content: "|";
  margin-right: 7px;
  color: #c1cbc7;
}

textarea {
  width: 100%;
  min-width: 0;
  min-height: 0;
  resize: none;
  border: 0;
  outline: 0;
  padding: 14px;
  color: #14201e;
  background: #fbfcfa;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: var(--code-font-size);
  line-height: 1.6;
}

.status-panel {
  margin: 10px 12px 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.status-panel.ok {
  border-color: #b8d8c6;
  background: #eff8f2;
  color: var(--good);
}

.status-panel.warn {
  border-color: #ead2a6;
  background: #fff8e8;
  color: var(--warn);
}

.status-panel.error {
  border-color: #efbdc2;
  background: #fff1f2;
  color: var(--danger);
}

.candidate-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px 0;
  overflow: visible;
}

.candidate-bar button {
  flex: 0 0 auto;
  height: 30px;
  background: #f8faf8;
  color: #41514d;
  font-size: 12px;
}

.candidate-bar button.active {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: #edf8f5;
}

.context-toggle {
  justify-self: start;
  width: fit-content;
  height: 30px;
  margin: 8px 12px 0;
  padding: 0 10px;
  border-color: #cfe0da;
  background: #f3faf7;
  color: #176a5d;
  font-size: 12px;
}

.context-popover {
  position: fixed;
  z-index: 20;
  width: min(720px, calc(100vw - 24px));
  max-height: min(420px, calc(100vh - 96px));
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid #cad9d4;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 50px rgba(20, 35, 30, 0.18);
  overflow: auto;
}

.context-popover-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 2px;
}

.context-popover-head strong {
  font-size: 13px;
}

.context-popover-head button {
  height: 26px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.context-popover > .context-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
}

.context-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px 0;
}

.context-popover strong {
  color: var(--muted);
  font-size: 12px;
}

.context-head button {
  height: 24px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.context-tokens {
  max-height: 96px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 7px 9px 9px;
  overflow: auto;
  color: #30413d;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: calc(var(--code-font-size) - 1px);
  line-height: 1.45;
}

.context-token {
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid #dfe8e4;
  border-radius: 5px;
  background: #ffffff;
  overflow-wrap: anywhere;
}

.context-empty {
  color: var(--muted);
}

.tool-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 160px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fbfcfa;
  color: var(--muted);
  font-size: 13px;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
}

.switches {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.font-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.font-controls button {
  width: 34px;
  height: 30px;
  padding: 0;
}

.font-controls span {
  min-width: 34px;
  text-align: center;
}

.switches label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.switches input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.switches input[type="number"] {
  width: 46px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 6px;
  background: #fff;
}

.tab.active {
  border-color: var(--accent);
  background: #eaf6f3;
  color: var(--accent-strong);
}

.view-stack {
  min-height: 0;
  min-width: 0;
  overflow: auto;
  background: #f4f7f5;
}

.tree-view,
.table-view,
.diff-view {
  padding: 10px;
}

.raw-view {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  padding: 14px;
  overflow: auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: var(--code-font-size);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-all;
  contain: inline-size;
}

.json-text-view {
  display: block;
  tab-size: 2;
}

.json-text-node.collapsed > .json-text-children,
.json-text-node.collapsed > .json-text-closing {
  display: none;
}

.json-text-line {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  padding-left: calc(var(--text-depth) * 20px);
  line-height: 1.62;
}

.json-text-line code {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.json-text-key {
  color: #1d5275;
  font-weight: 700;
}

.json-text-string {
  color: #8a4b12;
}

.json-text-number,
.json-text-boolean {
  color: #6741a1;
}

.json-text-null {
  color: #7b8790;
  font-style: italic;
}

.json-text-punctuation {
  color: #53625e;
}

.json-text-value {
  color: #30413d;
}

.json-text-toggle {
  width: 18px;
  height: 22px;
  margin-top: 1px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #48655e;
  font-family: inherit;
  line-height: 1;
  user-select: none;
  touch-action: manipulation;
}

.json-text-toggle:hover {
  background: #e5efeb;
}

.json-text-toggle.empty {
  pointer-events: none;
}

.tree-view {
  display: grid;
  gap: 1px;
}

.node {
  position: relative;
  min-height: 26px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  margin-left: calc(var(--depth) * 14px);
  padding: 2px 6px 2px 1px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: var(--code-font-size);
  line-height: 1.32;
}

.node::before {
  content: "";
  position: absolute;
  left: -8px;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: #dfe7e3;
  opacity: 0.85;
}

.node[style*="--depth: 0"]::before {
  display: none;
}

.node:hover {
  border-color: #d7e4df;
  background: #ffffff;
}

.container-node {
  background: rgba(255, 255, 255, 0.54);
}

.scalar-node {
  background: rgba(255, 255, 255, 0.3);
}

.tree-closing-node {
  min-height: 22px;
  background: transparent;
  color: #74817d;
}

.tree-closing-node:hover {
  border-color: transparent;
  background: transparent;
}

.node.hidden {
  display: none;
}

.twisty {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #47645e;
  font-size: 13px;
  user-select: none;
  touch-action: manipulation;
}

.twisty.empty {
  visibility: hidden;
}

.node-main {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 5px;
  overflow-wrap: normal;
}

.key {
  color: #1d5275;
  font-weight: 650;
  white-space: nowrap;
}

.string {
  color: #8a4b12;
}

.number,
.boolean {
  color: #6741a1;
}

.null {
  color: #7b8790;
}

.meta {
  color: #74817d;
  font-size: 12px;
}

.node-title {
  min-width: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

.node-separator {
  color: #97a5a1;
}

.tree-bracket {
  color: #53625e;
  font-weight: 800;
}

.value-preview {
  flex: 1 1 auto;
  min-width: 0;
  color: #30413d;
  overflow-wrap: anywhere;
}

.value-preview.editing {
  display: block;
  align-self: center;
}

.editable-token {
  cursor: text;
  border-radius: 4px;
}

.editable-token:hover {
  background: #eaf3ef;
  box-shadow: 0 0 0 2px #eaf3ef;
}

.inline-edit-input {
  width: 100%;
  min-width: 90px;
  max-width: 100%;
  height: 26px;
  padding: 2px 6px;
  border: 1px solid var(--accent);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  background: #eef1f0;
  color: #7a8582;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 5px;
  background: #f0f2f1;
  color: #7a8582;
  font-family: inherit;
  font-size: 11px;
}

.node-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  white-space: nowrap;
}

.copy-action {
  height: 22px;
  padding: 0 6px;
  border-color: #d2ddd9;
  background: #ffffff;
  font-size: 12px;
  color: #61706c;
}

.node:hover .node-actions,
.node:focus-within .node-actions {
  opacity: 1;
}

.match .node-main {
  background: #fff0bd;
  border-radius: 5px;
  padding: 1px 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--code-font-size);
}

th,
td {
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  position: sticky;
  top: 0;
  background: #eef4f2;
  z-index: 1;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.diff-input-row {
  display: grid;
  grid-template-columns: 160px minmax(240px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.diff-input-row > div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef4f2;
}

.diff-input-row strong,
.diff-input-row span {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.diff-input-row p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.diff-input-row label {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 120px;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.diff-input-row textarea {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.diff-summary {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfa;
  color: var(--muted);
  font-size: 13px;
}

.diff-result {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.git-diff-hunk {
  overflow: hidden;
  border: 1px solid #d7e0dc;
  border-radius: 8px;
  background: #fff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: var(--code-font-size);
}

.git-diff-hunk header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid #d7e0dc;
  background: #eef4f2;
  color: #53625e;
}

.git-diff-hunk header strong {
  color: #1f3d38;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.git-diff-hunk header em {
  margin-left: auto;
  color: #71807b;
  font-style: normal;
}

.git-diff-code {
  display: grid;
}

.git-diff-line {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 24px;
  line-height: 1.55;
}

.git-diff-line code {
  padding: 3px 10px 3px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.git-diff-sign {
  padding-top: 3px;
  text-align: center;
  user-select: none;
}

.git-diff-line.add {
  background: #e9f8ee;
  color: #143d26;
}

.git-diff-line.add .git-diff-sign {
  background: #d4f0dd;
  color: #176437;
}

.git-diff-line.del {
  background: #fff0f1;
  color: #5c1d24;
}

.git-diff-line.del .git-diff-sign {
  background: #f8d7da;
  color: #9f2835;
}

.json-body-diff {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #d7e0dc;
  border-radius: 8px;
  background: #fff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: var(--code-font-size);
}

.json-body-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 10px;
  border-bottom: 1px solid #d7e0dc;
  background: #eef4f2;
  color: #52615d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

.json-body-head:first-child,
.json-body-cell.left {
  border-right: 1px solid #d7e0dc;
}

.json-body-cell {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  min-height: 26px;
  line-height: 1.55;
  border-bottom: 1px solid #edf2f0;
}

.json-body-cell code {
  min-width: 0;
  padding: 3px 8px 3px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.json-prefix {
  padding-top: 3px;
  text-align: center;
  user-select: none;
}

.json-key {
  color: #1d5275;
  font-weight: 700;
}

.json-body-cell.added.right,
.json-body-cell.changed.right {
  background: #e9f8ee;
}

.json-body-cell.added.right .json-prefix,
.json-body-cell.changed.right .json-prefix {
  background: #d4f0dd;
  color: #176437;
}

.json-body-cell.removed.left,
.json-body-cell.changed.left {
  background: #fff0f1;
}

.json-body-cell.removed.left .json-prefix,
.json-body-cell.changed.left .json-prefix {
  background: #f8d7da;
  color: #9f2835;
}

.json-body-cell.added.left,
.json-body-cell.removed.right {
  background: #fafcfb;
  color: #a3afab;
}

.diff-row {
  display: grid;
  grid-template-columns: 88px minmax(140px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.diff-row.added {
  border-color: #b8d8c6;
  background: #f1f9f4;
}

.diff-row.removed {
  border-color: #efbdc2;
  background: #fff3f4;
}

.diff-row.changed {
  border-color: #ead2a6;
  background: #fff9ec;
}

.diff-kind {
  font-family: inherit;
  font-weight: 700;
}

.diff-path,
.diff-value {
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 6px;
  background: #14201e;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.toast.show {
  opacity: 1;
}

.compare-shell {
  min-height: 100vh;
}

.entry-shell {
  min-height: 100vh;
}

.entry-main {
  min-height: 0;
  display: grid;
  align-content: start;
  padding: 22px;
}

.entry-grid {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.entry-card {
  min-height: 128px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.entry-card:hover {
  border-color: #9cb8b1;
}

.entry-card strong {
  font-size: 18px;
}

.entry-card span {
  color: var(--muted);
  line-height: 1.6;
}

.home-shell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(15, 123, 104, 0.16), transparent 28%),
    radial-gradient(circle at 78% 10%, rgba(60, 92, 135, 0.16), transparent 30%),
    linear-gradient(135deg, #f7faf7 0%, #eef4f2 44%, #f9faf6 100%);
}

.home-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom-color: rgba(217, 224, 220, 0.72);
  background: rgba(255, 255, 255, 0.72);
}

.home-brand {
  color: inherit;
  text-decoration: none;
}

.link-btn.active,
.home-topbar .link-btn:hover {
  border-color: rgba(15, 123, 104, 0.34);
  background: #edf7f4;
  color: #0b5f52;
}

.home-hero {
  position: relative;
  min-height: clamp(560px, 74vh, 760px);
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 0.82fr);
  align-items: center;
  gap: 36px;
  padding: clamp(34px, 6vw, 74px);
}

.home-ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.home-light {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  filter: blur(14px);
  opacity: 0.56;
  animation: floatLight 9s ease-in-out infinite;
}

.home-light.one {
  left: 6%;
  top: 16%;
  background: rgba(15, 123, 104, 0.2);
}

.home-light.two {
  right: 8%;
  top: 8%;
  background: rgba(43, 74, 122, 0.18);
  animation-delay: -3s;
}

.home-light.three {
  right: 24%;
  bottom: 8%;
  background: rgba(169, 119, 44, 0.15);
  animation-delay: -6s;
}

.home-gridline {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(22, 61, 55, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 61, 55, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 82%, transparent);
  animation: gridDrift 20s linear infinite;
}

.home-copy,
.home-orbit,
.home-entry-section,
.profile-hero,
.profile-grid {
  position: relative;
  z-index: 1;
}

.home-eyebrow,
.home-card-kicker {
  display: inline-flex;
  width: max-content;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(15, 123, 104, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: #0c6658;
  font-size: 12px;
  font-weight: 800;
}

.home-copy h2 {
  max-width: 780px;
  margin-top: 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.02;
  font-weight: 850;
}

.home-copy p {
  max-width: 680px;
  margin-top: 20px;
  color: #53625e;
  font-size: 17px;
  line-height: 1.85;
}

.home-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.primary-link,
.secondary-link,
.card-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 750;
}

.primary-link {
  border: 1px solid #0f6e5e;
  background: #0f6e5e;
  color: #fff;
  box-shadow: 0 14px 34px rgba(15, 110, 94, 0.22);
}

.secondary-link,
.card-actions a {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
}

.home-orbit {
  min-height: 460px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 224, 220, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(238, 244, 242, 0.56)),
    radial-gradient(circle at 52% 50%, rgba(15, 123, 104, 0.1), transparent 36%);
  box-shadow: 0 28px 80px rgba(20, 35, 30, 0.14);
  overflow: hidden;
}

.home-orbit::before,
.home-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(15, 123, 104, 0.18);
  border-radius: 50%;
  animation: orbitSpin 18s linear infinite;
}

.home-orbit::before {
  width: 310px;
  height: 310px;
}

.home-orbit::after {
  width: 430px;
  height: 430px;
  animation-direction: reverse;
  animation-duration: 26s;
}

.orbit-core {
  width: 146px;
  height: 146px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(15, 123, 104, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 8px rgba(15, 123, 104, 0.06);
  color: #113d36;
  font-weight: 850;
}

.orbit-core span {
  font-size: 40px;
}

.orbit-core small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.orbit-dot {
  position: absolute;
  min-width: 64px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217, 224, 220, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #30504b;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 12px 28px rgba(20, 35, 30, 0.1);
  animation: bob 4s ease-in-out infinite;
}

.dot-a {
  left: 17%;
  top: 24%;
}

.dot-b {
  right: 13%;
  top: 34%;
  animation-delay: -1s;
}

.dot-c {
  left: 20%;
  bottom: 24%;
  animation-delay: -2s;
}

.dot-d {
  right: 21%;
  bottom: 18%;
  animation-delay: -3s;
}

.code-panel {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(217, 224, 220, 0.88);
  border-radius: 8px;
  background: rgba(18, 31, 29, 0.86);
  color: #e8f3ef;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
}

.code-panel code {
  white-space: nowrap;
}

.home-entry-section {
  padding: 6px clamp(20px, 6vw, 74px) 54px;
}

.section-title {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.section-title span {
  color: #0c6658;
  font-size: 12px;
  font-weight: 850;
}

.section-title h2 {
  font-size: 26px;
}

.home-entry-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.home-card {
  min-height: 218px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(217, 224, 220, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.home-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 123, 104, 0.34);
  box-shadow: 0 18px 42px rgba(20, 35, 30, 0.12);
}

.home-card.featured {
  grid-row: span 2;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(237, 247, 244, 0.9)),
    radial-gradient(circle at 90% 10%, rgba(15, 123, 104, 0.16), transparent 35%);
}

.home-card h3 {
  margin: 12px 0 0;
  font-size: 24px;
  line-height: 1.2;
}

.home-card p {
  margin-top: 12px;
  color: #5b6864;
  line-height: 1.75;
}

.visual-home {
  min-height: calc(100vh - 126px);
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(18px, 3vw, 32px);
  padding: clamp(24px, 4vw, 54px);
  background:
    linear-gradient(135deg, rgba(6, 17, 24, 0.94), rgba(10, 25, 31, 0.88)),
    radial-gradient(circle at 24% 20%, rgba(23, 151, 133, 0.24), transparent 34%),
    radial-gradient(circle at 78% 24%, rgba(179, 132, 54, 0.18), transparent 32%);
  isolation: isolate;
  overflow: hidden;
}

.visual-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.stage-grid {
  position: absolute;
  inset: -40px;
  background-image:
    linear-gradient(rgba(104, 184, 169, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 184, 169, 0.08) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: perspective(760px) rotateX(58deg) translateY(12%);
  transform-origin: center bottom;
  animation: stageGrid 12s linear infinite;
}

.stage-scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 48%,
    rgba(92, 221, 197, 0.26) 50%,
    rgba(255, 255, 255, 0.08) 52%,
    transparent 100%
  );
  opacity: 0.42;
  transform: translateY(-100%);
  animation: scanSweep 6.5s ease-in-out infinite;
}

.stage-beam {
  position: absolute;
  height: 2px;
  width: 68vw;
  background: linear-gradient(90deg, transparent, rgba(96, 228, 204, 0.86), transparent);
  filter: drop-shadow(0 0 12px rgba(96, 228, 204, 0.48));
  opacity: 0.8;
  transform-origin: center;
}

.beam-a {
  left: -10vw;
  top: 34%;
  --beam-rotate: 18deg;
  transform: rotate(18deg);
  animation: beamPulse 4.2s ease-in-out infinite;
}

.beam-b {
  right: -12vw;
  top: 58%;
  background: linear-gradient(90deg, transparent, rgba(238, 180, 84, 0.72), transparent);
  filter: drop-shadow(0 0 12px rgba(238, 180, 84, 0.42));
  --beam-rotate: -22deg;
  transform: rotate(-22deg);
  animation: beamPulse 5.4s ease-in-out infinite reverse;
}

.beam-c {
  left: 14vw;
  bottom: 16%;
  width: 44vw;
  background: linear-gradient(90deg, transparent, rgba(141, 164, 255, 0.68), transparent);
  filter: drop-shadow(0 0 14px rgba(141, 164, 255, 0.38));
  --beam-rotate: -8deg;
  transform: rotate(-8deg);
  animation: beamPulse 6s ease-in-out infinite;
}

.stage-rings {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(62vw, 660px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}

.stage-rings span {
  position: absolute;
  inset: calc(var(--ring) * 8%);
  border: 1px solid rgba(120, 238, 214, 0.18);
  border-top-color: rgba(120, 238, 214, 0.72);
  border-right-color: rgba(238, 180, 84, 0.5);
  border-radius: 50%;
  box-shadow:
    0 0 28px rgba(96, 228, 204, 0.12),
    inset 0 0 24px rgba(96, 228, 204, 0.06);
  animation: ringTurn calc(12s + var(--ring) * 3s) linear infinite;
}

.stage-rings span:nth-child(1) {
  --ring: 0;
}

.stage-rings span:nth-child(2) {
  --ring: 1;
  animation-direction: reverse;
}

.stage-rings span:nth-child(3) {
  --ring: 2;
}

.stage-rings span:nth-child(4) {
  --ring: 3;
  animation-direction: reverse;
}

.stage-core {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 2;
  display: flex;
  gap: clamp(10px, 2vw, 22px);
  transform: translate(-50%, -50%);
  color: #f6fffb;
  font-size: clamp(54px, 11vw, 156px);
  font-weight: 900;
  letter-spacing: 0;
  text-shadow:
    0 0 18px rgba(120, 238, 214, 0.44),
    0 0 64px rgba(120, 238, 214, 0.28);
}

.stage-core span {
  display: inline-block;
  animation: letterFloat 3.8s ease-in-out infinite;
}

.stage-core span:nth-child(2) {
  color: #ffe1a1;
  animation-delay: -1.1s;
}

.stage-core span:nth-child(3) {
  animation-delay: -2.1s;
}

.stage-particles i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #b8fff1;
  box-shadow: 0 0 14px rgba(184, 255, 241, 0.86);
  animation: particleDrift 8s linear infinite;
}

.stage-particles i:nth-child(1) { left: 9%; top: 18%; animation-delay: -1s; }
.stage-particles i:nth-child(2) { left: 16%; top: 72%; animation-delay: -5s; }
.stage-particles i:nth-child(3) { left: 24%; top: 38%; animation-delay: -2s; }
.stage-particles i:nth-child(4) { left: 32%; top: 82%; animation-delay: -7s; }
.stage-particles i:nth-child(5) { left: 42%; top: 24%; animation-delay: -3s; }
.stage-particles i:nth-child(6) { left: 52%; top: 74%; animation-delay: -6s; }
.stage-particles i:nth-child(7) { left: 63%; top: 18%; animation-delay: -4s; }
.stage-particles i:nth-child(8) { left: 72%; top: 68%; animation-delay: -8s; }
.stage-particles i:nth-child(9) { left: 81%; top: 34%; animation-delay: -2.5s; }
.stage-particles i:nth-child(10) { left: 88%; top: 79%; animation-delay: -6.5s; }
.stage-particles i:nth-child(11) { left: 12%; top: 50%; animation-delay: -3.5s; }
.stage-particles i:nth-child(12) { left: 92%; top: 18%; animation-delay: -5.5s; }
.stage-particles i:nth-child(13) { left: 38%; top: 12%; animation-delay: -7.5s; }
.stage-particles i:nth-child(14) { left: 57%; top: 42%; animation-delay: -1.7s; }
.stage-particles i:nth-child(15) { left: 69%; top: 88%; animation-delay: -4.8s; }
.stage-particles i:nth-child(16) { left: 6%; top: 86%; animation-delay: -2.8s; }

.stage-lines {
  position: absolute;
  left: 50%;
  bottom: 29%;
  width: min(560px, 72vw);
  display: grid;
  gap: 8px;
  transform: translateX(-50%);
}

.stage-lines span {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(120, 238, 214, 0.72), transparent);
  transform-origin: center;
  animation: lineEqualizer 2.8s ease-in-out infinite;
}

.stage-lines span:nth-child(2) {
  animation-delay: -0.4s;
}

.stage-lines span:nth-child(3) {
  animation-delay: -0.8s;
}

.stage-lines span:nth-child(4) {
  animation-delay: -1.2s;
}

.stage-lines span:nth-child(5) {
  animation-delay: -1.6s;
}

.visual-title {
  position: relative;
  z-index: 3;
  align-self: end;
  justify-self: start;
  max-width: min(620px, 100%);
  margin-top: clamp(220px, 30vh, 360px);
  color: #f7fffb;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
}

.visual-title span {
  color: #9df2df;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.visual-title h2 {
  margin-top: 8px;
  font-size: clamp(44px, 8vw, 92px);
  line-height: 0.98;
}

.visual-title p {
  margin-top: 12px;
  color: rgba(247, 255, 251, 0.78);
  font-size: 16px;
  line-height: 1.6;
}

.home-quick-entry {
  position: relative;
  z-index: 4;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-quick-entry a {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(157, 242, 223, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)),
    rgba(11, 27, 31, 0.58);
  color: #f7fffb;
  text-decoration: none;
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.home-quick-entry a:hover {
  transform: translateY(-4px);
  border-color: rgba(157, 242, 223, 0.54);
  background:
    linear-gradient(135deg, rgba(157, 242, 223, 0.18), rgba(255, 225, 161, 0.08)),
    rgba(11, 27, 31, 0.7);
}

.home-quick-entry span {
  color: #9df2df;
  font-size: 17px;
  font-weight: 850;
}

.home-quick-entry strong {
  color: rgba(247, 255, 251, 0.7);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

@keyframes stageGrid {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 0 54px;
  }
}

@keyframes scanSweep {
  0%,
  18% {
    transform: translateY(-100%);
  }

  55% {
    transform: translateY(100%);
  }

  100% {
    transform: translateY(100%);
  }
}

@keyframes beamPulse {
  0%,
  100% {
    opacity: 0.34;
    transform: translateX(-3%) rotate(var(--beam-rotate, 18deg));
  }

  50% {
    opacity: 0.88;
    transform: translateX(3%) rotate(var(--beam-rotate, 18deg));
  }
}

@keyframes ringTurn {
  from {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.025);
  }

  to {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes letterFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes particleDrift {
  from {
    transform: translate3d(0, 26px, 0);
    opacity: 0;
  }

  20%,
  78% {
    opacity: 0.86;
  }

  to {
    transform: translate3d(36px, -44px, 0);
    opacity: 0;
  }
}

@keyframes lineEqualizer {
  0%,
  100% {
    transform: scaleX(0.42);
    opacity: 0.26;
  }

  50% {
    transform: scaleX(1);
    opacity: 0.82;
  }
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-page {
  background:
    radial-gradient(circle at 12% 10%, rgba(15, 123, 104, 0.14), transparent 26%),
    radial-gradient(circle at 86% 12%, rgba(169, 119, 44, 0.12), transparent 28%),
    #f6f8f5;
}

.profile-hero {
  min-height: 360px;
  display: grid;
  align-items: end;
  padding: clamp(38px, 7vw, 88px);
  border-bottom: 1px solid rgba(217, 224, 220, 0.74);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.72), rgba(238, 244, 242, 0.34)),
    repeating-linear-gradient(90deg, rgba(22, 61, 55, 0.06), rgba(22, 61, 55, 0.06) 1px, transparent 1px, transparent 54px);
}

.profile-hero h2 {
  max-width: 760px;
  margin-top: 18px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
}

.profile-hero p {
  max-width: 720px;
  margin-top: 18px;
  color: #53625e;
  font-size: 16px;
  line-height: 1.85;
}

.game-hero {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.72), rgba(240, 245, 240, 0.4)),
    radial-gradient(circle at 76% 24%, rgba(15, 123, 104, 0.16), transparent 30%),
    repeating-linear-gradient(0deg, rgba(22, 61, 55, 0.055), rgba(22, 61, 55, 0.055) 1px, transparent 1px, transparent 48px);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 24px clamp(20px, 6vw, 74px) 54px;
}

.profile-block {
  min-height: 210px;
  padding: 18px;
  border: 1px solid rgba(217, 224, 220, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.profile-block span {
  color: #0c6658;
  font-size: 12px;
  font-weight: 850;
}

.profile-block h3 {
  margin: 14px 0 0;
  font-size: 21px;
}

.profile-block p {
  margin-top: 12px;
  color: #5b6864;
  line-height: 1.75;
}

@keyframes floatLight {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(24px, -18px, 0) scale(1.08);
  }
}

@keyframes gridDrift {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 42px 42px;
  }
}

@keyframes orbitSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-9px);
  }
}

.compare-workspace {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(260px, 42vh) minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
}

.page-actions {
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.compare-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
  gap: 10px;
}

.compare-pane {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.compare-pane span {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.compare-result-pane {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7f5;
  box-shadow: var(--shadow);
  padding: 10px;
}

.merge-workspace {
  grid-template-rows: auto minmax(260px, 40vh) minmax(0, 1fr);
}

.merge-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.merge-select select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.merge-output {
  min-height: 0;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #d7e0dc;
  border-radius: 8px;
  background: #fff;
  color: #21332f;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: var(--code-font-size);
  line-height: 1.62;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.escape-help {
  min-height: 82px;
}

.workday-page {
  min-height: 100vh;
  background: #050806;
  color: #f8efe0;
  overflow-x: hidden;
}

.workday-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background: #050806;
}

.workday-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: #050806;
}

.workday-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.98;
  transform: scale(1.035);
  filter: saturate(1.08) contrast(1.04) brightness(0.92);
  transition:
    opacity 0.5s ease,
    filter 0.5s ease,
    transform 1.2s ease;
}

.workday-shell[data-intro="ready"] .workday-backdrop img,
.workday-shell[data-intro="armed"] .workday-backdrop img {
  opacity: 0.16;
  transform: scale(1.1);
  filter: saturate(0.72) contrast(1.18) brightness(0.34) blur(10px);
}

.workday-shell[data-intro="slicing"] .workday-backdrop img {
  opacity: 0.72;
  transform: scale(1.055);
  filter: saturate(1.1) contrast(1.12) brightness(0.78) blur(2px);
}

.workday-backdrop canvas,
.cinema-vignette,
.cinema-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.workday-backdrop canvas {
  mix-blend-mode: screen;
  opacity: 0.58;
}

.cinema-vignette {
  background:
    linear-gradient(180deg, rgba(5, 8, 6, 0.84), rgba(5, 8, 6, 0.18) 42%, rgba(5, 8, 6, 0.74)),
    radial-gradient(circle at 52% 42%, rgba(237, 167, 71, 0.1), transparent 34%),
    radial-gradient(circle at 74% 44%, rgba(20, 148, 142, 0.18), transparent 30%);
}

.cinema-scan {
  opacity: 0.16;
  background-image: linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 100% 5px;
}

.ritual-intro,
.countdown-stage {
  min-height: 100vh;
}

.ritual-intro {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 96px 28px;
  overflow: hidden;
  cursor: pointer;
}

.ritual-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 245, 225, 0.07), transparent 19%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.96), rgba(2, 6, 7, 0.8) 50%, rgba(0, 0, 0, 0.96)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.98), rgba(2, 7, 8, 0.72) 46%, rgba(0, 0, 0, 0.98));
  transition: opacity 0.42s ease;
}

.ritual-intro::after {
  content: "";
  position: absolute;
  inset: -28%;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(108deg, transparent 44%, rgba(255, 244, 218, 0.28), transparent 56%);
  transform: translateX(-55%) rotate(-8deg);
}

.intro-static,
.intro-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.intro-static {
  z-index: 1;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.11) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(62, 212, 199, 0.1), transparent 40%);
  background-size:
    100% 4px,
    100% 100%;
}

.intro-ambient {
  z-index: 1;
  opacity: 0.44;
  mix-blend-mode: screen;
  filter: blur(18px);
}

.intro-ambient-a {
  background: radial-gradient(circle at 26% 54%, rgba(62, 212, 199, 0.18), transparent 28%);
  animation: ambientDriftA 7s ease-in-out infinite alternate;
}

.intro-ambient-b {
  background: radial-gradient(circle at 74% 44%, rgba(255, 213, 142, 0.16), transparent 30%);
  animation: ambientDriftB 8s ease-in-out infinite alternate;
}

.ritual-intro.is-armed::before {
  opacity: 0.98;
}

.ritual-intro.is-armed .ritual-trigger {
  animation: triggerLock 180ms steps(1, end) forwards;
}

.ritual-intro.is-slicing {
  pointer-events: none;
}

.ritual-intro.is-slicing::before {
  opacity: 0.28;
}

.ritual-intro.is-slicing::after {
  animation: slashWash 620ms ease-out forwards;
}

.letterbox {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 6;
  height: 13vh;
  background: #020303;
  pointer-events: none;
}

.letterbox-top {
  top: 0;
}

.letterbox-bottom {
  bottom: 0;
}

.ritual-intro.is-slicing .letterbox-top {
  animation: letterboxTop 900ms 330ms ease-in-out forwards;
}

.ritual-intro.is-slicing .letterbox-bottom {
  animation: letterboxBottom 900ms 330ms ease-in-out forwards;
}

.slash-stage {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 100%;
}

.workday-eyebrow {
  color: #ffd58e;
  font-size: 14px;
  font-weight: 800;
}

.ritual-trigger {
  position: relative;
  width: min(900px, calc(100vw - 44px));
  min-height: 154px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  padding: 22px 34px;
  background: transparent;
  color: #fff6e6;
  cursor: pointer;
  text-align: center;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.9),
    0 0 34px rgba(62, 212, 199, 0.18),
    0 14px 48px rgba(0, 0, 0, 0.7);
  transform: translateZ(0);
}

.ritual-trigger:disabled {
  opacity: 1;
  cursor: default;
}

.ritual-trigger:active {
  transform: translateZ(0);
}

.ritual-trigger::before,
.ritual-trigger::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 245, 224, 0.34), transparent);
}

.ritual-trigger::before {
  top: 0;
}

.ritual-trigger::after {
  bottom: 0;
}

.ritual-text {
  grid-area: 1 / 1;
  display: block;
  max-width: 100%;
  color: #fff7e8;
  font-size: 58px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.ritual-text-main {
  position: relative;
  z-index: 2;
  animation: ritualTextFlicker 3.4s ease-in-out infinite;
}

.ritual-text-half {
  position: relative;
  z-index: 3;
  opacity: 0;
  color: #fff7e8;
  text-shadow:
    0 0 2px #ffffff,
    0 0 22px rgba(255, 213, 142, 0.42),
    0 0 42px rgba(62, 212, 199, 0.22);
}

.ritual-text-upper {
  clip-path: polygon(0 0, 100% 0, 100% 44%, 0 62%);
}

.ritual-text-lower {
  clip-path: polygon(0 62%, 100% 44%, 100% 100%, 0 100%);
}

.slash-blade,
.slash-flare {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
}

.slash-blade {
  top: 50%;
  left: 50%;
  width: 76vw;
  height: 5px;
  background:
    linear-gradient(90deg, transparent 3%, rgba(255, 255, 255, 0.98) 46%, #ffffff 50%, rgba(62, 212, 199, 0.74) 54%, transparent 97%),
    linear-gradient(90deg, transparent 14%, rgba(255, 213, 142, 0.52), transparent 86%);
  box-shadow:
    0 0 12px rgba(255, 255, 255, 0.9),
    0 0 34px rgba(62, 212, 199, 0.48),
    0 0 66px rgba(255, 213, 142, 0.35);
  transform: translate3d(-96vw, -50%, 0) rotate(-18deg);
}

.slash-flare {
  width: 260px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 245, 224, 0.4);
  background: radial-gradient(circle, rgba(255, 245, 224, 0.62), rgba(62, 212, 199, 0.12) 34%, transparent 68%);
  transform: scale(0.08);
  filter: blur(1px);
}

.slash-shards {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.slash-shards span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--w);
  height: var(--h);
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(62, 212, 199, 0.35));
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.62);
  transform: translate(-50%, -50%) rotate(var(--r));
}

.ritual-intro.is-slicing .ritual-text-main {
  animation: mainTextVanish 220ms ease forwards;
}

.ritual-intro.is-slicing .ritual-text-upper {
  animation: splitUpper 1100ms 90ms cubic-bezier(0.16, 0.82, 0.26, 1) forwards;
}

.ritual-intro.is-slicing .ritual-text-lower {
  animation: splitLower 1100ms 90ms cubic-bezier(0.16, 0.82, 0.26, 1) forwards;
}

.ritual-intro.is-slicing .slash-blade {
  animation: bladeCut 520ms ease-out forwards;
}

.ritual-intro.is-slicing .slash-flare {
  animation: flareBurst 680ms 80ms ease-out forwards;
}

.ritual-intro.is-slicing .slash-shards span {
  animation: shardBurst 900ms var(--delay) ease-out forwards;
}

.ritual-intro.intro-complete {
  animation: introExit 260ms ease forwards;
}

.countdown-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr;
  opacity: 0;
  transform: translateY(12px);
}

.countdown-stage.stage-underlay {
  opacity: 0.92;
  transform: none;
  filter: blur(4px) brightness(0.72);
}

.countdown-stage.stage-ready {
  animation: stageEnter 720ms ease-out forwards;
}

.workday-topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255, 228, 177, 0.2);
  background: rgba(5, 8, 6, 0.36);
  backdrop-filter: blur(18px);
}

.workday-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff7e8;
  text-decoration: none;
}

.workday-brand span:last-child {
  display: grid;
  gap: 3px;
}

.workday-brand strong {
  font-size: 17px;
}

.workday-brand small {
  color: rgba(248, 239, 224, 0.62);
  font-size: 12px;
}

.workday-topbar .link-btn {
  border-color: rgba(255, 228, 177, 0.24);
  background: rgba(7, 15, 15, 0.54);
  color: #f8efe0;
}

.workday-topbar .link-btn:hover {
  border-color: rgba(62, 212, 199, 0.62);
}

.workday-footer {
  padding: 0 8vw 28px;
  justify-content: flex-start;
  color: rgba(248, 239, 224, 0.68);
}

.workday-footer a:hover {
  color: #fff7e8;
}

.countdown-hero {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 40px;
  align-items: end;
  padding: 60px 8vw 74px;
}

.countdown-copy {
  min-width: 0;
}

.countdown-copy h1 {
  margin-top: 12px;
  color: #fff7e8;
  font-size: 56px;
  line-height: 1.04;
  text-shadow: 0 16px 44px rgba(0, 0, 0, 0.54);
}

.time-grid {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(132px, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.time-unit {
  min-width: 0;
  min-height: 142px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 228, 177, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
    rgba(5, 8, 6, 0.46);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.time-unit strong {
  color: #fff7e8;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 56px;
  line-height: 1;
}

.time-unit span {
  color: rgba(248, 239, 224, 0.66);
  font-size: 14px;
  font-weight: 700;
}

.workday-status {
  max-width: 680px;
  margin-top: 22px;
  color: rgba(248, 239, 224, 0.76);
  font-size: 18px;
  line-height: 1.65;
}

.orbit-dashboard {
  min-width: 0;
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 22px;
  border: 1px solid rgba(62, 212, 199, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(11, 25, 24, 0.78), rgba(5, 8, 6, 0.44)),
    rgba(5, 8, 6, 0.48);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.progress-orbit {
  width: 210px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(6, 12, 12, 0.94) 56%, transparent 57%),
    conic-gradient(#ffd58e var(--progress), rgba(62, 212, 199, 0.2) 0);
  box-shadow:
    inset 0 0 40px rgba(62, 212, 199, 0.12),
    0 0 42px rgba(211, 59, 47, 0.12);
}

.progress-orbit > div {
  width: 152px;
  aspect-ratio: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 228, 177, 0.18);
  border-radius: 50%;
  background: rgba(3, 6, 6, 0.74);
}

.progress-orbit strong {
  color: #fff7e8;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 34px;
}

.progress-orbit span {
  color: rgba(248, 239, 224, 0.64);
  font-size: 13px;
  font-weight: 700;
}

.schedule-controls {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 42px;
  gap: 10px;
  align-items: end;
}

.schedule-controls label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: rgba(248, 239, 224, 0.66);
  font-size: 13px;
  font-weight: 700;
}

.schedule-controls input {
  width: 100%;
  height: 42px;
  min-width: 0;
  border: 1px solid rgba(255, 228, 177, 0.26);
  border-radius: 6px;
  padding: 0 10px;
  background: rgba(4, 8, 8, 0.68);
  color: #fff7e8;
  color-scheme: dark;
}

.schedule-controls button {
  width: 42px;
  height: 42px;
  padding: 0;
  border-color: rgba(255, 228, 177, 0.28);
  border-radius: 6px;
  background: rgba(4, 8, 8, 0.68);
  color: #ffd58e;
  font-size: 20px;
}

@keyframes ambientDriftA {
  to {
    transform: translate3d(5%, -4%, 0) scale(1.08);
  }
}

@keyframes ambientDriftB {
  to {
    transform: translate3d(-4%, 5%, 0) scale(1.1);
  }
}

@keyframes ritualTextFlicker {
  0%,
  16%,
  26%,
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0);
  }

  18% {
    opacity: 0.58;
    filter: blur(4px);
    transform: translate3d(-2px, 0, 0);
  }

  19% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(2px, 0, 0);
  }

  28% {
    opacity: 0.82;
    text-shadow:
      2px 0 rgba(62, 212, 199, 0.42),
      -2px 0 rgba(211, 59, 47, 0.34),
      0 16px 48px rgba(0, 0, 0, 0.74);
  }
}

@keyframes triggerLock {
  to {
    filter: contrast(1.28) brightness(1.2);
  }
}

@keyframes slashWash {
  0% {
    opacity: 0;
    transform: translateX(-55%) rotate(-8deg);
  }

  22%,
  56% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(58%) rotate(-8deg);
  }
}

@keyframes mainTextVanish {
  to {
    opacity: 0;
    filter: blur(9px);
    transform: scale(0.98);
  }
}

@keyframes bladeCut {
  0% {
    opacity: 0;
    transform: translate3d(-96vw, -50%, 0) rotate(-18deg);
  }

  12%,
  66% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(96vw, -50%, 0) rotate(-18deg);
  }
}

@keyframes flareBurst {
  0% {
    opacity: 0;
    transform: scale(0.08);
  }

  24% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: scale(4.2);
  }
}

@keyframes splitUpper {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  28% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(-96px, -54px, 0) rotate(-2deg);
    filter: blur(8px);
  }
}

@keyframes splitLower {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  28% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(104px, 58px, 0) rotate(2deg);
    filter: blur(8px);
  }
}

@keyframes shardBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--r)) scaleX(0.2);
  }

  16% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(calc(var(--r) + 160deg)) scaleX(1);
  }
}

@keyframes letterboxTop {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-100%);
  }
}

@keyframes letterboxBottom {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(100%);
  }
}

@keyframes introExit {
  to {
    opacity: 0;
    filter: blur(12px);
  }
}

@keyframes stageEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-light,
  .home-gridline,
  .home-orbit::before,
  .home-orbit::after,
  .orbit-dot,
  .stage-grid,
  .stage-scanline,
  .stage-beam,
  .stage-rings span,
  .stage-core span,
  .stage-particles i,
  .stage-lines span,
  .ritual-text-main,
  .intro-ambient-a,
  .intro-ambient-b,
  .letterbox-top,
  .letterbox-bottom,
  .ritual-intro::after,
  .ritual-intro.is-slicing .ritual-text-main,
  .ritual-intro.is-slicing .ritual-text-upper,
  .ritual-intro.is-slicing .ritual-text-lower,
  .ritual-intro.is-slicing .slash-blade,
  .ritual-intro.is-slicing .slash-flare,
  .ritual-intro.is-slicing .slash-shards span,
  .ritual-intro.intro-complete,
  .countdown-stage.stage-ready {
    animation-duration: 1ms;
    animation-iteration-count: 1;
  }
}

@media (max-width: 860px) {
  .topbar,
  .pane-head,
  .tool-row,
  .workday-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .inline-actions,
  .tabs,
  .view-actions,
  .page-actions,
  .switches {
    flex-wrap: wrap;
  }

  .context-panel {
    grid-template-columns: 1fr;
  }

  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(300px, 42vh) 0 minmax(420px, 1fr);
  }

  .split-handle {
    display: none;
  }

  .diff-input-row,
  .diff-row,
  .compare-grid,
  .entry-grid,
  .home-hero,
  .home-entry-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
    gap: 24px;
    padding: 34px 18px 28px;
  }

  .visual-home {
    min-height: calc(100vh - 128px);
  }

  .home-copy h2 {
    font-size: 42px;
  }

  .visual-title {
    margin-top: min(44vh, 300px);
  }

  .home-quick-entry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-quick-entry a {
    min-height: 82px;
  }

  .home-orbit {
    min-height: 390px;
  }

  .home-entry-section {
    padding: 8px 18px 38px;
  }

  .home-card.featured {
    grid-row: auto;
  }

  .profile-hero {
    min-height: 320px;
    padding: 36px 18px;
  }

  .profile-hero h2 {
    font-size: 40px;
  }

  .profile-grid {
    padding: 18px 18px 38px;
  }

  .compare-workspace {
    grid-template-rows: auto auto minmax(360px, 1fr);
  }

  .ritual-intro {
    padding: 84px 22px;
  }

  .ritual-text,
  .countdown-copy h1 {
    font-size: 42px;
  }

  .workday-status {
    font-size: 16px;
  }

  .ritual-trigger {
    min-height: 132px;
    padding: 18px 18px;
  }

  .countdown-hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 24px;
    padding: 34px 18px 42px;
  }

  .time-grid {
    grid-template-columns: 1fr;
  }

  .time-unit {
    min-height: 112px;
  }

  .time-unit strong {
    font-size: 46px;
  }

  .orbit-dashboard {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .home-copy h2,
  .profile-hero h2 {
    font-size: 34px;
  }

  .home-copy p,
  .profile-hero p {
    font-size: 15px;
  }

  .home-orbit {
    min-height: 340px;
  }

  .visual-home {
    padding: 24px 16px;
  }

  .stage-rings {
    top: 35%;
    width: 82vw;
  }

  .stage-core {
    top: 35%;
    font-size: 56px;
  }

  .stage-lines {
    bottom: 42%;
    width: 82vw;
  }

  .visual-title {
    margin-top: min(36vh, 240px);
  }

  .visual-title h2 {
    font-size: 42px;
  }

  .home-quick-entry {
    gap: 8px;
  }

  .home-quick-entry a {
    min-height: 76px;
    padding: 12px;
  }

  .home-quick-entry span {
    font-size: 15px;
  }

  .home-quick-entry strong {
    font-size: 11px;
  }

  .home-orbit::before {
    width: 230px;
    height: 230px;
  }

  .home-orbit::after {
    width: 320px;
    height: 320px;
  }

  .orbit-core {
    width: 118px;
    height: 118px;
  }

  .orbit-core span {
    font-size: 32px;
  }

  .orbit-dot {
    min-width: 56px;
  }

  .code-panel {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .ritual-text,
  .countdown-copy h1 {
    font-size: 34px;
  }

  .schedule-controls {
    grid-template-columns: 1fr;
  }

  .schedule-controls button {
    width: 100%;
  }
}
