:root {
  --bg: #080808;
  --panel: #111111;
  --panel-soft: #171717;
  --line: #303030;
  --text: #f5f2eb;
  --muted: #aaa69e;
  --accent: #f28705;
  --accent-dark: #b85e00;
  --success: #65c18c;
  --danger: #ff7b72;
  --focus: #ffd28c;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { min-height: 100vh; margin: 0; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -6rem;
  z-index: 100;
  padding: .75rem 1rem;
  color: #080808;
  background: var(--focus);
}
.skip-link:focus { top: 1rem; }

.site-header,
.site-footer {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-header { min-height: 76px; border-bottom: 1px solid var(--line); }
.site-footer {
  min-height: 72px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none; }
.brand-mark { padding: .42rem .55rem; background: var(--accent); color: #090909; font-weight: 900; letter-spacing: .12em; }
.brand-name { font-weight: 800; letter-spacing: .24em; }
.release-label { display: flex; gap: .75rem; color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }

.page-shell { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; min-height: calc(100vh - 148px); }
.center-panel { max-width: 700px; padding: clamp(5rem, 14vw, 11rem) 0; }
.center-panel h1,
.intro-panel h1,
.app-heading h1 { margin: .25rem 0 1.25rem; font-size: clamp(2.6rem, 7vw, 6.6rem); line-height: .94; letter-spacing: -.055em; }
.eyebrow { margin: 0 0 .75rem; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.muted { color: var(--muted); line-height: 1.65; }

.auth-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); min-height: calc(100vh - 148px); }
.intro-panel { padding: clamp(4rem, 10vw, 9rem) clamp(2rem, 7vw, 7rem) 4rem 0; border-right: 1px solid var(--line); }
.intro-panel > p:not(.eyebrow) { max-width: 650px; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.plain-list { margin: 2rem 0 0; padding: 0; list-style: none; }
.plain-list li { padding: .75rem 0; border-top: 1px solid var(--line); color: #d7d2c9; }
.form-panel { display: grid; align-items: center; padding: 3rem 0 3rem clamp(2rem, 6vw, 6rem); }
.form-panel form { width: 100%; }
.form-panel h2,
.account-panel h2,
.foundation-card h2 { margin: 0 0 1.5rem; font-size: clamp(1.5rem, 3vw, 2.4rem); letter-spacing: -.035em; }

label { display: block; margin: 1.25rem 0 .5rem; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
input {
  width: 100%;
  min-height: 52px;
  padding: .8rem 1rem;
  border: 1px solid #4a4a4a;
  border-radius: 0;
  color: var(--text);
  background: #090909;
}
input:focus-visible,
button:focus-visible,
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.primary-button,
.secondary-button {
  width: 100%;
  min-height: 52px;
  margin-top: 1.5rem;
  padding: .85rem 1rem;
  border: 1px solid var(--accent);
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.primary-button { color: #080808; background: var(--accent); }
.secondary-button { color: var(--accent); background: transparent; }
.primary-button:hover { background: #ff9e29; }
.secondary-button:hover { color: #080808; background: var(--accent); }
button:disabled { cursor: wait; opacity: .55; }
.text-button { padding: 0; border: 0; color: var(--accent); background: none; text-decoration: underline; text-underline-offset: .25rem; }

.message { margin: 1rem 0; padding: .85rem 1rem; border-left: 3px solid var(--accent); color: #e8e3da; background: #20180d; line-height: 1.5; }
.message[data-kind="error"] { border-color: var(--danger); background: #241010; }
.message[data-kind="success"] { border-color: var(--success); background: #0d2015; }
.field-help { color: var(--muted); font-size: .82rem; line-height: 1.5; }

.app-heading { display: flex; justify-content: space-between; gap: 3rem; padding: clamp(4rem, 10vw, 8rem) 0 3rem; border-bottom: 1px solid var(--line); }
.app-heading h1 { max-width: 820px; }
.identity-block { min-width: 210px; align-self: flex-start; display: grid; justify-items: end; gap: .5rem; }
.identity-block > span:first-child { font-weight: 800; }
.role-label { color: var(--muted); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.foundation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.foundation-card { min-height: 300px; padding: 2rem; border-right: 1px solid var(--line); background: var(--panel); }
.foundation-card:last-child { border-right: 0; }
.foundation-card--active { background: var(--panel-soft); }
.foundation-card p:last-child { color: var(--muted); line-height: 1.65; }
.status-dot { display: block; width: .7rem; height: .7rem; margin: 0 0 2rem; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 .3rem rgba(101, 193, 140, .12); }
.account-panel { display: grid; grid-template-columns: 1fr minmax(320px, .7fr); gap: clamp(3rem, 9vw, 8rem); padding: clamp(4rem, 10vw, 8rem) 0; }
.account-panel > div { max-width: 600px; }

@media (max-width: 820px) {
  .auth-layout { display: block; }
  .intro-panel { padding: 4rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .form-panel { padding: 3rem 0 5rem; }
  .app-heading { display: block; }
  .identity-block { margin-top: 2rem; justify-items: start; }
  .foundation-grid { grid-template-columns: 1fr; }
  .foundation-card { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .account-panel { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .site-header { align-items: flex-start; padding: 1rem 0; }
  .release-label { display: grid; justify-items: end; }
  .site-footer { display: grid; justify-content: start; padding: 1rem 0; }
  .center-panel h1,
  .intro-panel h1,
  .app-heading h1 { font-size: clamp(2.4rem, 15vw, 4.3rem); }
  .foundation-card { padding: 1.5rem 0; background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}
