.seo-tool-page {
  background: #f5f8f6;
}

.seo-hero {
  background: linear-gradient(135deg, #173d3a 0%, #2f6f6b 72%, #e4a72d 100%);
  color: #ffffff;
  padding: 28px clamp(18px, 5vw, 72px) 52px;
}

.seo-breadcrumb {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
}

.seo-breadcrumb a,
.seo-breadcrumb span,
.seo-hero .eyebrow,
.seo-hero .hero-copy {
  color: rgba(255, 255, 255, 0.84);
}

.seo-breadcrumb a {
  font-weight: 850;
  text-decoration: none;
}

.seo-breadcrumb span::before {
  content: "/";
  margin-right: 8px;
}

.seo-hero h1 {
  color: #ffffff;
  font-size: clamp(36px, 7vw, 70px);
  line-height: 1.02;
  max-width: 980px;
}

.hero-copy {
  font-size: 18px;
  line-height: 1.7;
  max-width: 760px;
}

.seo-hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.seo-hero-actions .primary-button {
  text-decoration: none;
}

.ghost-link {
  color: #ffffff;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.seo-tool-shell {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.72fr);
  padding: 30px clamp(18px, 5vw, 64px) 58px;
}

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

.seo-section,
.calculator-panel,
.seo-result-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(28, 43, 40, 0.08);
  padding: clamp(20px, 4vw, 30px);
}

.seo-section h2,
.calculator-panel h2 {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  margin-bottom: 12px;
}

.seo-section p,
.panel-heading p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.ingredient-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 14px;
}

.ingredient-row {
  align-items: end;
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1.2fr repeat(3, minmax(92px, 0.75fr)) minmax(94px, 0.75fr) auto;
  padding: 12px;
}

.ingredient-row label,
.single-dish-grid label {
  display: grid;
  gap: 7px;
}

.ingredient-row span,
.single-dish-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.ingredient-row input,
.single-dish-grid input,
.single-dish-grid select {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.row-cost {
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 900;
  min-width: 84px;
}

.remove-row {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--danger);
  font-weight: 900;
  min-height: 44px;
  width: 44px;
}

.single-dish-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.seo-result-card {
  position: sticky;
  top: 18px;
}

.seo-result-card h2 {
  font-size: 28px;
  line-height: 1.1;
  margin-bottom: 18px;
}

.metric-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 13px 0;
}

.metric-row span {
  color: var(--muted);
  font-weight: 800;
}

.metric-row strong {
  color: var(--text);
  font-size: 20px;
}

.metric-row.highlight strong {
  color: var(--accent-dark);
  font-size: 30px;
}

.risk-callout,
.formula-box,
.product-cta {
  background: #eef6f4;
  border-radius: 8px;
  color: var(--text);
  line-height: 1.6;
  margin-top: 18px;
  padding: 16px;
}

.risk-callout.is-good {
  background: #ecfdf3;
  color: var(--success);
  font-weight: 850;
}

.risk-callout.is-warning {
  background: #fff7ed;
  color: var(--warning);
  font-weight: 850;
}

.risk-callout.is-danger {
  background: #fef2f2;
  color: var(--danger);
  font-weight: 850;
}

.formula-box {
  display: grid;
  gap: 6px;
}

.formula-box strong {
  color: var(--accent-dark);
  font-size: 24px;
}

.formula-box span {
  color: var(--muted);
}

.check-list {
  color: var(--text);
  display: grid;
  gap: 12px;
  line-height: 1.55;
  margin-bottom: 0;
  padding-left: 20px;
}

.internal-link-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0;
}

.internal-link-grid a {
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-dark);
  font-weight: 850;
  padding: 14px;
  text-decoration: none;
}

.draft-note {
  background: #fff7ed;
  border-radius: 8px;
  color: var(--warning) !important;
  font-size: 14px !important;
  padding: 12px;
}

.source-section a {
  color: var(--accent-dark);
  font-weight: 850;
}

.product-cta h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.product-cta p {
  color: var(--muted);
  line-height: 1.6;
}

.product-cta .primary-button {
  display: inline-flex;
  margin-top: 6px;
  text-decoration: none;
}

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

  .seo-result-card {
    position: static;
  }

  .ingredient-row,
  .single-dish-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .seo-hero {
    padding-top: 22px;
  }

  .ingredient-row,
  .single-dish-grid,
  .internal-link-grid {
    grid-template-columns: 1fr;
  }

  .remove-row {
    width: 100%;
  }
}

.micro-cost-page {
  background: #f6f8f7;
}

.micro-shell {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 920px;
  padding: 18px clamp(14px, 4vw, 28px) 42px;
  width: 100%;
}

.micro-header {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: clamp(20px, 5vw, 34px);
}

.micro-breadcrumb {
  margin-bottom: 18px;
}

.micro-breadcrumb a,
.micro-breadcrumb span {
  color: var(--muted);
}

.language-toggle {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.language-toggle button {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-weight: 850;
  min-height: 44px;
  padding: 9px 14px;
}

.language-toggle button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.micro-header h1 {
  font-size: clamp(31px, 8vw, 52px);
  line-height: 1.04;
  margin-bottom: 10px;
}

.micro-header h1 small {
  color: var(--muted);
  display: block;
  font-size: clamp(17px, 4vw, 24px);
  line-height: 1.25;
  margin-top: 9px;
}

.micro-subtitle {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.55;
  margin-bottom: 0;
}

.micro-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: clamp(18px, 5vw, 30px);
}

.calculator-first {
  border-color: rgba(15, 118, 110, 0.28);
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: clamp(24px, 6vw, 36px);
  line-height: 1.1;
  margin-bottom: 8px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0;
}

.micro-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.micro-form-grid.three-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.micro-form-grid label {
  display: grid;
  gap: 7px;
}

.micro-form-grid label > span {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.micro-form-grid input,
.micro-form-grid select {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 16px;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.micro-form-grid input:focus,
.micro-form-grid select:focus,
.language-toggle button:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
  outline: none;
}

.money-input,
.input-with-unit {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
}

.money-input b {
  color: var(--accent-dark);
  font-weight: 950;
}

.input-with-unit {
  grid-template-columns: minmax(0, 1fr) 96px;
}

.validation-message {
  color: var(--danger);
  font-weight: 850;
  line-height: 1.45;
  margin: 12px 0 0;
  min-height: 20px;
}

.micro-result {
  background: #eef6f4;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  margin-top: 16px;
  padding: clamp(18px, 5vw, 28px);
}

.micro-result .result-label {
  color: var(--accent-dark);
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 6px;
}

.micro-result > strong {
  color: var(--accent-dark);
  display: block;
  font-size: clamp(44px, 13vw, 76px);
  line-height: 0.95;
  margin-bottom: 22px;
}

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

.result-grid div {
  background: #ffffff;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  padding: 14px;
}

.result-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.result-grid b {
  color: var(--text);
  font-size: clamp(19px, 5vw, 28px);
  line-height: 1.1;
}

.secondary-result {
  background: #f8fbfa;
}

.story-result {
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.55;
  margin: 16px 0 0;
}

.fine-print,
.micro-disclaimer p {
  color: var(--muted);
  line-height: 1.65;
}

.micro-disclaimer h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.micro-disclaimer p:last-child {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .micro-form-grid,
  .micro-form-grid.three-cols,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .language-toggle {
    justify-content: flex-start;
  }
}

@media (max-width: 360px) {
  .input-with-unit {
    grid-template-columns: 1fr;
  }
}
