:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #5b6472;
  --line: #d7dde5;
  --paper: #ffffff;
  --surface: #f5f7f9;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --gold: #b7791f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface);
}

a {
  color: inherit;
}

.report-page {
  min-height: 100vh;
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 40px 20px;
}

.portal-panel {
  width: min(100%, 720px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.status-note {
  margin: 0 0 20px;
  color: var(--muted);
}

.audit-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.audit-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}

.audit-form input,
.audit-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  font-weight: 400;
}

.status-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 18px;
}

.status-list dt {
  color: var(--muted);
  font-weight: 800;
}

.status-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.report-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 32px max(24px, calc((100vw - 1120px) / 2));
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  margin: 0 0 10px;
  color: var(--teal);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.12;
}

h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.site-url,
.level,
.report-body p,
li {
  color: var(--muted);
}

.score-panel {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.score {
  font-size: 32px;
  font-weight: 800;
  color: var(--gold);
}

.report-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button,
button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 14px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.primary,
button {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.button.primary:hover,
button:hover {
  background: var(--teal-dark);
}

.button.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.email-form {
  display: grid;
  gap: 6px;
  min-width: min(100%, 520px);
}

.status-actions {
  margin-top: 24px;
}

.inline-form {
  margin: 0;
}

.email-form > label {
  font-size: 13px;
  font-weight: 700;
}

.email-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

input[type="email"] {
  min-width: min(100%, 260px);
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

.check {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: var(--muted);
}

.report-body {
  display: grid;
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 24px 48px;
}

section {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
}

th,
td {
  padding: 11px 12px;
  border: 1px solid var(--line);
  text-align: left;
}

th {
  background: #e8f2f1;
}

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

.impact-item {
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.impact-item span {
  font-weight: 800;
  color: var(--gold);
}

.phase {
  margin-top: 16px;
}

.artifact-list,
.phase ul {
  padding-left: 20px;
}

.evidence-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.evidence-list article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

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

  .score-panel {
    justify-items: start;
  }

  h1 {
    font-size: 28px;
  }
}

/* --- WARM THEME & INTERACTIVE MVP-v1 PORTAL STYLES --- */

:root {
  --color-bg: #F7F4EF;
  --color-surface: #E6DED3;
  --color-card: #FFFFFF;
  --color-text-body: #4B4B4B;
  --color-text-heading: #1A1A1A;
  --color-accent: #C0A772;
  --color-btn-bg: #1A1A1A;
  --color-btn-text: #F7F4EF;
}

body.warm-theme {
  margin: 0;
  padding: 0;
  background-color: var(--color-bg);
  color: var(--color-text-body);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  min-height: 100vh;
  position: relative;
}

/* Moving Space Grid Background */
.space-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(to right, rgba(192, 167, 114, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(192, 167, 114, 0.1) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 1;
}

/* Call to action initial state */
.cta-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  cursor: pointer;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
  pointer-events: all;
}

.cta-overlay.faded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cta-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  padding: 20px;
  user-select: none;
}

.cta-hover-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 52px;
  font-weight: 800;
  margin: 0;
  line-height: 1.1;
  color: var(--color-text-heading);
  letter-spacing: -0.01em;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta-hover-title.hovered {
  color: var(--color-accent);
  transform: scale(1.02);
}

/* Modal and views */
.modal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
  pointer-events: none;
  background: rgba(26, 26, 26, 0.15);
}

.modal-wrapper.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.modal-panel {
  width: min(92%, 560px);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(192, 167, 114, 0.2);
  border-radius: 16px;
  padding: 36px;
  box-shadow: 
    0 20px 40px -10px rgba(26, 26, 26, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 110;
  position: relative;
  overflow: hidden;
}

.modal-wrapper.visible .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-header {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--color-surface);
  padding-bottom: 18px;
}

.brand-badge {
  display: inline-block;
  padding: 4px 8px;
  background: rgba(192, 167, 114, 0.12);
  color: var(--color-accent);
  border: 1px solid rgba(192, 167, 114, 0.25);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.modal-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  color: var(--color-text-heading);
  margin: 0 0 6px;
  font-weight: 700;
}

.modal-desc {
  font-size: 13.5px;
  color: var(--color-text-body);
  margin: 0;
  line-height: 1.4;
}

/* View switcher */
.modal-view {
  display: none;
}

.modal-view.active {
  display: block;
  animation: view-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes view-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modern Form styling */
.modern-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-heading);
}

.modern-form input,
.modern-form textarea {
  background: #FFFFFF;
  border: 1px solid var(--color-surface);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--color-text-heading);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.25s ease;
  width: 100%;
  box-sizing: border-box;
}

.modern-form input:focus,
.modern-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 10px rgba(192, 167, 114, 0.2);
}

.modern-form input.has-error,
.modern-form textarea.has-error {
  border-color: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}

.error-msg {
  font-size: 11px;
  color: #ef4444;
  min-height: 14px;
  margin-top: 2px;
}

.input-hint {
  font-size: 11.5px;
  color: var(--color-text-body);
  margin: 4px 0 0;
  line-height: 1.35;
}

/* Buttons */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

.form-actions.single-action {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-height: auto;
}

.btn-primary {
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  box-shadow: 0 4px 12px rgba(26, 26, 26, 0.15);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--color-accent);
  color: var(--color-btn-text);
  box-shadow: 0 6px 16px rgba(192, 167, 114, 0.3);
}

.btn-secondary {
  background: transparent;
  border-color: var(--color-surface);
  color: var(--color-text-heading);
}

.btn-secondary:hover {
  background: rgba(230, 222, 211, 0.3);
  border-color: var(--color-accent);
  color: var(--color-text-heading);
}

.arrow-icon {
  transition: transform 0.25s ease;
}

.btn-primary:hover .arrow-icon {
  transform: translateX(3px);
}

/* Progress circular component */
.progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  text-align: center;
}

.spinner-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 24px;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring__circle {
  transition: stroke-dashoffset 0.35s;
  transform-origin: 50% 50%;
  stroke-linecap: round;
}

.progress-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-heading);
}

.progress-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-heading);
  margin: 0 0 8px;
}

.progress-subtitle {
  font-size: 13.5px;
  color: var(--color-text-body);
  margin: 0 0 28px;
  line-height: 1.4;
  max-width: 360px;
}

/* Step list */
.status-steps {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(26, 26, 26, 0.4);
  transition: color 0.3s;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-surface);
  position: relative;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.step-label {
  font-size: 13px;
  font-weight: 500;
}

/* Active Step */
.step-item.active {
  color: var(--color-accent);
}

.step-item.active .step-dot {
  background-color: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
}

/* Completed Step */
.step-item.completed {
  color: var(--color-text-heading);
}

.step-item.completed .step-dot {
  background-color: var(--color-text-heading);
}

/* Success View */
.success-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 0;
}

.checkmark-wrapper {
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
}

.checkmark-svg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  stroke: var(--color-accent);
  stroke-width: 2.5;
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px var(--color-accent);
  animation: fill-checkmark 0.4s ease-in-out 0.4s forwards, scale-checkmark .3s ease-in-out .9s both;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2.5;
  stroke-miterlimit: 10;
  stroke: var(--color-accent);
  fill: none;
  animation: stroke-circle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke-check 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke-circle {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes stroke-check {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes fill-checkmark {
  100% {
    box-shadow: inset 0px 0px 0px 40px rgba(192, 167, 114, 0.1);
  }
}

@keyframes scale-checkmark {
  0%, 100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

.success-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-heading);
  margin: 0 0 8px;
}

.success-subtitle {
  font-size: 13.5px;
  color: var(--color-text-body);
  margin: 0 0 24px;
  line-height: 1.45;
  max-width: 400px;
}

.info-card {
  background: rgba(230, 222, 211, 0.3);
  border: 1px solid rgba(192, 167, 114, 0.15);
  border-radius: 8px;
  padding: 16px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.info-label {
  color: var(--color-text-body);
}

.info-val {
  color: var(--color-text-heading);
  font-weight: 600;
}

.monospace {
  font-family: monospace;
  font-size: 11.5px;
}

/* Error View */
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 0;
}

.error-icon-wrapper {
  margin-bottom: 24px;
}

.error-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-heading);
  margin: 0 0 8px;
}

.error-subtitle {
  font-size: 14px;
  color: #ef4444;
  margin: 0 0 28px;
  line-height: 1.4;
  max-width: 400px;
}

@media (max-width: 640px) {
  .cta-hover-title {
    font-size: 28px !important;
  }
  .modal-panel {
    padding: 24px !important;
    width: 95% !important;
  }
  .form-actions {
    flex-direction: column-reverse;
    gap: 10px;
  }
  .btn {
    width: 100% !important;
  }
}
