/* Kymi Error Code Hub — Consistent with Kymi Family Design System */

.hero-section {
  background: linear-gradient(135deg, #f8faff 0%, #eef2ff 52%, #f5f3ff 100%);
  border-bottom: 1px solid var(--border);
  padding: 2.2rem 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 1.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid #c7d2fe;
  color: #4338ca;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  font-weight: 900;
  line-height: 1.24;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 0.65rem;
}

.hero-title .accent {
  color: var(--primary);
}

.hero-desc {
  font-size: 0.96rem;
  color: var(--text-sub);
  line-height: 1.6;
  margin: 0 0 1.2rem;
  max-width: 660px;
}

.search-box-wrap {
  display: flex;
  gap: 0.5rem;
  background: #fff;
  border: 2px solid var(--primary);
  border-radius: 14px;
  padding: 0.35rem 0.45rem 0.35rem 1rem;
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.11);
  max-width: 650px;
}

.search-box-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  min-width: 0;
}

.search-box-wrap button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.search-box-wrap button:hover {
  background: #4338ca;
}

.search-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.55rem;
}

.hero-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.hero-stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.hero-stat-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.free-pill {
  background: #ecfdf5;
  color: #047857;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
}

.hero-stat-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.85rem;
}

.hero-stat-rows {
  display: grid;
  gap: 0.45rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  font-size: 0.83rem;
}

.hero-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.hero-stat-row span { color: var(--text-muted); }
.hero-stat-row strong { color: var(--text); font-weight: 700; text-align: right; }

/* Single-line Quick Action Strip (Emergency Triage & AS Center) */
.quick-strip {
  margin-top: 1.35rem;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 14px;
  padding: 0.8rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.quick-strip-text {
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.quick-strip-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.strip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.85rem;
  border-radius: 9px;
  font-size: 0.83rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: 0.15s ease;
}

.strip-btn-primary {
  background: #4f46e5;
  color: #fff;
}
.strip-btn-primary:hover { background: #4338ca; }

.strip-btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.strip-btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }

/* Section Layout */
.section-block {
  padding: 1.75rem 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* 6-Column Single-Row Appliance Category Grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.cat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 0.9rem 0.85rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.08);
}

.cat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cat-icon { font-size: 1.35rem; }
.cat-count {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
  background: #eef2ff;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}
.cat-name {
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Filter Bar (Brands + Severity) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-bottom: 1rem;
}

.filter-pill {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 0.83rem;
  font-weight: 700;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.15s ease;
}

.filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Error Code Cards Grid */
.error-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.error-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.05rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.error-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.error-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.code-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.02rem;
  font-weight: 900;
  color: #1e1b4b;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 0.18rem 0.6rem;
  border-radius: 8px;
}

.sev-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.52rem;
  border-radius: 999px;
  white-space: nowrap;
}

.sev-self { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.sev-check { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.sev-service { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.error-brand-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.error-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.38;
  margin: 0;
}

.error-cause {
  font-size: 0.83rem;
  color: var(--text-sub);
  line-height: 1.48;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.error-card-foot {
  margin-top: auto;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 700;
}

/* Detail Page Styles */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--text-sub); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }

.detail-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.geo-summary {
  background: #f8faff;
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.15rem;
  margin: 1rem 0 1.25rem;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--text);
}

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0.85rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.steps-list li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.94rem;
  line-height: 1.55;
}

.step-num {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.as-box {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  border-radius: 14px;
  padding: 1.2rem 1.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.as-box-btns {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.as-call-btn {
  background: #10b981;
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
}
.as-call-btn:hover { background: #059669; }

.as-web-btn {
  background: #4f46e5;
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
}
.as-web-btn:hover { background: #4338ca; }

/* AS Directory Table */
.as-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.as-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.as-table th, .as-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.as-table th {
  background: #f8fafc;
  font-weight: 800;
  color: var(--text);
}

/* Interactive Reset Checklist */
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  margin-bottom: 0.65rem;
}
.check-item input[type="checkbox"] {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  accent-color: var(--primary);
}
.check-item.done {
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 14px;
  display: none;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 700;
}
.lang-toggle a {
  padding: 0.28rem 0.55rem;
  text-decoration: none;
  color: var(--text-sub);
  background: #fff;
}
.lang-toggle a.active {
  background: var(--primary);
  color: #fff;
}

@media (max-width: 1080px) {
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .error-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stat-card { display: none; }
}

@media (max-width: 600px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .error-grid { grid-template-columns: 1fr; }
}
