/* OzSFKit specific styles */
.sfkit-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  padding-bottom: 70px;
}
.sfkit-sidebar {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.045);
  padding: 14px;
  align-self: start;
  position: sticky;
  top: 92px;
}
.category-filter {
  display: grid;
  gap: 8px;
}
.category-filter button {
  width: 100%;
  justify-content: flex-start;
}
.category-filter button.active {
  background: rgba(110,231,249,.12);
  border-color: rgba(110,231,249,.35);
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.tool-card-button {
  text-align: left;
  align-items: stretch;
  min-height: auto;
  border-radius: var(--radius-lg);
  padding: 18px;
  display: grid;
  gap: 10px;
  white-space: normal;
}
.tool-card-button.active {
  border-color: rgba(110,231,249,.52);
  background: rgba(110,231,249,.1);
}
.tool-card-button .tool-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-weight: 850;
  font-size: 18px;
}
.tool-card-button p { margin: 0; font-size: 14px; }
.tool-status {
  flex: 0 0 auto;
  font-size: 11px;
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.tool-status.available { color: var(--success); border-color: rgba(114,240,179,.3); }
.tool-status.soon { color: var(--warning); border-color: rgba(250,204,21,.28); }
.sfkit-output {
  min-height: 120px;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}
.log-output .line {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--muted);
}
.log-output .error { color: #fecdd3; background: rgba(251,113,133,.07); }
.log-output .debug { color: var(--brand); }
.log-output .soql { color: #c4b5fd; }
.log-output .dml { color: #fde68a; }
.log-output .limits { color: #bbf7d0; }
.snippet-list { display: grid; gap: 12px; }
.snippet-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,.035);
}
.snippet-card pre { margin: 10px 0; }
.trust-results { display: grid; gap: 10px; margin-top: 14px; }
.trust-result-row {
  display: grid;
  grid-template-columns: 170px minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
}
.checklist-output h4 { margin: 18px 0 8px; }
.checklist-output ul { margin: 0 0 8px; color: var(--muted); line-height: 1.75; }
@media (max-width: 900px) {
  .sfkit-layout { grid-template-columns: 1fr; }
  .sfkit-sidebar { position: static; }
  .tool-grid { grid-template-columns: 1fr; }
  .trust-result-row { grid-template-columns: 1fr; }
}


/* OzSFKit v0.2 trust helper polish */
.trust-action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.trust-summary-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(110, 231, 249, 0.06);
  margin-bottom: 12px;
}

.trust-summary-card h3 {
  margin: 4px 0 6px;
}

.trust-result-row {
  overflow-wrap: anywhere;
}

.trust-result-row code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}


/* OzSFKit v0.3 utility polish */
.sfkit-output pre,
.sfkit-output textarea,
#regex-output,
#cron-output pre,
#json-output,
#ts-output pre,
#err-output pre,
#url-output pre {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}
.sfkit-kv-grid {
  display: grid;
  gap: 10px;
}
.sfkit-kv-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.sfkit-kv-row code { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .sfkit-kv-row { grid-template-columns: 1fr; }
}


/* OzSFKit v0.4 JSON Assistant */
.json-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.json-feature-grid article {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,.035);
}
.json-feature-grid strong { display: block; color: var(--text); margin-bottom: 6px; }
.json-feature-grid span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.json-editor {
  min-height: 300px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
  overflow: auto;
}
.json-actions { align-items: center; }
.json-stats { min-height: 72px; margin-top: 10px; }
.sfkit-about {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255,255,255,.035);
}
.sfkit-about summary { cursor: pointer; font-weight: 800; color: var(--text); }
@media (max-width: 900px) {
  .json-feature-grid { grid-template-columns: 1fr; }
  .json-editor { min-height: 220px; }
}

/* v0.5 SFKit utility polish */
.sfkit-textarea,
.sfkit-small-textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

.sfkit-small-textarea {
  min-height: 110px;
}

.sfkit-output pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tool-card[data-status="available"] {
  border-color: rgba(110, 231, 249, 0.22);
}


/* OzSFKit v0.6 Command Studio */
.command-output {
  min-height: 110px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255,255,255,.035);
}
#cmd-notes {
  color: var(--muted);
}
#sf-panel[hidden],
#git-panel[hidden],
#sf-retrieve-panel[hidden],
#sf-deploy-panel[hidden],
#sf-other-panel[hidden] {
  display: none !important;
}


/* OzSFKit v0.7 search-first toolbox UX */
.sfkit-layout.compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding-bottom: 70px;
}

.tool-finder-panel {
  padding: 22px;
}

.tool-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin: 18px 0;
}

.tool-search-field input {
  font-size: 17px;
  padding: 14px 16px;
}

.tool-finder-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.category-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
  padding: 14px;
  margin: 12px 0 14px;
}

.category-panel h3 {
  margin-top: 0;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-filter button {
  width: auto;
  justify-content: center;
}

.privacy-note {
  margin: 14px 0;
}

.empty-tool-state {
  margin-top: 14px;
}

.empty-card {
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 18px;
  padding: 18px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
}

.empty-card strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
}

.tool-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-panel,
.active-tool-panel {
  padding: 22px;
}

.tool-card-button {
  min-height: 168px;
}

.tool-host-toolbar {
  position: sticky;
  top: 72px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  margin: -4px 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(9, 16, 28, .92);
  backdrop-filter: blur(16px);
}

.tool-host-toolbar strong {
  display: block;
  font-size: 18px;
}

.tool-host-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar-message {
  color: var(--success);
  font-size: 13px;
}

.active-tool-content {
  min-width: 0;
}

#tool-host.maximized {
  position: fixed;
  inset: 18px;
  z-index: 100;
  overflow: auto;
  background:
    radial-gradient(circle at 20% 10%, rgba(110,231,249,.08), transparent 28%),
    rgba(8, 14, 24, .98);
  border: 1px solid rgba(110,231,249,.26);
  box-shadow: 0 24px 90px rgba(0,0,0,.55);
  padding: 24px;
}

body.sfkit-modal-open {
  overflow: hidden;
}

/* JSON Assistant readability */
.json-editor-grid.stack {
  grid-template-columns: 1fr;
}

.json-editor-grid.side {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.json-editor-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.025);
  padding: 14px;
}

.json-editor {
  min-height: 260px;
  padding: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre;
}

.json-editor-grid.stack .json-editor {
  min-height: 320px;
}

.json-actions {
  gap: 12px;
  margin-top: 18px;
}

.sfkit-about {
  margin-top: 18px;
}

@media (max-width: 1180px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .tool-search-row {
    grid-template-columns: 1fr;
  }
  .tool-finder-actions {
    justify-content: stretch;
  }
  .tool-finder-actions .btn {
    flex: 1 1 auto;
  }
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .tool-host-toolbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }
  #tool-host.maximized {
    inset: 8px;
    padding: 14px;
  }
  .json-editor-grid.side {
    grid-template-columns: 1fr;
  }
}


/* OzSFKit v0.7.1 fixes */
.tool-card-button.selected {
  border-color: rgba(110, 231, 249, .55);
  box-shadow: 0 0 0 1px rgba(110, 231, 249, .22), 0 16px 40px rgba(0,0,0,.22);
}

.tool-host-toolbar {
  contain: layout paint;
}

.active-tool-content {
  contain: layout;
}

.tool-grid:empty {
  display: none;
}


/* OzSFKit v0.7.2 maximize and responsiveness fixes */
#tool-host.maximized {
  position: fixed;
  inset: 14px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: color-mix(in srgb, var(--bg) 92%, black 8%);
  border: 1px solid rgba(110, 231, 249, .36);
  box-shadow: 0 28px 110px rgba(0,0,0,.72);
  padding: 18px;
}

#tool-host.maximized .tool-host-toolbar {
  position: sticky;
  top: 0;
  flex: 0 0 auto;
  margin: 0 0 18px;
  background: color-mix(in srgb, var(--surface) 92%, black 8%);
  border-color: rgba(110, 231, 249, .24);
  z-index: 10;
}

#tool-host.maximized .active-tool-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 2px 24px;
}

#tool-host.maximized .active-tool-content > .eyebrow:first-child,
#tool-host.maximized .active-tool-content > h2:first-of-type {
  scroll-margin-top: 96px;
}

.tool-loading {
  border: 1px dashed rgba(110, 231, 249, .28);
  border-radius: 18px;
  padding: 28px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
}

@media (max-width: 760px) {
  #tool-host.maximized {
    inset: 6px;
    padding: 12px;
  }
  #tool-host.maximized .tool-host-toolbar {
    position: sticky;
    top: 0;
  }
}


/* OzSFKit v0.8 Apex/Flow analysis */
.log-editor {
  min-height: 320px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.55;
  white-space: pre;
}

.mini-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.mini-stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.035);
}

.mini-stat strong {
  display: block;
  font-size: 20px;
  color: var(--text);
}

.mini-stat span {
  color: var(--muted);
  font-size: 12px;
}

.log-analysis-grid {
  align-items: start;
}

.log-output {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 92%, black 8%);
}

.log-output .line {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,.045);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.log-output .line.error { background: rgba(255, 93, 93, .12); color: #ffd1d1; }
.log-output .line.soql { background: rgba(110, 231, 249, .08); }
.log-output .line.dml { background: rgba(255, 209, 102, .08); }
.log-output .line.debug { background: rgba(151, 255, 180, .08); }
.log-output .line.limits { background: rgba(179, 136, 255, .08); }
.line-no { color: var(--muted); }

.tab-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.tab-strip .active {
  border-color: rgba(110,231,249,.55);
  background: rgba(110,231,249,.12);
}

.log-extract {
  max-height: 460px;
  overflow: auto;
}

.log-extract pre,
.mermaid-output {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.finding {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 8px 0;
  background: rgba(255,255,255,.03);
}

.finding.warn {
  border-color: rgba(255,209,102,.32);
  background: rgba(255,209,102,.06);
}

.limit-row {
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 9px 0;
}

.limit-row span {
  float: right;
  color: var(--muted);
}

.limit-bar {
  clear: both;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  margin-top: 8px;
}

.limit-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6ee7f9, #a78bfa);
}

.sf-table-wrap {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.sf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.sf-table th,
.sf-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.sf-table th {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--surface) 90%, black 10%);
  z-index: 1;
}

@media (max-width: 760px) {
  .mini-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .log-output .line {
    grid-template-columns: 42px minmax(0, 1fr);
  }
}


/* OzSFKit v0.8.1 tool introduction and usage guide */
.tool-intro-card {
  border: 1px solid rgba(110, 231, 249, .18);
  border-radius: 20px;
  padding: 18px 20px;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at top left, rgba(110,231,249,.08), transparent 35%),
    rgba(255,255,255,.03);
}

.tool-intro-card h2 {
  margin: 6px 0 8px;
  line-height: 1.12;
}

.tool-intro-card p {
  margin: 0;
  max-width: 78ch;
  color: var(--muted);
}

.tool-module-root {
  min-width: 0;
}

.tool-bottom-guide {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.025);
  padding: 14px 16px;
}

.tool-bottom-guide summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
}

.tool-bottom-guide p {
  color: var(--muted);
  margin: 10px 0 0;
}

#tool-host.maximized .tool-intro-card {
  margin-top: 0;
}

@media (max-width: 760px) {
  .tool-intro-card,
  .tool-bottom-guide {
    padding: 14px;
  }
}


/* OzSFKit v0.8.2 readability and spacing pass */
:where(#tool-host, .tool-panel, .placeholder-box, .notice, .tool-intro-card, .tool-bottom-guide) {
  line-height: 1.62;
}

:where(#tool-host, .tool-panel) p {
  line-height: 1.7;
  margin-top: .55rem;
  margin-bottom: .85rem;
}

:where(#tool-host, .tool-panel) h2 {
  line-height: 1.16;
  margin-bottom: .75rem;
}

:where(#tool-host, .tool-panel) h3 {
  line-height: 1.24;
  margin-top: .35rem;
  margin-bottom: .85rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: inline-block;
  margin-bottom: .45rem;
  line-height: 1.35;
}

.factor-note,
.helper-text,
.tool-bottom-guide p,
.notice p {
  line-height: 1.68;
}

.hero-actions,
.inline-actions {
  row-gap: 10px;
}

.grid {
  row-gap: 18px;
}

textarea,
pre,
.sfkit-output,
.log-output .line,
.json-editor,
.command-output {
  line-height: 1.58;
}

button,
.btn {
  line-height: 1.25;
}

.tool-card-button {
  gap: 10px;
  padding: 18px;
}

.tool-card-button p {
  line-height: 1.58;
}

html[lang="zh-CN"] :where(#tool-host, .tool-panel, .tool-card-button, .notice) {
  letter-spacing: .01em;
}

html[lang="zh-CN"] :where(#tool-host, .tool-panel) h1,
html[lang="zh-CN"] :where(#tool-host, .tool-panel) h2,
html[lang="zh-CN"] :where(#tool-host, .tool-panel) h3 {
  line-height: 1.22;
  letter-spacing: .015em;
}

.tool-loading {
  min-height: 84px;
  display: grid;
  place-items: center;
}


/* OzSFKit v0.9 quick access and analysis polish */
.quick-access {
  margin: 12px 0 16px;
}

.quick-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255,255,255,.025);
  margin-bottom: 10px;
}

.quick-section strong {
  display: block;
  margin-bottom: 10px;
}

.quick-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-tool-chip {
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.055);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

.quick-tool-chip:hover {
  border-color: rgba(110,231,249,.55);
  background: rgba(110,231,249,.1);
}

.workflow-card > .btn.small {
  justify-self: start;
}

.workflow-card strong {
  line-height: 1.3;
}

.quick-empty {
  color: var(--muted);
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: 16px;
  padding: 12px 14px;
  margin: 0;
}

.pill {
  display: inline-block;
  border: 1px solid rgba(110,231,249,.35);
  background: rgba(110,231,249,.08);
  color: var(--text);
  border-radius: 999px;
  padding: 2px 8px;
  margin: 0 4px;
  font-size: 12px;
}


/* OzSFKit v0.9.1 Trust / sandbox intelligence */
.trust-detected {
  display: grid;
  gap: 8px;
}

.kv-row {
  display: grid;
  grid-template-columns: minmax(150px, 230px) minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 8px 0;
}

.kv-row strong {
  color: var(--muted);
}

.kv-row span {
  overflow-wrap: anywhere;
}

.trust-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-copy-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-help-list {
  color: var(--muted);
  line-height: 1.8;
}

@media (max-width:760px){
  .kv-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}


/* OzSFKit v0.9.2 Trust helper manual instance guide */
.trust-guide {
  margin-top: 18px;
}

.trust-steps,
.trust-tips {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 14px;
  background: rgba(255,255,255,.025);
}

.trust-steps h4,
.trust-tips h4 {
  margin: 0 0 10px;
  line-height: 1.3;
}

.trust-steps ol,
.trust-tips ul {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.75;
}

.trust-steps li,
.trust-tips li {
  margin: 6px 0;
}

html[lang="zh-CN"] .trust-steps li,
html[lang="zh-CN"] .trust-tips li {
  line-height: 1.85;
}


/* OzSFKit v0.9.3 search and ID tool polish */
.tool-count {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 12px;
}

.quick-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 10px;
}

.quick-empty span {
  display: block;
  margin-top: 6px;
}

.small-editor {
  min-height: 130px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.55;
}

.invalid-row {
  background: rgba(255, 93, 93, .08);
}

@media (max-width: 760px) {
  .quick-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* OzSFKit v0.9.4 card alignment and UX consistency pass */
.tool-grid {
  align-items: stretch;
}

.tool-card-button {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: start;
  align-items: start;
  justify-items: stretch;
  text-align: left;
  width: 100%;
  min-height: 176px;
  padding: 20px 18px 18px;
  gap: 12px;
}

.tool-card-button,
.tool-card-button * {
  text-align: left;
}

.tool-card-main {
  display: block;
  min-width: 0;
  padding-right: 72px;
}

.tool-card-title {
  display: block;
  min-height: 2.7em;
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -.012em;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: normal;
}

.tool-card-desc {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.tool-card-category {
  display: block;
  align-self: end;
  margin-top: auto;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.tool-card-status {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 84px;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid rgba(117, 255, 180, .35);
  color: #88ffc1;
  background: rgba(117, 255, 180, .08);
}

.tool-card-status.soon {
  border-color: rgba(255, 209, 102, .35);
  color: #ffe2a0;
  background: rgba(255, 209, 102, .08);
}

.tool-card-button:hover .tool-card-title,
.tool-card-button.selected .tool-card-title {
  color: #eaf6ff;
}

html[lang="zh-CN"] .tool-card-title {
  line-height: 1.38;
  letter-spacing: .01em;
}

html[lang="zh-CN"] .tool-card-desc {
  line-height: 1.72;
}

html[lang="zh-CN"] .tool-card-main {
  padding-right: 80px;
}

/* Make active tools feel less cramped and more consistent. */
.tool-module-root > :first-child {
  margin-top: 0;
}

.tool-module-root .grid.two,
.tool-module-root .grid.three {
  gap: 20px;
}

.tool-module-root .field {
  min-width: 0;
}

.tool-module-root input,
.tool-module-root select,
.tool-module-root textarea {
  width: 100%;
}

.tool-module-root .placeholder-box,
.tool-module-root .notice,
.tool-module-root .result-box.show {
  margin-top: 16px;
}

.tool-module-root .hero-actions {
  margin-top: 18px;
  margin-bottom: 18px;
}

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px;
}

.mode-switch .btn.active {
  border-color: rgba(110,231,249,.55);
  background: rgba(110,231,249,.12);
}

.sfkit-note-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.sfkit-note-list li + li {
  margin-top: 6px;
}

.release-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.release-type-grid .scenario-card {
  min-height: 100%;
}

.checkbox-stack {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.checkbox-stack small {
  display: block;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 4px;
}

.checkbox-field {
  display: flex;
  align-items: center;
}

.soql-panel {
  display: grid;
  gap: 18px;
}

.soql-order-grid {
  margin-top: 12px;
}

.soql-hints {
  margin: 0;
}

.soql-hints strong {
  display: block;
  margin-bottom: 8px;
}

.soql-hint-list {
  margin: 0;
}

.sfkit-muted-small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.notice p,
.finding p,
.empty-card span {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.log-editor,
.log-output,
.log-extract {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Better responsive card sizing. */
@media (min-width: 1360px) {
  .tool-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tool-card-title {
    min-height: auto;
  }
  .release-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .tool-card-button {
    min-height: 156px;
  }
  .tool-card-main {
    padding-right: 70px;
  }
  html[lang="zh-CN"] .tool-card-main {
    padding-right: 70px;
  }
  .release-type-grid {
    grid-template-columns: 1fr;
  }
}
