:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: transparent;
  color: #17231c;
  font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.seo-tool-embed-page {
  width: 100%;
  padding: 2px;
}

.seo-tool-card {
  overflow: hidden;
  width: 100%;
  border: 1px solid #d9e4dc;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(37, 74, 48, 0.08);
}

.seo-tool-head {
  padding: clamp(24px, 5vw, 42px);
  background: linear-gradient(135deg, #e9f5ed 0%, #f9f5e9 100%);
  border-bottom: 1px solid #dce7df;
}

.seo-tool-kicker {
  display: block;
  margin-bottom: 10px;
  color: #317244;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.seo-tool-head h1 {
  margin: 0;
  color: #183821;
  font-size: clamp(27px, 5vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.seo-tool-head p {
  max-width: 700px;
  margin: 14px 0 0;
  color: #4f6557;
  font-size: 16px;
  line-height: 1.7;
}

.seo-tool-form,
.seo-serp-preview,
.seo-result {
  margin: clamp(22px, 4vw, 36px);
}

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

.seo-tool-form label {
  display: grid;
  gap: 8px;
  color: #263c2d;
  font-size: 14px;
  font-weight: 750;
}

.seo-tool-form label > span {
  justify-self: end;
  margin-top: -26px;
  color: #738078;
  font-size: 12px;
  font-weight: 650;
}

.seo-tool-form input,
.seo-tool-form textarea {
  width: 100%;
  border: 1px solid #cdd9d0;
  border-radius: 12px;
  background: #fbfdfb;
  color: #17231c;
  font: inherit;
  font-weight: 500;
  line-height: 1.65;
  padding: 13px 15px;
  resize: vertical;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.seo-tool-form input:focus,
.seo-tool-form textarea:focus {
  outline: none;
  border-color: #409258;
  box-shadow: 0 0 0 4px rgba(64, 146, 88, 0.13);
}

.seo-article-input {
  min-height: 290px;
}

.seo-primary-button,
.seo-secondary-button,
.seo-format-switch button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.seo-primary-button {
  min-height: 52px;
  padding: 13px 20px;
  background: #226c3a;
  color: #fff;
  box-shadow: 0 8px 20px rgba(34, 108, 58, 0.2);
}

.seo-primary-button:hover {
  background: #19592f;
}

.seo-secondary-button {
  width: 100%;
  margin-top: 18px;
  padding: 12px 16px;
  background: #edf4ef;
  color: #245a35;
}

.seo-form-error {
  margin: -5px 0 0;
  color: #a52929;
  font-size: 13px;
  font-weight: 700;
}

.seo-serp-preview {
  border: 1px solid #e2e5e3;
  border-radius: 15px;
  background: #fafafa;
  padding: 18px;
}

.seo-serp-preview span {
  display: block;
  color: #4d5156;
  font-size: 12px;
}

.seo-serp-preview strong {
  display: block;
  overflow: hidden;
  margin-top: 7px;
  color: #1a0dab;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seo-serp-preview p {
  margin: 5px 0 0;
  color: #4d5156;
  font-size: 14px;
  line-height: 1.55;
}

.seo-result {
  border: 1px solid #cfe0d3;
  border-radius: 18px;
  background: #fbfefc;
  padding: clamp(18px, 4vw, 28px);
}

.seo-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid #dce7df;
}

.seo-result-header > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.seo-result-header span,
.seo-result-header small {
  color: #627167;
  font-size: 13px;
}

.seo-result-header strong {
  color: #216f3a;
  font-size: 38px;
  letter-spacing: -0.05em;
}

.seo-result-header p {
  margin: 0;
  border-radius: 999px;
  background: #e5f2e9;
  color: #216f3a;
  font-size: 13px;
  font-weight: 800;
  padding: 7px 11px;
}

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

.seo-stat-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.seo-stat-grid > div {
  border-radius: 12px;
  background: #f0f5f1;
  padding: 13px 10px;
  text-align: center;
}

.seo-stat-grid span,
.seo-stat-grid strong {
  display: block;
}

.seo-stat-grid span {
  color: #69776e;
  font-size: 11px;
}

.seo-stat-grid strong {
  margin-top: 3px;
  color: #263c2d;
  font-size: 18px;
}

.seo-check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seo-check {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-radius: 12px;
  padding: 12px;
}

.seo-check-good { background: #edf7f0; }
.seo-check-warn { background: #fff7e5; }
.seo-check-bad { background: #fff0ef; }

.seo-check-mark {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #fff;
  font-weight: 900;
}

.seo-check-good .seo-check-mark { color: #21713b; }
.seo-check-warn .seo-check-mark { color: #a36500; }
.seo-check-bad .seo-check-mark { color: #b22f2a; }

.seo-check strong,
.seo-check small {
  display: block;
}

.seo-check strong {
  color: #263c2d;
  font-size: 14px;
}

.seo-check small {
  margin-top: 3px;
  color: #5b6960;
  font-size: 12px;
  line-height: 1.55;
}

.seo-format-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  border: 0;
  padding: 0;
}

.seo-format-switch legend {
  width: 100%;
  margin-bottom: 2px;
  color: #263c2d;
  font-size: 14px;
  font-weight: 750;
}

.seo-format-switch button {
  padding: 9px 12px;
  background: #eef2ef;
  color: #536159;
  font-size: 13px;
}

.seo-format-switch button[aria-pressed="true"] {
  background: #226c3a;
  color: #fff;
}

.seo-related-link {
  display: block;
  margin: 0 clamp(22px, 4vw, 36px) 14px;
  border-radius: 13px;
  background: #f3f7f4;
  color: #245b35;
  font-size: 14px;
  font-weight: 800;
  padding: 14px 16px;
  text-decoration: none;
}

.seo-related-link:hover {
  background: #e8f1eb;
}

.seo-privacy-note {
  margin: 0 clamp(22px, 4vw, 36px) 28px;
  color: #758178;
  font-size: 11px;
  line-height: 1.55;
}

.seo-tool-card { overflow-wrap: anywhere; }
.seo-field { display: grid; gap: 8px; min-width: 0; }
.seo-field > small { color: #607066; font-size: 12px; }
.seo-help { color: #53665a; font-size: 12px; line-height: 1.7; margin: 12px 0; }
.seo-serp-preview p { max-height: 130px; overflow: auto; }
.seo-editor-panel { border-top: 1px solid #dce7df; margin-top: 22px; padding-top: 18px; min-width: 0; }
.seo-editor-panel h2 { font-size: 18px; margin: 0 0 12px; }
.seo-editor-panel h3 { font-size: 15px; margin: 8px 0; }
.seo-editor-panel h4 { font-size: 12px; margin: 10px 0; color: #53665a; }
.seo-issue-scroll { max-height: 460px; overflow: auto; padding: 2px; }
.seo-issue { background: #fff8e9; border: 1px solid #eddcb7; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.seo-location { color: #765116; font-size: 12px; font-weight: 700; }
.seo-issue p { font-size: 13px; line-height: 1.7; margin: 8px 0; }
.seo-advice { color: #344a3c; }
.seo-locate-button { border: 1px solid #b5cdbb; border-radius: 8px; background: #fff; color: #245a35; min-height: 44px; padding: 9px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-align: left; }
.seo-details { border-top: 1px solid #dce7df; margin-top: 18px; padding-top: 12px; }
.seo-details summary { cursor: pointer; font-size: 13px; font-weight: 750; min-height: 44px; padding: 10px 0; }
.seo-details > .seo-check-list { max-height: 360px; overflow: auto; }
.seo-source { font: 13px/1.8 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; background: #f3f5f3; padding: 12px; border: 1px solid #d9e4dc; border-radius: 8px; margin: 8px 0; }
.seo-source mark { background: #ffe391; color: #352805; box-decoration-break: clone; }
.seo-comparison-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.seo-comparison-table caption { color: #53665a; text-align: left; font-size: 11px; margin: 8px 0; }
.seo-comparison-table th, .seo-comparison-table td { padding: 10px 4px; border-bottom: 1px solid #dce7df; text-align: right; }
.seo-comparison-table th:first-child { text-align: left; width: 34%; }
.seo-compare-texts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.seo-comparison-content { max-height: 650px; overflow: auto; padding: 2px; }
.seo-notice, .seo-stale { background: #fff6df; color: #765116; border: 1px solid #eed79e; border-radius: 10px; padding: 14px; font-size: 13px; line-height: 1.7; }
.seo-stale { margin: 20px 16px; }
.seo-report-fallback { width: 100%; font: inherit; font-size: 12px; line-height: 1.6; }
.seo-result-header, .seo-result-header > div { flex-wrap: wrap; }
button:focus-visible, summary:focus-visible, .seo-source:focus-visible, .seo-issue-scroll:focus-visible { outline: 3px solid #226c3a; outline-offset: 3px; }

@media (max-width: 560px) {
  .seo-tool-card { border-radius: 16px; }
  .seo-tool-form,
  .seo-serp-preview,
  .seo-result { margin: 20px 16px; }
  .seo-related-link,
  .seo-privacy-note { margin-left: 16px; margin-right: 16px; }
  .seo-stat-grid,
  .seo-stat-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seo-result-header { align-items: flex-start; gap: 12px; }
  .seo-result-header p { white-space: nowrap; }
  .seo-compare-texts { grid-template-columns: minmax(0, 1fr); }
}
