.seo-tool-main { padding-block: 28px 64px; }

.tool-hero {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px 22px;
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.tool-hero h1 { font-size: 28px; line-height: 1.2; margin: 0; }
.tool-hero p { color: var(--muted); font-size: 14px; margin: 6px 0 0; max-width: 720px; }

.tool-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.tool-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
}
.tool-card h2 { font-size: 17px; margin: 0 0 12px; }

.tool-stack { display: flex; flex-direction: column; gap: 12px; }
.tool-row-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.tool-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.tool-input,
.tool-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
}
.tool-input:focus,
.tool-select:focus {
  outline: 2px solid #9ec9b9;
  border-color: var(--green);
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.tool-btn-secondary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.tool-btn-secondary:hover { border-color: var(--green); color: var(--green-dark); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stat-box {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
}
.stat-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.stat-value { font-size: 17px; font-weight: 700; color: var(--ink); margin-top: 3px; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.canvas-frame {
  background: #eef2f0;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.seo-canvas {
  max-width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.drop-box {
  border: 1.5px dashed #9bb4aa;
  border-radius: 5px;
  padding: 14px;
  text-align: center;
  background: #f9fbfa;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
}
.drop-box:hover { border-color: var(--green); color: var(--ink); }
.sr-only-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.ratio-table-wrap { overflow-x: auto; }
.ratio-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ratio-table th,
.ratio-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.ratio-table th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: var(--soft);
}

.dpi-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}
.badge-good { background: #e6f4ee; color: #13624d; }
.badge-warn { background: #fef5e2; color: #8c5a00; }
.badge-bad { background: #fcebeb; color: #9c2b2e; }

.cta-banner {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid #b6d6c9;
  border-radius: 6px;
  background: #f1f8f5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.cta-banner h3 { margin: 0 0 4px; font-size: 16.5px; }
.cta-banner p { margin: 0; font-size: 13.5px; color: var(--muted); max-width: 680px; }

.seo-article {
  margin-top: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 24px;
}
.seo-article h2 { font-size: 19px; margin: 18px 0 8px; }
.seo-article h2:first-child { margin-top: 0; }
.seo-article p, .seo-article li { font-size: 14.5px; line-height: 1.65; color: var(--ink); }

.pager-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.pager-btns { display: flex; align-items: center; gap: 8px; }
.status-note {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 4px;
  font-size: 13px;
  background: #edf6f3;
  border: 1px solid #b6d6c9;
  color: #134d3e;
}

@media (max-width: 860px) {
  .tool-grid { grid-template-columns: 1fr; }
}

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

.preset-chip {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.preset-chip:hover,
.preset-chip.is-active {
  border-color: var(--green);
  background: #edf6f3;
  color: #134d3e;
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mode-tab {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.mode-tab.is-active {
  border-color: var(--green);
  background: #edf6f3;
  color: #134d3e;
}

.toggle-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.toggle-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.preview-grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.9fr);
  gap: 14px;
  margin-bottom: 14px;
}

.crop-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 12px;
}
.crop-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.crop-canvas-wrap {
  background: #eef2f0;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.crop-card-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 12px;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-swatch {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
.legend-43 { border: 2px dashed #17755d; }
.legend-11 { border: 2px dashed #c47a13; }

.tool-section-gap { margin-top: 16px; }
.tool-subhead { font-size: 14.5px; margin: 14px 0 8px; color: var(--ink); }

@media (max-width: 720px) {
  .preview-grid-two { grid-template-columns: 1fr; }
}
