/* RC88 · Pannello SEO e anteprima nei risultati di ricerca.
   Stessa palette dell'app: fondo chiaro, inchiostro caldo, accento ocra. */

#seoPage {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 42px) clamp(14px, 4vw, 40px) 70px;
  background:
    radial-gradient(circle at 88% 0%, #f2b65d26, transparent 32%),
    #fffaf0;
  color: #322a22;
}

#seoPage[hidden] { display: none !important; }

/* Messaggio per i browser senza JavaScript: testo leggibile e collegamento
   all'indice dei luoghi, così nessuno resta davanti a una pagina vuota. */
.seo-noscript {
  max-width: 52rem;
  margin: 0 auto;
  padding: 22px 18px;
  color: #322a22;
  font: 16px/1.6 system-ui, sans-serif;
}

.seo-noscript h1 { margin: 0 0 10px; font: 900 1.6rem/1.15 Georgia, serif; }
.seo-noscript a { color: #8a4b12; font-weight: 800; }

.seo-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.seo-hero {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 22px clamp(16px, 3vw, 28px);
  border: 1px solid #e7b66a66;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff6e4, #fffdf8);
  box-shadow: 0 14px 38px #00000012;
}

.seo-hero h2 {
  margin: 0;
  font: 900 clamp(1.5rem, 4vw, 2.2rem)/1.05 Georgia, serif;
}

.seo-hero p {
  max-width: 70ch;
  margin: 0;
  color: #6b5f52;
  font-size: .94rem;
  line-height: 1.55;
}

.seo-hero .button { margin-top: 8px; }

.seo-block {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid #e2d6c2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px #00000010;
}

.seo-block-head { display: grid; gap: 6px; }

.seo-block-head h3 {
  margin: 0;
  font: 900 1.2rem/1.15 Georgia, serif;
}

.seo-block-head p {
  margin: 0;
  color: #6b5f52;
  font-size: .88rem;
  line-height: 1.5;
}

.seo-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.seo-stat {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #ece0cc;
  border-radius: 14px;
  background: #fffaf0;
}

.seo-stat span { color: #6b5f52; font-size: .78rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.seo-stat strong { font: 900 1.5rem/1 Georgia, serif; color: #8a4b12; }

.seo-settings {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed #d9c7a8;
  border-radius: 16px;
  background: #fffdf8;
}

.seo-settings label {
  color: #5c4326;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.seo-settings input {
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid #e0d3bd;
  border-radius: 12px;
  background: #fff;
  color: #322a22;
  font: 600 .95rem/1 system-ui, sans-serif;
}

.seo-settings input:focus-visible,
.seo-file-actions .button:focus-visible,
.seo-preview-search input:focus-visible,
.seo-preview-list button:focus-visible,
.seo-keyword:focus-visible,
.seo-preview-actions .button:focus-visible,
.seo-hero .button:focus-visible {
  outline: 3px solid #c2782447;
  outline-offset: 2px;
  border-color: #c27824;
}

.seo-settings .button { justify-self: start; min-height: 48px; }

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

.seo-check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid #ece0cc;
  border-radius: 13px;
  background: #fffdf8;
}

.seo-check-mark {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dff3e6;
  color: #1f6b45;
  font-weight: 900;
  font-size: .82rem;
}

.seo-check[data-ok="0"] .seo-check-mark { background: #fde5dd; color: #a53f2c; }

.seo-check-text { display: grid; gap: 2px; min-width: 0; }
.seo-check-text b { font-size: .9rem; }
.seo-check-text em { color: #7a6d5c; font-size: .78rem; font-style: normal; overflow-wrap: anywhere; }

.seo-file-actions,
.seo-preview-actions,
.seo-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.seo-file-actions .button,
.seo-preview-actions .button { min-height: 46px; text-decoration: none; }

.seo-keyword {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #e0d3bd;
  border-radius: 999px;
  background: #fffaf0;
  color: #8a4b12;
  font: 800 .84rem/1 system-ui, sans-serif;
  cursor: pointer;
}

.seo-keyword:hover { background: #fff3d8; }

.seo-status {
  min-height: 20px;
  margin: 0;
  color: #6b5f52;
  font-size: .84rem;
  font-weight: 800;
}

.seo-status[data-kind="success"] { color: #1f6b45; }
.seo-status[data-kind="error"] { color: #a53f2c; }

.seo-steps-block {
  border-color: #d8b070;
  background: #fffdf5;
}

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

.seo-steps li {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 16px 14px 58px;
  border: 1px solid #ece0cc;
  border-radius: 14px;
  background: #fff;
  counter-increment: seo-step;
}

.seo-steps li::before {
  content: counter(seo-step);
  position: absolute;
  left: 15px;
  top: 14px;
  width: 29px;
  height: 29px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff0bd, #f6bf4d 58%, #d88422);
  color: #3f270c;
  font: 900 .92rem/29px system-ui, sans-serif;
  text-align: center;
}

.seo-steps b {
  color: #322a22;
  font: 900 1rem/1.25 system-ui, sans-serif;
}

.seo-steps span {
  color: #6b5f52;
  font-size: .88rem;
  line-height: 1.5;
}

.seo-steps-tip {
  margin: 0;
  padding: 11px 13px;
  border: 1px dashed #d8b070;
  border-radius: 12px;
  background: #fff6e0;
  color: #6e460b;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .seo-steps li { padding: 13px 13px 13px 52px; }
}

.seo-preview { display: grid; gap: 14px; }

.seo-preview-search { display: grid; gap: 7px; }

.seo-preview-search label {
  color: #5c4326;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.seo-preview-search input {
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid #e0d3bd;
  border-radius: 12px;
  background: #fff;
  color: #322a22;
  font: 600 .95rem/1 system-ui, sans-serif;
}

.seo-preview-hint { margin: 0; color: #7a6d5c; font-size: .8rem; font-weight: 700; }

.seo-preview-body {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.seo-preview-list {
  display: grid;
  gap: 6px;
  max-height: 420px;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid #ece0cc;
  border-radius: 14px;
  background: #fffdf8;
  list-style: none;
}

.seo-preview-list button {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #3c3125;
  font: 750 .88rem/1.3 system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}

.seo-preview-list button:hover { background: #fff3d8; }

.seo-preview-list button[aria-current="true"] {
  border-color: #c27824;
  background: #fff0cf;
  color: #6e460b;
}

.seo-preview-none { padding: 10px; color: #7a6d5c; font-size: .86rem; }

.seo-preview-card {
  display: grid;
  gap: 12px;
  min-height: 180px;
  padding: 16px;
  border: 1px solid #e2d6c2;
  border-radius: 16px;
  background: #fff;
}

.seo-preview-empty,
.seo-preview-loading { margin: 0; color: #7a6d5c; font-size: .88rem; font-weight: 700; }

.seo-result-preview {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid #e8ddc9;
  border-radius: 13px;
  background: #fffdf8;
}

.seo-result-url { margin: 0; color: #3d6b46; font-size: .78rem; overflow-wrap: anywhere; }
.seo-result-title { margin: 0; color: #1a3a86; font: 700 1.06rem/1.3 system-ui, sans-serif; }
.seo-result-description { margin: 0; color: #55493c; font-size: .88rem; line-height: 1.5; }

.seo-preview-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 0;
}

.seo-preview-facts div { display: grid; gap: 2px; }
.seo-preview-facts dt { color: #7a6d5c; font-size: .72rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.seo-preview-facts dd { margin: 0; font-size: .88rem; font-weight: 750; }

.seo-preview-json summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: #8a4b12;
  font-size: .86rem;
  font-weight: 850;
  cursor: pointer;
}

.seo-preview-json pre {
  max-height: 320px;
  margin: 8px 0 0;
  padding: 12px;
  overflow: auto;
  border-radius: 12px;
  background: #2a2419;
  color: #f6e7c8;
  font: 500 .76rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 760px) {
  .seo-preview-body { grid-template-columns: 1fr; }
  .seo-preview-list { max-height: 260px; }
  .seo-file-actions .button,
  .seo-preview-actions .button,
  .seo-settings .button { width: 100%; }
}
