/* Word Count Official - SEO Article Verifier Warm Paper Ledger Stylesheet */

#seoVerifierApp {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sav-textarea {
  min-height: 220px;
  line-height: 1.6;
}

.sav-type-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sav-section-label,
.sav-field-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.sav-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sav-type-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.45rem 0.95rem;
  border: 1px solid rgba(41, 37, 36, 0.22);
  border-radius: 2px;
  background: #fffdf9;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.sav-type-chip:hover {
  border-color: var(--theme-primary);
  color: var(--theme-primary);
  background: #ffffff;
}

.sav-type-chip.is-active {
  background: var(--theme-primary);
  border-color: var(--theme-primary-hover);
  color: #ffffff;
  font-weight: 600;
}

.sav-custom-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 1rem;
  background: #fffdf9;
  border: 1px dashed rgba(41, 37, 36, 0.25);
  border-radius: 2px;
}

.sav-custom-panel[hidden] {
  display: none;
}

.sav-custom-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sav-custom-input,
.sav-custom-keywords {
  width: 100%;
  min-height: 44px;
}

.sav-custom-keywords {
  resize: vertical;
  line-height: 1.45;
}

.sav-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.sav-analyze-btn,
.sav-clear-btn {
  min-height: 44px;
  padding: 0.55rem 1.25rem;
}

.sav-word-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.sav-notice {
  padding: 0.9rem 1rem;
  border-radius: 2px;
  background: #fffdf9;
  border: 1px dashed rgba(41, 37, 36, 0.25);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}

.sav-notice[hidden],
.sav-results[hidden] {
  display: none;
}

.sav-results {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding-top: 0.35rem;
}

.sav-summary-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 0.9rem;
}

.sav-summary-card {
  background: #fffdf9;
  border: 1px solid rgba(41, 37, 36, 0.2);
  border-radius: 2px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.sav-card-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-muted);
}

.sav-detected-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--theme-primary);
  line-height: 1.25;
  word-break: break-word;
}

.sav-detected-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.sav-match-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.sav-match-score {
  font-family: var(--font-mono);
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.sav-match-max {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sav-match-badge {
  margin-left: auto;
  padding: 0.18rem 0.55rem;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sav-match-high {
  background: #ecfdf5;
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.35);
}

.sav-match-medium {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid rgba(217, 119, 6, 0.35);
}

.sav-match-low {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.35);
}

.sav-gauge-track {
  width: 100%;
  height: 10px;
  border-radius: 0;
  background: rgba(41, 37, 36, 0.1);
  overflow: hidden;
}

.sav-gauge-fill {
  height: 100%;
  border-radius: 0;
  background: var(--theme-primary);
  transition: width 0.25s ease;
}

.sav-match-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.sav-block {
  background: #fffdf9;
  border: 1px solid rgba(41, 37, 36, 0.2);
  border-radius: 2px;
  padding: 1.1rem;
  min-width: 0;
}

.sav-block-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed rgba(41, 37, 36, 0.2);
}

.sav-bars-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.sav-bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sav-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
}

.sav-bar-name {
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
  word-break: break-word;
}

.sav-bar-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.45rem;
  border-radius: 2px;
  background: #f7f3ea;
  border: 1px solid rgba(41, 37, 36, 0.16);
  color: var(--text-muted);
}

.sav-bar-tag-detected {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.4);
  color: var(--theme-primary);
}

.sav-bar-score {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.sav-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 0;
  background: rgba(41, 37, 36, 0.1);
  overflow: hidden;
}

.sav-bar-fill {
  height: 100%;
  border-radius: 0;
  background: var(--text-muted);
  transition: width 0.25s ease;
}

.sav-bar-row.is-detected .sav-bar-fill {
  background: var(--theme-primary);
}

.sav-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.sav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sav-list li {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
  padding: 0.55rem 0.75rem;
  border-radius: 2px;
  background: #f7f3ea;
  border: 1px solid rgba(41, 37, 36, 0.14);
  word-break: break-word;
}

.sav-suggestions-list li {
  border-left: 3px solid var(--theme-primary);
}

@media (max-width: 767px) {
  .sav-textarea {
    width: 100%;
    font-size: 1rem;
    line-height: 1.55;
    height: 196px;
    min-height: 196px;
    overflow-y: hidden;
    resize: none;
  }

  .sav-type-chip {
    min-height: 44px;
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
  }

  .sav-custom-input,
  .sav-custom-keywords {
    width: 100%;
    font-size: 1rem;
    min-height: 44px;
  }

  .sav-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .sav-analyze-btn,
  .sav-clear-btn {
    width: 100%;
    min-height: 44px;
  }

  .sav-word-meta {
    margin-left: 0;
    text-align: center;
  }

  .sav-summary-grid,
  .sav-details-grid {
    grid-template-columns: 1fr;
  }
}
