:root {
  --bg: #f6eecc;
  --panel: #ffffff;
  --line: #dbe6e1;
  --text: #0b243c;
  --muted: #4f6c71;
  --green: #0b243c;
  --green-dark: #133a56;
  --orange: #80afb6;
  --orange-dark: #67969d;
  --danger: #c83838;
  --ok: #0b243c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

.site-head {
  background: #f6eecc;
  position: sticky;
  top: 0;
  z-index: 30;
}

.head-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.logo-image {
  width: auto;
  height: 60px;
  max-width: min(245px, 60vw);
  object-fit: contain;
  display: block;
}

.wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 24px 20px 10px;
}

.home-main {
  min-height: calc(100vh - 92px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 56px;
}

.home-card {
  width: 100%;
  max-width: 760px;
}

.home-flow {
  width: 100%;
  max-width: 760px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.05);
}

h1 {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0;
  font-size: 1.05rem;
}

p {
  margin: 0;
  color: var(--muted);
}

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

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button,
.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--green), var(--green-dark));
  color: white;
  font-family: inherit;
  font-weight: 700;
  padding: 11px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 8px 14px rgba(31, 143, 95, 0.24);
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: #fff;
  color: #0b243c;
  border-color: #80afb6;
  box-shadow: none;
}

.btn-warm {
  background: linear-gradient(90deg, var(--orange), var(--orange-dark));
  box-shadow: 0 8px 14px rgba(241, 143, 50, 0.3);
}

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

.kv div {
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
}

.status {
  font-weight: 600;
  text-align: center;
}

.status.ok {
  color: var(--ok);
}

.status.err {
  color: var(--danger);
}

.status.status-toast {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  min-height: auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eaf4f6;
  border: 1px solid #bed7db;
  color: #0b243c;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.42s ease, transform 0.42s ease;
}

.status.status-toast.fade-out {
  opacity: 0;
  transform: translateY(-5px);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #d7e5de;
  border-top-color: var(--green);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

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

.mono {
  font-family: "JetBrains Mono", monospace;
}

.check-item {
  border: 1px solid #bfd7db;
  border-radius: 14px;
  background: white;
  overflow: hidden;
}

.check-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff, #f8fcfa);
}

.check-summary::-webkit-details-marker {
  display: none;
}

.check-item[open] .check-summary {
  border-bottom: 1px solid #cfe2e5;
}

.check-badge {
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 800;
}

.check-badge.pass {
  background: var(--green);
}

.check-badge.fail {
  background: var(--danger);
}

.check-content {
  padding: 12px 14px 14px;
  display: grid;
  gap: 10px;
  background: #f9fcfb;
}

.check-row {
  border: 1px solid #cfe2e5;
  border-radius: 10px;
  background: #fff;
  padding: 11px 12px;
  display: grid;
  gap: 6px;
  font-size: 0.94rem;
}

.row-status {
  font-weight: 700;
}

.page-title {
  display: grid;
  gap: 5px;
}

.report-card {
  position: relative;
  padding-top: 58px;
}

.report-title {
  text-align: center;
}

.report-copy-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  color: #2d72b8;
  border-color: #b9d1eb;
}

.report-copy-btn svg {
  fill: currentColor;
}

.report-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
  text-align: center;
}

.report-summary.pass {
  background: #e8f1fb;
  border: 1px solid #b9d1eb;
  color: #184d88;
}

.report-summary.fail {
  background: #fdeeee;
  border: 1px solid #efc3c3;
  color: #a12828;
}

.report-summary-badge {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 800;
  flex-shrink: 0;
}

.report-summary.pass .report-summary-badge {
  background: #2d72b8;
}

.report-summary.fail .report-summary-badge {
  background: var(--danger);
}

.report-note {
  text-align: center;
  font-size: 0.94rem;
  color: var(--muted);
  margin-top: 4px;
}

.report-actions {
  justify-content: center;
}

.report-new-btn {
  min-width: 148px;
}

.home-card .page-title {
  text-align: center;
}

.home-flow .page-title {
  text-align: center;
}

.email-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
  padding: 10px 12px;
}

.email-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-text .mono {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-actions-desktop {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .report-card {
    padding-top: 74px;
  }

  .report-copy-btn {
    top: 18px;
    right: 18px;
  }
}

.icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-actions {
  justify-content: center;
}

.forest-bg {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 1800px;
  height: auto;
  pointer-events: none;
  z-index: 1;
  display: block;
}

.wrap,
.card,
.home-flow {
  position: relative;
  z-index: 5;
}

.home-main {
  padding-bottom: 130px;
}

@media (max-width: 640px) {
  .wrap {
    padding: 18px 14px 30px;
  }
  h1 {
    font-size: 1.4rem;
  }
  .home-main {
    min-height: auto;
    display: block;
    padding-top: 24px;
  }
  .email-field {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }
  .email-text {
    min-width: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.88rem;
  }
  .email-actions-desktop {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }
  .email-actions-desktop .generate-btn {
    display: none;
  }
  .home-main {
    padding-bottom: 80px;
  }
}
