
:root {
  --paper: #FAF9F5;
  --white: #FFFFFF;
  --ink: #141619;
  --muted: #70777D;
  --blue: #167D9A;
  --blue-dark: #10566B;
  --border: #E5E5E0;
  --success: #167A49;
  --danger: #B42318;
  --radius: 16px;
  --shadow: 0 14px 45px rgba(20, 22, 25, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

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

/* Top navigation */

.topbar {
  min-height: 76px;
  padding: 16px 7%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(250, 249, 245, 0.96);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.brand b {
  font-weight: 800;
}

.mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--blue-dark);
  color: white;
  font-size: 23px;
  font-weight: 800;
}

.mark span {
  color: #8ED8E7;
}

.back-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--blue);
}

/* Main layout */

.shell {
  width: min(100% - 40px, 540px);
  margin: 70px auto 40px;
}

.intro {
  margin-bottom: 30px;
}

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

.intro h1 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(38px, 8vw, 54px);
  line-height: 1.12;
  letter-spacing: -2px;
}

.intro h1 span {
  color: var(--blue);
}

.intro > p:last-child {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* Portal panel */

.panel {
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0 0 10px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 25px;
  letter-spacing: -0.8px;
}

.hint {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* Form fields */

form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  background: #FEFEFD;
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22, 125, 154, 0.12);
}

label small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

/* Buttons */

button {
  min-height: 49px;
  padding: 13px 18px;
  border: 0;
  border-radius: 9px;
  background: var(--blue-dark);
  color: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

form button {
  margin-top: 5px;
}

button:hover {
  background: var(--blue);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

button.secondary {
  width: 100%;
  margin-top: 15px;
  border: 1px solid var(--border);
  background: white;
  color: var(--ink);
}

button.secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* Feedback and session states */

.state {
  color: var(--muted);
  font-size: 13px;
}

.message {
  margin-top: 20px;
  padding: 13px 15px;
  border: 1px solid #F0B9B5;
  border-radius: 9px;
  background: #FFF4F2;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.6;
}

.message.success {
  border-color: #B8E0CA;
  background: #F0FAF4;
  color: var(--success);
}

.notice {
  padding: 16px;
  border-left: 3px solid var(--blue);
  border-radius: 5px;
  background: #F1F8FA;
  color: var(--blue-dark);
  font-size: 12px;
  line-height: 1.7;
}

.footnote {
  margin: 25px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

/* Accessibility */

[hidden] {
  display: none !important;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(22, 125, 154, 0.3);
  outline-offset: 3px;
}

/* Mobile responsiveness */

@media (max-width: 600px) {
  .topbar {
    min-height: 66px;
    padding: 13px 20px;
  }

  .brand {
    font-size: 12px;
  }

  .shell {
    width: min(100% - 28px, 540px);
    margin-top: 45px;
  }

  .panel {
    padding: 24px 19px;
  }

  .intro h1 {
    font-size: 40px;
  }
}
