:root {
  --bg: #f3efe7;
  --surface: #fcfaf4;
  --surface-soft: #f5f0e6;
  --glass: #fcfaf4;
  --glass-strong: #fffdf8;
  --glass-soft: #f6f1e8;
  --glass-line: #d7cfc1;
  --glass-shadow: 0 12px 22px rgba(35, 27, 17, 0.08);
  --glass-blur: 0px;
  --text: #1f1a14;
  --muted: #5e5548;
  --line: #d8d0c2;
  --line-strong: #c6bcac;

  --brand: #2b4f75;
  --brand-strong: #203c5a;
  --brand-soft: #e5ecf4;

  --success: #137a48;
  --warn: #b56c00;
  --danger: #bf2d2d;

  --shadow-sm: 0 1px 2px rgba(35, 27, 17, 0.08);
  --shadow-md: 0 10px 20px rgba(35, 27, 17, 0.07);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Work Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(1100px 450px at 100% -220px, #e7dfd2 0%, transparent 60%),
    radial-gradient(1000px 380px at -180px -110px, #e7e1d7 0%, transparent 56%),
    linear-gradient(180deg, #f5f1e9 0%, #f0eadf 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(rgba(66, 53, 38, 0.08) 0.55px, transparent 0.55px);
  background-size: 3px 3px;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(16px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 96%, white);
  box-shadow: var(--shadow-sm);
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: "Fraunces", "Work Sans", sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.topbar-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px 8px 11px 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--brand), var(--brand-strong));
  color: #fff;
}

.topbar-mark svg,
.brand-mark svg,
.button-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #c5ddca;
  background: #edf7ef;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 45%, transparent);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px transparent;
  }
}

.topbar-status {
  color: var(--success);
  font-size: 0.82rem;
  font-weight: 700;
}

.language-button {
  border: 1px solid var(--line);
  background: #f7f2e8;
  color: var(--text);
  border-radius: 10px 8px 11px 9px;
  padding: 6px 10px;
  font-weight: 700;
  cursor: pointer;
}

.app-shell {
  width: min(1180px, calc(100% - 24px));
  margin: 26px auto;
  display: grid;
  gap: 18px;
}

.hero-banner {
  border: 1px solid var(--line);
  border-radius: 18px 14px 17px 13px;
  background: linear-gradient(160deg, #f7f2e8 0%, #f1ebdf 100%);
  box-shadow: var(--glass-shadow);
  color: var(--text);
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 20px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
  display: grid;
  gap: 0;
}

.hero-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: #6f6250;
}

.hero-banner h1 {
  margin-top: 10px;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #231f18;
  max-width: 15ch;
  font-family: "Fraunces", "Work Sans", sans-serif;
  font-weight: 600;
}

.hero-subtitle {
  margin-top: 14px;
  max-width: 62ch;
  color: #5e5548;
  line-height: 1.58;
}

.hero-actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-cta {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.86rem;
  color: #2b4f75;
  background: #fffdf8;
  border: 1px solid #cfc5b6;
  box-shadow: 0 3px 0 #d8ccbb;
}

.hero-note {
  font-size: 0.84rem;
  color: #776a57;
  font-weight: 700;
}

.hero-image-card {
  margin: 0;
  border: 1px solid #cfc5b6;
  border-radius: 16px 12px 15px 11px;
  overflow: hidden;
  background: #f6efe3;
  min-height: 258px;
  box-shadow: 0 6px 14px rgba(50, 37, 25, 0.14);
  position: relative;
}

.hero-image-card img {
  width: 100%;
  height: 100%;
  min-height: 258px;
  max-height: 320px;
  object-fit: cover;
  display: block;
  filter: saturate(0.9) contrast(1.03) brightness(0.92);
}

.hero-image-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(35, 26, 17, 0.08) 0%, rgba(35, 26, 17, 0.58) 100%);
  pointer-events: none;
}

.hero-image-card figcaption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 1;
  color: #f7efe3;
  font-size: 0.73rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero-kpis {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-kpi {
  border: 1px solid #d3c9ba;
  border-radius: 12px 10px 13px 9px;
  background: #f8f3e9;
  padding: 10px 12px;
}

.hero-kpi strong {
  display: block;
  color: #2b4f75;
  font-family: "Fraunces", "Work Sans", sans-serif;
  font-size: 1.02rem;
}

.hero-kpi span {
  display: block;
  margin-top: 1px;
  color: #746754;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.container {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(400px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.checker-panel,
.result-container {
  border: 1px solid var(--line);
  border-radius: 16px 13px 15px 12px;
  background: var(--surface);
  box-shadow: var(--glass-shadow);
}

.checker-panel {
  padding: 24px;
}

.brand-row {
  margin-bottom: 18px;
}

.brand-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 13px 10px 12px 9px;
  background: linear-gradient(160deg, var(--brand), var(--brand-strong));
  display: grid;
  place-items: center;
  color: #fff;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 5px;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  font-family: "Fraunces", "Work Sans", sans-serif;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.12;
}

.page-copy {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.checker-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-label {
  font-size: 0.92rem;
  font-weight: 700;
}

.field-description {
  color: var(--muted);
  font-size: 0.79rem;
}

.phone-control {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 54px;
  border: 1px solid #d7cebf;
  border-radius: 12px;
  overflow: hidden;
  background: #fffdf8;
}

.phone-control:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px #e5dccf;
}

.phone-prefix {
  padding: 0 14px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  background: #f5eee2;
  border-right: 1px solid #d7cebf;
  height: 100%;
  display: inline-flex;
  align-items: center;
}

input {
  border: 0;
  outline: none;
  width: 100%;
  height: 100%;
  padding: 0 14px;
  color: var(--text);
}

.submit-button {
  border: 0;
  border-radius: 12px;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(160deg, var(--brand), var(--brand-strong));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.submit-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.submit-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.button-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.is-loading .button-spinner {
  display: inline-block;
}

.is-loading .button-icon {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

.info-card {
  border: 1px solid #ddd4c5;
  border-radius: var(--radius-md);
  background: #f7f1e7;
  padding: 12px;
  display: flex;
  gap: 10px;
}

.info-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
}

.info-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.info-card strong {
  display: block;
  font-size: 0.88rem;
}

.info-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.signal-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.signal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d6cdbc;
  border-radius: 999px;
  background: #f9f4ea;
  padding: 6px 11px;
  font-size: 0.82rem;
  font-weight: 700;
}

.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.signal-dot.pathao {
  background: #00a24a;
}

.signal-dot.redx {
  background: #ff6e33;
}

.signal-dot.steadfast {
  background: #6d47c9;
}

.result-container {
  padding: 0;
  overflow: hidden;
}

.panel-heading {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-heading h2 {
  font-size: 1.35rem;
}

.result-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #4e4539;
  background: #eee6d8;
}

.result-chip.checking {
  color: #124b99;
  background: #dbeafe;
}

.result-chip.complete {
  color: #11663f;
  background: #def7e9;
}

.result-chip.error {
  color: #912323;
  background: #fbe5e5;
}

.risk-section {
  padding: 18px 20px 0;
}

.risk-meter {
  border: 1px solid #d8cfbf;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f8f2e8 0%, #f2ebdf 100%);
  padding: 16px;
}

.risk-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.risk-caption {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 800;
}

.risk-value {
  font-family: "Fraunces", "Work Sans", sans-serif;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1;
  font-weight: 800;
  color: var(--text);
}

.risk-progress {
  margin-top: 12px;
  height: 8px;
  border-radius: 999px;
  background: #e8decc;
  overflow: hidden;
}

.risk-track {
  height: 100%;
  width: 0;
  transition: width 0.35s ease;
  background: linear-gradient(90deg, #1f8f5a, #d9a000, #c73737);
}

.risk-label {
  margin-top: 8px;
  font-weight: 700;
}

.risk-meter.low .risk-value,
.risk-meter.low .risk-label {
  color: var(--success);
}

.risk-meter.medium .risk-value,
.risk-meter.medium .risk-label {
  color: var(--warn);
}

.risk-meter.high .risk-value,
.risk-meter.high .risk-label {
  color: var(--danger);
}

.risk-meter.loading {
  animation: breathe 1s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    transform: scale(0.995);
  }
}

.status-box {
  margin: 14px 20px 0;
  border: 1px solid #d7cdbd;
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 14px;
  background: #faf5ec;
}

.status-title {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.status-text {
  margin: 0;
  color: #5a5144;
}

.loading-track {
  margin-top: 10px;
  height: 4px;
  border-radius: 999px;
  background: #e6ddcc;
  overflow: hidden;
  display: none;
}

.loading-track.active {
  display: block;
}

.loading-track .progress-bar {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: var(--brand);
  animation: bar 1s ease-in-out infinite;
}

@keyframes bar {
  from {
    transform: translateX(-130%);
  }
  to {
    transform: translateX(300%);
  }
}

.stats-grid {
  margin: 14px 20px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stat-item {
  border: 1px solid #ddd4c6;
  border-radius: 10px;
  background: #f6efe4;
  padding: 10px;
  text-align: center;
}

.stat-label {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

.stat-value {
  margin-top: 2px;
  font-family: "Fraunces", "Work Sans", sans-serif;
  font-size: 1.25rem;
  line-height: 1.1;
  font-weight: 700;
  color: var(--brand);
}

.response-list {
  margin: 14px 20px 20px;
  display: grid;
  gap: 10px;
}

.empty-state {
  min-height: 110px;
  border: 1px dashed rgba(197, 208, 221, 0.95);
  border-radius: var(--radius-md);
  background: #f7f0e5;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  padding: 14px;
}

.empty-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-soft);
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  max-width: 360px;
}

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

.skeleton-card {
  border: 1px solid #ddd3c4;
  border-radius: 10px;
  background: #faf5ec;
  padding: 12px;
  min-height: 78px;
}

.skeleton-card span,
.skeleton-card strong {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, #edf2f7, #f9fbfd, #edf2f7);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-card span {
  width: 52%;
  height: 10px;
}

.skeleton-card strong {
  width: 72%;
  height: 20px;
  margin-top: 12px;
}

@keyframes shimmer {
  from {
    background-position: 150% 0;
  }
  to {
    background-position: -150% 0;
  }
}

.summary-grid,
.provider-grid {
  display: grid;
  gap: 8px;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.provider-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metric-card,
.provider-card,
.pie-card {
  border: 1px solid #ddd3c4;
  border-radius: 10px;
  background: #faf5ec;
  padding: 12px;
}

.metric-card strong {
  display: block;
  font-size: 1.18rem;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.pie-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.pie-chart {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--success) 0 var(--success-value), var(--danger) var(--success-value) 100%);
}

.pie-center {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #fffdf7;
  display: grid;
  place-items: center;
  align-content: center;
}

.pie-center strong {
  font-size: 1.1rem;
}

.pie-center span {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--muted);
}

.pie-details h3 {
  margin: 0;
  font-size: 1rem;
}

.pie-details p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.pie-legend {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.pie-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}

.pie-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-success {
  background: var(--success);
}

.legend-failed {
  background: var(--danger);
}

.provider-card-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.provider-card h3 {
  margin: 0;
  font-size: 1rem;
}

.provider-rating {
  align-self: start;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #10603d;
  background: #def7e9;
}

.provider-rating.poor,
.provider-rating.bad {
  color: #902727;
  background: #fbe5e5;
}

.provider-rating.average,
.provider-rating.medium {
  color: #8a5a00;
  background: #fff0d5;
}

.provider-metrics {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.provider-metrics .metric-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: #f3ebde;
}

.provider-metrics .metric-card strong {
  font-size: 1rem;
}

.provider-metrics .metric-card span {
  margin-top: 0;
  font-size: 0.67rem;
}

.success-bar {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  background: rgba(232, 239, 246, 0.84);
  overflow: hidden;
}

.success-bar span {
  display: block;
  height: 100%;
  background: var(--success);
}

.success-meta {
  margin: 8px 0 0;
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 700;
}

.site-footer {
  width: min(1180px, calc(100% - 24px));
  margin: 4px auto 26px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

@media (max-width: 1060px) {
  .hero-banner {
    grid-template-columns: 1fr;
  }

  .hero-image-card {
    order: -1;
    min-height: 200px;
  }

  .hero-image-card img {
    min-height: 200px;
    max-height: 240px;
  }

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

@media (max-width: 700px) {
  .topbar {
    padding: 10px 12px;
    min-height: auto;
    flex-wrap: wrap;
    gap: 8px;
  }

  .topbar-meta {
    display: none;
  }

  .checker-panel {
    padding: 16px;
  }

  .hero-banner {
    padding: 16px;
  }

  .hero-banner h1 {
    font-size: 1.85rem;
  }

  .hero-kpis {
    grid-template-columns: 1fr;
  }

  .hero-image-card img {
    max-height: 190px;
  }

  .brand-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .info-grid,
  .stats-grid,
  .skeleton-grid,
  .pie-card {
    grid-template-columns: 1fr;
  }

  .panel-heading,
  .risk-section,
  .status-box,
  .stats-grid,
  .response-list {
    margin-left: 0;
    margin-right: 0;
  }

  .panel-heading,
  .risk-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .status-box,
  .stats-grid,
  .response-list {
    margin: 10px 14px 0;
  }

  .response-list {
    margin-bottom: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
