:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #eef4f8;
  --text: #17212b;
  --muted: #5d6b78;
  --border: #d8e0e7;
  --primary: #174a73;
  --primary-dark: #103854;
  --accent: #d9edf8;
  --warning: #fff4dd;
  --warning-border: #e6bd63;
  --success: #eaf6ee;
  --success-border: #75b489;
  --shadow: 0 10px 30px rgba(20, 42, 62, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: linear-gradient(135deg, #103854, #1f628f);
  color: #fff;
  padding: 56px 0 48px;
}

.header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.82;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  line-height: 1.2;
  margin-bottom: 10px;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.3;
  margin-bottom: 8px;
}

.header-copy {
  max-width: 720px;
  margin-bottom: 0;
  font-size: 1.08rem;
  color: rgba(255,255,255,0.88);
}

.print-button {
  border: 1px solid rgba(255,255,255,0.5);
  background: #fff;
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

main {
  padding: 36px 0 64px;
}

.intro-card,
.final-check {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.method-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.method-summary {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: var(--surface-soft);
  border-radius: 14px;
}

.method-summary p,
.method-summary h3 {
  margin-bottom: 0;
}

.method-icon {
  font-size: 1.7rem;
}

.method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 28px 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  position: sticky;
  top: 10px;
  z-index: 10;
  box-shadow: 0 8px 20px rgba(20, 42, 62, 0.06);
}

.tab-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 11px;
  padding: 13px 16px;
  font-weight: 800;
  cursor: pointer;
}

.tab-button.active {
  color: #fff;
  background: var(--primary);
}

.method-panel {
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.method-heading {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 26px;
  align-items: start;
  margin-bottom: 24px;
}

.requirements {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px;
  background: var(--accent);
  border-radius: 14px;
}

.requirements strong {
  width: 100%;
}

.requirements span {
  display: inline-flex;
  padding: 6px 9px;
  background: #fff;
  border: 1px solid rgba(23, 74, 115, 0.15);
  border-radius: 999px;
  font-size: 0.9rem;
}

.steps {
  display: grid;
  gap: 20px;
}

.step-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: 22px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.step-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 800;
}

.step-content p:last-child,
.step-content ul:last-child {
  margin-bottom: 0;
}

.step-content ul {
  padding-left: 20px;
}

.tip,
.callout,
.example,
.action-placeholder {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
}

.tip,
.example {
  background: var(--success);
  border-left: 4px solid var(--success-border);
}

.callout {
  background: var(--warning);
  border-left: 4px solid var(--warning-border);
}

.action-placeholder {
  display: grid;
  gap: 4px;
  background: var(--surface-soft);
  border: 1px dashed #91a5b7;
}

.step-image {
  margin: 0;
}

.image-placeholder {
  min-height: 210px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  color: var(--primary-dark);
  background:
    linear-gradient(135deg, rgba(23,74,115,0.04), rgba(23,74,115,0.1)),
    repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(23,74,115,0.025) 12px, rgba(23,74,115,0.025) 24px);
  border: 2px dashed #9fb3c2;
  border-radius: 14px;
  padding: 24px;
}

.image-placeholder span {
  font-weight: 800;
  font-size: 1.05rem;
}

.image-placeholder small {
  max-width: 250px;
  color: var(--muted);
}

figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.final-check {
  margin-top: 32px;
}

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

.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.checklist input {
  margin-top: 5px;
}

.site-footer {
  padding: 28px 0;
  background: #e9eef2;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin-bottom: 4px;
}

.footer-note {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .header-inner,
  .method-heading {
    grid-template-columns: 1fr;
    display: grid;
  }

  .step-card {
    grid-template-columns: 48px 1fr;
  }

  .step-image {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 20px, 1180px);
  }

  .site-header {
    padding: 38px 0 34px;
  }

  main {
    padding-top: 22px;
  }

  .method-summary-grid,
  .method-tabs,
  .checklist {
    grid-template-columns: 1fr;
  }

  .method-tabs {
    position: static;
  }

  .intro-card,
  .final-check,
  .step-card {
    padding: 18px;
  }

  .step-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .step-number {
    width: 42px;
    height: 42px;
  }

  .step-image {
    grid-column: auto;
  }
}

@media print {
  body {
    background: #fff;
    font-size: 11pt;
  }

  .site-header {
    background: #fff !important;
    color: #000;
    padding: 20px 0;
    border-bottom: 2px solid #000;
  }

  .header-copy {
    color: #333;
  }

  .print-button,
  .method-tabs {
    display: none !important;
  }

  .method-panel,
  .method-panel[hidden] {
    display: block !important;
  }

  .method-panel + .method-panel {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 2px solid #bbb;
  }

  .intro-card,
  .final-check,
  .step-card {
    box-shadow: none;
    break-inside: avoid;
  }

  .step-card {
    grid-template-columns: 42px 1fr;
  }

  .step-image {
    grid-column: 2;
  }
}

/* Responsive screenshot improvements */
@media (min-width: 901px) {
  .container {
    width: min(1320px, calc(100% - 48px));
  }

  .step-card {
    grid-template-columns: 56px minmax(280px, 0.8fr) minmax(460px, 1.25fr);
    gap: 24px;
  }
}

.image-placeholder {
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  background: #fff;
  border-style: solid;
  border-width: 1px;
}

.image-placeholder img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 9px;
  object-fit: contain;
  cursor: zoom-in;
}

.image-placeholder-empty {
  min-height: 210px;
  padding: 24px;
  border: 2px dashed #9fb3c2;
  background:
    linear-gradient(135deg, rgba(23,74,115,0.04), rgba(23,74,115,0.1)),
    repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(23,74,115,0.025) 12px, rgba(23,74,115,0.025) 24px);
}

.step-image > p {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.45;
}

/* Click-to-enlarge screenshot viewer */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(8, 18, 28, 0.88);
}

.image-lightbox.open {
  display: flex;
}

.image-lightbox img {
  display: block;
  max-width: min(96vw, 1500px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  .image-placeholder {
    padding: 10px;
  }
}

@media print {
  .image-placeholder img {
    cursor: default;
  }

  .image-lightbox {
    display: none !important;
  }
}
