:root {
  color-scheme: light;
  --lm-paper: #f6f8f5;
  --lm-surface: #ffffff;
  --lm-ink: #26382f;
  --lm-muted: #596c61;
  --lm-line: #b8c8be;
  --lm-green: #236448;
  --lm-mint: #d5f5df;
  --lm-pink: #fbe1ea;
  --lm-yellow: #fff1b9;
  --lm-red: #ad2943;
  --lm-font: "SF Mono", "Menlo", "Cascadia Code", "PingFang SC", monospace;
  --surface: var(--lm-surface);
  --surface-2: #edf3ee;
  --bg: var(--lm-paper);
  --bg-soft: #edf3ee;
  --bg-2: var(--lm-paper);
  --card: var(--lm-surface);
  --panel: var(--lm-surface);
  --panel-soft: #edf3ee;
  --border: var(--lm-line);
  --line: var(--lm-line);
  --line-strong: #748d7f;
  --stroke: var(--lm-line);
  --stroke-soft: #d9e3dc;
  --text: var(--lm-ink);
  --ink: var(--lm-ink);
  --muted: var(--lm-muted);
  --text-dim: var(--lm-muted);
  --body: var(--lm-green);
  --accent: var(--lm-green);
  --accent-2: #174c35;
  --ok: var(--lm-green);
  --warn: #805d00;
  --danger: var(--lm-red);
  --radius-xl: 8px;
  --radius-lg: 8px;
  --radius-md: 6px;
  --shadow: 3px 3px 0 #dce5df;
}

* { box-sizing: border-box; letter-spacing: 0; }
html { background: var(--lm-paper); color: var(--lm-ink); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--lm-ink);
  font-family: var(--lm-font);
  font-size: 14px;
  line-height: 1.6;
  background: repeating-linear-gradient(0deg, transparent 0 31px, #26382f04 31px 32px), var(--lm-paper);
}
body::before { content: none; }
a { color: var(--lm-green); text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--lm-green); outline-offset: 3px; }
::selection { background: var(--lm-mint); color: var(--lm-ink); }
[hidden] { display: none !important; }
h1, h2, h3, p, label, a { overflow-wrap: anywhere; }
h1 { font-size: 26px; line-height: 1.3; }
h2 { font-size: 18px; line-height: 1.4; }
.wrap, .app { width: 100%; max-width: 1200px; margin: 0 auto; padding: 28px 24px 56px; }
.hero { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0 0 20px; margin-bottom: 24px; flex-wrap: wrap; }
.hero h1, .title { font-size: 24px; }
.hero p, .hero .meta { max-width: 72ch; }
.grid, .layout, .row, .stack, .field, .column, .main, .sidebar { min-width: 0; }
.grid > *, .layout > *, .row > *, .stack > * { min-width: 0; }
.panel { border: 0; border-top: 1px solid var(--lm-line); border-radius: 0; background: transparent; box-shadow: none; padding: 20px 0; }
.card, .item, .lm-card { border: 1px solid var(--lm-line); border-radius: 8px; background: var(--lm-surface); box-shadow: 3px 3px 0 #dce5df; }
.lm-panel { padding-block: 20px; border-block-start: 1px solid var(--lm-line); }
.lm-stack { display: grid; gap: 16px; }
.lm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
label { color: var(--lm-muted); }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea, .lm-input {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--lm-line);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--lm-surface);
  color: var(--lm-ink);
  box-shadow: inset 0 2px 0 #26382f05;
}
textarea { width: 100%; resize: vertical; }
input::placeholder, textarea::placeholder { color: #738378; opacity: 1; }
input[type="checkbox"], input[type="radio"] { min-width: 16px; width: 16px; height: 16px; accent-color: var(--lm-green); flex: 0 0 auto; }
button, .lm-button, .nav a, .site-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  max-width: 100%;
  padding: 8px 14px;
  border: 1px solid var(--lm-line);
  border-radius: 6px;
  background: var(--lm-surface);
  color: var(--lm-ink);
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
button:hover, .lm-button:hover, .nav a:hover, .site-nav-button:hover { background: #edf3ee; border-color: var(--lm-green); }
button.primary, .btn-accent, .lm-button--primary, .lm-login button[type="submit"] { background: var(--lm-mint); color: var(--lm-green); border-color: #8db59c; box-shadow: 2px 2px 0 #b8d6c1; }
button.primary:hover, .btn-accent:hover, .lm-button--primary:hover { background: #c1eccc; color: var(--lm-green); }
button.danger, .btn-danger, .lm-button--danger { color: var(--lm-red); background: var(--lm-pink); border-color: #dea9b5; }
button:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.badge, .pill, .lm-badge { display: inline-flex; align-items: center; border: 1px solid var(--lm-line); border-radius: 4px; padding: 2px 7px; background: var(--lm-yellow); color: var(--lm-ink); font-size: 11px; }
.status-box, .status, .lm-status { background: #edf3ee; border: 1px dashed var(--lm-line); border-radius: 6px; padding: 10px 12px; overflow-wrap: anywhere; }
.error, .msg.err { color: var(--lm-red); }
.msg.ok { color: var(--lm-green); }
.meta, .hint, .muted { color: var(--lm-muted); }
table { width: 100%; border-collapse: collapse; font-size: 12px; background: var(--lm-surface); }
th { background: #e9f1ec; color: var(--lm-ink); }
th, td { border: 1px solid var(--lm-line); padding: 10px 12px; text-align: left; }
tbody tr:nth-child(even) { background: #f5f8f6; }
tbody tr:hover { background: #edf8f0; }
#usersTable, #tableWrap, #table, .table-wrap, .lm-table-scroll { max-width: 100%; overflow-x: auto; }
pre { max-width: 100%; overflow-x: auto; }
.nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav form { margin: 0 !important; }
.modal { background: var(--lm-surface); color: var(--lm-ink); border: 1px solid var(--lm-line); border-radius: 8px; box-shadow: 6px 6px 0 #26382f30; }

limbo-site-nav { display: block; }
.lm-header { border-bottom: 1px solid var(--lm-line); background: #ffffffed; position: relative; z-index: 10; }
.lm-header-inner { max-width: 1200px; margin: auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lm-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--lm-ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.lm-brand img { width: 32px; height: 32px; border-radius: 6px; image-rendering: auto; }
.lm-brand span::after { content: "_"; color: var(--lm-green); }
.lm-global-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12px; }
.lm-global-nav > a { text-decoration: none; }
.lm-global-nav form { margin: 0; }
.lm-global-nav button, .lm-login-link { min-height: auto; padding: 7px 10px; font-size: 12px; }
.lm-login-link { text-decoration: none; }
.lm-menu { position: relative; }
.lm-menu summary { cursor: pointer; padding: 8px 10px; border: 1px solid var(--lm-line); border-radius: 6px; background: var(--lm-mint); font-weight: 600; }
.lm-menu-list { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; max-width: calc(100vw - 32px); padding: 8px; background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 8px; box-shadow: 4px 4px 0 #dce5df; }
.lm-menu-list a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 4px; text-decoration: none; }
.lm-menu-list a:hover, .lm-menu-list a[aria-current="page"] { background: var(--lm-mint); }
.lm-menu-list small { color: var(--lm-muted); }
.lm-menu-list form { padding: 8px 10px 0; border-top: 1px solid var(--lm-line); }
.lm-menu-list form button { width: 100%; }
.lm-footer { max-width: 1200px; margin: auto; padding: 20px 24px 28px; border-top: 1px solid var(--lm-line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--lm-muted); }
.lm-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.lm-skip { position: absolute; top: -100px; left: 16px; z-index: 100; padding: 8px 16px; background: white; }
.lm-skip:focus { top: 8px; }

.lm-login { display: block; }
.lm-login > .card { width: min(440px, calc(100% - 32px)); margin: 64px auto; padding: 28px; }
.lm-login h1 { font-size: 24px; }
.lm-login h1::before { content: "> "; color: var(--lm-green); }
.lm-login .meta { word-break: normal; }
.lm-login .error { background: var(--lm-pink); }
.lm-users .grid { grid-template-columns: minmax(0, 1fr); }
.lm-home .site-nav { padding-top: 0; }
.lm-home .site-nav .brand { display: none; }
.lm-home .site-nav { justify-content: flex-end; }
.lm-home .page-header h1 { font-size: 48px; letter-spacing: 0; }
.lm-home .page-header p { font-size: 18px; }
.lm-home .terminal-shell { background: #fff; border-color: var(--lm-line); border-radius: 8px; box-shadow: var(--shadow); }
.lm-home .terminal-header { background: #e9f1ec; border-color: var(--lm-line); }
.lm-home .terminal-content { color: var(--lm-ink); }
.lm-home .agent-modal { z-index: 30; }
.lm-home .agent-modal-card { background: var(--lm-surface); box-shadow: 5px 5px 0 #26382f30; }
.lm-home .command-row { background: #edf3ee; }
.lm-home .command-tab.active { background: var(--lm-mint); border-color: var(--lm-green); }
.lm-home .iphone-preview-layout { min-width: 0; }
.lm-home .aux-previews > *, .lm-home .terminal-shell, .lm-home .terminal-preview { min-width: 0; max-width: 100%; }
.lm-home .watch-stage { max-width: 100%; }
.lm-home .watch-stage-image { max-width: 100%; object-fit: contain; }
.lm-home .iphone-stage { width: min(384px, 100%); min-width: 0; }
.lm-home .iphone-screen { width: 100%; height: auto; aspect-ratio: 384 / 760; }
.lm-home .watch-screen {
  --text: #f3f3f3;
  --text-dim: #b5c5bb;
  --body: #a7e9bf;
  --bg: #080808;
  color: var(--text);
}
.lm-home .watch-screen .muted, .lm-home .iphone-screen .muted { color: var(--text-dim); }
.lm-home .iphone-content button { min-height: 27px; padding: 4px 6px; font-size: 9px; }
.lm-home .iphone-content .iphone-toolbar-button { width: 27px; height: 27px; padding: 0; background: transparent; border: 0; color: var(--text); }
.lm-home .watch-screen button { min-height: 32px; padding: 4px 6px; font-size: 11px; }
.lm-usage .metric, .lm-usage .agent { background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 8px; box-shadow: 2px 2px 0 #dce5df; }
.lm-usage .metric::after { content: none; }
.lm-usage .metric:nth-child(3n + 1) { border-top: 3px solid #a8daba; }
.lm-usage .metric:nth-child(3n + 2) { border-top: 3px solid #e9b5c7; }
.lm-usage .metric:nth-child(3n) { border-top: 3px solid #e6d38b; }
.lm-usage .metric .value { font-size: 28px; overflow-wrap: anywhere; }
.lm-usage .bar-track { background: #e9f1ec; }
.lm-usage .dot { box-shadow: none; }
.lm-usage .status.ok { color: var(--lm-green); }
.lm-usage .day-bar:hover::after { background: var(--lm-ink); color: white; }
.lm-usage .table-scroll { border-radius: 6px; }
.lm-usage .controls input, .lm-usage .controls select { height: 42px; }
.lm-usage .controls .load { height: 42px; }
.lm-usage .token-wrap { min-width: 0; grid-template-columns: minmax(0, 1fr) auto; }
.lm-usage .token-wrap input { border-radius: 6px 0 0 6px; }
.lm-usage .token-wrap button { border-radius: 0 6px 6px 0; border-left: 0; }
.lm-survey .page-header h1 { font-size: 32px; }
.lm-survey .page-header p { font-size: 14px; }
.lm-survey .card { background: transparent; border: 0; border-top: 1px solid var(--lm-line); border-radius: 0; box-shadow: none; padding: 22px 0; }
.lm-survey label.row { background: var(--lm-surface); border: 1px solid var(--lm-line); border-radius: 6px; color: var(--lm-ink); }
.lm-survey label.row:has(input:checked) { background: var(--lm-mint); border-color: var(--lm-green); }
.lm-survey .star-btn { width: 40px; height: 40px; padding: 4px; }
.lm-survey .star-btn[aria-pressed="true"] { background: var(--lm-yellow); border-color: #c8b260; }
.lm-survey-admin .badge { border-color: var(--lm-line); background: var(--lm-yellow); color: var(--lm-ink); }

@media (max-width: 760px) {
  .wrap, .app { padding: 20px 16px 40px; }
  .lm-header-inner { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .lm-global-nav { gap: 12px; }
  .grid, .layout { grid-template-columns: minmax(0, 1fr); }
  .hero { align-items: flex-start; flex-direction: column; }
  .lm-home .page-header h1 { font-size: 32px; }
  .lm-home .iphone-preview-layout { grid-template-columns: minmax(0, 1fr); }
  .lm-home .iphone-screen { padding: 24px; }
  .lm-home .iphone-copy { padding: 16px 0; }
  .lm-login > .card { margin-block: 32px; padding: 22px; }
}
@media (max-width: 380px) {
  .lm-brand { font-size: 13px; }
  .lm-global-nav { width: 100%; justify-content: space-between; }
  .lm-page-link { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}