:root {
  --ink: #102437;
  --muted: #526779;
  --line: #dce6ec;
  --brand: #007fae;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}
body {
  margin: 0;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #f4f8fa;
  color: var(--ink);
  line-height: 1.6;
}
a {
  color: #00739b;
}
button,
input,
select,
textarea {
  font: inherit;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #00baf3;
  outline-offset: 4px;
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  background: #fff;
  padding: 12px;
  z-index: 100;
}
.skip:focus {
  top: 10px;
}
.portal-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px max(5%, calc((100vw - 1200px) / 2));
  min-height: 86px;
}
.brand img {
  object-fit: contain;
  display: block;
}
.portal-label {
  font-size: 12px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.portal-header nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.portal-header nav a {
  font-size: 13px;
  text-decoration: none;
  font-weight: 600;
}
.portal-header form {
  margin: 0;
}
.signout {
  background: #f0f5f8;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
}
.portal-main {
  width: 90%;
  max-width: 1200px;
  margin: 48px auto;
  min-height: 70vh;
}
h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.7px;
}
h1 {
  font-size: clamp(30px, 4vw, 42px);
}
h2 {
  font-size: 24px;
}
h3 {
  font-size: 20px;
}
p {
  margin: 0 0 18px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: var(--brand);
  display: block;
  margin-bottom: 18px;
}
.panel {
  padding: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 4px 20px #10243704;
}
.notice {
  border: 1px solid #b7dbe8;
  background: #eaf6fb;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
}
.login-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: 1040px;
  margin: 60px auto;
}
.login-intro {
  padding: 36px 0;
}
.login-intro h1 {
  font-size: clamp(38px, 4vw, 52px);
  letter-spacing: -1.8px;
}
.login-intro p {
  font-size: 17px;
  max-width: 440px;
}
.login-intro ul {
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}
.login-intro li {
  margin: 12px 0;
}
.login-intro li::before {
  content: "✓";
  color: var(--brand);
  margin-right: 12px;
}
.intro-note {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font-size: 12px;
  color: var(--muted);
  max-width: 400px;
}
.login-panel {
  padding: 36px;
}
.login-panel h2 {
  font-size: 26px;
}
.login-panel > p {
  font-size: 13px;
}
.login-panel .small {
  margin-top: 24px;
}
.password-panel {
  max-width: 560px;
  margin: 0 auto;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 18px;
}
input,
select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid #bacbd7;
  border-radius: 9px;
  background: #fbfdfe;
  color: var(--ink);
  font-size: 14px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  background: var(--ink);
  border: 1px solid var(--ink);
  color: #fff;
  border-radius: 9px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 46px;
}
.button:hover {
  background: #1b4057;
}
.secondary {
  background: #eef7fb;
  color: #006e94;
  border-color: #bddce9;
}
.secondary:hover {
  background: #e1f1f8;
}
.login-panel .button,
.password-panel .button {
  width: 100%;
}
.mfa-details {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 24px;
}
.mfa-details label {
  margin-top: 14px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.pill {
  display: inline-block;
  padding: 5px 11px;
  background: #e5f6f0;
  color: #16644b;
  font-size: 10px;
  border-radius: 6px;
  font-weight: 600;
}
.muted-pill {
  background: #eef3f7;
  color: var(--muted);
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.summary-grid .muted {
  font-size: 12px;
}
.summary-grid strong {
  display: block;
  font-size: 36px;
  letter-spacing: -1px;
  margin-top: 6px;
}
.section-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.section-nav a {
  background: #fff;
  border: 1px solid var(--line);
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.setup-guide ol {
  padding-left: 20px;
  font-size: 13px;
  color: var(--muted);
}
.setup-guide li {
  padding: 4px;
}
.admin-section {
  margin-top: 44px;
}
.section-heading {
  margin: 36px 0 20px;
}
.section-heading p {
  font-size: 13px;
}
.admin-section > details {
  margin-bottom: 20px;
}
.record-grid,
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.record {
  min-width: 0;
  overflow-wrap: anywhere;
}
.record > .pill {
  margin-bottom: 16px;
}
.record p {
  font-size: 13px;
}
.record details {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}
summary {
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}
details[open] > summary {
  margin-bottom: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
  margin-top: 20px;
}
.form-grid .button {
  align-self: end;
  margin-bottom: 18px;
}
.check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.check input {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--brand);
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin: 0 0 20px;
}
legend {
  font-size: 12px;
  color: var(--muted);
}
.full-width {
  grid-column: 1/-1;
}
.empty-copy {
  color: var(--muted);
  font-size: 13px;
  padding: 16px;
}
.record .price {
  font-size: 22px;
  font-weight: 700;
}
.tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.activity-list {
  list-style: none;
  padding: 0;
}
.activity-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
  font-size: 12px;
}
.activity-list time {
  color: var(--muted);
  font-size: 11px;
}
.module-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.module-card p {
  font-size: 13px;
  flex: 1;
}
.module-card h3 {
  margin-top: 24px;
}
.module-icon {
  font-size: 24px;
  color: var(--brand);
  background: #eaf6fb;
  padding: 8px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
}
.locked {
  font-size: 11px;
  background: #f2f5f7;
  color: var(--muted);
  padding: 12px;
  border-radius: 8px;
}
.subscription-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.subscription-panel h2 {
  font-size: 18px;
}
.subscription-panel > p {
  font-size: 13px;
}
.empty-state {
  text-align: center;
  max-width: 760px;
  margin: 50px auto;
  padding: 56px 36px;
}
.empty-state p {
  max-width: 560px;
  margin: 20px auto;
}
.portal-footer {
  padding: 26px 5%;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.portal-footer a {
  margin-left: 20px;
}
@media (max-width: 1000px) {
  .record-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .login-layout {
    gap: 32px;
  }
  .portal-label {
    display: none;
  }
  .module-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .portal-main {
    margin: 30px auto;
  }
  .portal-header {
    gap: 10px;
    padding: 10px 5%;
    flex-wrap: wrap;
  }
  .brand img {
    width: 96px;
    height: 48px;
  }
  .portal-header nav {
    gap: 12px;
  }
  .portal-header nav a {
    font-size: 11px;
  }
  .signout {
    font-size: 11px;
    padding: 8px;
  }
  .login-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin: 0 auto;
  }
  .login-intro {
    padding: 14px 0;
  }
  .login-intro h1 {
    font-size: 36px;
  }
  .login-intro ul,
  .intro-note {
    display: none;
  }
  .login-panel,
  .panel {
    padding: 24px;
  }
  .page-heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .summary-grid {
    gap: 8px;
  }
  .summary-grid .panel {
    padding: 16px 10px;
  }
  .summary-grid strong {
    font-size: 28px;
  }
  .record-grid,
  .form-grid,
  .subscription-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  .activity-list li {
    flex-direction: column;
    gap: 4px;
  }
  .portal-footer a {
    display: block;
    margin: 10px 0 0;
  }
  .empty-state {
    padding: 36px 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
/* Keep long release hashes and installer filenames usable on narrow screens. */
.panel p { overflow-wrap: anywhere; }
.panel input[type="file"] { max-width: 100%; min-width: 0; }
.panel textarea { width: 100%; max-width: 100%; min-width: 0; padding: .8rem; border: 1px solid #b5cbdc; border-radius: .65rem; font: inherit; overflow-wrap: anywhere; }
