:root {
  color-scheme: light;
  --navy-950: #071d2b;
  --navy-900: #0b2738;
  --navy-800: #12384b;
  --teal-700: #087f75;
  --teal-600: #0b9588;
  --teal-100: #dff4f0;
  --cyan-100: #e9f5fa;
  --amber-700: #9b5800;
  --amber-100: #fff1d6;
  --red-700: #a23232;
  --red-100: #fde9e7;
  --green-700: #176b48;
  --green-100: #e3f5eb;
  --slate-900: #15252d;
  --slate-700: #425b66;
  --slate-600: #5d737c;
  --slate-300: #c8d5da;
  --slate-200: #dce5e8;
  --slate-100: #eef3f4;
  --surface: #ffffff;
  --canvas: #f4f7f7;
  --shadow: 0 20px 55px rgba(7, 29, 43, 0.1);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--slate-900);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(11, 149, 136, 0.28);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--navy-900);
  font-weight: 800;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(200, 213, 218, 0.85);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1320px, calc(100% - 40px));
  min-height: 74px;
  margin: 0 auto;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--teal-600), var(--navy-800));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(8, 127, 117, 0.22);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: 2px;
  color: var(--slate-600);
  font-size: 0.72rem;
  font-weight: 650;
}

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

.mode-pill,
.status-badge,
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
}

.mode-pill.sample {
  background: var(--cyan-100);
  color: var(--navy-800);
}

.mode-pill.live {
  background: var(--green-100);
  color: var(--green-700);
}

.mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(11, 149, 136, 0.11);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

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

.button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.button.primary {
  background: var(--teal-700);
  color: #fff;
  box-shadow: 0 10px 22px rgba(8, 127, 117, 0.2);
}

.button.primary:hover {
  background: #066f67;
}

.button.secondary {
  border-color: var(--slate-300);
  background: var(--surface);
  color: var(--navy-800);
}

.button.secondary:hover {
  border-color: var(--teal-600);
  box-shadow: 0 8px 18px rgba(7, 29, 43, 0.07);
}

.button.compact {
  min-height: 36px;
  padding: 0 13px;
  font-size: 0.78rem;
}

.hero {
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 5%, rgba(38, 192, 170, 0.22), transparent 31%),
    linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: #fff;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  align-items: center;
  width: min(1320px, calc(100% - 40px));
  min-height: 360px;
  margin: 0 auto;
  padding: 64px 0;
  gap: 70px;
}

.eyebrow,
.section-kicker {
  margin-bottom: 10px;
  color: var(--teal-600);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #69d9c9;
}

.hero h1 {
  max-width: 880px;
  margin-bottom: 22px;
  font-size: clamp(2.4rem, 5vw, 4.85rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero-lede {
  max-width: 770px;
  margin-bottom: 0;
  color: #d6e3e8;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.62;
}

.hero-proof {
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
}

.hero-proof strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.hero-proof p {
  margin-bottom: 20px;
  color: #c9d9df;
  font-size: 0.91rem;
  line-height: 1.55;
}

.hero-proof ul {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 11px;
  list-style: none;
}

.hero-proof li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #e8f3f4;
  font-size: 0.86rem;
  line-height: 1.4;
}

.hero-proof li span {
  color: #69d9c9;
  font-weight: 900;
}

.workspace-shell {
  width: min(1320px, calc(100% - 40px));
  margin: 32px auto 70px;
}

.tab-list {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--surface);
}

.tab-button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--slate-600);
  font-size: 0.84rem;
  font-weight: 850;
  cursor: pointer;
}

.tab-button.active {
  background: var(--navy-900);
  color: #fff;
}

.tab-panel[hidden] {
  display: none;
}

.review-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.84fr) minmax(520px, 1.16fr);
  align-items: start;
  gap: 22px;
}

.panel,
.architecture-panel {
  min-width: 0;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  padding: 25px;
}

.panel-heading,
.subsection-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 18px;
}

.panel-heading h2,
.architecture-intro h2 {
  margin-bottom: 0;
  color: var(--navy-950);
  font-size: 1.28rem;
}

.how-it-works {
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--cyan-100), #fff);
}

.how-it-works > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--navy-900);
  font-size: 0.88rem;
}

.how-it-works ol {
  display: grid;
  margin: 0 0 9px;
  padding-left: 20px;
  gap: 4px;
  color: var(--slate-700);
  font-size: 0.82rem;
  line-height: 1.45;
}

.how-it-works p {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.76rem;
  line-height: 1.45;
}

.section-kicker {
  margin-bottom: 5px;
  color: var(--teal-700);
  font-size: 0.65rem;
}

.status-badge {
  background: var(--teal-100);
  color: var(--teal-700);
}

.status-badge.neutral {
  background: var(--slate-100);
  color: var(--slate-600);
}

.status-badge.success {
  background: var(--green-100);
  color: var(--green-700);
}

.status-badge.warning {
  background: var(--amber-100);
  color: var(--amber-700);
}

form {
  display: grid;
  gap: 17px;
}

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

.field > span {
  color: var(--navy-900);
  font-size: 0.82rem;
  font-weight: 850;
}

.field small,
.upload-control small,
.rule small {
  color: var(--slate-600);
  font-size: 0.76rem;
  line-height: 1.5;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--slate-900);
}

select {
  min-height: 46px;
  padding: 0 12px;
  cursor: pointer;
}

textarea {
  min-height: 235px;
  padding: 13px 14px;
  resize: vertical;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.79rem;
  line-height: 1.58;
}

textarea[readonly] {
  border-color: var(--slate-200);
  background: #f8fafb;
  color: #42545c;
}

.access-notice {
  padding: 14px 15px;
  border: 1px solid;
  border-radius: 12px;
}

.access-notice.sample {
  border-color: #c7dfe9;
  background: var(--cyan-100);
}

.access-notice.live {
  border-color: #bfe5ce;
  background: var(--green-100);
}

.access-notice strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy-900);
  font-size: 0.84rem;
}

.access-notice p {
  margin: 0;
  color: var(--slate-700);
  font-size: 0.78rem;
  line-height: 1.5;
}

.upload-control {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  padding: 14px;
  border: 1px dashed #9bb4bd;
  border-radius: 12px;
  background: #f8fbfb;
  gap: 12px;
  cursor: pointer;
}

.upload-control:hover {
  border-color: var(--teal-600);
}

.upload-control.disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.upload-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--teal-100);
  color: var(--teal-700);
  font-size: 1.2rem;
  font-weight: 900;
}

.upload-control strong,
.upload-control small {
  display: block;
}

.upload-control strong {
  margin-bottom: 3px;
  color: var(--navy-900);
  font-size: 0.81rem;
}

.upload-control small.error {
  color: var(--red-700);
}

.profile-recommendation {
  margin: -7px 0 0;
  padding: 11px 13px;
  border-left: 4px solid var(--amber-700);
  border-radius: 6px;
  background: var(--amber-100);
  color: var(--amber-700);
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.45;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.results-panel {
  display: grid;
  gap: 18px;
}

.results-panel > .panel-heading {
  margin-bottom: 0;
}

.processing-card {
  display: grid;
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-radius: 13px;
  background: #f8fafb;
  gap: 12px;
}

.processing-copy {
  display: grid;
  grid-template-columns: 27px 1fr;
  align-items: center;
  gap: 11px;
}

.processing-copy strong {
  display: block;
  margin-bottom: 3px;
  color: var(--navy-900);
  font-size: 0.86rem;
}

.processing-copy p {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.77rem;
  line-height: 1.45;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--slate-200);
  border-top-color: var(--teal-600);
  border-radius: 50%;
}

.processing-card.active .spinner {
  animation: spin 740ms linear infinite;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dde7e9;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-600), #33b8a6);
  transition: width 260ms ease;
}

.score-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  min-height: 180px;
  padding: 18px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 94% 10%, rgba(38, 192, 170, 0.16), transparent 38%),
    var(--navy-950);
  color: #fff;
  gap: 24px;
}

.gauge {
  position: relative;
  width: 142px;
  height: 142px;
}

.gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-track,
.gauge-value {
  fill: none;
  stroke-width: 12;
}

.gauge-track {
  stroke: rgba(255, 255, 255, 0.16);
}

.gauge-value {
  stroke: #53d4c2;
  stroke-dasharray: 364.42;
  stroke-dashoffset: 364.42;
  stroke-linecap: round;
  transition: stroke-dashoffset 600ms ease;
}

.gauge-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.gauge-copy span {
  font-size: 1.75rem;
  font-weight: 900;
}

.gauge-copy small {
  width: 88px;
  color: #b9cdd4;
  font-size: 0.65rem;
  font-weight: 750;
  line-height: 1.2;
}

.risk-row {
  display: flex;
  align-items: center;
  margin-bottom: 13px;
  gap: 10px;
}

.risk-row > span {
  color: #b9cdd4;
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
}

.risk-badge.neutral {
  background: rgba(255, 255, 255, 0.13);
  color: #e6eff2;
}

.risk-badge.low {
  background: rgba(76, 205, 137, 0.17);
  color: #86e5b1;
}

.risk-badge.moderate {
  background: rgba(255, 184, 77, 0.15);
  color: #ffd18d;
}

.risk-badge.high {
  background: rgba(255, 103, 103, 0.16);
  color: #ffaaaa;
}

.score-copy h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.score-copy p {
  margin: 0;
  color: #c8d8dd;
  font-size: 0.83rem;
  line-height: 1.55;
}

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

.check-card {
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-top: 4px solid var(--slate-300);
  border-radius: 13px;
  background: #fff;
}

.check-card.passed {
  border-top-color: var(--green-700);
}

.check-card.warning {
  border-top-color: #d6881e;
}

.check-card.critical {
  border-top-color: var(--red-700);
}

.check-state {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--slate-600);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.check-card.passed .check-state {
  color: var(--green-700);
}

.check-card.warning .check-state {
  color: var(--amber-700);
}

.check-card.critical .check-state {
  color: var(--red-700);
}

.check-card h3 {
  margin-bottom: 6px;
  color: var(--navy-900);
  font-size: 0.88rem;
}

.check-card p {
  margin-bottom: 7px;
  color: var(--slate-600);
  font-size: 0.74rem;
  line-height: 1.45;
}

.check-card small {
  display: block;
  color: var(--slate-700);
  font-size: 0.72rem;
  line-height: 1.42;
}

.actions-section {
  padding-top: 3px;
}

.subsection-heading {
  align-items: center;
  margin-bottom: 12px;
}

.subsection-heading h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal-700);
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.text-button:disabled {
  color: #93a3a9;
  cursor: not-allowed;
}

.action-list {
  display: grid;
  gap: 9px;
}

.action-card,
.empty-state {
  padding: 13px 14px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: #fbfcfc;
}

.priority {
  display: block;
  margin-bottom: 5px;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.priority.high {
  color: var(--red-700);
}

.priority.medium {
  color: var(--amber-700);
}

.priority.low {
  color: var(--green-700);
}

.action-card h4 {
  margin-bottom: 4px;
  color: var(--navy-900);
  font-size: 0.84rem;
}

.action-card p,
.empty-state p {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.76rem;
  line-height: 1.5;
}

.architecture-panel {
  padding: 34px;
}

.architecture-intro {
  max-width: 760px;
  margin-bottom: 28px;
}

.architecture-intro h2 {
  margin-bottom: 10px;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.architecture-intro p:last-child {
  margin-bottom: 0;
  color: var(--slate-600);
  line-height: 1.6;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
  gap: 14px;
}

.flow-card {
  padding: 22px;
  border-radius: 16px;
}

.flow-card.public {
  border: 1px solid #cce3eb;
  background: var(--cyan-100);
}

.flow-card.live {
  border: 1px solid #bfe5ce;
  background: var(--green-100);
}

.flow-card > span {
  display: block;
  margin-bottom: 8px;
  color: var(--teal-700);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flow-card h3 {
  margin-bottom: 14px;
  color: var(--navy-900);
  font-size: 1rem;
}

.flow-card ol {
  display: grid;
  margin: 0;
  padding-left: 21px;
  color: var(--slate-700);
  font-size: 0.8rem;
  line-height: 1.5;
  gap: 7px;
}

.safeguard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
  gap: 12px;
}

.safeguard-grid article {
  padding: 18px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: #fff;
}

.safeguard-icon {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 13px;
  place-items: center;
  border-radius: 10px;
  background: var(--teal-100);
  color: var(--teal-700);
  font-size: 0.69rem;
  font-weight: 900;
}

.safeguard-grid h3 {
  margin-bottom: 7px;
  font-size: 0.88rem;
}

.safeguard-grid p {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.76rem;
  line-height: 1.5;
}

.config-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--navy-950);
}

.config-strip > div {
  padding: 17px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.config-strip > div:last-child {
  border-right: 0;
}

.config-strip span,
.config-strip strong {
  display: block;
}

.config-strip span {
  margin-bottom: 5px;
  color: #9eb5be;
  font-size: 0.66rem;
  font-weight: 750;
  text-transform: uppercase;
}

.config-strip strong {
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.4;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 30px;
  border-top: 1px solid var(--slate-200);
  color: var(--slate-600);
  font-size: 0.72rem;
  gap: 20px;
}

footer p {
  margin: 0;
}

footer span {
  font-weight: 750;
  white-space: nowrap;
}

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

@media (max-width: 1050px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-proof {
    max-width: 720px;
  }

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

  .safeguard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .config-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .config-strip > div:nth-child(2) {
    border-right: 0;
  }

  .config-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 700px) {
  .header-inner,
  .hero-inner,
  .workspace-shell,
  footer {
    width: min(100% - 24px, 1320px);
  }

  .header-inner {
    align-items: flex-start;
    padding: 12px 0;
  }

  .brand small,
  .mode-pill {
    display: none;
  }

  .hero-inner {
    min-height: auto;
    padding: 46px 0;
  }

  .hero h1 {
    font-size: clamp(2.25rem, 12vw, 3.7rem);
  }

  .workspace-shell {
    margin-top: 22px;
  }

  .tab-list {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-button {
    padding: 0 9px;
    font-size: 0.72rem;
  }

  .panel,
  .architecture-panel {
    padding: 18px;
    border-radius: 17px;
  }

  .panel-heading {
    display: grid;
  }

  .score-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .risk-row {
    justify-content: center;
  }

  .check-grid,
  .flow-grid,
  .safeguard-grid,
  .config-strip {
    grid-template-columns: 1fr;
  }

  .config-strip > div,
  .config-strip > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .config-strip > div:last-child {
    border-bottom: 0;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
