:root{--wine:#72263d;--ink:#302832;--muted:#695e68;--gold:#e4c894;--paper:#f7f5f2;--line:#e7dfe0}
body{background:var(--paper);color:var(--ink);line-height:1.55;font-family:system-ui,sans-serif}header{background:linear-gradient(120deg,#451a31,#72263d 75%,#963b4f);color:#f9e7c8;padding:18px clamp(14px,4vw,36px);border-bottom:3px solid var(--gold)}.brand-header{display:flex;gap:18px;align-items:center;max-width:1500px;margin:auto}.brand-logo{width:clamp(72px,12vw,116px);height:auto;object-fit:contain;flex-shrink:0}.brand-header h1{font-size:clamp(19px,3vw,30px);color:white;letter-spacing:.01em}section{border:1px solid var(--line);box-shadow:0 3px 14px #3d202707;border-radius:16px}button{background:var(--wine);border:1px solid var(--wine);border-radius:10px;cursor:pointer}button:hover{background:#512034}a{color:var(--wine)}input,select,textarea{border:1px solid #cfc2c6;border-radius:9px;background:white;color:var(--ink)}textarea{font:inherit;padding:10px;max-width:100%;box-sizing:border-box}th{background:#f1e9ea;color:#512034}.layout .sidebar{background:#fff;border-right:1px solid var(--line)}.layout .sidebar a{border-radius:8px;border-bottom:0;color:#512034}.layout .sidebar a:hover{background:#f3e9ec}.honor-card,.recognition-board{background:linear-gradient(140deg,#451a31,#72263d);border-color:#d5b981}.recognition-card{background:#fff9f0;color:#372430;border-color:#e8d4af}.recognition-card strong,.recognition-card small{color:#72263d}.recognition-card img.portrait,.portrait{width:100%;max-width:180px;height:auto;aspect-ratio:3/4;object-fit:cover;border-radius:12px}.news-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:16px}.news-card,.editor-card{border:1px solid var(--line);border-radius:14px;background:white;overflow:hidden;min-width:0;padding:14px}.news-card{padding:0}.news-card img,.banner-preview{width:100%;aspect-ratio:16/9;object-fit:cover;display:block}.banner-preview{max-width:360px}.news-card div{padding:16px}.news-card h3{margin:0;color:var(--wine)}.news-card p{white-space:pre-wrap;overflow-wrap:anywhere}.news-body{display:flex;flex-direction:column}.editor-card label{display:block}.portal-entry a{background:var(--wine);color:#fff;border-color:var(--wine)}@media(max-width:600px){.brand-header{gap:10px}.brand-header h1{line-height:1.35}.news-grid{grid-template-columns:1fr}.editor-card{padding:12px}}

:root {
  --wine: #2456a1;
  --ink: #203148;
  --muted: #51657b;
  --paper: #f4f8fd;
  --line: #dbe5f0;
  --gold: #caa657;
}

body {
  --wine-dark: #173a6a;
  --soft: #eaf2fe;
  --focus: #2456a1;
}

header {
  background: linear-gradient(110deg, #2456a1, #3477c4);
  color: #fff;
  box-shadow: 0 3px 12px #173a6a26;
}

.brand-header h1 { color: #fff; }

button:hover,
.portal-entry a:hover { background: #1b437e; }

.layout .sidebar a { color: #284469; }
.layout .sidebar a:hover { background: #eff5ff; }
.layout .sidebar a[aria-current=page] {
  background: #e5efff;
  color: #173a6a;
}

section { box-shadow: 0 4px 18px #173a6a0b; }
table th { background: #e8f1fc; color: #173a6a; }
body tbody tr:nth-child(even) { background: #f7faff; }
body .metric { background: #f6faff; }
body .tree-canvas .root-scores span { background: #eaf2fe; }
body .signup-code-preview { background: #eef5ff; }

td[style="color:green"] {
  color: #17643e !important;
  background: #e9f8ee;
  font-weight: 700;
}

/* Typography and spacing for the header, navigation and portal entrance. */
header {
  padding-block: clamp(14px, 2vw, 24px);
}

.brand-header {
  gap: clamp(12px, 2vw, 24px);
}

.brand-header h1 {
  margin: 0 0 3px;
  font-size: clamp(22px, 2.6vw, 36px);
  font-weight: 750;
  line-height: 1.25;
}

.brand-header > div {
  font-size: clamp(13px, 1.15vw, 16px);
  line-height: 1.55;
}

.layout .sidebar nav a {
  font-size: 16px;
  line-height: 1.45;
}

.top-actions a,
.top-actions button {
  font-size: 15px;
  line-height: 1.45;
}

section:has(> .portal-entry) {
  padding: clamp(20px, 3vw, 34px);
}

section:has(> .portal-entry) > h2 {
  margin: 0 0 18px;
  color: #173a6a;
  font-size: clamp(23px, 2.1vw, 30px);
  line-height: 1.35;
}

.portal-entry {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 22px);
}

.portal-entry a {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 12px 16px;
  font-size: clamp(17px, 1.55vw, 21px);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  .portal-entry {
    grid-template-columns: 1fr;
  }

  .portal-entry a {
    min-height: 54px;
  }
}

.member-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(245px, 330px);
  gap: clamp(16px, 3vw, 32px);
  align-items: start;
}

.member-details { min-width: 0; }
.member-password { display: inline-block; margin: 0 0 14px; }
.member-details p { margin: 0 0 10px; }

.member-details .member-rank {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #173a6a;
  font-weight: 700;
}

.member-honor .honor-card {
  margin: 0;
  background: linear-gradient(145deg, #173a6a, #2456a1);
  border-color: #caa657;
}

@media (max-width: 900px) {
  .member-overview { grid-template-columns: minmax(0, 1fr); }
  .member-honor { width: min(100%, 380px); }
}

/* Keep the member summary and honor card together in the content area. */
section.member-overview {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  padding: clamp(16px, 3vw, 32px);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(16px, 3vw, 32px);
}

.member-details {
  padding: clamp(14px, 2.2vw, 24px);
  border: 1px solid #dbe5f0;
  border-radius: 14px;
  background: #f6faff;
  overflow-wrap: anywhere;
}

.member-details > h2:first-of-type {
  color: #173a6a;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.25;
}

.member-details > h2:nth-of-type(2) {
  margin: 16px 0 10px;
  font-size: clamp(21px, 2.25vw, 28px);
}

.member-details p {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.55;
}

.member-details .member-rank .rank-badge {
  width: clamp(56px, 6vw, 76px);
  height: auto;
}

.member-honor {
  width: 100%;
  min-width: 0;
}

.member-honor .honor-card {
  padding: clamp(16px, 2.4vw, 26px);
}

.member-honor .honor-target {
  display: block;
  width: min(105px, 100%);
  height: auto;
  margin: 10px auto;
}

.member-honor .honor-numbers {
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
}

@media (max-width: 900px) {
  section.member-overview {
    max-width: 640px;
    grid-template-columns: minmax(0, 1fr);
  }
  .member-honor { max-width: 420px; justify-self: center; }
}
