:root {
  --ink: #14201d;
  --muted: #5c6862;
  --paper: #f5f2ea;
  --panel: #fffaf0;
  --line: rgba(20, 32, 29, 0.16);
  --forest: #14584f;
  --teal: #1d8a80;
  --amber: #c9822b;
  --clay: #b64d35;
  --charcoal: #111816;
  --white: #ffffff;
  --shadow: 0 20px 60px rgba(16, 27, 24, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Source Sans 3", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  color: var(--white);
  background: linear-gradient(180deg, rgba(12, 18, 16, 0.88), rgba(12, 18, 16, 0.18));
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 3vw, 34px);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.86);
}

.nav-links a:hover {
  color: var(--white);
}

.language-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(13, 19, 17, 0.38);
}

.lang-button {
  min-width: 46px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.lang-button.active {
  color: var(--charcoal);
  background: var(--white);
}

.signin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.signin-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.signin-button[hidden],
.signout-button[hidden] {
  display: none !important;
}

.signout-button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  color: var(--charcoal);
  background: var(--white);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 760;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 68vh;
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(300px, 0.58fr);
  gap: clamp(18px, 4vw, 56px);
  align-items: end;
  padding: 96px clamp(18px, 5vw, 72px) 28px;
  overflow: hidden;
  color: var(--white);
  background: var(--charcoal);
}

.hero-media,
.hero-media::after {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("assets/gpsflow-hero.png");
  background-size: cover;
  background-position: center;
}

.hero-media::after {
  content: "";
  background:
    linear-gradient(90deg, rgba(8, 13, 12, 0.92) 0%, rgba(8, 13, 12, 0.62) 42%, rgba(8, 13, 12, 0.12) 100%),
    linear-gradient(0deg, rgba(8, 13, 12, 0.84) 0%, rgba(8, 13, 12, 0.05) 42%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  padding-bottom: 30px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 5rem;
  line-height: 0.96;
  letter-spacing: 0;
  font-weight: 780;
}

.hero-copy {
  max-width: 620px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 760;
  font-size: 0.94rem;
}

.button.primary {
  color: var(--charcoal);
  background: var(--white);
}

.button.secondary {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.09);
}

.hero-panel {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(760px, 100%);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  overflow: hidden;
}

.hero-insight {
  position: relative;
  z-index: 1;
  align-self: center;
  display: grid;
  gap: 1px;
  width: min(430px, 100%);
  justify-self: end;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.32);
}

.hero-insight > p,
.hero-insight > div {
  margin: 0;
  padding: 14px 16px;
  background: rgba(10, 16, 14, 0.66);
  backdrop-filter: blur(16px);
}

.hero-insight > p {
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.hero-insight > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-insight span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.84rem;
}

.hero-insight strong {
  color: var(--white);
  font-size: 0.9rem;
  text-align: right;
}

.hero-panel div {
  padding: 18px;
  background: rgba(10, 16, 14, 0.64);
  backdrop-filter: blur(14px);
}

.metric,
.label {
  display: block;
}

.metric {
  font-size: 1.24rem;
  font-weight: 820;
}

.label {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
}

.about-band,
.workflow-band,
.assistant-band,
.modules-band {
  padding: clamp(54px, 7vw, 88px) clamp(18px, 5vw, 72px);
}

.about-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(340px, 1.22fr);
  gap: clamp(28px, 6vw, 92px);
  align-items: start;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.about-kicker {
  max-width: 620px;
}

.about-copy {
  display: grid;
  gap: 18px;
  max-width: 880px;
  padding-top: 8px;
  font-size: 1.05rem;
}

.about-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.78;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 32px;
}

h2 {
  margin: 0;
  font-size: 2.4rem;
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 760;
}

h3 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.3;
  letter-spacing: 0;
  font-weight: 760;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.workflow-step {
  min-height: 270px;
  padding: 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.56);
}

.step-number {
  display: inline-block;
  margin-bottom: 76px;
  color: var(--teal);
  font-weight: 850;
  font-size: 0.92rem;
}

.workflow-step p,
.module p,
.capability p,
.assistant-copy p {
  color: var(--muted);
  line-height: 1.62;
}

.assistant-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(32px, 6vw, 86px);
  align-items: start;
  background: var(--charcoal);
  color: var(--white);
}

.assistant-copy {
  position: sticky;
  top: 110px;
}

.assistant-copy p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
}

.capability-list {
  display: grid;
  gap: 14px;
}

.capability {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.capability h3 {
  color: var(--white);
}

.capability p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.68);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.module {
  min-height: 214px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.module h3::before,
.capability h3::before {
  content: "";
  display: block;
  width: 34px;
  height: 4px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--clay);
}

.capability:nth-child(2) h3::before,
.module:nth-child(2) h3::before {
  background: var(--teal);
}

.capability:nth-child(3) h3::before,
.module:nth-child(3) h3::before {
  background: var(--amber);
}

.module:nth-child(4) h3::before {
  background: var(--forest);
}

.module:nth-child(5) h3::before {
  background: var(--teal);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 26px clamp(18px, 5vw, 72px);
  color: rgba(255, 255, 255, 0.72);
  background: #0b100f;
}

.site-footer span:first-child {
  color: var(--white);
  font-weight: 800;
}

.workspace-shell {
  min-height: 100vh;
  padding: 106px clamp(18px, 5vw, 72px) 56px;
  background: var(--paper);
}

.workspace-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.workspace-hero h1 {
  color: var(--ink);
  font-size: 3.4rem;
}

.workspace-hero p {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.workspace-account {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.workspace-account span {
  color: var(--muted);
  font-size: 0.9rem;
}

.workspace-account strong {
  color: var(--ink);
  font-size: 1.04rem;
}

.account-name-button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.account-name-button:hover strong {
  color: var(--forest);
  text-decoration: underline;
}

.workspace-account .button.secondary {
  min-height: 38px;
  margin-top: 8px;
  color: var(--forest);
  border-color: var(--line);
  background: var(--white);
}

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.project-context {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(120px, 0.33fr);
  gap: 12px;
  align-items: end;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.project-context-status {
  grid-column: 1 / -1;
  min-height: 20px;
  margin: 0;
  color: var(--forest);
  font-size: 0.9rem;
}

.project-context-status.error {
  color: var(--clay);
}

.project-context label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 760;
}

.project-context label[hidden] {
  display: none;
}

.project-context select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.workbench-step-selector {
  grid-column: 1 / 2;
  grid-row: 2;
}

.workbench-step-status {
  grid-column: 1 / -1;
  min-height: 20px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.workbench-step-status.error {
  color: var(--clay);
}

.project-context select:disabled {
  color: var(--muted);
  background: rgba(246, 248, 247, 0.9);
}

.project-context .button.primary {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  width: 100%;
  border: 0;
  color: var(--white);
  background: var(--forest);
}

.workspace-card {
  min-height: 270px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  align-content: stretch;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.workspace-card h2 {
  font-size: 1.42rem;
}

.workspace-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.workspace-card .active-project {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid rgba(29, 138, 128, 0.28);
  border-radius: 8px;
  color: var(--forest);
  background: rgba(29, 138, 128, 0.08);
  font-size: 0.86rem;
  font-weight: 760;
}

.workspace-tag {
  color: var(--teal);
  font-weight: 850;
  font-size: 0.88rem;
}

.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.workspace-actions .button.primary {
  color: var(--white);
  border: 0;
  background: var(--forest);
}

.workspace-actions .button.secondary {
  color: var(--forest);
  border-color: var(--line);
  background: var(--white);
}

.download-links {
  min-height: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.download-links[aria-hidden="true"] {
  visibility: hidden;
}

.download-links.error {
  color: #a33a2b;
}

.download-links p {
  margin: 0 0 8px;
}

.download-links div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.download-links a,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--forest);
  background: var(--white);
  font-weight: 760;
  text-decoration: none;
}

.small-button.disabled {
  pointer-events: none;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.04);
}

.small-button.danger {
  color: #9a3326;
}

.case-workspace {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 104px 0 48px;
}

.case-workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.case-workspace-hero h1 {
  margin: 6px 0 10px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.case-workspace-hero p {
  margin: 0;
  color: var(--muted);
}

.case-workspace-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.run-step-selector {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 760;
}

.run-step-selector[hidden] {
  display: none !important;
}

.editor-label[hidden] {
  display: none !important;
}

.inline-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.circle-check-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.circle-check-dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border: 1.5px solid rgba(29, 138, 128, 0.62);
  border-radius: 50%;
  background: var(--white);
}

.circle-check-input:checked + .circle-check-dot {
  border-color: var(--forest);
  background: radial-gradient(circle at center, var(--forest) 0 42%, transparent 47%);
}

.inline-check:has(.circle-check-input:focus-visible) .circle-check-dot {
  outline: 2px solid rgba(29, 138, 128, 0.26);
  outline-offset: 2px;
}

.run-custom-executable-option {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
}

.run-step-selector select {
  min-height: 38px;
  min-width: min(320px, 72vw);
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.run-step-selector select:disabled {
  color: var(--muted);
  background: rgba(246, 248, 247, 0.9);
}

.run-step-status {
  margin-top: 8px !important;
  color: var(--muted);
  font-size: 0.92rem;
}

.run-step-status.error {
  color: var(--clay);
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.case-actions .button {
  min-width: 116px;
  color: var(--forest);
  border: 1px solid rgba(29, 138, 128, 0.28);
  background: var(--white);
  box-shadow: none;
}

.case-actions .button:hover,
.case-actions .button:focus-visible {
  border-color: rgba(29, 138, 128, 0.56);
  background: rgba(29, 138, 128, 0.08);
}

.case-builder-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.step-selector-panel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.step-selector-panel[hidden] {
  display: none !important;
}

.step-selector-panel label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 760;
}

.step-selector-panel select,
.step-selector-panel input {
  min-height: 38px;
  min-width: 150px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.step-selector-panel input {
  min-width: 190px;
  padding-right: 12px;
}

.step-selector-panel select:disabled,
.step-selector-panel input:disabled {
  color: var(--muted);
  background: rgba(246, 248, 247, 0.9);
}

.step-selector-panel strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 760;
}

.step-selector-panel p {
  flex: 1 1 220px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.step-selector-panel p.error {
  color: var(--clay);
}

.file-panel,
.editor-panel {
  min-height: 620px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1.18rem;
}

.file-list {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.file-list-group-label {
  padding: 7px 10px;
  color: var(--muted);
  background: rgba(29, 138, 128, 0.07);
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.keyword-category-group {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.keyword-category-group:last-child {
  border-bottom: 0;
}

.keyword-category-group > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 10px;
  color: var(--ink);
  background: rgba(29, 138, 128, 0.035);
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.keyword-category-group > summary::-webkit-details-marker {
  display: none;
}

.keyword-category-group > summary::before {
  content: "▸";
  flex: 0 0 auto;
  color: var(--forest);
  font-size: 0.95rem;
  font-weight: 800;
  transition: transform 0.16s ease;
}

.keyword-category-group[open] > summary::before {
  transform: rotate(90deg);
}

.keyword-category-group > summary strong {
  flex: 1 1 auto;
  font-size: 0.82rem;
}

.keyword-category-group > summary span {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(29, 138, 128, 0.09);
  font-size: 0.72rem;
  text-align: center;
}

.keyword-category-items {
  display: grid;
}

.keyword-category-items .file-line {
  padding: 7px 10px 7px 14px;
}

.keyword-file-line {
  grid-template-columns: 30px minmax(max-content, 1fr) auto;
  gap: 8px;
  min-height: 48px;
  border-left: 3px solid transparent;
}

.keyword-file-line.active {
  border-left-color: var(--forest);
}

.keyword-item-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: var(--forest);
  background: rgba(29, 138, 128, 0.09);
}

.keyword-item-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.keyword-item-title {
  min-width: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.84rem;
  white-space: nowrap;
}

.keyword-item-hint {
  justify-self: end;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

.placeholder-keyword-line {
  cursor: default;
  background: rgba(29, 138, 128, 0.018);
}

.placeholder-keyword-line:hover {
  background: rgba(29, 138, 128, 0.018);
}

.placeholder-keyword-line .keyword-item-title {
  color: var(--muted);
}

.placeholder-keyword-line .keyword-item-icon {
  color: rgba(67, 82, 78, 0.66);
  background: rgba(67, 82, 78, 0.07);
}

.file-line.virtual-file-line {
  border-style: dashed;
}

.file-line.disabled-keyword {
  opacity: 0.58;
}

.file-list-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
}

.file-line {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: var(--white);
  text-align: left;
  cursor: pointer;
}

.file-line:last-child {
  border-bottom: 0;
}

.file-line.active {
  background: rgba(29, 138, 128, 0.08);
}

.file-line.pending {
  grid-template-columns: 18px minmax(0, 1fr);
  cursor: default;
}

.file-line.pending strong {
  color: var(--muted);
}

.file-line.pending span:last-child {
  grid-column: 2;
  justify-self: start;
  white-space: nowrap;
}

.file-line span:last-child {
  justify-self: end;
}

.file-line.pending span:last-child {
  justify-self: start;
}

.file-select-indicator {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(29, 138, 128, 0.5);
  border-radius: 50%;
  background: var(--white);
}

.file-line.active .file-select-indicator {
  border-color: var(--forest);
  background: var(--forest);
  box-shadow: inset 0 0 0 3px var(--white);
}

.compact-file-list .file-line {
  grid-template-columns: 18px minmax(0, 1fr) auto auto;
}

.source-file-delete {
  justify-self: end;
  padding: 3px 8px;
  border: 1px solid rgba(162, 59, 59, 0.28);
  border-radius: 6px;
  color: #9a3326;
  background: rgba(162, 59, 59, 0.06);
  font-size: 0.78rem;
  font-weight: 760;
}

.source-file-delete:hover,
.source-file-delete:focus-visible {
  outline: none;
  color: var(--white);
  background: #9a3326;
}

.file-line strong,
.file-line span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-line span {
  color: var(--muted);
  font-size: 0.86rem;
}

.editor-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}

.ai-material-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(29, 138, 128, 0.22);
  border-radius: 8px;
  background: rgba(29, 138, 128, 0.06);
}

.ai-material-panel[hidden] {
  display: none;
}

.ai-material-panel h3 {
  margin: 0;
  font-size: 1rem;
}

.light-preprocessor-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.light-preprocessor-panel[hidden] {
  display: none;
}

.preprocessor-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
}

.preprocessor-toolbar[hidden] {
  display: none;
}

.preprocessor-icon-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--forest);
  background: var(--white);
  cursor: pointer;
}

.preprocessor-icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.preprocessor-icon-button:hover,
.preprocessor-icon-button:focus-visible {
  outline: none;
  border-color: rgba(29, 138, 128, 0.5);
  background: rgba(29, 138, 128, 0.1);
}

.preprocessor-icon-button.primary {
  color: var(--white);
  border-color: var(--forest);
  background: var(--forest);
}

.preprocessor-icon-button.danger {
  color: #9a3326;
}

.preprocessor-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.light-preprocessor-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 510px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.keyword-editor,
.keyword-preview {
  min-width: 0;
  padding: 16px;
}

.keyword-editor {
  overflow-y: auto;
  border-bottom: 1px solid var(--line);
}

.rock-secondary-nav {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 5px;
  margin: -4px 0 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.rock-secondary-nav[hidden] {
  display: none;
}

.rock-secondary-nav button {
  position: relative;
  min-width: 84px;
  min-height: 32px;
  padding: 5px 20px 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.rock-secondary-nav button:hover,
.rock-secondary-nav button:focus-visible,
.rock-secondary-nav button.active {
  outline: none;
  border-color: rgba(29, 138, 128, 0.5);
  background: rgba(29, 138, 128, 0.1);
}

.rock-secondary-nav button.disabled-keyword {
  opacity: 0.58;
}

.rock-secondary-nav strong {
  overflow: hidden;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rock-enabled-dot {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(29, 138, 128, 0.55);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--white);
}

.rock-enabled-dot.enabled {
  border-color: var(--forest);
  background: var(--forest);
}

.rock-enabled-dot:hover,
.rock-enabled-dot:focus-visible {
  outline: 2px solid rgba(29, 138, 128, 0.24);
  outline-offset: 2px;
}

.keyword-editor-heading[hidden] {
  display: none;
}

.keyword-editor-heading,
.keyword-preview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.keyword-editor-heading > div:first-child {
  display: grid;
  gap: 4px;
}

.keyword-editor-heading strong,
.keyword-preview-heading strong {
  font-family: Consolas, "Courier New", monospace;
}

.keyword-editor-heading span,
.keyword-preview-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.keyword-enabled {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.keyword-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 12px;
}

.keyword-form.grouped-keyword-form {
  grid-template-columns: minmax(0, 1fr);
}

.keyword-field-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(29, 138, 128, 0.025);
}

.keyword-field-group > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.keyword-field-group > summary::-webkit-details-marker,
.keyword-preview > summary::-webkit-details-marker {
  display: none;
}

.keyword-field-group > summary::before,
.keyword-preview > summary::before {
  content: "▸";
  flex: 0 0 auto;
  color: var(--forest);
  font-size: 1.2rem;
  font-weight: 800;
  transition: transform 0.16s ease;
}

.keyword-field-group[open] > summary::before,
.keyword-preview[open] > summary::before {
  transform: rotate(90deg);
}

.keyword-field-group > summary > span {
  display: flex;
  align-items: baseline;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 5px 10px;
  min-width: 0;
}

.keyword-field-group > summary strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.keyword-field-group > summary small,
.keyword-field-group > summary em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 500;
}

.keyword-field-group > summary small::before {
  content: "·";
  margin-right: 10px;
}

.keyword-field-group > summary em {
  margin-left: auto;
  white-space: nowrap;
}

.keyword-group-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 12px;
  padding: 4px 14px 14px;
  border-top: 1px solid rgba(29, 138, 128, 0.12);
}

.keyword-form label {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 720;
}

.keyword-form label.keyword-check-row {
  display: flex;
  align-items: center;
  min-height: 40px;
}

.keyword-form input:not([type="checkbox"]),
.keyword-form select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.keyword-form textarea {
  min-height: 92px;
}

.keyword-preview {
  background: rgba(29, 138, 128, 0.025);
}

.keyword-preview > summary {
  align-items: center;
  margin: 0;
  padding: 2px 0;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.keyword-preview > summary strong {
  flex: 1 1 auto;
}

.keyword-preview[open] > summary {
  margin-bottom: 14px;
}

.keyword-preview textarea {
  width: 100%;
  min-height: 230px;
  resize: none;
  font-size: 0.82rem;
  white-space: pre;
}

.file-editor-body {
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr) auto;
  gap: 12px;
}

.file-editor-body[hidden] {
  display: none;
}

.diagnostics-panel {
  display: grid;
}

.diagnostics-panel[hidden] {
  display: none;
}

.run-console-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.diagnostics-workspace-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.35fr);
  gap: 18px;
  align-items: stretch;
}

.results-workspace-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.38fr);
  gap: 18px;
  align-items: stretch;
  min-width: 0;
}

.simulator-manager-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(360px, 1.38fr);
  gap: 18px;
  align-items: stretch;
}

.run-control-panel,
.run-monitor-panel {
  min-height: 560px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.run-control-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.diagnostics-question-panel,
.diagnostics-result-panel,
.results-file-panel,
.results-preview-panel,
.simulator-left-panel,
.simulator-editor-panel {
  min-height: 560px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.diagnostics-question-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.diagnostics-result-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.results-file-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.results-preview-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.simulator-left-panel {
  display: grid;
  align-content: start;
  gap: 18px;
}

.simulator-editor-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
}

.simulator-panel-section {
  display: grid;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.simulator-panel-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.simulator-panel-section > .button.secondary {
  width: 100%;
  color: var(--forest);
  border: 1px solid rgba(29, 138, 128, 0.28);
  background: var(--white);
}

.simulator-version-summary {
  padding: 14px;
  border: 1px dashed rgba(29, 138, 128, 0.32);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(29, 138, 128, 0.05);
  line-height: 1.6;
  min-width: 0;
  overflow-wrap: anywhere;
}

.simulator-panel-section select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}

.compact-file-list {
  min-height: 180px;
}

.simulator-description-input {
  min-height: 130px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  line-height: 1.55;
  resize: vertical;
}

.simulator-description-input::placeholder {
  color: rgba(67, 82, 78, 0.46);
}

.source-code-editor {
  min-height: 360px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  resize: vertical;
  white-space: pre;
}

.source-code-editor:read-only {
  background: rgba(29, 138, 128, 0.05);
}

.results-detail {
  min-width: 0;
  max-width: 100%;
  min-height: 360px;
  padding: 16px;
  border: 1px dashed rgba(29, 138, 128, 0.32);
  border-radius: 8px;
  background: rgba(29, 138, 128, 0.05);
}

.result-file-details {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
}

.result-file-details div {
  display: grid;
  gap: 4px;
}

.result-file-details dt {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
}

.result-file-details dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.output-preview-text {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  max-height: 520px;
  min-height: 300px;
  margin: 16px 0 0;
  padding: 14px;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre;
  word-break: normal;
}

.diagnostics-problem-input {
  min-height: 260px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  line-height: 1.55;
  resize: vertical;
}

.diagnostics-result-panel pre {
  min-height: 420px;
  margin: 0;
  padding: 16px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--ink);
  background: rgba(29, 138, 128, 0.05);
  border: 1px dashed rgba(29, 138, 128, 0.32);
  border-radius: 8px;
  line-height: 1.6;
}

.run-number-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.run-actions {
  justify-content: stretch;
  gap: 8px;
}

.run-actions .button {
  flex: 1 1 0;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 6px;
  box-shadow: none;
  white-space: nowrap;
}

.source-save-actions {
  justify-content: flex-start;
}

.source-save-actions .button {
  flex: 0 0 auto;
  min-width: 86px;
  padding: 8px 16px;
}

.run-actions .button.primary,
.run-actions .button.secondary,
.run-actions .button.danger {
  color: var(--forest);
  border: 1px solid rgba(29, 138, 128, 0.28);
  background: var(--white);
}

.run-actions .button.danger {
  color: #a23b3b;
  border-color: rgba(162, 59, 59, 0.28);
}

.run-actions .button:hover,
.run-actions .button:focus-visible {
  border-color: rgba(29, 138, 128, 0.56);
  background: rgba(29, 138, 128, 0.08);
}

.run-actions .button.danger:hover,
.run-actions .button.danger:focus-visible {
  border-color: rgba(162, 59, 59, 0.5);
  background: rgba(162, 59, 59, 0.08);
}

.run-actions .button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  border-color: var(--line);
  background: rgba(246, 248, 247, 0.9);
  opacity: 0.72;
}

.runtime-parameters-panel {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.panel-heading.compact {
  margin-bottom: 2px;
}

.panel-heading.compact h3 {
  margin: 0;
  font-size: 1rem;
}

.runtime-parameter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.runtime-parameter-grid label {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(86px, 0.85fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.runtime-parameter-grid span {
  min-width: 0;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.8rem;
  white-space: nowrap;
}

.runtime-parameter-grid input {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 0.86rem;
}

.runtime-parameter-grid input::placeholder {
  color: #a9b3b0;
  opacity: 1;
}

.run-monitor-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.run-monitor-stack {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 420px;
}

.run-terminal-strip,
.run-log-window {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.run-output-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.run-output-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.log-refresh-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.log-refresh-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.log-refresh-controls select {
  width: auto;
  min-width: 84px;
  padding: 7px 28px 7px 9px;
}

.run-terminal-strip pre,
.run-log-window pre {
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow: auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.run-terminal-strip pre {
  min-height: 88px;
  max-height: 120px;
  border: 1px solid rgba(12, 31, 39, 0.12);
  color: var(--ink);
  background: var(--white);
}

.run-log-window pre {
  min-height: 260px;
  max-height: min(52vh, 520px);
  border: 1px dashed rgba(29, 138, 128, 0.32);
  color: var(--muted);
  background: rgba(29, 138, 128, 0.05);
  resize: vertical;
}

.diagnostics-panel pre {
  min-height: 320px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow: auto;
}

.feedback-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: var(--white);
  background: var(--forest);
  font: inherit;
  font-weight: 760;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.feedback-fab[hidden] {
  display: none;
}

.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
}

.feedback-modal[hidden] {
  display: none;
}

.feedback-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 13, 12, 0.58);
}

.feedback-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.feedback-dialog h3,
.feedback-dialog p {
  margin: 0;
}

.feedback-dialog-actions {
  position: sticky;
  bottom: -18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 4px -18px -18px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.feedback-rating {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-rating .small-button.active {
  color: var(--white);
  border-color: var(--forest);
  background: var(--forest);
}

.feedback-textarea {
  min-height: 72px;
  resize: vertical;
}

.smart-modify-textarea {
  min-height: 160px;
}

.smart-modify-textarea::placeholder {
  color: rgba(67, 82, 78, 0.46);
  opacity: 1;
}

.editor-label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 760;
}

.editor-label input,
.editor-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.editor-label input {
  min-height: 42px;
  padding: 10px 12px;
}

.editor-panel textarea {
  min-height: 420px;
  padding: 14px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.5;
}

.editor-panel textarea.material-input {
  min-height: 130px;
  font-family: inherit;
}

.editor-panel textarea.material-input.compact {
  min-height: 82px;
}

.reference-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.reference-file-list {
  display: grid;
  gap: 8px;
}

.reference-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.reference-file-item strong,
.reference-file-item span {
  overflow-wrap: anywhere;
}

.reference-file-item span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.84rem;
}

.editor-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.editor-actions .button {
  min-height: 42px;
}

.editor-actions .button:disabled {
  cursor: not-allowed;
  color: #96a39f;
  border: 1px solid var(--line);
  background: #eef2f1;
  box-shadow: none;
  opacity: 1;
}

.login-modal,
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 20px;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 20px;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 20px;
}

.account-modal.open {
  display: grid;
}

.project-modal.open {
  display: grid;
}

.account-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.project-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.account-dialog h2 {
  font-size: 2.1rem;
}

.project-dialog h2 {
  font-size: 1.85rem;
}

.account-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 1px;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.account-details div {
  padding: 16px;
  background: var(--white);
}

.account-details dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.account-details dd {
  margin: 7px 0 0;
  color: var(--ink);
  font-weight: 760;
  overflow-wrap: anywhere;
}

.account-storage-warning {
  margin: -8px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(182, 77, 53, 0.28);
  border-radius: 8px;
  color: var(--clay);
  background: rgba(182, 77, 53, 0.08);
  font-size: 0.92rem;
}

.account-storage-warning[hidden] {
  display: none;
}

.account-section {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.account-section h3 {
  font-size: 1.08rem;
}

.admin-shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 106px 0 52px;
}

.admin-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.admin-settings-panel {
  margin-bottom: 18px;
}

.admin-settings-row {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-settings-row label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
}

.admin-settings-row input {
  width: 150px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.admin-settings-row p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-settings-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
}

.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.admin-settings-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
}

.admin-settings-grid input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.admin-security-settings {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-security-settings h4 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.admin-security-settings p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-security-settings.locked input {
  color: var(--muted);
  background: rgba(22, 36, 48, 0.05);
}

.admin-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
}

.admin-toolbar select {
  min-width: 150px;
  min-height: 36px;
  padding: 7px 34px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.admin-table-wrap {
  overflow: auto;
}

.admin-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-table td strong,
.admin-table td span,
.admin-table td small,
.admin-table td em {
  display: block;
}

.admin-table td span,
.admin-table td small {
  color: var(--muted);
}

.admin-table td em {
  margin-top: 4px;
  color: var(--forest);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 760;
}

.admin-table select,
.admin-table input[type="text"],
.admin-table input[type="password"],
.admin-table input[type="number"] {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.admin-table .admin-core-input,
.admin-table .admin-limit-input {
  width: 72px;
  min-width: 72px;
}

.admin-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(29, 138, 128, 0.28);
  border-radius: 999px;
  color: var(--forest);
  background: rgba(29, 138, 128, 0.08);
  font-size: 0.82rem;
  font-weight: 760;
  white-space: nowrap;
}

.admin-status-badge.frozen {
  border-color: rgba(182, 77, 53, 0.28);
  color: var(--clay);
  background: rgba(182, 77, 53, 0.08);
}

.admin-actions-cell {
  white-space: nowrap;
}

.admin-actions-cell .small-button {
  margin-right: 6px;
}

.admin-password-reset {
  display: inline-grid;
  grid-template-columns: minmax(120px, 0.8fr) auto;
  gap: 6px;
  align-items: center;
  margin-right: 6px;
  vertical-align: middle;
}

.admin-password-reset input {
  min-width: 130px;
}

.admin-org-cell {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.admin-confirm-check {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
  word-break: keep-all;
}

.admin-org-cell small {
  grid-column: 1 / -1;
}

.admin-confirm-check input {
  margin: 0;
}

.unit-access-active,
.unit-access-pending {
  font-size: 0.78rem;
  font-weight: 760;
}

.unit-access-active {
  color: var(--forest) !important;
}

.unit-access-pending {
  color: var(--clay) !important;
}

.project-list {
  display: grid;
  gap: 8px;
}

.project-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.project-item strong,
.project-item span {
  display: block;
}

.project-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.88rem;
}

.delete-project {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(182, 77, 53, 0.34);
  border-radius: 8px;
  color: var(--clay);
  background: rgba(182, 77, 53, 0.08);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 760;
  cursor: pointer;
}

.password-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.password-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 760;
}

.password-form input {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.password-form .button.primary {
  border: 0;
  color: var(--white);
  background: var(--forest);
}

.project-create-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.project-create-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 760;
}

.project-create-form input,
.project-create-form select {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.project-create-form input:disabled {
  color: var(--muted);
  background: rgba(246, 248, 247, 0.86);
}

.project-create-form .button.primary {
  min-height: 44px;
  border: 0;
  color: var(--white);
  background: var(--forest);
}

.login-modal.open,
.contact-modal.open {
  display: grid;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 13, 12, 0.68);
  backdrop-filter: blur(8px);
}

.login-dialog,
.contact-dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-dialog h2,
.contact-dialog h2 {
  font-size: 2.1rem;
}

.login-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.login-form,
.contact-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 20px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 32, 29, 0.06);
}

.login-tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 760;
  cursor: pointer;
}

.login-tab.active {
  color: var(--white);
  background: var(--forest);
}

.login-form label,
.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 760;
}

.login-form label[hidden] {
  display: none;
}

.login-form input,
.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.contact-form textarea {
  min-height: 120px;
  padding: 12px 13px;
  resize: vertical;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover {
  color: var(--forest);
  background: rgba(20, 88, 79, 0.08);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.login-form .button.primary,
.contact-form .button.primary {
  width: 100%;
  border: 0;
  color: var(--white);
  background: var(--forest);
  cursor: pointer;
}

.login-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--forest);
  font-size: 0.92rem;
  line-height: 1.45;
}

.login-status.error {
  color: var(--clay);
}

.login-note {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 980px) {
  .preprocessor-toolbar {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .keyword-preview textarea {
    min-height: 220px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .workflow-grid,
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assistant-band {
    grid-template-columns: 1fr;
  }

  .about-band {
    grid-template-columns: 1fr;
  }

    .workspace-hero,
    .project-context,
    .workspace-grid,
    .case-workspace-hero,
    .case-builder-grid,
    .run-console-grid,
    .diagnostics-workspace-grid,
    .results-workspace-grid,
    .simulator-manager-grid {
    grid-template-columns: 1fr;
  }

  .workbench-step-selector,
  .project-context .button.primary {
    grid-column: 1;
    grid-row: auto;
  }

  .case-actions {
    justify-content: flex-start;
  }

  .file-panel,
  .editor-panel,
  .run-control-panel,
  .run-monitor-panel {
    min-height: 0;
  }

  .run-number-grid {
    grid-template-columns: 1fr;
  }

  .run-log-window pre {
    min-height: 220px;
    max-height: 48vh;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 4.25rem;
  }

  h2 {
    font-size: 2.1rem;
  }

  .hero-insight {
    justify-self: start;
  }

  .assistant-copy {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-content: stretch;
    align-items: start;
    gap: 12px;
    padding: 14px;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .language-toggle {
    transform: none;
  }

  .hero {
    min-height: auto;
    padding: 128px 18px 22px;
  }

  .hero-content {
    padding-bottom: 24px;
  }

  h1 {
    font-size: 3.2rem;
  }

  .workspace-hero h1 {
    font-size: 2.45rem;
  }

  .case-workspace {
    width: min(100% - 28px, 1180px);
    padding-top: 92px;
  }

  .case-workspace-hero h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.72rem;
  }

  .hero-copy,
  .about-copy {
    font-size: 1rem;
  }

  .hero-panel,
  .workflow-grid,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel div {
    padding: 14px 16px;
  }

  .workflow-step {
    min-height: auto;
  }

  .step-number {
    margin-bottom: 36px;
  }

  .site-footer {
    flex-direction: column;
  }

  .signin-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .signout-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .login-dialog {
    padding: 24px;
  }

  .case-actions,
  .workspace-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .editor-panel textarea {
    min-height: 320px;
  }

  .account-dialog {
    padding: 24px;
  }

  .account-details,
  .password-form {
    grid-template-columns: 1fr;
  }
}

/* Output Variables Tabs */
.output-vars-tabs-container {
  grid-column: 1 / -1;
}

/* 第一级标签（大类）+ 快捷按钮 */
.output-vars-primary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(29, 138, 128, 0.04);
  border: 1px solid var(--line);
  border-radius: 7px 7px 0 0;
}

.output-vars-primary-tabs {
  display: flex;
  gap: 6px;
}

.output-vars-primary-tab {
  padding: 8px 20px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: var(--white);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
  transition: all 0.15s ease;
}

.output-vars-primary-tab:hover {
  color: var(--forest);
  background: rgba(29, 138, 128, 0.08);
  border-color: rgba(29, 138, 128, 0.3);
}

.output-vars-primary-tab.active {
  color: var(--white);
  background: var(--forest);
  border-color: var(--forest);
  font-weight: 720;
}

.output-vars-quick-actions {
  display: flex;
  gap: 6px;
}

.output-vars-quick-btn {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--forest);
  background: var(--white);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}

.output-vars-quick-btn:hover {
  border-color: rgba(29, 138, 128, 0.5);
  background: rgba(29, 138, 128, 0.08);
}

/* 第二级标签（小类） */
.output-vars-secondary-header {
  position: relative;
  min-height: 44px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--white);
}

.output-vars-secondary-tabs {
  display: none;
  gap: 4px;
  padding: 6px 12px;
}

.output-vars-secondary-tabs.active {
  display: flex;
}

.output-vars-secondary-tab {
  flex: 1;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.output-vars-secondary-tab:hover {
  color: var(--forest);
  background: rgba(29, 138, 128, 0.06);
}

.output-vars-secondary-tab.active {
  color: var(--forest);
  background: rgba(29, 138, 128, 0.1);
  border-color: rgba(29, 138, 128, 0.25);
  font-weight: 680;
}

/* 内容区域 */
.output-vars-tabs-content {
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 7px 7px;
  background: var(--white);
  overflow: hidden;
  min-height: 420px;
}

.output-vars-tab-panel {
  display: none;
  padding: 14px;
  min-height: 420px;
}

.output-vars-tab-panel.active {
  display: block;
}

/* Variable Selector - Two Column Layout */
.var-selector-container {
  display: flex;
  flex-direction: column;
}

/* 两列布局 */
.var-selector-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.var-selector-left,
.var-selector-right {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  overflow: hidden;
}

/* 列标题 */
.var-column-label {
  padding: 9px 12px;
  color: var(--muted);
  background: rgba(29, 138, 128, 0.04);
  font-size: 0.78rem;
  font-weight: 680;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--line);
}

/* 左侧标题带搜索框 */
.var-column-header-with-search {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 36px;
  padding: 0 12px;
  background: rgba(29, 138, 128, 0.04);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.var-column-header-with-search .var-column-label {
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 680;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}

.var-column-header-with-search .var-search-input {
  flex: 0 0 auto;
  width: 140px;
  height: 20px;
  margin: 0;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.72rem;
  line-height: 18px;
  background: var(--white);
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.var-column-header-with-search .var-search-input::placeholder {
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.6;
}

.var-column-header-with-search .var-search-input:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 2px rgba(29, 138, 128, 0.1);
}

.var-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  background: rgba(29, 138, 128, 0.04);
  border-bottom: 1px solid var(--line);
}

.var-column-header .var-column-label {
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

.var-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 10px;
  color: var(--white);
  background: var(--forest);
  font-size: 0.72rem;
  font-weight: 680;
}

/* 左侧：可选变量列表 */
.var-available-list {
  overflow-y: auto;
  max-height: 300px;
  padding: 6px;
}
.var-available-list::-webkit-scrollbar {
  width: 8px;
}

.var-available-list::-webkit-scrollbar-track {
  background: rgba(29, 138, 128, 0.04);
  border-radius: 4px;
}

.var-available-list::-webkit-scrollbar-thumb {
  background: rgba(29, 138, 128, 0.2);
  border-radius: 4px;
}

.var-available-list::-webkit-scrollbar-thumb:hover {
  background: rgba(29, 138, 128, 0.35);
}

.var-available-item {
  display: grid;
  grid-template-columns: 32px 1fr 24px;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.var-available-item:hover {
  background: rgba(29, 138, 128, 0.08);
}

.var-available-item:hover .var-add-icon {
  opacity: 1;
  transform: scale(1.1);
}

.var-add-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  color: var(--white);
  background: var(--forest);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  opacity: 0.7;
  transition: all 0.12s ease;
}

.var-item-index {
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--forest);
  background: rgba(29, 138, 128, 0.12);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 680;
  text-align: center;
}

.var-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
}

/* 右侧：已选变量列表 */
.var-selected-list {
  overflow-y: auto;
  max-height: 340px;
  min-height: 120px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.var-selected-list::-webkit-scrollbar {
  width: 8px;
}

.var-selected-list::-webkit-scrollbar-track {
  background: rgba(29, 138, 128, 0.04);
  border-radius: 4px;
}

.var-selected-list::-webkit-scrollbar-thumb {
  background: rgba(29, 138, 128, 0.2);
  border-radius: 4px;
}

.var-selected-list::-webkit-scrollbar-thumb:hover {
  background: rgba(29, 138, 128, 0.35);
}

.var-selected-empty {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.var-selected-item {
  display: grid;
  grid-template-columns: 20px 32px 1fr 24px;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(29, 138, 128, 0.04);
  cursor: move;
  transition: all 0.12s ease;
}

.var-selected-item:hover {
  background: rgba(29, 138, 128, 0.08);
  border-color: rgba(29, 138, 128, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.var-selected-item.dragging {
  opacity: 0.5;
  transform: scale(1.02);
}

.var-drag-handle {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1;
  cursor: grab;
  user-select: none;
}

.var-selected-item:active .var-drag-handle {
  cursor: grabbing;
}

.var-selected-item .var-item-index {
  color: var(--white);
  background: var(--forest);
}

.var-remove-btn {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.12s ease;
}

.var-remove-btn:hover {
  color: #9a3326;
}

.field-helper {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.4;
}
