:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  color: #16181d;
  background: #f4f6f8;
  --ink: #16181d;
  --muted: #626873;
  --line: #d8dde4;
  --surface: #ffffff;
  --surface-subtle: #eef2f5;
  --accent: #d84a22;
  --accent-hover: #b93b19;
  --focus: #087f8c;
  --success: #18794e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f4f6f8;
}

a {
  color: inherit;
}

.page-shell {
  width: min(100%, 1080px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.surface-label,
.surface-link,
.status-mark {
  color: var(--muted);
  font-size: 0.875rem;
}

.surface-link {
  text-underline-offset: 3px;
}

main {
  flex: 1;
  padding: 56px 0 72px;
}

.status-band {
  padding: 0 0 44px;
  border-bottom: 1px solid var(--line);
}

.status-band.signed-out {
  max-width: 760px;
  padding-top: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: 2.25rem;
  line-height: 1.16;
}

h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.3;
}

p {
  margin: 12px 0 0;
  max-width: 700px;
  color: var(--muted);
  line-height: 1.65;
}

.status-heading,
.section-heading,
.account-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.status-mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.status-mark span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
}

.primary-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.button {
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  color: #ffffff;
  background: var(--accent);
}

.button-primary:hover {
  background: var(--accent-hover);
}

.button-secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: #bfc6cf;
}

.button-secondary:hover {
  border-color: #747c87;
  background: var(--surface-subtle);
}

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

.button:focus-visible,
.text-link:focus-visible,
.brand:focus-visible,
footer a:focus-visible {
  outline: 3px solid rgba(8, 127, 140, 0.28);
  outline-offset: 3px;
}

.text-link {
  color: #075d69;
  font-weight: 650;
  text-underline-offset: 3px;
}

.workspace {
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  align-items: flex-end;
}

.license-list {
  min-height: 116px;
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.loading-row,
.empty-state,
.error-state {
  min-height: 116px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}

.loading-bar {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: var(--focus);
}

.license-item {
  min-height: 116px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) repeat(3, minmax(105px, 0.7fr));
  gap: 18px;
  align-items: center;
}

.license-item strong,
.license-item span {
  display: block;
}

.license-plan {
  font-size: 1.05rem;
}

.license-id {
  margin-top: 6px;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.78rem;
}

.datum-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.datum-value {
  font-weight: 650;
}

.account-actions {
  padding-top: 42px;
  align-items: center;
}

.plan-grid {
  padding: 42px 0 30px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.plan-option {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.plan-option p {
  font-size: 0.94rem;
}

.plan-option ul {
  width: 100%;
  margin: 22px 0 26px;
  padding: 18px 0 0 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.75;
}

.plan-option .button {
  margin-top: auto;
}

.checkout-message {
  min-height: 1.6em;
  margin-top: 0;
  color: var(--ink);
  font-weight: 650;
}

.checkout-note {
  margin-top: 8px;
  font-size: 0.86rem;
}

footer {
  min-height: 76px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 0.85rem;
}

footer nav {
  display: flex;
  gap: 20px;
}

footer a {
  color: var(--muted);
  text-underline-offset: 3px;
}

@media (max-width: 760px) {
  .page-shell {
    padding: 0 20px;
  }

  main {
    padding: 36px 0 52px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .status-heading,
  .section-heading,
  .account-actions {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .license-identity {
    grid-column: 1 / -1;
  }

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

@media (max-width: 430px) {
  .topbar {
    min-height: 66px;
  }

  .surface-label {
    display: none;
  }

  .license-item {
    grid-template-columns: 1fr;
  }

  .license-identity {
    grid-column: auto;
  }

  footer nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
