/* ============================================================
   Max Guru — light minimal design system (v1)
   iOS-native feel: system font, bottom tab bar, grouped cards.
   ============================================================ */

:root {
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #F1F3F6;
  --border: #E9ECF0;
  --text: #16181D;
  --text-2: #667085;
  --text-3: #98A2B3;

  --accent: #F4530B;
  --accent-strong: #DE4206;
  --accent-soft: #FEEFE6;
  --on-accent: #FFFFFF;

  --green: #12915B;  --green-soft: #E7F7EF;
  --red: #D92D20;    --red-soft: #FEECEB;
  --blue: #175CD3;   --blue-soft: #EBF1FC;
  --amber: #B54708;  --amber-soft: #FEF4E6;

  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-pop: 0 8px 30px rgba(16, 24, 40, .12);

  --appbar-h: 52px;
  --tabbar-h: 58px;
  --side-w: 236px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
svg { display: block; }

h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; }

::selection { background: var(--accent-soft); }

/* ============================== app shell ============================== */

.appbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  height: calc(var(--appbar-h) + var(--sat));
  padding-top: var(--sat);
  display: flex; align-items: center; justify-content: center;
  background: rgba(246, 247, 249, .85);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.appbar.scrolled { border-bottom-color: var(--border); }
.appbar-title {
  font-size: 16.5px; font-weight: 650; letter-spacing: -.01em;
  max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.appbar-back, .appbar-action {
  position: absolute; bottom: 0; height: var(--appbar-h);
  display: flex; align-items: center; gap: 2px;
  color: var(--accent); font-size: 15px; font-weight: 550; padding: 0 12px;
}
.appbar-back { left: 2px; }
.appbar-back svg { width: 22px; height: 22px; }
.appbar-action { right: 6px; }
.appbar-back:active, .appbar-action:active { opacity: .55; }

.content {
  padding: calc(var(--appbar-h) + var(--sat) + 10px) 16px calc(var(--tabbar-h) + var(--sab) + 26px);
}
.page { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.page.wide { max-width: 900px; }

/* ---------- bottom tab bar (mobile) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tabbar-h) + var(--sab));
  padding: 6px 8px calc(var(--sab) + 4px);
  display: flex; align-items: stretch; justify-content: space-around;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--border);
}
.tab {
  flex: 1; max-width: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); font-size: 10px; font-weight: 550; letter-spacing: .01em;
  border-radius: 12px; position: relative;
  transition: color .2s;
}
.tab svg { width: 24px; height: 24px; transition: transform .25s var(--ease); }
.tab.on { color: var(--accent); }
.tab.on svg { transform: translateY(-1px) scale(1.06); }
.tab:active svg { transform: scale(.9); }
.tab .badge { position: absolute; top: 0; left: calc(50% + 6px); }

.no-tabs .tabbar { display: none; }
.no-tabs .content { padding-bottom: calc(var(--sab) + 16px); }
.no-bars .appbar { display: none; }
.no-bars .content { padding-top: calc(var(--sat) + 14px); }

/* ---------- desktop sidebar ---------- */
.side { display: none; }

@media (min-width: 900px) {
  .tabbar { display: none; }
  .side {
    display: flex; flex-direction: column;
    position: fixed; top: 0; bottom: 0; left: 0; width: var(--side-w); z-index: 50;
    background: var(--surface); border-right: 1px solid var(--border);
    padding: 20px 12px 16px;
    overflow-y: auto;
  }
  .appbar, .content { left: var(--side-w); }
  .appbar { padding-left: 0; }
  .content { margin-left: var(--side-w); padding-bottom: 48px; }
  .no-side .content { margin-left: 0; }
  .no-side .appbar { left: 0; }
}

.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.side-brand .mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #FF8A4C);
  color: #fff; font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center; letter-spacing: -.03em;
}
.side-brand b { font-size: 16px; letter-spacing: -.02em; }
.side-label { font-size: 11px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 14px 10px 6px; }
.side a.srow {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  color: var(--text-2); font-size: 14px; font-weight: 520;
  transition: background .15s, color .15s;
}
.side a.srow svg { width: 20px; height: 20px; }
.side a.srow:hover { background: var(--surface-2); color: var(--text); }
.side a.srow.on { background: var(--accent-soft); color: var(--accent); font-weight: 620; }
.side a.srow .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }

/* ============================== cards & lists ============================== */

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(16, 24, 40, .03);
}
.card.pad { padding: 16px; }
.card-title { font-size: 15px; font-weight: 650; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.card-title > svg { width: 18px; height: 18px; color: var(--text-2); }
.card-title .spacer { flex: 1; }
.sec-label {
  font-size: 12px; font-weight: 650; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .06em;
  padding: 6px 4px 0;
}

.list { overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; min-height: 56px;
  transition: background .15s;
}
.row + .row { border-top: 1px solid var(--border); }
a.row:active, button.row:active { background: var(--surface-2); }
.row-ic {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text-2);
}
.row-ic svg { width: 20px; height: 20px; }
.row-ic.accent { background: var(--accent-soft); color: var(--accent); }
.row-ic.green  { background: var(--green-soft);  color: var(--green); }
.row-ic.blue   { background: var(--blue-soft);   color: var(--blue); }
.row-ic.red    { background: var(--red-soft);    color: var(--red); }
.row-ic.amber  { background: var(--amber-soft);  color: var(--amber); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-t { font-size: 15px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-s { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-s svg, .row-t svg { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.row-end { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 14px; flex-shrink: 0; }
.row-end svg { width: 18px; height: 18px; }

/* ============================== buttons ============================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 48px; padding: 0 20px;
  background: var(--accent); color: var(--on-accent);
  border-radius: 12px; font-size: 15px; font-weight: 620; letter-spacing: -.01em;
  transition: transform .15s var(--ease), background .15s, opacity .15s;
  user-select: none; -webkit-user-select: none;
}
.btn svg { width: 19px; height: 19px; }
.btn:active { transform: scale(.965); }
.btn:hover { background: var(--accent-strong); }
.btn.secondary { background: var(--surface-2); color: var(--text); }
.btn.secondary:hover { background: var(--border); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.danger:hover { background: #fbdcda; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn.sm svg { width: 16px; height: 16px; }
.btn.full { width: 100%; }
.btn.pill { border-radius: 999px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ============================== stats ============================== */

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stats.c3 { grid-template-columns: repeat(3, 1fr); }
.stats.c4 { grid-template-columns: repeat(4, 1fr); }
.stat {
  background: var(--surface); border-radius: var(--r-md);
  box-shadow: var(--shadow-card); border: 1px solid rgba(16, 24, 40, .03);
  padding: 14px; display: flex; flex-direction: column; gap: 2px;
}
.stat-v { font-size: 24px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 12px; color: var(--text-2); font-weight: 520; }
.stat.accent .stat-v { color: var(--accent); }
.stat.green  .stat-v { color: var(--green); }
.stat.blue   .stat-v { color: var(--blue); }
.stat.amber  .stat-v { color: var(--amber); }

/* ============================== progress ============================== */

.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: var(--accent);
  transition: width .9s var(--ease);
}
.bar.green i { background: var(--green); }
.bar.blue i  { background: var(--blue); }
.bar.amber i { background: var(--amber); }
.bar.thin { height: 5px; }

.ring { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.6; }
.ring .tr { stroke: var(--border); }
.ring .pr {
  stroke: var(--accent); stroke-linecap: round;
  stroke-dasharray: 100 100; stroke-dashoffset: 100;
  transition: stroke-dashoffset 1s var(--ease);
}
.ring.green .pr { stroke: var(--green); }
.ring.blue .pr  { stroke: var(--blue); }
.ring.amber .pr { stroke: var(--amber); }
.ring-v {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.ring.lg { width: 88px; height: 88px; } .ring.lg .ring-v { font-size: 18px; }
.ring.sm { width: 48px; height: 48px; } .ring.sm .ring-v { font-size: 11px; }

/* ============================== badges & chips ============================== */

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--red); color: #fff;
  border-radius: 999px; font-size: 11px; font-weight: 700;
}
.badge.green, .badge.gray, .badge.accent, .badge.blue, .badge.amber {
  height: auto; min-width: 0; padding: 3px 9px; font-size: 11.5px; font-weight: 620;
}
.badge.green  { background: var(--green-soft);  color: var(--green); }
.badge.gray   { background: var(--surface-2);   color: var(--text-2); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.blue   { background: var(--blue-soft);   color: var(--blue); }
.badge.amber  { background: var(--amber-soft);  color: var(--amber); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 8px 15px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13.5px; font-weight: 550;
  transition: all .15s;
}
.chip:active { transform: scale(.96); }
.chip.on { background: var(--text); border-color: var(--text); color: #fff; }

.seg { display: flex; background: var(--surface-2); border-radius: 11px; padding: 2.5px; }
.seg > * {
  flex: 1; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 570; color: var(--text-2);
  transition: all .2s var(--ease); text-align: center;
}
.seg > .on { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(16, 24, 40, .1); }

/* ============================== forms ============================== */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > label { font-size: 13px; font-weight: 570; color: var(--text-2); }
.field input, .field select, .field textarea,
.field .form-input, .field .form-select, .field .form-textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--surface-2); border: 1.5px solid transparent; border-radius: 12px;
  font: inherit; font-size: 16px; color: var(--text);
  outline: none; appearance: none; -webkit-appearance: none;
  transition: border-color .15s, background .15s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  background: var(--surface); border-color: var(--accent);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2398A2B3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 40px;
}
.field .hint { font-size: 12px; color: var(--text-3); }
.field .err { font-size: 12.5px; color: var(--red); font-weight: 500; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.frow .field { margin-bottom: 14px; }

.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14.5px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i {
  flex-shrink: 0; width: 50px; height: 30px; border-radius: 999px;
  background: #E2E6EA; position: relative;
  transition: background .25s;
}
.switch i::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(16, 24, 40, .25);
  transition: transform .25s var(--ease);
}
.switch input:checked + i { background: #34C759; }
.switch input:checked + i::after { transform: translateX(20px); }

/* ============================== misc ============================== */

.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.avatar.txt { font-size: 15px; font-weight: 650; color: var(--accent); }
.avatar.sm { width: 32px; height: 32px; font-size: 16px; }
.avatar.sm.txt { font-size: 12px; }
.avatar.lg { width: 64px; height: 64px; font-size: 32px; }
.avatar.lg.txt { font-size: 24px; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 36px 20px; gap: 4px; }
.empty svg { width: 40px; height: 40px; color: var(--text-3); margin-bottom: 8px; }
.empty-t { font-size: 15px; font-weight: 620; }
.empty-s { font-size: 13.5px; color: var(--text-2); max-width: 280px; }

.divider { height: 1px; background: var(--border); border: 0; }

.ic-sm svg { width: 16px; height: 16px; }
.ic-lg svg { width: 28px; height: 28px; }

img.rounded { border-radius: 12px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.table th {
  text-align: left; font-size: 11.5px; font-weight: 650; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .05em;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
}
table.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.table tr:last-child td { border-bottom: 0; }

/* ============================== toasts ============================== */

.toasts {
  position: fixed; top: calc(var(--sat) + 10px); left: 16px; right: 16px; z-index: 100;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  max-width: 420px; padding: 12px 18px;
  background: rgba(22, 24, 29, .94); color: #fff;
  border-radius: 999px; font-size: 14px; font-weight: 530;
  box-shadow: var(--shadow-pop);
  animation: toastIn .35s var(--ease) both;
}
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.ok svg { color: #4ADE80; }
.toast.err svg { color: #F87171; }
.toast.out { animation: toastOut .3s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(.97); } }

/* ============================== bottom sheet ============================== */

.sheet {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(16, 24, 40, .45);
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet.open { opacity: 1; pointer-events: auto; }
.sheet-card {
  width: 100%; max-width: 620px; max-height: 86vh; overflow-y: auto;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(var(--sab) + 20px);
  transform: translateY(100%);
  transition: transform .35s var(--ease);
}
.sheet.open .sheet-card { transform: none; }
.sheet-card::before {
  content: ''; display: block; width: 40px; height: 4.5px; border-radius: 999px;
  background: var(--border); margin: 4px auto 14px;
}

/* ============================== animations ============================== */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.anim > * { animation: fadeUp .5s var(--ease) both; }
.anim > *:nth-child(1) { animation-delay: .02s; }
.anim > *:nth-child(2) { animation-delay: .06s; }
.anim > *:nth-child(3) { animation-delay: .10s; }
.anim > *:nth-child(4) { animation-delay: .14s; }
.anim > *:nth-child(5) { animation-delay: .18s; }
.anim > *:nth-child(6) { animation-delay: .22s; }
.anim > *:nth-child(7) { animation-delay: .26s; }
.anim > *:nth-child(8) { animation-delay: .30s; }
.anim > *:nth-child(9) { animation-delay: .34s; }
.anim > *:nth-child(n+10) { animation-delay: .38s; }

@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton {
  border-radius: var(--r-sm); min-height: 16px;
  background: linear-gradient(90deg, var(--surface-2) 25%, #E7EAEF 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.pop { animation: pop .35s var(--ease); }

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

/* ============================== hub chooser cards ============================== */

.hub-card { display: block; }
.hub-card.preferred { border: 1.5px solid var(--accent); box-shadow: 0 6px 20px rgba(244, 83, 11, .1); }
.hub-card .between > .flex { min-width: 0; flex: 1; }
.hub-card .between > .badge { flex-shrink: 0; }
.hub-card .row-t, .hub-card .row-s { white-space: normal; }

/* ============================== auth screens ============================== */

.auth-wrap {
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--sat) + 24px) 20px calc(var(--sab) + 24px);
}
.auth-card { width: 100%; max-width: 400px; }
.auth-logo {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--accent), #FF8A4C);
  color: #fff; font-size: 28px; font-weight: 800; letter-spacing: -.04em;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(244, 83, 11, .3);
}
.auth-title { text-align: center; font-size: 24px; margin-bottom: 4px; }
.auth-sub { text-align: center; font-size: 14.5px; color: var(--text-2); margin-bottom: 24px; }
.auth-foot { text-align: center; font-size: 14px; color: var(--text-2); margin-top: 20px; }
.auth-foot a { color: var(--accent); font-weight: 600; }

/* ============================== trainer directory ============================== */

input.code-input {
  min-height: 48px; padding: 12px 14px; width: 100%;
  background: var(--surface-2); border: 1.5px solid transparent; border-radius: 12px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 17px; letter-spacing: .12em; text-align: center; color: var(--text);
  outline: none; transition: border-color .15s, background .15s;
}
input.code-input:focus { background: var(--surface); border-color: var(--accent); }
input.code-input::placeholder { color: var(--text-3); letter-spacing: .12em; }

.feat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) {
  .feat-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px; scrollbar-width: none; }
  .feat-row::-webkit-scrollbar { display: none; }
  .feat-row .feat-card { flex: 0 0 72%; scroll-snap-align: center; }
}
.feat-card {
  position: relative; display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 18px 14px 14px; gap: 2px;
}
.feat-card.first { border: 1.5px solid var(--accent); box-shadow: 0 6px 20px rgba(244, 83, 11, .12); }
.feat-medal { position: absolute; top: 10px; left: 12px; font-size: 20px; }
.feat-name { font-size: 15px; font-weight: 680; margin-top: 8px; }
.feat-title { font-size: 12.5px; color: var(--accent); font-weight: 600; }
.feat-bio { font-size: 12px; color: var(--text-2); margin-top: 4px; }

.code-display {
  display: flex; align-items: center; justify-content: center;
  padding: 14px; border: 1.5px dashed var(--border); border-radius: 12px;
  background: var(--surface-2);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 22px; font-weight: 650; letter-spacing: .14em; color: var(--text);
  user-select: all; -webkit-user-select: all;
}

/* ============================== helpers ============================== */

.flex { display: flex; align-items: center; gap: 10px; }
.flex .grow { flex: 1; min-width: 0; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.center { text-align: center; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; color: var(--text-3); }
.mt0 { margin-top: 0 !important; } .mb0 { margin-bottom: 0 !important; }
.gap4 { gap: 4px; } .gap6 { gap: 6px; } .gap16 { gap: 16px; }
.accent-t { color: var(--accent); } .green-t { color: var(--green); }
.red-t { color: var(--red); } .blue-t { color: var(--blue); } .amber-t { color: var(--amber); }
.w600 { font-weight: 600; } .w700 { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
