* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-muted: #eef3f8;
  --line: #d9e1ec;
  --line-strong: #c4cfdd;
  --text: #172033;
  --muted: #61708a;
  --accent: #1769e0;
  --accent-strong: #0f55ba;
  --red: #b42318;
  --shadow: 0 10px 26px rgba(30, 43, 68, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.is-hidden {
  display: none !important;
}

.site-header,
main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 64px;
  border-bottom: 1px solid rgba(217, 225, 236, 0.78);
  background: rgba(245, 247, 251, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 750;
}

.brand small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.nav-links {
  display: inline-flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.session-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}

.access-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 42px;
  align-items: start;
  padding: 72px 0;
}

.access-copy {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.18;
}

h1 {
  max-width: 12ch;
  font-size: 42px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 16px;
}

.access-copy > p:not(.eyebrow),
#tenant-summary,
.status-box,
.row-state {
  color: var(--muted);
  line-height: 1.55;
}

.access-copy > p:not(.eyebrow),
#tenant-summary {
  max-width: 54ch;
  font-size: 16px;
}

.login-panel,
.status-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.login-panel label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.login-panel input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.login-panel input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.14);
}

.primary-button,
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 750;
  cursor: pointer;
}

.primary-button:hover,
.download-button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.quiet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.form-state {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.form-state.error,
.row-state.error,
.status-box.error {
  color: var(--red);
}

.portal-hero {
  padding: 28px 0 10px;
}

.portal-hero h1 {
  max-width: none;
  font-size: 30px;
}

.content-section {
  padding: 18px 0 42px;
}

.content-section h2 {
  margin-bottom: 12px;
}

.status-box {
  padding: 14px 16px;
}

.download-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 112px;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.product-row h3 {
  min-width: 0;
  font-weight: 720;
}

.product-row time {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.product-row .download-button {
  width: 100%;
  min-height: 36px;
}

.row-state {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  font-size: 13px;
}

.row-state:empty {
  display: none;
}

.download-button[disabled],
.quiet-button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 760px) {
  .site-header,
  main {
    width: min(calc(100% - 24px), 1120px);
  }

  .site-header {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 10px;
    padding: 14px 0;
  }

  .session-actions {
    margin-left: 0;
  }

  .access-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 36px 0;
  }

  h1 {
    max-width: none;
    font-size: 32px;
  }

  h2 {
    font-size: 22px;
  }

  .product-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }

  .product-row time {
    white-space: normal;
  }

  .primary-button,
  .quiet-button,
  .download-button {
    width: 100%;
  }
}
