/* /css/SudokuDifficultyGuide.css
// ==========================================================
// Sudoku Paradise — How Difficulty Is Measured Guide
// ========================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #243b3e;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.difficulty-page-header {
  display: flex;
  justify-content: center;
  padding: 1.1rem 5rem 0.4rem;
}

.difficulty-brand {
  color: #0b6870;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.difficulty-page-main {
  width: min(1020px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.7rem 0 2.5rem;
}

.difficulty-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  max-width: 900px;
  margin: 0 auto 1rem;
  color: #547074;
  font-size: 0.84rem;
}

.difficulty-breadcrumbs a {
  color: #0b6870;
  font-weight: 700;
}

.difficulty-hero {
  max-width: 880px;
  margin: 0 auto 1.4rem;
  text-align: center;
}

.difficulty-eyebrow,
.section-kicker {
  margin: 0 0 0.4rem;
  color: #0b6870;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.difficulty-hero h1 {
  margin: 0;
  color: #174f55;
  font-size: clamp(2rem, 6vw, 3.35rem);
  line-height: 1.08;
}

.difficulty-lead {
  max-width: 800px;
  margin: 1rem auto 0;
  font-size: clamp(1.03rem, 2.4vw, 1.18rem);
  line-height: 1.68;
}

.difficulty-formula,
.difficulty-section,
.difficulty-comparison,
.difficulty-target,
.difficulty-principles,
.difficulty-faq,
.difficulty-cta {
  max-width: 900px;
  margin: 1.3rem auto;
  padding: clamp(1.15rem, 4vw, 1.8rem);
  border: 1px solid rgba(11, 104, 112, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 8px 22px rgba(20, 55, 60, 0.1);
}

.difficulty-formula h2,
.difficulty-section h2,
.difficulty-comparison h2,
.difficulty-target h2,
.difficulty-principles h2,
.difficulty-faq h2,
.difficulty-cta h2 {
  margin: 0 0 0.85rem;
  color: #0b6870;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  line-height: 1.25;
}

.difficulty-formula {
  overflow: hidden;
  border-color: rgba(11, 104, 112, 0.38);
  background:
    linear-gradient(145deg, rgba(239, 251, 249, 0.98), rgba(255, 255, 255, 0.96));
  text-align: center;
}

.formula-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.formula-factor {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 10.5rem;
  padding: 1.1rem 0.85rem;
  border: 1px solid rgba(11, 104, 112, 0.25);
  border-radius: 12px;
  background: #ffffff;
}

.formula-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  margin-bottom: 0.65rem;
  border-radius: 50%;
  background: #0b6870;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 850;
}

.formula-factor strong {
  color: #174f55;
  font-size: 1.05rem;
}

.formula-factor > span:last-child {
  margin-top: 0.4rem;
  color: #547074;
  font-size: 0.88rem;
  line-height: 1.4;
}

.formula-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a46900;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.formula-summary {
  margin: 1.15rem 0 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid #d39a1f;
  background: rgba(255, 244, 208, 0.72);
  color: #3e4e50;
  line-height: 1.55;
  text-align: left;
}

.difficulty-section {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.15rem;
}

.section-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: #0b6870;
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 850;
}

.difficulty-section p,
.difficulty-comparison p,
.difficulty-target p,
.difficulty-principles p,
.difficulty-faq p,
.difficulty-cta p {
  line-height: 1.68;
}

.difficulty-section p:not(.section-kicker) {
  margin: 0.55rem 0;
}

.difficulty-comparison > p:not(.section-kicker),
.difficulty-target p,
.difficulty-principles > p,
.difficulty-cta > p {
  margin: 0.55rem 0;
}

.comparison-table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  border: 1px solid rgba(11, 104, 112, 0.22);
  border-radius: 10px;
}

.difficulty-comparison table {
  width: 100%;
  min-width: 610px;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 0.92rem;
}

.difficulty-comparison th,
.difficulty-comparison td {
  padding: 0.78rem;
  border-right: 1px solid rgba(11, 104, 112, 0.14);
  border-bottom: 1px solid rgba(11, 104, 112, 0.14);
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.difficulty-comparison th:last-child,
.difficulty-comparison td:last-child {
  border-right: 0;
}

.difficulty-comparison tbody tr:last-child th,
.difficulty-comparison tbody tr:last-child td {
  border-bottom: 0;
}

.difficulty-comparison thead th {
  background: #0b6870;
  color: #ffffff;
  font-weight: 800;
}

.difficulty-comparison tbody th {
  width: 23%;
  background: rgba(232, 247, 245, 0.78);
  color: #174f55;
}

.comparison-note {
  color: #547074;
  font-size: 0.87rem;
}

.difficulty-target {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  border-color: rgba(211, 154, 31, 0.46);
  background:
    linear-gradient(145deg, rgba(255, 249, 230, 0.96), rgba(255, 255, 255, 0.96));
}

.target-icon {
  display: flex;
  flex: 0 0 3.2rem;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: #d39a1f;
  color: #ffffff;
  font-size: 1.65rem;
  font-weight: 850;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.principle-grid article {
  padding: 1rem;
  border: 1px solid rgba(11, 104, 112, 0.2);
  border-radius: 10px;
  background: rgba(239, 249, 248, 0.72);
}

.principle-grid h3 {
  margin: 0 0 0.45rem;
  color: #174f55;
  font-size: 1.02rem;
}

.principle-grid p {
  margin: 0;
  font-size: 0.91rem;
}

.rating-caveat {
  margin-top: 1rem !important;
  padding: 0.8rem 1rem;
  border-left: 4px solid #0b6870;
  background: rgba(231, 247, 244, 0.82);
}

.difficulty-faq details {
  padding: 0.8rem 0;
  border-top: 1px solid rgba(11, 104, 112, 0.17);
}

.difficulty-faq details:last-child {
  border-bottom: 1px solid rgba(11, 104, 112, 0.17);
}

.difficulty-faq summary {
  color: #174f55;
  cursor: pointer;
  font-weight: 750;
  line-height: 1.45;
}

.difficulty-faq details p {
  margin: 0.65rem 0 0.1rem;
}

.difficulty-cta {
  text-align: center;
}

.difficulty-cta > p {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
}

.cta-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.cta-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.68rem 0.95rem;
  border: 1px solid rgba(11, 104, 112, 0.42);
  border-radius: 9px;
  background: #ffffff;
  color: #0b6870;
  font-weight: 750;
  text-decoration: none;
}

.cta-links a:hover,
.cta-links a:focus-visible {
  border-color: #084f56;
  outline: 2px solid rgba(11, 104, 112, 0.2);
}

.cta-links .cta-primary {
  border-color: #0b6870;
  background: #0b6870;
  color: #ffffff;
}

.cta-links .cta-primary:hover,
.cta-links .cta-primary:focus-visible {
  background: #084f56;
}

.difficulty-page-footer {
  padding: 1rem;
  color: #486467;
  font-size: 0.9rem;
  text-align: center;
}

.difficulty-page-footer a {
  color: #0b6870;
  font-weight: 700;
}

@media (max-width: 760px) {
  .difficulty-page-header {
    padding-top: 3.6rem;
  }

  .formula-flow {
    grid-template-columns: 1fr;
  }

  .formula-factor {
    min-height: 0;
  }

  .formula-connector {
    min-height: 1.8rem;
    writing-mode: horizontal-tb;
    transform: none;
  }

  .principle-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .difficulty-page-main {
    width: min(100% - 1rem, 1020px);
  }

  .difficulty-section,
  .difficulty-target {
    grid-template-columns: 1fr;
  }

  .difficulty-section {
    display: grid;
  }

  .difficulty-target {
    display: flex;
    flex-direction: column;
  }

  .section-marker,
  .target-icon {
    width: 2.75rem;
    height: 2.75rem;
  }

  .cta-links {
    align-items: stretch;
    flex-direction: column;
  }
}

@media print {
  .site-menu-button,
  .site-drawer,
  .site-drawer-backdrop,
  .difficulty-page-header,
  .difficulty-breadcrumbs,
  .difficulty-cta,
  .difficulty-page-footer {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #111111;
  }

  .difficulty-page-main {
    width: 100%;
    padding: 0;
  }

  .difficulty-formula,
  .difficulty-section,
  .difficulty-comparison,
  .difficulty-target,
  .difficulty-principles,
  .difficulty-faq {
    break-inside: avoid;
    border-color: #8a8a8a;
    box-shadow: none;
  }
}
