:root {
  color-scheme: light;
  --brand-blue: #3f57a5;
  --brand-green: #77bf31;
  --brand-gray: #a6adb5;
  --ink: #102033;
  --ink-soft: #4e6175;
  --muted: #718295;
  --bg: #eef3f8;
  --panel: #ffffff;
  --panel-soft: #f6f9fc;
  --line: #dce5ee;
  --danger: #b14a34;
  --success: #366f1e;
  --shadow: 0 22px 58px rgba(10, 25, 43, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(63, 87, 165, 0.08), rgba(119, 191, 49, 0.05)),
    var(--bg);
  font-family:
    "Avenir Next", "Helvetica Neue", "Segoe UI", Inter, ui-sans-serif,
    system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button,
input {
  font: inherit;
}

.portal-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(360px, 1fr);
}

.visual-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding: 42px;
  overflow: hidden;
  color: #f4f8fc;
  background:
    linear-gradient(180deg, rgba(8, 20, 31, 0.08), rgba(8, 20, 31, 0.9)),
    linear-gradient(90deg, rgba(8, 20, 31, 0.82), rgba(8, 20, 31, 0.2)),
    url("/assets/it-one-portal-bg.png") center / cover;
}

.visual-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.brand-lockup,
.visual-copy,
.signal-strip {
  position: relative;
  z-index: 1;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  max-width: 420px;
}

.brand-logo {
  width: 68px;
  height: 73px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.25));
}

.brand-lockup strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-lockup span {
  display: block;
  margin-top: 3px;
  color: rgba(244, 248, 252, 0.78);
  line-height: 1.35;
}

.visual-copy {
  max-width: 560px;
  padding-top: 80px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  color: #b9ec85;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.visual-copy h2 {
  margin: 0 0 18px;
  max-width: 11ch;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.visual-copy p {
  max-width: 34rem;
  margin: 0;
  color: rgba(244, 248, 252, 0.82);
  font-size: 1.05rem;
  line-height: 1.58;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 420px;
  margin-top: 48px;
}

.signal-strip span {
  height: 4px;
  border-radius: 999px;
  background: var(--brand-green);
}

.signal-strip span:nth-child(2) {
  background: var(--brand-blue);
}

.signal-strip span:nth-child(3) {
  background: var(--brand-gray);
}

.access-panel {
  align-self: center;
  justify-self: center;
  width: min(540px, calc(100% - 40px));
  padding: 34px;
  background: var(--panel);
  border: 1px solid rgba(16, 32, 51, 0.1);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 12px;
  border-left: 5px solid var(--brand-green);
  color: var(--brand-blue);
  background: #f2f6fb;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 800;
}

.version-label {
  color: var(--muted);
  font-size: 0.86rem;
}

h1 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1;
  letter-spacing: 0;
}

.support-text {
  min-height: 1.6em;
  margin: 0 0 28px;
  color: var(--ink-soft);
  line-height: 1.58;
}

.session-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-soft);
}

.session-details div {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.session-details div:last-child {
  border-right: 0;
}

dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

dd {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 800;
}

.terms-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 20px;
  color: #2d3e50;
  line-height: 1.45;
}

.access-code-row {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  color: #2d3e50;
  font-size: 0.9rem;
  font-weight: 800;
}

.access-code-row input {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
}

.access-code-row input:focus {
  border-color: var(--brand-blue);
  outline: 3px solid rgba(63, 87, 165, 0.16);
}

.access-code-row small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.terms-row input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--brand-green);
}

.portal-legal-summary {
  margin: -4px 0 22px;
  padding: 16px;
  background: #f7fbf4;
  border: 1px solid rgba(119, 191, 49, 0.42);
  border-left: 5px solid var(--brand-green);
  border-radius: 8px;
}

.portal-legal-summary h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.portal-legal-summary details {
  padding: 10px 0;
  border-top: 1px solid rgba(119, 191, 49, 0.25);
}

.portal-legal-summary details:first-of-type {
  border-top: 0;
}

.portal-legal-summary summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: var(--brand-blue);
  font-weight: 900;
}

.portal-legal-summary summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: #fff;
  background: var(--brand-blue);
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
}

.portal-legal-summary details[open] summary::after {
  content: "-";
}

.portal-legal-summary summary::marker,
.portal-legal-summary summary::-webkit-details-marker {
  display: none;
}

.portal-legal-summary ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.portal-legal-summary li,
.portal-legal-summary p {
  color: #2d3e50;
  font-size: 0.9rem;
  line-height: 1.48;
}

.portal-legal-summary li + li {
  margin-top: 7px;
}

.portal-legal-summary p {
  margin: 10px 0 0;
}

.terms-row a,
.legal-links a,
.legal-shell a {
  color: var(--brand-blue);
  font-weight: 800;
  text-decoration: none;
}

.terms-row a:hover,
.legal-links a:hover,
.legal-shell a:hover {
  text-decoration: underline;
}

button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--brand-blue);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(63, 87, 165, 0.22);
}

button:hover {
  background: #334987;
}

button:disabled {
  cursor: not-allowed;
  background: #9aa7b5;
  box-shadow: none;
}

.status-message {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.status-message.success {
  color: var(--success);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-page {
  min-height: 100svh;
}

.legal-shell {
  width: min(calc(100% - 32px), 1120px);
  margin: 0 auto;
  padding: 28px 0 56px;
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 900;
}

.legal-brand img {
  width: 46px;
  height: 49px;
  object-fit: contain;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.legal-hero,
.legal-section {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(16, 32, 51, 0.1);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(10, 25, 43, 0.08);
}

.legal-hero {
  padding: 34px;
  margin-bottom: 22px;
}

.legal-hero h1 {
  max-width: 12ch;
}

.legal-hero p {
  max-width: 48rem;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.legal-section {
  padding: 28px;
  margin-top: 18px;
}

.legal-section h2 {
  margin: 0 0 20px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: 0;
}

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

.legal-grid article {
  min-width: 0;
  padding: 18px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.legal-grid h3 {
  margin: 0 0 10px;
  color: var(--brand-blue);
  font-size: 1rem;
}

.legal-grid p {
  margin: 0;
  color: #2d3e50;
  line-height: 1.58;
}

.legal-grid p + p {
  margin-top: 12px;
}

@media (max-width: 920px) {
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .visual-panel {
    min-height: 42svh;
    padding: 30px;
  }

  .visual-copy {
    padding-top: 44px;
  }

  .visual-copy h2 {
    max-width: 14ch;
    font-size: clamp(2.2rem, 9vw, 4rem);
  }

  .access-panel {
    width: min(580px, calc(100% - 28px));
    margin: -28px 0 28px;
    padding: 26px;
  }
}

@media (max-width: 560px) {
  .visual-panel {
    padding: 24px;
  }

  .brand-logo {
    width: 54px;
    height: 58px;
  }

  .brand-lockup span {
    font-size: 0.82rem;
  }

  .session-details {
    grid-template-columns: 1fr;
  }

  .session-details div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .session-details div:last-child {
    border-bottom: 0;
  }

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

  .legal-hero,
  .legal-section {
    padding: 22px;
  }

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