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

:root {
  --blue: #f05a00;
  --blue-dark: #c44800;
  --blue-light: #fdf0e6;
  --accent: #f05a00;
  --text: #1a1a2e;
  --text-muted: #5a6a7a;
  --bg: #f4f7fb;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 57, 122, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Header */
header {
  background: #000000;
  color: var(--white);
  padding: 24px 20px 20px;
  text-align: center;
}

header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

header .subtitle {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-top: 4px;
}

/* Main */
main {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.intro-card {
  margin-bottom: 20px;
  border-left: 4px solid var(--blue);
}

.intro-card h2 {
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: var(--blue-dark);
}

.intro-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.category-btn {
  background: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 20px 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.category-btn:hover, .category-btn:active {
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(0, 57, 122, 0.18);
}

.category-btn .icon {
  font-size: 2rem;
}

.category-btn .label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue-dark);
  line-height: 1.2;
}

.category-btn .step-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Steps view */
.hidden {
  display: none !important;
}

.back-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
  display: inline-block;
}

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.step-header h2 {
  font-size: 1.1rem;
  color: var(--blue-dark);
}

.step-counter {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--blue-light);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Progress bar */
.progress-bar {
  background: var(--blue-light);
  border-radius: 4px;
  height: 6px;
  margin-bottom: 16px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Step card */
.step-card {
  margin-bottom: 20px;
  min-height: 200px;
}

.step-number {
  width: 36px;
  height: 36px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 14px;
}

.step-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--blue-dark);
}

.step-card p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Step image */
.step-image {
  width: 100%;
  border-radius: 8px;
  margin: 12px 0;
  object-fit: cover;
}

/* Step link */
.step-link {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 16px;
  background: var(--blue);
  color: var(--white);
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.step-link:active {
  background: var(--blue-dark);
}

/* Tip box */
.tip-box {
  margin-top: 16px;
  background: #fffbf0;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px 14px;
}

.tip-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.tip-box p {
  font-size: 0.88rem;
  color: #6b5000;
}

/* Nav buttons */
.nav-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:not(:disabled):hover {
  background: var(--blue-dark);
}

.btn-secondary {
  background: var(--blue-light);
  color: var(--blue-dark);
}

/* Info page */
.info-block {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.info-section-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin: 20px 0 8px;
}

.info-block h4 {
  font-size: 1rem;
  color: var(--blue-dark);
  margin-bottom: 6px;
}

.info-list {
  margin-top: 8px;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

.info-block p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Emergency button */
.emergency-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 18px 20px;
  background: #c0392b;
  color: #ffffff;
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(192, 57, 43, 0.35);
  transition: background 0.15s, transform 0.15s;
}

.emergency-btn:active {
  background: #a93226;
  transform: scale(0.98);
}

.emergency-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.emergency-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.emergency-text strong {
  font-size: 1rem;
}

.emergency-text span {
  font-size: 0.88rem;
  opacity: 0.88;
}

/* Done message */
.done-message {
  text-align: center;
  padding: 20px;
}

.done-message p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
