:root {
  color-scheme: light;
  --ink: #100D08;
  --muted: #667085;
  --line: #D0D5DD;
  --soft-line: #EAECF0;
  --paper: #F9F8F6;
  --panel: #FFFFFF;
  --primary: #FFB834;
  --primary-hover: #E59B13;
  --primary-text: #100D08;
  --warning-soft: #FFFAEB;
  --success-soft: #ECFDF3;
  --danger: #F04438;
  --danger-soft: #FEF3F2;
  --focus: rgba(229, 155, 19, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

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

a:hover {
  color: var(--primary);
}

code {
  font: 13px/1.45 Consolas, "Courier New", monospace;
  overflow-wrap: anywhere;
}

.shell {
  width: min(920px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.narrow-shell {
  width: min(500px, calc(100vw - 32px));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav-user {
  max-width: min(260px, 34vw);
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.logout-link:hover {
  border-color: #A3A3A3;
  background: #FFFFFF;
  color: var(--ink);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(16, 13, 8, 0.04), 0 8px 24px rgba(16, 13, 8, 0.04);
  padding: clamp(22px, 4vw, 30px);
}

.auth-card {
  margin-top: clamp(24px, 7vh, 64px);
}

.login-page .topbar {
  display: none;
}

.auth-card-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.auth-card-brand img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.home-page {
  padding-top: clamp(28px, 7vh, 72px);
}

.home-hero {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin: 0 auto clamp(40px, 8vh, 68px);
  max-width: 620px;
  text-align: center;
}

.home-app-icon {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin-bottom: 12px;
  border: 1px solid rgba(16, 13, 8, 0.1);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(249, 248, 246, 0.62)),
    #FFFFFF;
  box-shadow: 0 20px 48px rgba(16, 13, 8, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.home-app-icon img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.home-hero h1 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.08;
}

.home-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.home-hero-action {
  gap: 8px;
  min-height: 42px;
  margin-top: 10px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
}

.windows-mark {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: currentColor;
}

.home-action-disabled {
  cursor: default;
  opacity: 0.72;
}

.home-action-disabled:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.home-access-note {
  width: min(420px, 100%);
  margin-top: 14px;
  border: 1px solid rgba(240, 68, 56, 0.35);
  border-radius: 8px;
  background: #FFFFFF;
  padding: 16px;
  text-align: left;
}

.home-access-note h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.home-access-note p {
  margin: 8px 0 0;
  font-size: 14px;
}

.home-product-list {
  width: min(780px, 100%);
  margin: 0 auto;
  border-top: 1px solid var(--soft-line);
}

.home-install-section,
.home-release-section {
  border-bottom: 1px solid var(--soft-line);
  padding: 28px 0;
}

.home-install-heading {
  margin-bottom: 14px;
}

.home-install-heading h2,
.home-release-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.home-install-heading h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 18px;
}

.home-release-section h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

.home-install-heading h2 span[aria-hidden],
.home-install-count {
  color: var(--muted);
}

.home-install-count {
  font-size: 14px;
  font-weight: 500;
}

.home-release-list {
  display: grid;
}

.home-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
  border-bottom: 1px solid var(--soft-line);
  padding: 10px 0;
}

.home-product-row:first-child {
  padding-top: 0;
}

.home-product-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.home-install-row {
  border-bottom: 0;
}

.home-product-name {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.home-product-name strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.home-product-name span,
.home-install-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.home-product-name code {
  font-size: 12px;
}

.home-release-link {
  color: var(--ink);
  text-decoration: none;
}

.home-release-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.home-install-meta {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 460px;
  text-align: right;
}

.home-install-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: var(--line);
}

.card-heading,
.page-heading {
  margin-bottom: 22px;
}

.card-heading h1,
.page-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.15;
}

.card-heading p,
.page-heading p,
.muted {
  margin: 10px 0 0;
  color: var(--muted);
}

.card-heading .badge + h1 {
  margin-top: 12px;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.section-stack {
  display: grid;
  gap: 18px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.section-heading h2,
.install-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

.status-box {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #FFFFFF;
  padding: 16px;
}

.status-box h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

.status-box p {
  margin: 8px 0 0;
  color: var(--muted);
}

.status-box p:first-child {
  margin-top: 0;
}

.status-box + .form-alert,
.status-box + .login-form,
.status-box + .actions {
  margin-top: 18px;
}

.status-box .field {
  margin-top: 14px;
}

.status-box .field + p {
  margin-top: 12px;
}

.status-box.success {
  border-color: rgba(71, 205, 137, 0.35);
  background: #FFFFFF;
}

.status-box.warning {
  border-color: rgba(254, 200, 75, 0.55);
  background: #FFFFFF;
}

.status-box.error {
  border-color: rgba(240, 68, 56, 0.35);
  background: #FFFFFF;
}

.badge,
.count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  white-space: nowrap;
}

.badge.success {
  border-color: rgba(71, 205, 137, 0.45);
  background: var(--success-soft);
  color: #067647;
}

.badge.warning {
  border-color: rgba(254, 200, 75, 0.75);
  background: var(--warning-soft);
  color: #8A6100;
}

.badge.error {
  border-color: rgba(240, 68, 56, 0.45);
  background: var(--danger-soft);
  color: var(--danger);
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.actions.stacked {
  display: grid;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 0 16px;
  text-decoration: none;
}

.button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--primary-text);
}

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

.button.secondary:hover {
  background: #F9FAFB;
  color: var(--ink);
  border-color: #A3A3A3;
}

.full-width {
  width: 100%;
}

.login-form {
  display: grid;
  gap: 14px;
}

.field-group,
.field {
  display: grid;
  gap: 7px;
}

.field-group label,
.field label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.login-form input[type="email"],
.login-form input[type="password"],
.readonly {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--ink);
  font: inherit;
  padding: 9px 11px;
  outline: none;
}

.readonly {
  font-family: Consolas, "Courier New", monospace;
}

.login-form input:focus,
.readonly:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus);
}

.login-form input::placeholder {
  color: #A3A3A3;
}

.field-group.has-error input {
  border-color: var(--danger);
}

.form-alert,
.field-errors {
  color: var(--danger);
}

.form-alert {
  border: 1px solid rgba(240, 68, 56, 0.35);
  border-radius: 8px;
  background: #FFFFFF;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 14px;
}

.form-alert ul,
.field-errors ul {
  margin: 0;
  padding-left: 18px;
}

.field-errors,
.field-help {
  font-size: 13px;
}

.field-help {
  color: var(--muted);
}

.field-help ul {
  margin: 0;
  padding-left: 18px;
}

.provider-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.provider-button {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.provider-button:hover {
  border-color: #A3A3A3;
  background: #F9FAFB;
  color: var(--ink);
}

.provider-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
}

.microsoft-icon {
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.microsoft-icon span:nth-child(1) {
  background: #F35325;
}

.microsoft-icon span:nth-child(2) {
  background: #81BC06;
}

.microsoft-icon span:nth-child(3) {
  background: #05A6F0;
}

.microsoft-icon span:nth-child(4) {
  background: #FFBA08;
}

.google-icon {
  place-items: center;
}

.google-logo-svg {
  width: 18px;
  height: 18px;
  display: block;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--soft-line);
}

.login-options,
.remember-control,
.card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-options {
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}

.remember-control input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.card-footer {
  justify-content: center;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--soft-line);
  color: var(--muted);
  font-size: 14px;
}

.card-footer a {
  font-weight: 600;
  text-decoration: none;
}

.card-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

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

.meta-grid.single-column {
  grid-template-columns: 1fr;
}

.meta-grid div {
  min-width: 0;
  border-right: 1px solid var(--soft-line);
  padding: 13px 14px;
}

.meta-grid.single-column div {
  border-right: 0;
  border-bottom: 1px solid var(--soft-line);
}

.meta-grid div:last-child {
  border-right: 0;
  border-bottom: 0;
}

.meta-grid dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.meta-grid dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.install-section {
  margin-top: 4px;
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
}

.install-table {
  min-width: 680px;
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.install-table th,
.install-table td {
  border-bottom: 1px solid var(--soft-line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.install-table th {
  background: #F9FAFB;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.install-table tr:last-child td {
  border-bottom: 0;
}

.consent-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--ink);
}

.button:focus-visible,
.provider-button:focus-visible,
.logout-link:focus-visible,
.home-release-link:focus-visible,
.card-footer a:focus-visible,
.login-form input:focus-visible,
.remember-control input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .page-heading,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .meta-grid div:nth-child(2) {
    border-right: 0;
  }

  .meta-grid div:nth-child(1),
  .meta-grid div:nth-child(2) {
    border-bottom: 1px solid var(--soft-line);
  }
}

@media (max-width: 520px) {
  .shell {
    width: calc(100vw - 24px);
    padding-top: 18px;
  }

  .topbar,
  .login-options,
  .card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: space-between;
    width: 100%;
    margin-left: 0;
  }

  .nav-user {
    max-width: calc(100vw - 140px);
  }

  .panel {
    padding: 20px;
  }

  .auth-card {
    margin-top: 18px;
  }

  .home-page {
    padding-top: 22px;
  }

  .home-app-icon {
    width: 92px;
    height: 92px;
    border-radius: 22px;
  }

  .home-app-icon img {
    width: 58px;
    height: 58px;
  }

  .home-section-heading .button {
    width: 100%;
  }

  .home-product-row,
  .home-install-meta {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    text-align: left;
  }

  .home-install-meta {
    gap: 4px;
    padding-left: 0;
  }

  .home-install-meta span + span::before {
    content: none;
  }

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

  .meta-grid div,
  .meta-grid div:nth-child(2) {
    border-right: 0;
  }

  .meta-grid div:nth-child(1),
  .meta-grid div:nth-child(2),
  .meta-grid div:nth-child(3) {
    border-bottom: 1px solid var(--soft-line);
  }

  .meta-grid div:last-child {
    border-bottom: 0;
  }
}
