:root {
  color-scheme: light;
  --ink: #151b22;
  --muted: #677280;
  --paper: #ffffff;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-solid: #ffffff;
  --line: rgba(21, 27, 34, 0.14);
  --line-strong: rgba(21, 27, 34, 0.32);
  --green: #14785b;
  --green-dark: #0d513e;
  --blue: #285fa8;
  --amber: #a96817;
  --terminal: #121821;
  --terminal-line: #2c3746;
  --terminal-ink: #d8f8e7;
  --shadow: 0 24px 76px rgba(21, 27, 34, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background: var(--paper);
}

a {
  color: inherit;
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.workspace-page {
  height: 100vh;
  overflow: hidden;
}

.workspace-page .shell {
  height: 100vh;
  overflow: hidden;
}

.topbar {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  z-index: 4;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
}

.brand-home,
.brand-title {
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--green-dark);
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(21, 27, 34, 0.08);
  backdrop-filter: blur(14px);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-line > span:first-child {
  line-height: 1.1;
}

.brand-line {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.tool-count-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--muted);
  background: var(--panel-solid);
  font-size: 11px;
  font-weight: 720;
  line-height: 1;
}

.zoom-control {
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  background: var(--panel-solid);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 720;
  line-height: 1;
}

.zoom-control button {
  width: 24px;
  height: 22px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.zoom-control button:hover {
  background: rgba(20, 120, 91, 0.08);
}

.zoom-control span {
  min-width: 42px;
  text-align: center;
}

.brand-copy > span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.25;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

.workspace {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  z-index: 1;
}

.workspace-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.workspace-viewport.is-dragging {
  cursor: grabbing;
}

.symbol-plane,
.tool-plane {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.symbol-plane {
  z-index: 0;
  pointer-events: none;
}

.tool-plane {
  z-index: 2;
}

.bg-symbol {
  position: absolute;
  left: var(--symbol-x);
  top: var(--symbol-y);
  color: rgba(21, 27, 34, 0.14);
  font: 680 18px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  transform: rotate(calc((var(--symbol-delay) - 2) * 4deg));
  white-space: nowrap;
}

.burst-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.burst-symbol {
  position: absolute;
  color: rgba(21, 27, 34, 0.48);
  font: 760 14px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  transform: translate(-50%, -50%);
  animation: burst-pop 680ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  white-space: nowrap;
}

@keyframes burst-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--burst-x)), calc(-50% + var(--burst-y))) scale(1.18);
  }
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.94;
  letter-spacing: 0;
}

.lead {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
}

.tool-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  text-align: left;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 18px 48px rgba(21, 27, 34, 0.08);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.canvas-tool {
  position: absolute;
  left: var(--tool-x);
  top: var(--tool-y);
  width: min(390px, calc(100vw - 36px));
  min-height: 242px;
  padding: 22px;
  outline: none;
}

.canvas-tool:hover,
.canvas-tool:focus-visible {
  border-color: rgba(21, 27, 34, 0.24);
  box-shadow: 0 22px 54px rgba(21, 27, 34, 0.11);
  transform: translateY(-3px);
}

.canvas-tool.is-copied {
  border-color: rgba(20, 120, 91, 0.62);
}

.tool-name {
  display: block;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.04;
  font-weight: 780;
}

.tool-copy {
  max-width: 420px;
  margin-top: 16px;
  display: block;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.58;
}

.tool-command {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #213000;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.command-strip {
  margin-top: 24px;
  min-height: 48px;
  border: 1px solid rgba(21, 27, 34, 0.12);
  border-radius: 8px;
  padding: 10px 10px 10px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f7f8f7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.copy-icon-button {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(21, 27, 34, 0.12);
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #ffffff;
  color: transparent;
  cursor: pointer;
}

.copy-icon-button::before,
.copy-icon-button::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 15px;
  border: 1.6px solid #2d3640;
  border-radius: 3px;
}

.copy-icon-button::before {
  transform: translate(-3px, 3px);
  opacity: 0.52;
}

.copy-icon-button::after {
  transform: translate(3px, -3px);
  background: #ffffff;
}

.copy-icon-button:hover {
  border-color: rgba(21, 27, 34, 0.24);
  background: #f4f5f4;
}

.copy-icon-button[data-state="copied"],
.copy-icon-button[data-state="ready"] {
  color: var(--ink);
  font-size: 0;
}

.copy-icon-button[data-state="copied"]::before,
.copy-icon-button[data-state="copied"]::after {
  content: none;
}

.copy-icon-button[data-state="copied"] {
  background: #f4f5f4;
}

.copy-icon-button[data-state="copied"]::after {
  content: "";
  width: 14px;
  height: 8px;
  border: 0;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}

.copy-icon-button[data-state="ready"]::before,
.copy-icon-button[data-state="ready"]::after {
  content: none;
}

.copy-icon-button[data-state="ready"]::after {
  content: "OK";
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 10px;
  font-weight: 820;
  transform: none;
}

.tool-stage {
  width: min(1120px, calc(100% - 32px));
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: 46px 0 48px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
  grid-template-areas:
    "copy command"
    "copy safe";
  gap: 26px 44px;
  align-content: center;
}

.stage-copy {
  grid-area: copy;
}

.detail-stage h1 {
  font-size: clamp(40px, 6.7vw, 74px);
}

.button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-dark);
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: var(--panel-solid);
  color: var(--ink);
  border-color: var(--line);
}

.button:hover {
  filter: brightness(0.96);
}

.terminal-head {
  height: 38px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--terminal-line);
  color: #8ea2b5;
  font-size: 13px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef6b63;
}

.dot:nth-child(2) {
  background: #e6b450;
}

.dot:nth-child(3) {
  background: #5fbf75;
}

.terminal-title {
  margin-left: 8px;
}

.prompt {
  color: #80d0ff;
}

.command-panel {
  overflow: hidden;
  border: 1px solid #273341;
  border-radius: 8px;
  background: var(--terminal);
  color: var(--terminal-ink);
  box-shadow: var(--shadow);
}

.detail-command {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(21, 27, 34, 0.08);
}

.primary-panel {
  grid-area: command;
}

.detail-command-strip {
  margin-top: 0;
}

.safe-panel {
  grid-area: safe;
}

.command-panel pre {
  margin: 0;
  overflow-x: auto;
  padding: 22px;
  white-space: pre;
  font: 14px/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.command-panel .button {
  margin: 0 22px 22px;
}

.safe-panel {
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
  backdrop-filter: blur(18px);
}

.safe-panel pre {
  color: var(--ink);
}

.footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: rgba(247, 248, 244, 0.52);
  backdrop-filter: blur(12px);
}

.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

@media (max-width: 900px) {
  .topbar,
  .tool-stage,
  .footer-inner {
    width: min(100% - 24px, 1120px);
  }

  .tool-stage {
    min-height: auto;
    padding-top: 28px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "command"
      "safe";
  }

  h1,
  .detail-stage h1 {
    font-size: clamp(38px, 12vw, 68px);
  }

  .footer-inner {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .nav {
    display: none;
  }

  .brand-copy > span:last-child {
    display: none;
  }

  .canvas-tool {
    width: calc(100vw - 36px);
    min-height: 286px;
    padding: 20px;
  }

  .tool-name {
    margin-top: 34px;
  }

  .tool-command {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .button {
    width: calc(100% - 44px);
  }

  .command-panel pre {
    padding: 18px;
    font-size: 13px;
  }
}
