:root {
  color-scheme: dark light;
  --ink: #08111f;
  --muted: #566274;
  --paper: #f7f9fc;
  --panel: rgba(255, 255, 255, 0.92);
  --line: rgba(12, 23, 43, 0.12);
  --blue: #4285f4;
  --red: #ea4335;
  --yellow: #fbbc05;
  --green: #34a853;
  --navy: #07111f;
  --shadow: 0 24px 80px rgba(8, 17, 31, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(66, 133, 244, 0.22), transparent 34rem),
    radial-gradient(circle at 78% 18%, rgba(234, 67, 53, 0.16), transparent 26rem),
    radial-gradient(circle at 60% 80%, rgba(52, 168, 83, 0.16), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: Montserrat, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(8, 17, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 17, 31, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

img {
  max-width: 100%;
}

a {
  color: var(--blue);
  font-weight: 800;
}

.site-header,
.site-footer,
main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
}

.brand,
.top-links,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 950;
  letter-spacing: 0.01em;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(8, 17, 31, 0.16));
}

.top-links a,
.site-footer a {
  color: var(--muted);
  font-size: 0.94rem;
  text-decoration: none;
}

.top-links a:hover,
.site-footer a:hover {
  color: var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,255,255,0.76));
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: conic-gradient(from 0deg, var(--blue), var(--red), var(--yellow), var(--green), var(--blue));
  opacity: 0.14;
  filter: blur(2px);
}

.hero-home {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 28px;
  align-items: center;
  padding: clamp(30px, 6vw, 72px);
}

.hero-copy,
.hero-card,
.legal-hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.18em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 820px;
  margin-bottom: 20px;
  font-size: clamp(2.45rem, 6.5vw, 5.75rem);
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

p {
  color: var(--muted);
}

.lead {
  max-width: 720px;
  font-size: clamp(1.04rem, 2.1vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.email-card {
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  text-decoration: none;
}

.button.primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 16px 34px rgba(8, 17, 31, 0.24);
}

.button.secondary {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.72);
  color: var(--ink);
}

.hero-card {
  display: grid;
  gap: 18px;
  justify-items: center;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 28px;
  background: linear-gradient(160deg, #07111f, #0b1a31 62%, #102847);
  color: white;
  padding: 30px;
  text-align: center;
}

.hero-card img {
  width: min(260px, 76%);
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, 0.25));
}

.hero-card strong {
  display: block;
  font-size: 1.7rem;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.hero-card span {
  color: rgba(255,255,255,0.68);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 18px 0;
}

.feature,
.panel,
.legal-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 14px 44px rgba(8, 17, 31, 0.08);
}

.feature {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  padding: 26px;
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: var(--stripe, var(--blue));
}

.feature.blue { --stripe: var(--blue); }
.feature.red { --stripe: var(--red); }
.feature.green { --stripe: var(--green); }

.feature-kicker {
  color: var(--muted);
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 950;
  margin-bottom: 44px;
}

.feature p,
.legal-card p,
.panel p {
  font-size: 1rem;
}

.panel {
  margin: 18px 0;
  padding: clamp(24px, 4vw, 40px);
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
}

.check-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.check-list li {
  color: var(--ink);
  font-weight: 800;
}

.check-list li::before {
  content: "✓";
  color: var(--green);
  margin-right: 10px;
}

.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.email-card {
  background: linear-gradient(135deg, var(--blue), #1f6ff0);
  color: #fff;
  box-shadow: 0 16px 34px rgba(66, 133, 244, 0.28);
  white-space: nowrap;
}

.legal-page {
  max-width: 940px;
}

.legal-hero {
  padding: clamp(28px, 5vw, 58px);
}

.legal-card {
  margin: 16px 0;
  padding: clamp(22px, 4vw, 34px);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 46px;
  color: var(--muted);
  font-size: 0.94rem;
}

@media (max-width: 820px) {
  .hero-home,
  .grid,
  .split {
    grid-template-columns: 1fr;
  }

  .site-header,
  .site-footer,
  .contact-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-links {
    flex-wrap: wrap;
  }

  .hero-card {
    padding: 24px;
  }

  .feature {
    min-height: auto;
  }

  .feature-kicker {
    margin-bottom: 22px;
  }

  .email-card {
    white-space: normal;
  }
}

.portal-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 20%, rgba(66, 133, 244, 0.26), transparent 30rem),
    radial-gradient(circle at 80% 16%, rgba(234, 67, 53, 0.18), transparent 24rem),
    radial-gradient(circle at 48% 92%, rgba(52, 168, 83, 0.18), transparent 26rem),
    linear-gradient(145deg, #f7f9fc, #eef3fb);
}

.portal-header {
  position: relative;
  z-index: 2;
}

.portal-shell {
  display: grid;
  min-height: calc(100vh - 118px);
  place-items: center;
  padding: 20px 0 60px;
}

.portal-card {
  position: relative;
  isolation: isolate;
  width: min(760px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 38px;
  background: rgba(255,255,255,0.84);
  box-shadow: 0 28px 100px rgba(8, 17, 31, 0.2);
  padding: clamp(26px, 6vw, 56px);
  text-align: center;
}

.portal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(66,133,244,0.12), transparent 38%),
    linear-gradient(315deg, rgba(251,188,5,0.16), transparent 42%);
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(8, 17, 31, 0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.74);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  margin-bottom: 18px;
  padding: 9px 13px;
  text-transform: uppercase;
}

.portal-logo {
  display: block;
  width: min(190px, 52vw);
  margin: 0 auto 18px;
  filter: drop-shadow(0 20px 34px rgba(8, 17, 31, 0.18));
}

.portal-card h1 {
  margin: 0 auto 16px;
  max-width: 620px;
}

.portal-card > p {
  max-width: 620px;
  margin-inline: auto;
}

.access-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  margin: 30px auto 24px;
  max-width: 680px;
  text-align: left;
}

.access-form label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-form input {
  min-height: 50px;
  border: 1px solid rgba(8, 17, 31, 0.14);
  border-radius: 16px;
  background: rgba(255,255,255,0.86);
  color: var(--ink);
  padding: 12px 14px;
}

.access-form .button {
  align-self: end;
  border: 0;
  cursor: pointer;
  min-height: 50px;
  white-space: nowrap;
}

.portal-locks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
  text-align: left;
}

.portal-locks article {
  border: 1px solid rgba(8, 17, 31, 0.1);
  border-radius: 22px;
  background: rgba(255,255,255,0.68);
  padding: 18px;
}

.portal-locks strong,
.portal-locks span {
  display: block;
}

.portal-locks strong {
  color: var(--ink);
  font-size: 0.98rem;
  margin-bottom: 8px;
}

.portal-locks span {
  color: var(--muted);
  font-size: 0.9rem;
}

.portal-note {
  border-top: 1px solid rgba(8, 17, 31, 0.1);
  font-size: 0.92rem;
  margin-top: 28px;
  padding-top: 20px;
}

@media (max-width: 760px) {
  .access-form,
  .portal-locks {
    grid-template-columns: 1fr;
  }

  .access-form .button {
    width: 100%;
  }
}

.portal-shell-wide {
  align-items: start;
  padding-top: 20px;
}

.portal-product-card {
  width: min(980px, 100%);
  max-width: 100%;
  min-width: 0;
}

.portal-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  max-width: 680px;
  border: 1px solid rgba(8, 17, 31, 0.12);
  border-radius: 22px;
  background: rgba(255,255,255,0.7);
  margin: 20px auto 8px;
  padding: 6px;
}

.portal-tab {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.15;
  min-width: 0;
  min-height: 42px;
  padding: 9px 8px;
}

.portal-tab.active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 24px rgba(8, 17, 31, 0.16);
}

.portal-tab-panel {
  display: none;
  margin-top: 12px;
  min-width: 0;
}

.portal-tab-panel.active {
  display: block;
}

.access-form-full {
  grid-template-columns: 1fr 1fr;
  max-width: 780px;
  min-width: 0;
  width: 100%;
}

.access-form-full label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.access-form-full input,
.access-form-full textarea {
  min-width: 0;
  width: 100%;
}

.access-form-full label:nth-of-type(3),
.access-form-full label:nth-of-type(4),
.access-form-full button,
.access-form-full .form-status {
  grid-column: 1 / -1;
}

.access-form-full textarea {
  min-height: 110px;
  border: 1px solid rgba(8, 17, 31, 0.14);
  border-radius: 16px;
  background: rgba(255,255,255,0.86);
  color: var(--ink);
  padding: 12px 14px;
  resize: vertical;
}

.form-status {
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
  padding: 12px 14px;
  text-align: center;
}

.form-status:empty {
  display: none;
}

.form-status[data-tone='success'] {
  background: rgba(52, 168, 83, 0.12);
  color: #176b3a;
}

.form-status[data-tone='warning'] {
  background: rgba(251, 188, 5, 0.16);
  color: #7a5511;
}

.form-status[data-tone='info'] {
  background: rgba(66, 133, 244, 0.1);
  color: #275ca8;
}

.admin-login-card,
.admin-dashboard {
  border: 1px solid rgba(8, 17, 31, 0.1);
  border-radius: 26px;
  background: rgba(255,255,255,0.68);
  margin: 8px auto 0;
  max-width: 820px;
  padding: 24px;
  text-align: left;
}

.admin-login-card h2,
.admin-dashboard h2 {
  margin-bottom: 10px;
}

.admin-dashboard-head {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.admin-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.admin-summary span {
  border-radius: 999px;
  background: rgba(8, 17, 31, 0.08);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  padding: 8px 10px;
}

.request-list {
  display: grid;
  gap: 12px;
}

.request-card {
  border: 1px solid rgba(8, 17, 31, 0.1);
  border-radius: 20px;
  background: rgba(255,255,255,0.74);
  padding: 18px;
}

.request-card > div:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: space-between;
}

.request-card strong,
.request-card span {
  overflow-wrap: anywhere;
}

#admin-user-label,
#tester-user-label {
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.tester-access-message {
  border-radius: 16px;
  background: rgba(52, 168, 83, 0.1);
  color: #176b3a;
  margin: 18px 0 0;
  padding: 14px 16px;
}

.request-card p {
  margin: 8px 0 0;
}

.request-card footer {
  align-items: center;
  border-top: 1px solid rgba(8, 17, 31, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
}

.request-card footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.request-card button,
.button.secondary {
  border: 1px solid rgba(8, 17, 31, 0.16);
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
  min-height: 38px;
  padding: 8px 12px;
}

@media (max-width: 760px) {
  .site-header,
  main {
    width: min(100% - 16px, 1120px);
  }

  .access-form-full {
    grid-template-columns: 1fr;
  }

  .admin-dashboard-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .portal-tabs {
    border-radius: 18px;
    gap: 4px;
    padding: 4px;
  }

  .portal-tab {
    font-size: 0.72rem;
    padding: 9px 4px;
  }

  .admin-login-card,
  .admin-dashboard {
    border-radius: 20px;
    padding: 18px;
  }

  .admin-login-card h2,
  .admin-dashboard h2 {
    font-size: 1.75rem;
  }

  .request-card {
    padding: 16px;
  }

  .request-card > div:first-child {
    display: grid;
    gap: 4px;
  }

  .request-card-identity span {
    font-size: 0.85rem;
  }

  .request-card footer {
    align-items: stretch;
    display: grid;
  }

  .request-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-actions button {
    width: 100%;
  }
}

/* Compact portal cleanup */
.portal-product-card > p {
  font-size: 1rem;
  margin-bottom: 10px;
}
.portal-locks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}
.portal-locks article {
  padding: 14px;
}
.portal-locks span {
  font-size: 0.84rem;
}
.portal-note {
  font-size: 0.86rem;
  margin-top: 18px;
  padding-top: 16px;
}
.access-form-full {
  gap: 10px;
  margin-top: 18px;
}
.access-form-full textarea {
  min-height: 86px;
}
@media (max-width: 760px) {
  .portal-card {
    border-radius: 24px;
    padding: 16px;
  }
  .portal-logo {
    width: min(142px, 42vw);
  }
  .portal-card h1 {
    font-size: clamp(2.05rem, 11vw, 3.2rem);
  }
  .portal-locks {
    grid-template-columns: 1fr;
  }
}

.compact-locks { margin-top: 18px; }
.tester-dashboard .portal-locks { grid-template-columns: 1fr; }

/* Private tester workspace */
.tester-dashboard,
.admin-dashboard {
  max-width: 860px;
}

.workspace-section,
.admin-workspace {
  border-top: 1px solid rgba(8, 17, 31, 0.1);
  margin-top: 24px;
  padding-top: 24px;
  text-align: left;
}

.workspace-section-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.workspace-section-head h3 {
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0;
}

.workspace-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.workspace-summary span {
  border-radius: 999px;
  background: rgba(8, 17, 31, 0.08);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 7px 9px;
  white-space: nowrap;
}

.private-analysis-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.private-analysis-form label,
.feedback-form label {
  color: var(--muted);
  display: grid;
  font-size: 0.74rem;
  font-weight: 900;
  gap: 7px;
  letter-spacing: 0.06em;
  min-width: 0;
  text-transform: uppercase;
}

.private-analysis-form input,
.private-analysis-form select,
.private-analysis-form textarea,
.feedback-form select,
.feedback-form textarea,
.job-admin-controls textarea {
  appearance: none;
  border: 1px solid rgba(8, 17, 31, 0.14);
  border-radius: 16px;
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: normal;
  min-height: 50px;
  min-width: 0;
  padding: 12px 14px;
  text-transform: none;
  width: 100%;
}

.private-analysis-form textarea,
.feedback-form textarea,
.job-admin-controls textarea {
  min-height: 92px;
  resize: vertical;
}

.full-field {
  grid-column: 1 / -1;
}

.optional-label {
  color: #7b8797;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.job-list {
  display: grid;
  gap: 12px;
}

.job-card {
  border: 1px solid rgba(8, 17, 31, 0.1);
  border-radius: 20px;
  background: rgba(255,255,255,0.78);
  padding: 18px;
}

.job-card-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.job-card-head strong,
.job-card-head span {
  display: block;
}

.job-card-head strong {
  color: var(--ink);
  font-size: 1.04rem;
  overflow-wrap: anywhere;
}

.job-location,
.job-owner,
.job-objective,
.job-state-description,
.job-meta,
.job-details p {
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.job-location {
  margin-top: 3px;
}

.job-owner {
  font-weight: 800;
  margin: 12px 0 0;
}

.job-objective {
  color: var(--ink);
  font-weight: 850;
  margin: 14px 0 4px;
}

.job-state-description {
  margin: 0;
}

.job-status-chip {
  border-radius: 999px;
  background: rgba(66, 133, 244, 0.12);
  color: #275ca8;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 950;
  padding: 7px 9px;
}

.status-completed .job-status-chip {
  background: rgba(52, 168, 83, 0.12);
  color: #176b3a;
}

.status-cancelled .job-status-chip {
  background: rgba(8, 17, 31, 0.08);
  color: var(--muted);
}

.job-details {
  border-top: 1px solid rgba(8, 17, 31, 0.08);
  margin-top: 14px;
  padding-top: 12px;
}

.job-details summary,
.feedback-section summary {
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.job-details p {
  margin: 10px 0 0;
}

.job-result {
  border-radius: 16px;
  background: rgba(52, 168, 83, 0.1);
  margin-top: 14px;
  padding: 14px;
}

.job-result strong {
  color: #176b3a;
}

.job-result p {
  color: var(--ink);
  margin: 7px 0 0;
  white-space: pre-wrap;
}

.job-meta {
  border-top: 1px solid rgba(8, 17, 31, 0.08);
  margin-top: 14px;
  padding-top: 10px;
}

.feedback-form,
.job-admin-controls {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.job-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-admin-actions button {
  border: 1px solid rgba(8, 17, 31, 0.14);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
  min-height: 40px;
  padding: 9px 12px;
}

.job-admin-actions .primary-job-action {
  background: var(--ink);
  color: #fff;
}

.feedback-section > summary {
  font-size: 1.05rem;
  list-style-position: inside;
}

@media (max-width: 760px) {
  .private-analysis-form {
    grid-template-columns: 1fr;
  }

  .private-analysis-form > * {
    grid-column: 1;
  }

  .workspace-section,
  .admin-workspace {
    margin-top: 20px;
    padding-top: 20px;
  }

  .workspace-section-head,
  .job-card-head {
    display: grid;
  }

  .workspace-summary {
    justify-content: flex-start;
  }

  .job-status-chip {
    justify-self: start;
  }

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

  .job-admin-actions button {
    width: 100%;
  }
}
