:root {
  color-scheme:light;
  --bg:#f6f8fc;
  --white:#fff;
  --ink:#111a2e;
  --muted:#64708a;
  --line:#e3e8f1;
  --brand:#d91121;
  --soft:#fdeced;
  --navy:#153a74;
  --green:#14714d;
  --radius:16px;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-size:15px;
  line-height:1.55;
}

a {
  color:var(--navy);
  text-underline-offset:3px;
}

a:hover {
  color:var(--brand);
}

h1,h2,h3,h4,p {
  margin:0 0 .7rem;
}

h1 {
  font-size:clamp(1.8rem,4vw,2.75rem);
  letter-spacing:-.045em;
  line-height:1.08;
}

h2 {
  font-size:1.35rem;
  letter-spacing:-.025em;
}

h3 {
  font-size:1.1rem;
}

h4 {
  font-size:.94rem;
}

button,input,select,textarea {
  font:inherit;
}

button,.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:38px;
  border:1px solid transparent;
  border-radius:9px;
  background:var(--brand);
  color:white;
  font-size:.87rem;
  font-weight:650;
  line-height:1.1;
  padding:9px 14px;
  cursor:pointer;
  text-decoration:none;
}

button:hover,.button:hover {
  filter:brightness(.95);
  color:white;
}

.button.secondary,button.secondary {
  background:var(--white);
  border-color:var(--line);
  color:var(--ink);
}

.button.light {
  background:white;
  color:var(--navy);
}

.small {
  min-height:32px;
  font-size:.78rem;
  padding:7px 10px;
}

button:disabled {
  opacity:.6;
  cursor:default;
}

:focus-visible {
  outline:3px solid #2278e4;
  outline-offset:3px;
}

form {
  margin:0;
}

.inline {
  display:inline-block;
}

.row {
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.between {
  justify-content:space-between;
}

.right {
  text-align:right;
  justify-content:flex-end;
}

.stack {
  display:grid;
  gap:12px;
}

.grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.catalog {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,265px),1fr));
  gap:16px;
}

.card {
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:clamp(14px,2.5vw,24px);
  margin:0 0 14px;
  min-width:0;
}

.card>p:last-child,.card>ul:last-child {
  margin-bottom:0;
}

.page-heading {
  margin:3px 0 26px;
}

.page-heading p,.meta {
  color:var(--muted);
}

.meta {
  font-size:.87rem;
}

.kicker {
  font-weight:700;
  font-size:.78rem;
  color:var(--brand);
  letter-spacing:.045em;
}

.chip {
  display:inline-flex;
  align-items:center;
  color:var(--navy);
  background:#eaf1fb;
  border-radius:20px;
  padding:3px 10px;
  font-size:.75rem;
  font-weight:650;
}

.chip.green {
  color:var(--green);
  background:#e2f7ea;
}

.field {
  display:grid;
  gap:4px;
  min-width:0;
  color:var(--muted);
  font-weight:550;
  font-size:.85rem;
}

.field input,.field textarea,.field select {
  width:100%;
  min-width:0;
  border:1px solid #cfd8e5;
  border-radius:8px;
  padding:8px 10px;
  background:white;
  color:var(--ink);
  font-weight:400;
}

.field textarea {
  resize:vertical;
}

.option {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:.9rem;
  margin:5px 0;
}

.option input {
  accent-color:var(--brand);
}

fieldset {
  border:1px solid var(--line);
  border-radius:9px;
  padding:10px 14px;
  margin:0;
}

legend {
  font-weight:600;
  padding:0 4px;
}

.notice {
  border-radius:8px;
  background:#ebf8f3;
  color:var(--green);
  padding:11px 14px;
  margin-bottom:15px;
}

.notice.error {
  background:var(--soft);
  color:#a21924;
}

.sidebar {
  position:fixed;
  top:0;
  bottom:0;
  left:0;
  width:236px;
  overflow:auto;
  background:white;
  padding:18px 13px;
  border-right:1px solid var(--line);
  z-index:4;
}

.brand {
  display:inline-flex;
  align-items:center;
  min-width:0;
}

.brand-logo {
  display:block;
  width:196px;
  max-width:100%;
  height:auto;
}

.brand-compact {
  display:none;
}

.sidebar>.brand {
  max-width:100%;
  margin:0 4px 14px;
}

.sidebar nav {
  display:grid;
  gap:4px;
}

.sidebar nav a {
  display:flex;
  align-items:center;
  gap:9px;
  padding:8px 11px;
  color:var(--ink);
  text-decoration:none;
  border-radius:9px;
  font-size:.88rem;
}

.sidebar nav a span {
  display:inline-block;
  width:1.15rem;
  text-align:center;
  color:var(--muted);
}

.sidebar nav a:hover,.sidebar nav a.active {
  background:var(--soft);
  color:var(--brand);
}

.sidebar nav b {
  margin-left:auto;
  font-size:.75rem;
}

.workspace {
  margin-left:236px;
}

.topbar {
  position:sticky;
  top:0;
  z-index:3;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  min-height:55px;
  padding:8px 24px;
  border-bottom:1px solid var(--line);
  background:#ffffffed;
  backdrop-filter:blur(8px);
}

.topbar .profile {
  min-width:0;
  font-weight:600;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.menu {
  display:none;
}

.main {
  max-width:1220px;
  margin:auto;
  padding:28px clamp(14px,3vw,32px) 60px;
}

.auth {
  max-width:465px;
  margin:min(10vh,80px) auto;
  padding:20px;
}

.auth-brand {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 18px;
}

.auth-brand .brand {
  background:white;
  border-radius:12px;
}

.auth-brand .brand-logo {
  width:245px;
}

.auth-card {
  box-shadow:0 15px 44px #192e5314;
}

.auth-card h1 {
  font-size:1.85rem;
}

.auth-card form {
  margin:18px 0;
}

.auth-card .right {
  margin:0;
}

.auth-card button {
  justify-self:start;
}

.hero {
  border-radius:var(--radius);
  background:linear-gradient(130deg,#102c58,#2259a0);
  color:white;
  padding:clamp(20px,4vw,38px);
  margin-bottom:24px;
}

.hero .kicker {
  color:#dce9ff;
}

.hero p {
  max-width:68ch;
  color:#eef5ff;
}

.hero .row {
  margin-top:18px;
}

.hero button {
  background:var(--brand);
}

.journey {
  margin-bottom:24px;
  background:#eaf1fb;
  border:1px solid #dbe5f2;
  border-radius:var(--radius);
  padding:19px 24px;
}

.journey ol {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:8px 24px;
  margin-bottom:0;
  padding-left:25px;
}

.meter {
  flex-wrap:nowrap;
  margin:8px 0;
}

.meter progress {
  width:100%;
  height:10px;
  appearance:none;
  border:0;
  border-radius:8px;
  background:#e9eff7;
}

.meter progress::-webkit-progress-bar {
  border-radius:8px;
  background:#e9eff7;
}

.meter progress::-webkit-progress-value {
  border-radius:8px;
  background:var(--navy);
}

.meter progress::-moz-progress-bar {
  background:var(--navy);
  border-radius:8px;
}

.meter span {
  font-size:.82rem;
  font-weight:600;
}

.lines {
  list-style:none;
  padding:0;
}

.lines li {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:7px 0;
  border-bottom:1px solid var(--line);
}

.lines li .meta {
  white-space:nowrap;
}

.video,.document {
  width:100%;
  border-radius:12px;
  display:block;
  border:0;
  margin:0 0 15px;
}

.video {
  aspect-ratio:16/9;
  background:#0c1421;
}

.document {
  min-height:65vh;
}

.markdown {
  overflow-wrap:anywhere;
}

.markdown p {
  margin:0 0 .65em;
}

.markdown code {
  background:#eef2f8;
  padding:1px 4px;
  border-radius:4px;
}

.markdown pre {
  overflow:auto;
  background:#14233d;
  color:white;
  border-radius:9px;
  padding:15px;
}

.markdown pre code {
  background:none;
}

.markdown blockquote {
  border-left:4px solid var(--navy);
  margin:12px 0;
  padding:8px 14px;
  background:#edf4fd;
}

.certificate {
  padding:clamp(20px,7vw,100px);
  border:8px double var(--navy);
  background:white;
  text-align:center;
  margin-top:18px;
}

.certificate h2 {
  font-size:2.2rem;
}

.table-wrap {
  overflow:auto;
}

table {
  border-collapse:collapse;
  width:100%;
  text-align:left;
}

th,td {
  padding:9px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
}

.tabs {
  margin-bottom:14px;
}

.tabs a {
  white-space:nowrap;
}

details>summary {
  font-weight:670;
  cursor:pointer;
}

details[open]>summary {
  margin-bottom:14px;
}

.chat {
  max-height:390px;
  overflow:auto;
}

.message {
  white-space:pre-wrap;
  padding:10px;
  border-radius:8px;
  background:#eef2f8;
}

.message.user {
  background:#e7effa;
  margin-left:20%;
}

.message.assistant {
  margin-right:10%;
}

hr {
  border:0;
  border-top:1px solid var(--line);
  margin:16px 0;
}

@media(max-width:850px) {
  .menu {
    display:inline-flex;
  }
  .brand-compact {
    display:inline-flex;
    flex:0 1 136px;
    margin-right:auto;
  }
  .sidebar {
    width:230px;
    transform:translateX(-101%);
    transition:transform .16s;
  }
  .menu-open .sidebar {
    transform:translateX(0);
    top:54px;
    box-shadow:10px 0 26px #14274422;
  }
  .workspace {
    margin-left:0;
  }
  .topbar {
    padding:8px 14px;
  }
}

@media(max-width:590px) {
  .grid {
    grid-template-columns:1fr;
  }
  .topbar {
    gap:6px;
  }
  .profile {
    max-width:min(90px, 14vw);
  }
  .page-heading {
    margin-bottom:17px;
  }
}

@media print {
  .no-print {
    display:none!important;
  }
  .workspace {
    margin:0;
  }
  body {
    background:white;
  }
  .main {
    padding:0;
  }
  .certificate {
    margin:0;
  }
}
