@font-face {
  font-family: "Instrument Serif";
  src: url("/suite-assets/InstrumentSerif-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/suite-assets/InstrumentSerif-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/suite-assets/InstrumentSans-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/suite-assets/InstrumentSans-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Instrument Sans", sans-serif;
  background: #05060b;
  color: #eeeae1;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 8%, rgba(38, 73, 128, 0.34), transparent 32rem),
    radial-gradient(circle at 92% 92%, rgba(102, 22, 48, 0.26), transparent 34rem),
    #05060b;
}

button, input { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

.shell {
  width: min(100% - 2rem, 62rem);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2.4rem) 0;
  display: grid;
}

.portal {
  min-height: calc(100vh - clamp(2rem, 8vw, 4.8rem));
  border: 1px solid rgba(238, 234, 225, 0.18);
  background: rgba(4, 6, 12, 0.82);
  display: grid;
  grid-template-rows: auto 1fr auto;
  backdrop-filter: blur(22px);
}

.masthead, footer {
  min-height: 3.15rem;
  padding: 0 3.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(238, 234, 225, 0.12);
  color: rgba(238, 234, 225, 0.66);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.classification, .eyebrow { color: #93b7d3; }

.view {
  width: min(100% - 2rem, 50rem);
  margin: auto;
  padding: clamp(3rem, 9vw, 6rem) 0;
}

.login, .loading { max-width: 42rem; text-align: center; }

.eyebrow, .field-label {
  margin: 0 0 1.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-weight: 400; }

.title-lead {
  display: block;
  font-family: "Instrument Serif", serif;
  font-size: clamp(3.1rem, 8vw, 5.4rem);
  font-style: italic;
  line-height: 0.84;
  letter-spacing: -0.045em;
}

.title-main {
  display: block;
  margin-top: 0.2rem;
  font-family: "Instrument Serif", serif;
  font-size: clamp(4rem, 11vw, 7.1rem);
  line-height: 0.86;
  letter-spacing: -0.055em;
}

.lede {
  margin: 2.2rem auto 0;
  color: rgba(238, 234, 225, 0.72);
  font-size: 1.05rem;
}

.license-picker {
  width: min(100%, 25rem);
  margin: 2rem auto 0;
  padding: 1rem 1.15rem;
  border: 1px solid #eeeae1;
  background: #eeeae1;
  color: #090a0f;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 140ms ease, color 140ms ease;
}

.license-picker:hover { background: transparent; color: #eeeae1; }
#license-file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#license-file:focus-visible + .status { outline: 2px solid #93b7d3; }

.status {
  min-height: 1.4rem;
  margin: 1.05rem 0 0;
  color: rgba(238, 234, 225, 0.6);
  font-size: 0.8rem;
}
.status[data-state="error"] { color: #d9919f; }
.fine-print { color: rgba(238, 234, 225, 0.34); font-size: 0.73rem; }

.dashboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
}

.dashboard .title-lead { font-size: clamp(2.5rem, 7vw, 4.3rem); }
.dashboard .title-main { font-size: clamp(3.4rem, 9vw, 5.8rem); }

.sign-out {
  border: 0;
  border-bottom: 1px solid rgba(147, 183, 211, 0.45);
  padding: 0.25rem 0;
  background: transparent;
  color: rgba(238, 234, 225, 0.62);
  cursor: pointer;
  font-size: 0.72rem;
}
.sign-out:hover { color: #b8d3e7; }

.license-card {
  border: 1px solid rgba(238, 234, 225, 0.16);
  padding: clamp(1.4rem, 4vw, 2.25rem);
}

.license-card-heading { display: flex; justify-content: space-between; gap: 1.5rem; }
.field-label { margin-bottom: 0.65rem; color: rgba(238, 234, 225, 0.42); }
.license-card h2, .downloads h2 {
  margin-bottom: 0;
  font-family: "Instrument Serif", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
}

.license-state {
  align-self: flex-start;
  border: 1px solid rgba(120, 170, 145, 0.5);
  padding: 0.4rem 0.65rem;
  color: #a8cdb9;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.license-state[data-state="inactive"] { border-color: rgba(189, 77, 98, 0.5); color: #d9919f; }

.license-details {
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2rem;
}
.license-details div { min-width: 0; }
.license-details dt { margin-bottom: 0.38rem; color: rgba(238, 234, 225, 0.4); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; }
.license-details dd { margin: 0; color: rgba(238, 234, 225, 0.82); font-size: 0.9rem; }
.license-id { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.downloads { margin-top: 3.2rem; }
.section-heading { margin-bottom: 1.25rem; }
.download-list { display: grid; gap: 0.75rem; }
.download-row {
  border: 1px solid rgba(238, 234, 225, 0.18);
  padding: 1rem 1.15rem;
  color: #eeeae1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease;
}
.download-row:hover { border-color: rgba(147, 183, 211, 0.7); background: rgba(147, 183, 211, 0.06); }
.download-main { display: grid; gap: 0.35rem; }
.download-main strong { font-size: 0.86rem; font-weight: 600; }
.download-main span { color: rgba(238, 234, 225, 0.45); font-size: 0.72rem; }
.download-arrow { color: #93b7d3; }
.access-notice, .empty-downloads { border-left: 1px solid #93b7d3; padding: 0.2rem 0 0.2rem 1rem; color: rgba(238, 234, 225, 0.58); font-size: 0.84rem; line-height: 1.5; }
.access-notice { border-color: #bd4d62; }

footer { border-top: 1px solid rgba(238, 234, 225, 0.12); border-bottom: 0; color: rgba(238, 234, 225, 0.38); }

:focus-visible { outline: 2px solid #93b7d3; outline-offset: 4px; }

@media (max-width: 620px) {
  .shell { width: 100%; padding: 0; }
  .portal { min-height: 100vh; border-left: 0; border-right: 0; }
  .masthead, footer { padding: 0 1.2rem; }
  .view { width: min(100% - 2.4rem, 50rem); padding: 3.5rem 0; }
  .dashboard-heading { display: block; }
  .sign-out { margin-top: 1.25rem; }
  .license-details { grid-template-columns: 1fr; }
  footer span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
