:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #66645f;
  --line: #dedbd2;
  --paper: #f8f7f2;
  --white: #ffffff;
  --green: #1f6b55;
  --red: #9d2f2f;
  --gold: #b78b2f;
  --blue: #245f8f;
  --shadow: 0 18px 44px rgba(34, 31, 24, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(31, 107, 85, 0.08), transparent 34%),
    linear-gradient(240deg, rgba(157, 47, 47, 0.08), transparent 36%),
    var(--paper);
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(30, 28, 23, 0.12);
  background: rgba(248, 247, 242, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark,
.row-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--green);
  font-weight: 800;
  font-size: 13px;
}

.brand-name {
  font-weight: 800;
  font-size: 18px;
}

.project-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  background: var(--white);
  overflow-x: auto;
  max-width: 100%;
}

.account-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.tab {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}

.tab.is-active {
  background: var(--ink);
  color: var(--white);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) 0 64px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: end;
  gap: 28px;
  margin-bottom: 28px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.02;
}

h1 {
  max-width: 760px;
  font-size: clamp(46px, 8vw, 92px);
}

h2 {
  max-width: 680px;
  font-size: clamp(32px, 5vw, 58px);
}

.lead {
  max-width: 660px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.account-gateway {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 680px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(31, 107, 85, 0.28);
  background: rgba(255, 255, 255, 0.78);
}

.account-gateway span,
.account-gateway strong {
  display: block;
}

.account-gateway span {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.account-gateway strong {
  margin-top: 4px;
  line-height: 1.35;
}

.account-gateway a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--white);
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.login-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.75fr) auto;
  gap: 10px;
  max-width: 680px;
  margin-top: 22px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.login-form input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
}

.login-form button {
  align-self: end;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--white);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
}

.login-status {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.login-status a {
  color: var(--green);
  font-weight: 850;
}

.status-panel {
  display: grid;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
}

.status-label {
  color: var(--red);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.status-panel strong {
  font-size: 24px;
}

.status-panel span:last-child {
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.project-list {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--white);
}

.project-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 68px;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.project-row img {
  display: block;
  max-width: 44px;
  max-height: 44px;
  object-fit: contain;
}

.project-row strong,
.project-row small {
  display: block;
}

.project-row strong {
  font-size: 15px;
}

.project-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.project-row.is-active {
  border-color: rgba(31, 107, 85, 0.35);
  background: rgba(31, 107, 85, 0.08);
}

.project-detail {
  display: none;
  min-height: 520px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
}

.project-detail.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: space-between;
  gap: 36px;
}

.panel-copy p:not(.section-kicker) {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.project-logo {
  display: block;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 20px;
}

.courses-logo {
  max-width: min(420px, 100%);
  max-height: 92px;
}

.zapareno-logo {
  max-width: min(300px, 100%);
  max-height: 104px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.primary-link {
  background: var(--ink);
  color: var(--white);
}

.secondary-link {
  background: var(--white);
}

.metrics,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metrics div,
.feature-grid div {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fbfaf6;
}

.metrics strong,
.feature-grid strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.metrics span,
.feature-grid span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 860px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .project-tabs {
    width: 100%;
  }

  .account-entry {
    width: 100%;
  }

  .intro,
  .workspace {
    grid-template-columns: 1fr;
  }

  .status-panel {
    box-shadow: none;
  }

  .project-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-gateway {
    align-items: stretch;
    flex-direction: column;
  }

  .login-form {
    grid-template-columns: 1fr;
  }

  .login-form button {
    width: 100%;
    min-height: 46px;
    white-space: normal;
  }
}

@media (max-width: 620px) {
  main {
    width: min(100% - 22px, 1180px);
    padding-top: 24px;
  }

  .brand-name {
    font-size: 16px;
  }

  .tab {
    padding: 0 12px;
  }

  .project-list,
  .metrics,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .project-detail {
    min-height: 0;
  }

  .panel-copy p:not(.section-kicker) {
    font-size: 16px;
  }
}
