:root {
  color-scheme: light;
  --ink: #172321;
  --muted: #52605d;
  --line: #c9d8d3;
  --panel: #ffffff;
  --wash: #eef6f3;
  --brand: #075a52;
  --brand-2: #0e7b67;
  --warn: #7a3f00;
}

* { box-sizing: border-box; }

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(238, 246, 243, 0.94), rgba(255,255,255,0.98)),
    #f7fbf9;
}

a { color: var(--brand); }

.access-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.access-panel {
  width: min(100%, 860px);
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 46px);
  box-shadow: 0 18px 52px rgba(30, 64, 56, 0.12);
}

.access-logo {
  width: 148px;
  height: auto;
  display: block;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.lead {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.access-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 26px 0 26px;
  background: var(--line);
}

.access-summary div {
  min-height: 96px;
  background: var(--wash);
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.access-summary span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.access-summary strong {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.18;
}

.copy-block {
  display: grid;
  gap: 12px;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.6;
}

.copy-block p { margin: 0; }

.access-legal-details,
.access-support-details {
  max-width: 760px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.48;
}

.access-legal-details summary,
.access-support-details summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.access-legal-details p,
.access-support-details p {
  margin: 8px 0 0;
}

.purchase-form {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
}

.purchase-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 800;
}

.purchase-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input,
textarea,
button,
.button-link {
  min-height: 50px;
  border-radius: 6px;
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 0 14px;
}

textarea {
  min-height: 118px;
  padding: 12px 14px;
  resize: vertical;
}

button,
.button-link {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button-link:hover { background: var(--brand-2); }

button:disabled { opacity: 0.64; cursor: wait; }

.status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--warn);
}

.issued-code {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #f6fbf9;
}

.code-box {
  display: inline-flex;
  align-items: center;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 18px;
  color: var(--brand);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: clamp(1.4rem, 3vw, 2.15rem);
  font-weight: 800;
}

.issued-code p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.actions button {
  background: transparent;
  color: var(--brand);
}

.support-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(280px, 1.14fr);
  gap: 22px;
  align-items: start;
  margin: 12px 0 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfb;
}

.support-panel h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.support-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.support-form {
  display: grid;
  gap: 8px;
}

.support-form label {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.support-form button {
  margin-top: 4px;
}

.support-status {
  min-height: 22px;
  margin: 2px 0 0;
  color: var(--warn);
}

.support-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

@media (max-width: 720px) {
  .access-page {
    align-items: start;
    padding: 10px;
  }

  .access-summary,
  .purchase-row {
    grid-template-columns: 1fr;
  }

  .access-panel {
    width: 100%;
    padding: 14px;
    border-radius: 6px;
  }

  .access-logo {
    width: 118px;
    margin-bottom: 14px;
  }

  .eyebrow {
    margin-bottom: 6px;
    font-size: 0.7rem;
  }

  h1 {
    font-size: clamp(1.55rem, 8.2vw, 2.25rem);
    line-height: 1.04;
  }

  .lead {
    margin-top: 10px;
    font-size: 0.95rem;
    line-height: 1.42;
  }

  .purchase-form {
    margin-top: 16px;
    padding: 14px;
  }

  input,
  textarea,
  button,
  .button-link {
    min-height: 46px;
  }

  .status {
    min-height: 20px;
    margin-top: 8px;
    font-size: 0.88rem;
  }

  .access-summary {
    margin: 16px 0 14px;
  }

  .access-summary div {
    min-height: 68px;
    padding: 12px;
    gap: 4px;
  }

  .copy-block {
    gap: 10px;
    font-size: 0.92rem;
    line-height: 1.48;
  }

  .support-panel {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 16px 0;
    padding: 14px;
  }

  .support-panel h2 {
    font-size: 1.35rem;
  }

  .issued-code {
    margin-top: 16px;
    padding: 16px;
  }

  .code-box {
    min-height: 54px;
    width: 100%;
    justify-content: center;
  }

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

@media (max-width: 720px) and (max-height: 760px) {
  .copy-block p:first-child { display: none; }

  .access-summary div {
    min-height: 58px;
    padding: 8px;
  }

  .access-summary span {
    font-size: 0.62rem;
  }

  .access-summary strong {
    font-size: 0.78rem;
  }
}
