﻿:root {
  color-scheme: light;
  --bg: #f3f4f8;
  --panel: #fbfcfb;
  --panel-strong: #ffffff;
  --ink: #202438;
  --muted: #72778b;
  --line: #e3e5ee;
  --accent: #6474ff;
  --accent-strong: #5967dd;
  --danger: #b42318;
  --warning: #f3c14b;
  --code-bg: #111817;
  --code-ink: #e6f4ef;
  --shadow: 0 4px 24px rgba(32, 36, 56, 0.035);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  width: 100%;

}

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

  background: var(--bg);
}

button {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.shell {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  padding: 40px 0 24px;
}

.scanner {
  min-width: 0;
  display: grid;
  gap: 20px;
}

.topbar,
.summary,
.results-panel,
.paste-panel {
  background: rgba(251, 252, 251, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);

}

.topbar {
  min-height: 96px;
  padding: 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.65rem, 2.6vw, 2.3rem);
  line-height: 1.02;
}

h2 {
  font-size: 1.05rem;
}

.actions,
.panel-head,
.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.paste-button,
.search-button,
.ai-button,
.copy-button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  transition:
    transform 0.16s ease,
    background-color 0.16s ease,
    color 0.16s ease;
}

.icon-button:hover,
.paste-button:hover:not(:disabled),
.search-button:hover,
.ai-button:hover:not(:disabled),
.copy-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.icon-button {
  width: 44px;
  color: #111111;
  background: #dfe5e2;
  border-color: #c8d0cc;
  font-size: 1.5rem;
}

.search-button {
  padding: 0 18px;
  color: white;
  background: #6474ff;
  border-color: #5162f4;
  box-shadow: 0 10px 24px rgba(100, 116, 255, 0.28);
}

.paste-button {
  padding: 0 18px;
  color: #0d211d;
  background: #c6eee4;
  border-color: #89cabb;
}

.paste-button:hover {
  background: #aee3d6;
}

.search-button:hover {
  background: #5264f5;
}

.copy-button {
  min-height: 38px;
  padding: 0 12px;
  color: #4052df;
  background: #e9edff;
  border-color: #cad2ff;
  font-size: 0.92rem;
}

.ai-button {
  min-height: 38px;
  padding: 0 13px;
  color: #12342e;
  background: #dff6ef;
  border-color: #a6d9cc;
  font-size: 0.92rem;
}

.ai-button:hover {
  background: #c9eee4;
}

.paste-panel {
  border-radius: 12px;
  padding: 24px;
  display: grid;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.paste-kicker {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.paste-panel strong {
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1.15;
}

.paste-panel span:last-child {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.summary {
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}

.summary article {
  min-height: 100px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-right: 1px solid var(--line);
}

.summary article:last-child {
  border-right: 0;
}

.summary span:last-child {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.15;
}

.metric {
  color: var(--accent-strong);
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.results-panel {
  min-width: 0;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-head {
  justify-content: space-between;
}

.panel-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ai-panel {
  min-width: 0;
  padding: 12px;
  color: #192622;
  background: #f3faf7;
  border: 1px solid #cfe4dc;
  border-radius: 12px;
}

.ai-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ai-panel-head strong {
  font-size: 0.92rem;
}

.ai-panel-head span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
}

.ai-panel pre {
  max-height: 220px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.48;
}

.empty-state {
  min-height: 280px;
  background: #fafbfe;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 18px;
}

.results {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  max-height: 680px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding-right: 0;
}

.results-table-head,
.table-result-row {
  min-width: 0;
  display: grid;
  grid-template-columns:
    minmax(0, 0.65fr) minmax(0, 0.8fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 12px;
}

.results-table-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  color: var(--accent-strong);
  background: #f0f2fb;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 900;
}

.result-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(72px, auto) 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.table-result-row {
  grid-template-columns:
    minmax(0, 0.65fr) minmax(0, 0.8fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 12px;
}

.result-row > div {
  min-width: 0;
}

.result-cell {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #18231f;
  font-family:
    "Cascadia Mono", "Consolas", "SFMono-Regular", ui-monospace, monospace;
  font-size: 0.9rem;
  line-height: 1.45;
}

.table-result-row .keyword-strip {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.line-number {
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.line-text {
  min-width: 0;
  max-height: 145px;
  margin: 0;
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-family:
    "Cascadia Mono", "Consolas", "SFMono-Regular", ui-monospace, monospace;
  font-size: 0.9rem;
  line-height: 1.45;
}

mark {
  color: #1c1600;
  background: var(--warning);
  border-radius: 4px;
  padding: 0 3px;
  font-weight: 900;
}

.keyword-strip {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  color: var(--danger);
  background: #fff0ed;
  border: 1px solid #ffd7d0;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.muted-chip {
  color: #4f5e58;
  background: #eef3f1;
  border-color: #d7e0dc;
}

.limit-note {
  padding: 12px;
  color: var(--muted);
  background: #f7faf8;
  border: 1px dashed var(--line);
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.moon-footer {
  min-height: 46px;
  padding: 6px 14px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.moon-logo {
  max-width: 100%;
  min-height: 30px;
  padding: 3px 0 7px;
  position: relative;
  display: inline-grid;
  place-items: center;
  color: #72778b;
  font-family:
    "Cascadia Mono", "Consolas", "SFMono-Regular", ui-monospace, monospace;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: lowercase;
  white-space: nowrap;
  cursor: default;
  transition: color 0.2s ease;
}

.moon-logo::after {
  content: "dev: osouu";
  position: absolute;
  inset: 3px 0 7px;
  display: grid;
  place-items: center;
  color: #5967dd;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.96em;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(6px);
  text-shadow: 0 0 18px rgba(127, 143, 255, 0.34);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
  white-space: nowrap;
  animation: moon-dev-once 9.4s ease-in-out forwards;
}

.moon-word {
  display: inline-block;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
  animation: moon-word-once 9.4s ease-in-out forwards;
}

@keyframes moon-word-once {
  0%,
  53% {
    opacity: 1;
    transform: translateY(0);
  }

  61%,
  92% {
    opacity: 0;
    transform: translateY(-6px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes moon-dev-once {
  0%,
  53% {
    opacity: 0;
    transform: translateY(6px);
  }

  61%,
  92% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(6px);
  }
}

.project-word {
  color: #555a5a;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button:focus-visible {
  outline: 3px solid #8b96ff;
  outline-offset: 3px;
}
.topbar > div, .panel-head > *, .summary article { min-width: 0; }
.panel-head { flex-wrap: wrap; }
.result-cell.line-number { white-space: normal; }

@media (max-width: 1100px) {
  .results-table-head { display: none; }
  .table-result-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 18px;
    gap: 16px;
  }
  .result-cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font: 600 0.75rem/1.4 system-ui, sans-serif;
  }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 32px); padding: 20px 0; }
  .scanner { gap: 14px; }
  .topbar { align-items: stretch; flex-direction: column; gap: 20px; }
  .topbar, .paste-panel, .results-panel { padding: 20px; }
  .actions { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); }
  .summary article { padding: 16px 10px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .summary span:last-child { font-size: 0.76rem; line-height: 1.4; }
  .metric { font-size: 1.65rem; }
  .panel-head { align-items: stretch; flex-direction: column; gap: 16px; }
  .panel-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .ai-button, .copy-button { min-height: 44px; }
  .empty-state { min-height: 220px; font-size: 0.9rem; line-height: 1.6; }
  .results { max-height: none; overflow: visible; }
  .result-row { grid-template-columns: minmax(0, 1fr); }
  .ai-panel-head { flex-wrap: wrap; }
  .paste-panel span:last-child { font-size: 0.85rem; line-height: 1.6; font-weight: 500; }
  .moon-footer { min-height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.fix-two {
  display: inline-block;
  font-size: 0.94em;
  line-height: 1;
  vertical-align: -0.04em;
  transform: none;
  transform-origin: center;
}

