*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream: #f5f0e8;
  --ink: #0d0d0d;
  --ink-muted: #5a5a5a;
  --surface: #fffdf9;
  --surface-2: #faf6ef;
  --border: #0d0d0d;
  --border-soft: rgba(13, 13, 13, 0.12);

  --coral: #ff5c5c;
  --yellow: #ffe14d;
  --teal: #3dd9c4;
  --purple: #a78bfa;
  --pink: #ff8cc8;
  --blue: #4d9fff;
  --gold: #f5a623;

  --success: #059669;
  --success-bg: #ecfdf5;
  --error: #dc2626;
  --error-bg: #fef2f2;
  --warning: #d97706;
  --warning-bg: #fffbeb;

  --radius: 16px;
  --radius-sm: 10px;
  --font-display: "DM Sans", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "DM Sans", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", "Fira Code", Consolas, monospace;

  --shadow-hard: 4px 4px 0 var(--ink);
  --shadow-hard-sm: 3px 3px 0 var(--ink);
  --shadow-hover: 6px 6px 0 var(--ink);

  --nav-h: 52px;
  --workbench-h: calc(100vh - var(--nav-h) - 200px);
  --editor-min-h: 240px;
  --editor-h: 100%;

  --ink-on-bright: #0d0d0d;
  --placeholder: #7a756c;
  --invert-bg: #0d0d0d;
  --invert-fg: #f5f0e8;
  --invert-muted: rgba(245, 240, 232, 0.72);
}

[data-theme="dark"] {
  --cream: #12121a;
  --ink: #f5f0e8;
  --ink-muted: #d2d2dc;
  --surface: #1a1a26;
  --surface-2: #222230;
  --border: #f5f0e8;
  --border-soft: rgba(245, 240, 232, 0.22);
  --placeholder: #d4d2de;
  --invert-bg: #0a0a12;
  --invert-fg: #f5f0e8;
  --invert-muted: rgba(245, 240, 232, 0.78);

  --coral: #ff6b6b;
  --yellow: #ffe14d;
  --teal: #3dd9c4;
  --purple: #c4b5fd;
  --pink: #ff8cc8;
  --blue: #6eb3ff;
  --gold: #ffb84d;

  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.12);
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.12);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.12);

  --shadow-hard: 4px 4px 0 rgba(245, 240, 232, 0.25);
  --shadow-hard-sm: 3px 3px 0 rgba(245, 240, 232, 0.2);
  --shadow-hover: 6px 6px 0 rgba(245, 240, 232, 0.3);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Background shapes */
.bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: float 14s ease-in-out infinite;
}

.shape-1 { width: 400px; height: 400px; background: var(--coral); top: 5%; right: 5%; }
.shape-2 { width: 350px; height: 350px; background: var(--yellow); top: 45%; left: -8%; animation-delay: -4s; }
.shape-3 { width: 300px; height: 300px; background: var(--teal); top: 70%; right: -5%; animation-delay: -8s; }
.shape-4 { width: 250px; height: 250px; background: var(--purple); top: 25%; left: 35%; animation-delay: -12s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(25px, -35px) scale(1.06); }
  66% { transform: translate(-20px, 25px) scale(0.94); }
}

/* Nav */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 clamp(20px, 4vw, 48px);
  background: rgba(245, 240, 232, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border);
}

[data-theme="dark"] .site-nav {
  background: rgba(18, 18, 26, 0.88);
}

.nav-logo {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--coral);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}

.theme-toggle:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hover);
}

.theme-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Sections shared */
.section {
  position: relative;
  z-index: 1;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 4vw, 48px);
}

/* 首屏：紧凑标题 + 工作台 */
.section-top {
  padding-top: var(--nav-h);
}

.section-top-inner {
  padding: 28px clamp(16px, 3vw, 32px) 24px;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-intro {
  text-align: left;
  margin-bottom: 0;
  flex-shrink: 0;
}

.page-intro-compact {
  display: block;
  padding: 0 0 4px;
  border-bottom: none;
}

.page-intro-main {
  margin-bottom: 8px;
}

.page-intro-compact .eyebrow {
  margin-bottom: 8px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
}

.page-title-compact {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 600;
  margin-bottom: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-title-compact .title-line {
  display: inline;
}

.page-title-compact .title-line + .title-line::before {
  content: " ";
}

.page-tagline-compact {
  max-width: none;
  margin: 0;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* 工作台：顶部工具条 + 下方编辑区 */
.workbench-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  height: var(--workbench-h);
  scroll-margin-top: calc(var(--nav-h) + 8px);
}

.tool-dock {
  flex-shrink: 0;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
  padding: 10px 12px;
}

.tool-dock-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.tool-cat-tab {
  padding: 6px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.12s, border-color 0.12s;
}

.tool-cat-tab:hover {
  border-color: var(--border);
  background: var(--cream);
}

.tool-cat-tab.active {
  background: var(--yellow);
  border-color: var(--border);
  font-weight: 600;
}

.cat-gold.tool-cat-tab.active { background: var(--gold); }
.cat-pink.tool-cat-tab.active { background: var(--pink); }

.tool-dock-panels {
  min-height: 0;
}

.tool-dock-panel {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
}

.tool-dock-panel.active {
  display: flex;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.12s, border-color 0.12s;
}

.tool-chip:hover {
  border-color: var(--border);
  background: var(--surface-2);
}

.tool-chip.active {
  background: var(--yellow);
  border-color: var(--border);
  font-weight: 600;
}

.workspace-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}

.workspace-main > .workspace-head {
  flex-shrink: 0;
}

.workspace-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  padding: 10px 14px;
  border-bottom: 2px solid var(--border);
  background: var(--surface-2);
  flex-shrink: 0;
}

.import-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.btn-import {
  padding: 5px 10px !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
}

.import-hint {
  font-size: 0.72rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.smart-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.smart-suggestions-label {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-right: 4px;
}

.smart-suggestion-chip {
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.smart-suggestion-chip:hover {
  background: var(--yellow);
  border-color: var(--border);
}

.history-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 400;
  min-width: 260px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard);
}

.history-menu-head {
  padding: 8px 12px;
  font-size: 0.72rem;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--border-soft);
}

.history-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
}

.history-item:hover {
  background: var(--surface-2);
}

.history-item-name {
  font-size: 0.8125rem;
  font-weight: 500;
}

.history-item-time {
  font-size: 0.68rem;
  color: var(--ink-muted);
}

.workbench-shell {
  position: relative;
}

.workspace-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.workspace-title {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.page-title {
  font-family: var(--font-body);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 10px;
}

.title-line {
  display: block;
}

.title-accent {
  color: var(--coral);
}

.page-tagline {
  font-size: 0.95rem;
  color: var(--ink-muted);
  font-weight: 500;
}

/* 工具面板 */
.workspace-main .tool-panel {
  display: none;
  flex: 1;
  min-height: 0;
}

.workspace-main > .tool-panel.active {
  display: flex;
}

.tool-panel.active {
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 16px;
  overflow: hidden;
}

.workspace-main .toolbar {
  padding: 10px 0 12px;
  background: transparent;
  border: none;
  border-bottom: 2px dashed var(--border-soft);
  border-radius: 0;
  box-shadow: none;
  flex-shrink: 0;
}

.workspace-main .toolbar .btn {
  padding: 7px 14px;
  font-size: 0.82rem;
}

.editor-grid-diff .panel {
  min-width: 0;
}

.section-head {
  margin-bottom: clamp(40px, 6vw, 64px);
}

.section-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--coral);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 520px;
}

/* Marquee */
.marquee-bar {
  background: var(--ink);
  color: var(--cream);
  padding: 14px 0;
  overflow: hidden;
  border-top: 3px solid var(--coral);
  border-bottom: 3px solid var(--coral);
}

.marquee-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: marquee 24s linear infinite;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.marquee-track span:nth-child(even) {
  color: var(--yellow);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Features */
.section-features {
  background: var(--surface);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  display: block;
  padding: clamp(28px, 4vw, 40px);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-hard);
  transition: transform 0.18s, box-shadow 0.18s;
}

.feature-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  background: var(--cream);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

.feature-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-category {
  padding: clamp(24px, 4vw, 32px);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  background: var(--surface);
}

.feature-category h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 0.7rem;
  border: 2px solid var(--border);
}

.cat-blue .fc-num { background: var(--blue); }
.cat-teal .fc-num { background: var(--teal); }
.cat-purple .fc-num { background: var(--purple); }
.cat-coral .fc-num { background: var(--coral); color: #fff; }
.cat-gold .fc-num { background: var(--gold); color: var(--ink); }
.cat-pink .fc-num { background: var(--pink); color: var(--ink); }
[data-theme="dark"] .cat-coral .fc-num { color: var(--ink); }

.fc-desc {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.fc-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fc-tools a {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: 999px;
  transition: transform 0.12s, box-shadow 0.12s;
}

.fc-tools a:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard-sm);
}

.feature-category.cat-blue { border-top: 5px solid var(--blue); }
.feature-category.cat-teal { border-top: 5px solid var(--teal); }
.feature-category.cat-purple { border-top: 5px solid var(--purple); }
.feature-category.cat-coral { border-top: 5px solid var(--coral); }
.feature-category.cat-gold { border-top: 5px solid var(--gold); }
.feature-category.cat-pink { border-top: 5px solid var(--pink); }

.feature-grid-wide {
  grid-template-columns: repeat(2, 1fr);
}

.feature-grid-wide .feature-card {
  cursor: default;
}

.feature-grid-wide .feature-card:hover {
  transform: none;
  box-shadow: var(--shadow-hard);
}

.tool-path-input,
.tool-name-input,
.tool-count-input {
  padding: 8px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  min-width: 160px;
  box-shadow: var(--shadow-hard-sm);
}

.tool-count-input {
  width: 72px;
}

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

.custom-select {
  position: relative;
  display: inline-block;
  min-width: 148px;
}

.custom-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 148px;
  padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}

.custom-select-trigger:hover {
  border-color: var(--border);
  background: var(--surface-2);
}

.custom-select.open .custom-select-trigger {
  border-color: var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-hard-sm);
}

.custom-select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.custom-select-arrow {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1;
  transition: transform 0.15s ease;
}

.custom-select.open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 300;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard);
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

.custom-select.open .custom-select-menu {
  display: block;
  animation: select-drop 0.15s ease;
}

@keyframes select-drop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.custom-select-option {
  padding: 8px 10px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.1s;
}

.custom-select-option:hover {
  background: var(--surface-2);
}

.custom-select-option.is-selected {
  background: var(--yellow);
  font-weight: 600;
}

.custom-select-option.is-selected::before {
  content: "✓ ";
  font-weight: 700;
}

.tool-select {
  padding: 7px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}
.feature-blue { border-top: 5px solid var(--blue); }
.feature-coral { border-top: 5px solid var(--coral); }
.feature-teal { border-top: 5px solid var(--teal); }
.feature-purple { border-top: 5px solid var(--purple); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  margin-bottom: 0;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toolbar-divider {
  width: 2px;
  height: 28px;
  background: var(--border-soft);
}

.btn {
  padding: 9px 18px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.12s, box-shadow 0.12s;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hover);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.btn-primary { background: var(--blue); }
.btn-coral { background: var(--coral); color: #fff; }
[data-theme="dark"] .btn-coral { color: var(--ink); }
.btn-teal { background: var(--teal); }
.btn-purple { background: var(--purple); }
.btn-yellow { background: var(--yellow); }
.btn-ghost { background: transparent; box-shadow: none; border-style: dashed; }
.btn-ghost:hover { background: var(--surface-2); box-shadow: var(--shadow-hard-sm); }

[data-theme="dark"] .btn-ghost {
  color: var(--ink);
  border-color: rgba(245, 240, 232, 0.5);
}

[data-theme="dark"] .btn-import {
  font-weight: 600 !important;
}

[data-theme="dark"] .tool-cat-tab.active,
[data-theme="dark"] .tool-chip.active,
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-yellow,
[data-theme="dark"] .btn-teal,
[data-theme="dark"] .btn-purple,
[data-theme="dark"] .custom-select-option.is-selected,
[data-theme="dark"] .panel-output .panel-badge,
[data-theme="dark"] .connector-arrow,
[data-theme="dark"] .step-num,
[data-theme="dark"] .example-try-btn,
[data-theme="dark"] .scenario-tag,
[data-theme="dark"] .blog-kicker,
[data-theme="dark"] .cat-gold .fc-num,
[data-theme="dark"] .cat-teal .fc-num,
[data-theme="dark"] .cat-pink .fc-num,
[data-theme="dark"] .smart-suggestion-chip:hover {
  color: var(--ink-on-bright);
}

.indent-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 500;
  flex-shrink: 0;
}

.indent-label {
  color: var(--ink-muted);
  font-weight: 500;
  white-space: nowrap;
}

.workspace-main .toolbar .indent-control {
  margin-left: auto;
}

.workspace-main .toolbar {
  overflow: visible;
  z-index: 10;
  position: relative;
}

/* Status */
.status {
  min-height: 0;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  display: none;
  border: 2px solid transparent;
  margin-bottom: 0;
}

.status.visible {
  display: block;
  padding: 12px 18px;
  animation: pop-in 0.25s ease;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.status.success { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.status.error { background: var(--error-bg); color: var(--error); border-color: var(--error); }
.status.warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning); }

/* Editor grid — side by side on desktop */
.editor-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(16px, 2.5vw, 24px);
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.editor-grid-diff {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
}

.panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  min-height: 0;
  flex: 1;
}

.panel-input { border-top: 5px solid var(--coral); }
.panel-output { border-top: 5px solid var(--teal); }

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 2px solid var(--border);
  background: var(--surface-2);
}

.panel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 6px;
  border: 2px solid var(--border);
}

.panel-input .panel-badge { background: var(--coral); color: #fff; }
[data-theme="dark"] .panel-input .panel-badge { color: var(--ink); }
.panel-output .panel-badge { background: var(--teal); }

.panel-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
}

.panel-meta {
  margin-left: auto;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.editor {
  flex: 1;
  width: 100%;
  min-height: var(--editor-min-h);
  height: auto;
  padding: 16px;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  background: var(--surface);
  color: var(--ink);
  tab-size: 2;
}

.editor::placeholder,
.app-modal-field::placeholder,
.tool-path-input::placeholder,
.tool-name-input::placeholder,
.tool-count-input::placeholder {
  color: var(--placeholder);
  -webkit-text-fill-color: var(--placeholder);
  opacity: 1;
}

.editor::-webkit-input-placeholder,
.app-modal-field::-webkit-input-placeholder,
.tool-path-input::-webkit-input-placeholder,
.tool-name-input::-webkit-input-placeholder,
.tool-count-input::-webkit-input-placeholder {
  color: var(--placeholder);
  -webkit-text-fill-color: var(--placeholder);
  opacity: 1;
}

.editor:focus {
  background: var(--surface-2);
}

.panel-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

.connector-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--yellow);
  border: 2px solid var(--border);
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: var(--shadow-hard-sm);
  flex-shrink: 0;
}

.workspace-stats {
  margin-top: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
  min-height: 1.4em;
}

/* Guide */
.section-guide {
  background: var(--surface);
  border-top: 2px solid var(--border);
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step-item {
  display: flex;
  gap: clamp(20px, 4vw, 36px);
  padding: clamp(32px, 5vw, 48px) 0;
  border-bottom: 2px dashed var(--border-soft);
}

.step-item:last-child {
  border-bottom: none;
}

.step-num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--yellow);
  border: 2px solid var(--border);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  box-shadow: var(--shadow-hard-sm);
}

.step-body h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-body p {
  color: var(--ink-muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 560px;
}

.step-body kbd {
  display: inline-block;
  padding: 2px 8px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* Highlights */
.section-highlights {
  background: var(--invert-bg);
  color: var(--invert-fg);
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.highlight-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: clamp(24px, 4vw, 40px) 16px;
  border: 2px solid rgba(245, 240, 232, 0.2);
  border-radius: var(--radius);
}

.highlight-num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  color: var(--yellow);
  line-height: 1;
}

.highlight-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--invert-muted);
  letter-spacing: 0.04em;
}

/* Advantages */
.section-advantages {
  background: var(--cream);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.info-box {
  padding: clamp(24px, 3vw, 32px);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  transition: transform 0.15s, box-shadow 0.15s;
}

.info-box:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hover);
}

.info-box-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  background: var(--cream);
}

.info-box h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.info-box p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

.info-box-blue { border-top: 5px solid var(--blue); }
.info-box-yellow { border-top: 5px solid var(--yellow); }
.info-box-teal { border-top: 5px solid var(--teal); }
.info-box-purple { border-top: 5px solid var(--purple); }
.info-box-coral { border-top: 5px solid var(--coral); }
.info-box-pink { border-top: 5px solid var(--pink); }

/* Examples */
.section-examples {
  background: var(--surface-2);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.example-card {
  padding: 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.example-card.example-blue { border-top: 4px solid var(--blue); }
.example-card.example-teal { border-top: 4px solid var(--teal); }
.example-card.example-purple { border-top: 4px solid var(--purple); }
.example-card.example-coral { border-top: 4px solid var(--coral); }
.example-card.example-yellow { border-top: 4px solid var(--yellow); }
.example-card.example-gold { border-top: 4px solid var(--gold); }
.example-card.example-pink { border-top: 4px solid var(--pink); }

.example-tool {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: 999px;
}

.example-preview {
  flex: 1;
  margin: 0;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--ink-muted);
  background: var(--cream);
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-all;
}

.example-try-btn {
  align-self: flex-start;
  display: inline-block;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.example-try-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hover);
}

.example-note {
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--ink-muted);
  text-align: center;
}

/* Scenarios */
.section-scenarios {
  background: var(--surface);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.scenario-card {
  padding: clamp(24px, 3vw, 32px);
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scenario-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--yellow);
  border: 2px solid var(--border);
  border-radius: 999px;
}

.scenario-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.scenario-card p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.65;
  flex: 1;
}

.scenario-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  margin-top: 4px;
}

.scenario-link:hover {
  color: var(--coral);
}

/* FAQ */
.section-faq {
  background: var(--cream);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--coral);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 22px 18px;
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

/* CTA */
.section-cta {
  background: var(--yellow);
  border-top: 3px solid var(--border);
  border-bottom: 3px solid var(--border);
}

.cta-box {
  text-align: center;
  padding: clamp(40px, 6vw, 64px) 24px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 600;
  margin-bottom: 12px;
}

.cta-desc {
  font-size: 1rem;
  color: var(--ink-muted);
  margin-bottom: 24px;
}

.cta-btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--coral);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-hard);
  transition: transform 0.15s, box-shadow 0.15s;
}

[data-theme="dark"] .cta-btn {
  color: var(--ink);
}

.cta-btn:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hover);
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--invert-bg);
  color: var(--invert-fg);
  border-top: 4px solid var(--coral);
}

.footer-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 72px) clamp(20px, 4vw, 48px) 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-logo span {
  color: var(--coral);
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--invert-muted);
  line-height: 1.7;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--yellow);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--invert-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--invert-fg);
}

.footer-note {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--invert-muted);
  line-height: 1.5;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px clamp(20px, 4vw, 48px);
  border-top: 1px solid rgba(245, 240, 232, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--invert-muted);
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-blog,
.footer-back {
  display: inline-block;
  padding: 8px 20px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  border: 2px solid var(--cream);
  border-radius: 999px;
  transition: transform 0.15s;
}

.footer-blog {
  background: var(--yellow);
  color: #0d0d0d;
}

.footer-back {
  background: var(--coral);
  color: var(--ink);
}

.footer-blog:hover,
.footer-back:hover {
  transform: translateY(-2px);
}

/* Blog */
.blog-page .section-top-inner {
  min-height: auto;
}

.blog-hero {
  padding-top: calc(var(--nav-h) + 36px);
}

.blog-hero-inner {
  padding-bottom: 8px;
}

.blog-featured {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-top: 28px;
  padding: clamp(24px, 4vw, 36px);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.blog-featured:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hover);
}

.blog-kicker {
  display: inline-block;
  padding: 4px 10px;
  margin-bottom: 12px;
  background: var(--yellow);
  border: 2px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.blog-featured h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 12px;
}

.blog-excerpt {
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.blog-featured-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
}

.blog-featured-aside p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink-muted);
}

.blog-read {
  margin-top: 16px;
  font-weight: 700;
  color: var(--coral);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.blog-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hover);
}

.blog-card.card-blue { border-top: 5px solid var(--blue); }
.blog-card.card-teal { border-top: 5px solid var(--teal); }
.blog-card.card-purple { border-top: 5px solid var(--purple); }
.blog-card.card-coral { border-top: 5px solid var(--coral); }
.blog-card.card-pink { border-top: 5px solid var(--pink); }
.blog-card.card-gold { border-top: 5px solid var(--gold); }

.blog-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 8px 0 10px;
  line-height: 1.35;
}

.blog-card p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.65;
  flex: 1;
}

.blog-card .blog-meta {
  margin-top: 12px;
  flex: 0 0 auto;
}

.blog-card .blog-read {
  margin-top: 12px;
}

/* App modal */
.app-modal[hidden] {
  display: none !important;
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 13, 0.45);
}

[data-theme="dark"] .app-modal-backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.app-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}

.app-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 2px solid var(--border);
  background: var(--surface-2);
}

.app-modal-title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.app-modal-x {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.app-modal-x:hover {
  background: var(--cream);
  color: var(--ink);
}

.app-modal-body {
  padding: 16px;
}

.app-modal-desc {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 0 0 12px;
}

.app-modal-desc[hidden] {
  display: none;
}

.app-modal-field {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  box-shadow: var(--shadow-hard-sm);
}

.app-modal-field:focus {
  outline: none;
  border-color: var(--blue);
}

.app-modal-field[hidden] {
  display: none;
}

.app-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 2px solid var(--border-soft);
  background: var(--surface-2);
}

.app-modal-foot .btn[hidden] {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

/* Responsive */
@media (max-width: 900px) {
  .editor-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .editor-grid-diff {
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .info-grid,
  .scenario-grid,
  .example-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-featured {
    grid-template-columns: 1fr;
  }

  .footer-main {
    grid-template-columns: repeat(2, 1fr);
  }

  .panel-connector {
    padding: 4px 0;
  }

  .connector-arrow {
    transform: rotate(90deg);
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

@media (max-width: 960px) {
  :root {
    --workbench-h: auto;
  }

  .workbench-shell {
    height: auto;
    min-height: calc(100vh - var(--nav-h) - 180px);
  }

  .workspace-main {
    min-height: 480px;
  }

  .tool-cat-tab {
    padding: 5px 10px;
    font-size: 0.75rem;
  }

  .tool-chip {
    padding: 4px 10px;
    font-size: 0.75rem;
  }
}

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

  .section-top-inner {
    padding: 12px 12px 20px;
    min-height: auto;
  }

  .page-title-compact {
    font-size: 1.5rem;
  }

  .tool-panel.active {
    gap: 12px;
    padding: 0 12px 12px;
  }

  .feature-categories {
    grid-template-columns: 1fr;
  }

  .feature-grid-wide {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .highlight-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-grid,
  .scenario-grid,
  .example-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .indent-control {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }

  .toolbar-divider {
    display: none;
  }

  .editor {
    min-height: 300px;
    height: clamp(300px, calc(100vh - var(--nav-h) - 260px), 560px);
  }
}

@media (max-width: 480px) {
  .toolbar-group {
    width: 100%;
  }

  .btn {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    font-size: 0.8rem;
  }

  .highlight-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* Dedicated tool landing pages */
.tool-chip-link {
  text-decoration: none;
}

.tool-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.tool-breadcrumb a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 600;
}

.tool-breadcrumb a:hover {
  color: var(--coral);
}

.tool-seo {
  background: var(--surface);
  border-top: 2px solid var(--border);
}

.tool-seo-grid {
  display: grid;
  gap: 40px;
}

.seo-block > h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.tool-seo p,
.tool-seo li {
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.seo-lead p + p {
  margin-top: 10px;
}

.seo-tips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.seo-tip {
  padding: 14px 16px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

.seo-tip h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}

.seo-tip p {
  margin: 0;
  font-size: 0.9rem;
}

.seo-steps ol {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
  counter-reset: seo-step;
}

.seo-steps li {
  position: relative;
  padding-left: 32px;
  counter-increment: seo-step;
}

.seo-steps li::before {
  content: counter(seo-step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink-on-bright);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
}

.seo-scenes ul,
.seo-notes ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}

.seo-scenes li,
.seo-notes li {
  padding-left: 16px;
  position: relative;
}

.seo-scenes li::before,
.seo-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-muted);
}

.seo-notes li::before {
  background: var(--coral);
}

.tool-related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-related a {
  display: inline-flex;
  padding: 6px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.tool-related a:hover {
  background: var(--yellow);
  color: var(--ink-on-bright);
}

@media (max-width: 768px) {
  .seo-tips {
    grid-template-columns: 1fr;
  }
}
