/* ==========================================================================
   Foodtech Pathshala · Hackathons — design system
   Self-contained (no Tailwind dependency). Served via /hackathon/?r=asset/hk.css
   Brand: magenta #a53692 · ink #101828 · Plus Jakarta Sans
   ========================================================================== */

/* ── 1. Tokens ─────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;

  --brand-25:  #fefafd;
  --brand-50:  #fdf2fa;
  --brand-100: #fbe4f5;
  --brand-200: #f5c8ea;
  --brand-300: #eaa0d8;
  --brand-500: #c04aac;
  --brand-600: #a53692;
  --brand-700: #8a2b7a;
  --brand-800: #6f2463;
  --brand-900: #3f1238;

  --n-0:   #ffffff;
  --n-25:  #fcfcfd;
  --n-50:  #f8f9fb;
  --n-100: #f2f4f7;
  --n-200: #e4e7ec;
  --n-300: #d0d5dd;
  --n-400: #98a2b3;
  --n-500: #667085;
  --n-600: #475467;
  --n-700: #344054;
  --n-800: #1d2939;
  --n-900: #101828;

  --success-50: #ecfdf3; --success-200: #abefc6; --success-600: #079455; --success-700: #067647;
  --warning-50: #fffaeb; --warning-200: #fedf89; --warning-600: #dc6803; --warning-700: #b54708;
  --danger-50:  #fef3f2; --danger-200:  #fecdca; --danger-600:  #d92d20; --danger-700:  #b42318;
  --info-50:    #eff8ff; --info-200:    #b2ddff; --info-600:    #1570ef; --info-700:    #175cd3;

  --bg: var(--n-50);
  --surface: var(--n-0);
  --ink: var(--n-900);
  --text: var(--n-700);
  --muted: var(--n-600);
  --subtle: var(--n-500);
  --line: var(--n-200);
  --line-strong: var(--n-300);

  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --fs-xs: .75rem;     /* 12 */
  --fs-sm: .8125rem;   /* 13 */
  --fs-base: .9375rem; /* 15 */
  --fs-md: 1rem;       /* 16 */
  --fs-lg: 1.125rem;   /* 18 */
  --fs-xl: 1.25rem;    /* 20 */
  --fs-2xl: 1.5rem;    /* 24 */
  --fs-3xl: 1.875rem;  /* 30 */
  --fs-4xl: 2.25rem;   /* 36 */

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px;

  --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 999px;

  --sh-xs: 0 1px 2px rgba(16,24,40,.05);
  --sh-sm: 0 1px 3px rgba(16,24,40,.07), 0 1px 2px rgba(16,24,40,.04);
  --sh-md: 0 10px 24px -8px rgba(16,24,40,.12), 0 2px 6px -2px rgba(16,24,40,.05);
  --sh-lg: 0 24px 48px -16px rgba(16,24,40,.20);
  --ring: 0 0 0 4px rgba(165,54,146,.16);

  --ease: cubic-bezier(.2,.8,.2,1);
  --t-fast: 120ms; --t: 180ms;

  --header-h: 64px;
}

/* ── 2. Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: var(--fs-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -.015em; font-weight: 700; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
img, svg, iframe { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
b, strong { font-weight: 700; color: var(--ink); }
::selection { background: var(--brand-100); color: var(--brand-900); }
:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }
[hidden] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s-4); top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: var(--s-2) var(--s-4); border-radius: var(--r-sm); font-weight: 600; transition: top var(--t) var(--ease); }
.skip-link:focus { top: var(--s-3); }

/* ── 3. Layout primitives ─────────────────────────────────────────────── */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--s-4); }
.wrap-sm { max-width: 480px; }
.wrap-md { max-width: 760px; }
@media (min-width: 640px) { .wrap { padding: 0 var(--s-6); } }
@media (min-width: 1024px) { .wrap { padding: 0 var(--s-8); } }

.page { flex: 1 0 auto; padding: var(--s-8) 0 var(--s-16); }
.page--flush { padding-top: 0; }

.stack   > * + * { margin-top: var(--s-4); }
.stack-2 > * + * { margin-top: var(--s-2); }
.stack-3 > * + * { margin-top: var(--s-3); }
.stack-5 > * + * { margin-top: var(--s-5); }
.stack-6 > * + * { margin-top: var(--s-6); }

.row { display: flex; align-items: center; gap: var(--s-3); }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.row-end { display: flex; justify-content: flex-end; gap: var(--s-3); flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.ml-auto { margin-left: auto; }

.grid { display: grid; gap: var(--s-5); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--s-5); grid-template-columns: minmax(0,1fr); }
.gap-3 { gap: var(--s-3) !important; }
.gap-4 { gap: var(--s-4) !important; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .span-2 { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

/* main + sidebar */
.layout { display: grid; gap: var(--s-6); grid-template-columns: minmax(0,1fr); align-items: start; }
@media (min-width: 1024px) {
  .layout { grid-template-columns: minmax(0,1fr) 340px; gap: var(--s-8); }
  .layout__aside { position: sticky; top: calc(var(--header-h) + var(--s-6)); }
}

/* ── 4. Typography helpers ────────────────────────────────────────────── */
.eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-600); }
.h-display { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.06; }
.h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 800; letter-spacing: -.02em; }
.h2 { font-size: var(--fs-xl); font-weight: 700; }
.h3 { font-size: var(--fs-md); font-weight: 700; }
.lead { font-size: var(--fs-md); color: var(--muted); line-height: 1.65; max-width: 62ch; }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.ink { color: var(--ink); }
.brand { color: var(--brand-600); }
.danger-text { color: var(--danger-700); }
.success-text { color: var(--success-700); }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; } .fw-800 { font-weight: 800; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prose { color: var(--text); line-height: 1.75; white-space: pre-line; max-width: 72ch; overflow-wrap: anywhere; }
.center { text-align: center; }
.right { text-align: right; }
.link { color: var(--brand-600); font-weight: 600; text-underline-offset: 3px; transition: color var(--t-fast); }
.link:hover { color: var(--brand-700); text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); font-weight: 600; color: var(--muted); padding: var(--s-1) 0; transition: color var(--t-fast); }
.back-link:hover { color: var(--ink); }
.back-link i { font-size: 11px; transition: transform var(--t) var(--ease); }
.back-link:hover i { transform: translateX(-2px); }

.mt-1 { margin-top: var(--s-1); } .mt-2 { margin-top: var(--s-2); } .mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); } .mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); } .mt-10 { margin-top: var(--s-10); } .mt-12 { margin-top: var(--s-12); }
.mb-1 { margin-bottom: var(--s-1); } .mb-2 { margin-bottom: var(--s-2); } .mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); } .mb-5 { margin-bottom: var(--s-5); } .mb-6 { margin-bottom: var(--s-6); } .mb-8 { margin-bottom: var(--s-8); }

/* ── 5. Buttons ───────────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--n-700); --btn-bd: var(--line-strong);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 40px; padding: 0 var(--s-4); border-radius: var(--r-md);
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  font-size: var(--fs-sm); font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none;
  box-shadow: var(--sh-xs); cursor: pointer; user-select: none;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:hover { background: var(--n-50); color: var(--ink); border-color: var(--n-300); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--brand-500); }
.btn i { font-size: .95em; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; box-shadow: none; }

.btn-primary { --btn-bg: var(--brand-600); --btn-fg: #fff; --btn-bd: var(--brand-600); box-shadow: 0 1px 2px rgba(16,24,40,.08), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.btn-dark { --btn-bg: var(--n-900); --btn-fg: #fff; --btn-bd: var(--n-900); }
.btn-dark:hover { background: var(--n-800); border-color: var(--n-800); color: #fff; }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--n-100); border-color: transparent; }
.btn-danger { --btn-fg: var(--danger-700); --btn-bd: var(--danger-200); }
.btn-danger:hover { background: var(--danger-50); color: var(--danger-700); border-color: var(--danger-200); }
.btn-danger-solid { --btn-bg: var(--danger-600); --btn-fg: #fff; --btn-bd: var(--danger-600); }
.btn-danger-solid:hover { background: var(--danger-700); border-color: var(--danger-700); color: #fff; }
.btn-light { --btn-bg: #fff; --btn-fg: var(--brand-700); --btn-bd: #fff; }
.btn-light:hover { background: var(--brand-50); color: var(--brand-800); border-color: var(--brand-50); }

.btn-sm { min-height: 32px; padding: 0 var(--s-3); font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn-lg { min-height: 48px; padding: 0 var(--s-6); font-size: var(--fs-base); border-radius: var(--r-md); }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }

.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: rgba(255,255,255,.5); border-top-color: #fff;
  animation: hk-spin .7s linear infinite;
}
.btn:not(.btn-primary):not(.btn-dark):not(.btn-danger-solid).is-loading::after { border-color: var(--n-300); border-top-color: var(--n-700); }
@keyframes hk-spin { to { transform: rotate(360deg); } }

.text-btn { background: none; border: 0; padding: var(--s-1) 0; font-size: var(--fs-sm); font-weight: 600; color: var(--brand-600); cursor: pointer; border-radius: var(--r-sm); }
.text-btn:hover { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; }
.text-btn.muted { color: var(--muted); }
.text-btn.muted:hover { color: var(--ink); }
.text-btn[disabled] { color: var(--n-400); cursor: not-allowed; text-decoration: none; }

/* ── 6. Forms ─────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: var(--fs-sm); font-weight: 600; color: var(--n-700); }
.label .req { color: var(--danger-600); margin-left: 2px; }
.label .opt { color: var(--subtle); font-weight: 500; }
.help { font-size: var(--fs-xs); color: var(--subtle); line-height: 1.5; }
.field-error { font-size: var(--fs-xs); color: var(--danger-700); font-weight: 500; }

.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  font-size: var(--fs-base); line-height: 1.4; box-shadow: var(--sh-xs);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  appearance: none; -webkit-appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--n-400); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--n-400); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: var(--ring); }
.input:disabled, .select:disabled, .textarea:disabled, .input[readonly] { background: var(--n-50); color: var(--muted); cursor: not-allowed; box-shadow: none; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger-600); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(217,45,32,.14); }
.textarea { min-height: 112px; resize: vertical; line-height: 1.6; }
.select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%23667085' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.67' d='m5 7.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.input-sm, .select.input-sm { min-height: 36px; padding: 6px 10px; font-size: var(--fs-sm); }
.select.input-sm { padding-right: 34px; background-position: right 8px center; }
.input-otp { text-align: center; font-size: var(--fs-2xl); font-weight: 700; letter-spacing: .5em; padding-left: calc(14px + .5em); font-variant-numeric: tabular-nums; }

.input-group { display: flex; align-items: stretch; }
.input-group__addon {
  display: inline-flex; align-items: center; padding: 0 14px; background: var(--n-50);
  border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r-md) 0 0 var(--r-md);
  color: var(--muted); font-weight: 600; font-size: var(--fs-sm);
}
.input-group .input { border-radius: 0 var(--r-md) var(--r-md) 0; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }
.input-wrap__btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; border-radius: var(--r-sm); color: var(--subtle); }
.input-wrap__btn:hover { color: var(--ink); background: var(--n-100); }

.check { display: inline-flex; align-items: flex-start; gap: var(--s-3); cursor: pointer; font-size: var(--fs-sm); color: var(--n-700); line-height: 1.45; }
.check input { margin: 0; margin-top: 1px; width: 18px; height: 18px; accent-color: var(--brand-600); flex-shrink: 0; cursor: pointer; }
.check small { display: block; color: var(--subtle); font-size: var(--fs-xs); }
.choice-list { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.choice {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 40px; padding: 0 var(--s-4);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface);
  font-size: var(--fs-sm); font-weight: 500; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast);
}
.choice:hover { border-color: var(--n-400); }
.choice input { accent-color: var(--brand-600); width: 16px; height: 16px; margin: 0; }
.choice:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-800); }

/* toggle switch */
.switch { display: inline-flex; align-items: center; gap: var(--s-3); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--n-300); transition: background var(--t) var(--ease); flex-shrink: 0; }
.switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-sm); transition: transform var(--t) var(--ease); }
.switch input:checked + .switch__track { background: var(--brand-600); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--ring); }

/* file drop */
.dropzone {
  position: relative; display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-5); border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg);
  background: var(--n-25); transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--brand-500); background: var(--brand-25); }
.dropzone:focus-within { border-color: var(--brand-500); box-shadow: var(--ring); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone__icon { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--brand-600); font-size: 18px; flex-shrink: 0; box-shadow: var(--sh-xs); }
.dropzone__title { font-weight: 600; color: var(--ink); font-size: var(--fs-sm); }
.dropzone__title span { color: var(--brand-600); }
.dropzone__meta { font-size: var(--fs-xs); color: var(--subtle); margin-top: 2px; }
.dropzone.has-file { border-style: solid; border-color: var(--success-200); background: var(--success-50); }
.dropzone.has-file .dropzone__icon { color: var(--success-700); }
.dropzone.is-invalid { border-color: var(--danger-600); background: var(--danger-50); }

.form-section { padding: var(--s-6); }
.form-section + .form-section { border-top: 1px solid var(--line); }
.form-section__head { margin-bottom: var(--s-5); }
.form-section__title { font-size: var(--fs-md); font-weight: 700; color: var(--ink); }
.form-section__desc { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
@media (min-width: 900px) {
  .form-section--split { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: var(--s-8); }
  .form-section--split .form-section__head { margin-bottom: 0; }
}

/* ── 7. Surfaces ──────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-xs); }
.card-pad { padding: var(--s-6); }
.card-pad-sm { padding: var(--s-4) var(--s-5); }
@media (max-width: 639px) { .card-pad { padding: var(--s-5); } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-6); border-bottom: 1px solid var(--line); }
.card-title { font-size: var(--fs-md); font-weight: 700; color: var(--ink); }
.card-sub { font-size: var(--fs-sm); color: var(--muted); }
.card-foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-3); padding: var(--s-4) var(--s-6); border-top: 1px solid var(--line); background: var(--n-25); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.card-link { display: block; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease); }
.card-link:hover { border-color: var(--n-300); box-shadow: var(--sh-md); transform: translateY(-2px); }
.card-link:focus-visible { outline: none; box-shadow: var(--ring), var(--sh-md); border-color: var(--brand-500); }
.section-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); margin-bottom: var(--s-3); }
.divider { height: 1px; background: var(--line); border: 0; margin: var(--s-5) 0; }

/* key/value list */
.kv { display: grid; }
.kv__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--n-100); font-size: var(--fs-sm); }
.kv__row:last-child { border-bottom: 0; }
.kv__row:first-child { padding-top: 0; }
.kv__k { color: var(--muted); flex-shrink: 0; }
.kv__v { color: var(--ink); font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* ── 8. Badges & alerts ───────────────────────────────────────────────── */
.badge {
  --b-bg: var(--n-100); --b-fg: var(--n-700); --b-dot: var(--n-400);
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: var(--r-full); background: var(--b-bg); color: var(--b-fg);
  font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; line-height: 1;
}
.badge--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--b-dot); }
.badge--success { --b-bg: var(--success-50); --b-fg: var(--success-700); --b-dot: var(--success-600); }
.badge--warning { --b-bg: var(--warning-50); --b-fg: var(--warning-700); --b-dot: var(--warning-600); }
.badge--danger  { --b-bg: var(--danger-50);  --b-fg: var(--danger-700);  --b-dot: var(--danger-600); }
.badge--info    { --b-bg: var(--info-50);    --b-fg: var(--info-700);    --b-dot: var(--info-600); }
.badge--brand   { --b-bg: var(--brand-50);   --b-fg: var(--brand-700);   --b-dot: var(--brand-600); }
.badge--neutral { --b-bg: var(--n-100); --b-fg: var(--n-700); --b-dot: var(--n-400); }
.badge--glass { --b-bg: rgba(255,255,255,.16); --b-fg: #fff; --b-dot: #fff; backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.badge--glass.badge--success { --b-dot: #6ce9a6; }
.badge--live::before { animation: hk-pulse 2s ease-in-out infinite; }
@keyframes hk-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(7,148,85,.5); } 50% { box-shadow: 0 0 0 4px rgba(7,148,85,0); } }

.alert {
  --a-bg: var(--info-50); --a-bd: var(--info-200); --a-fg: var(--info-700);
  display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) var(--s-4);
  border: 1px solid var(--a-bd); background: var(--a-bg); color: var(--a-fg);
  border-radius: var(--r-md); font-size: var(--fs-sm); line-height: 1.5;
}
.alert > i { margin-top: 3px; flex-shrink: 0; }
.alert__body { flex: 1; min-width: 0; }
.alert__title { font-weight: 700; color: inherit; }
.alert__close { background: none; border: 0; color: inherit; opacity: .6; padding: 2px 4px; margin: -2px -4px 0 0; border-radius: 6px; }
.alert__close:hover { opacity: 1; }
.alert--success { --a-bg: var(--success-50); --a-bd: var(--success-200); --a-fg: var(--success-700); }
.alert--error   { --a-bg: var(--danger-50);  --a-bd: var(--danger-200);  --a-fg: var(--danger-700); }
.alert--warning { --a-bg: var(--warning-50); --a-bd: var(--warning-200); --a-fg: var(--warning-700); }
.alert--brand   { --a-bg: var(--brand-50);   --a-bd: var(--brand-200);   --a-fg: var(--brand-800); }
.alert--neutral { --a-bg: var(--n-50);       --a-bd: var(--line);        --a-fg: var(--n-700); }
.alert-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.flash { animation: hk-rise .28s var(--ease) both; }

/* ── 9. Empty state ───────────────────────────────────────────────────── */
.empty { text-align: center; padding: var(--s-12) var(--s-6); }
.empty__icon { width: 56px; height: 56px; margin: 0 auto var(--s-4); border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); font-size: 22px; box-shadow: 0 0 0 8px var(--brand-25); }
.empty__title { font-size: var(--fs-md); font-weight: 700; color: var(--ink); }
.empty__text { font-size: var(--fs-sm); color: var(--muted); max-width: 42ch; margin: 6px auto 0; }
.empty .btn { margin-top: var(--s-5); }

/* ── 10. Tables ───────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { font-size: var(--fs-sm); }
.table th {
  text-align: left; font-size: var(--fs-xs); font-weight: 600; color: var(--subtle);
  padding: 10px var(--s-4); background: var(--n-25); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 14px var(--s-4); border-bottom: 1px solid var(--n-100); vertical-align: middle; color: var(--text); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--n-25); }
.table tbody tr.is-selected { background: var(--brand-25); }
.table .col-check { width: 44px; padding-right: 0; }
.table input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand-600); cursor: pointer; margin: 0; display: block; }
.table .t-right { text-align: right; }
.table .t-strong { color: var(--ink); font-weight: 600; }
.table .t-sub { display: block; font-size: var(--fs-xs); color: var(--subtle); margin-top: 2px; }
.table-empty td { padding: var(--s-10) var(--s-4) !important; }
.card > .table-wrap:first-child .table th:first-child { border-top-left-radius: var(--r-lg); }
.card > .table-wrap:first-child .table th:last-child { border-top-right-radius: var(--r-lg); }

/* ── 11. Header / nav ─────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header__inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; min-width: 0; border-radius: var(--r-sm); }
.brand-lockup img { height: 34px; width: auto; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(140deg, var(--brand-600), #7e22ce); display: grid; place-items: center; color: #fff; font-size: 15px; flex-shrink: 0; box-shadow: 0 4px 10px rgba(165,54,146,.25); }
.brand-name { font-weight: 800; color: var(--ink); font-size: var(--fs-base); letter-spacing: -.01em; white-space: nowrap; }
.brand-tag { display: none; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-700); background: var(--brand-50); padding: 3px 8px; border-radius: var(--r-full); }
@media (min-width: 480px) { .brand-tag { display: inline-flex; } }

.nav { display: none; align-items: center; gap: var(--s-1); }
.nav__link { position: relative; display: inline-flex; align-items: center; height: 36px; padding: 0 var(--s-3); border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 600; color: var(--n-600); transition: color var(--t-fast), background var(--t-fast); }
.nav__link:hover { color: var(--ink); background: var(--n-100); }
.nav__link[aria-current="page"] { color: var(--brand-700); background: var(--brand-50); }
.nav__link--out { gap: 7px; color: var(--n-500); }
.nav__link--out i { font-size: .78em; opacity: .7; }
.nav__link--out:hover { color: var(--brand-700); background: var(--brand-50); }
.nav__sep { width: 1px; height: 24px; background: var(--line); margin: 0 var(--s-2); }
.nav .btn { margin-left: var(--s-1); }
@media (min-width: 820px) { .nav { display: flex; } .menu-btn { display: none !important; } }

.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-100); color: var(--brand-800); display: inline-grid; place-items: center; font-weight: 700; font-size: var(--fs-sm); flex-shrink: 0; }
.avatar-lg { width: 40px; height: 40px; font-size: var(--fs-base); }

.user-menu { position: relative; }
.user-menu__btn { display: inline-flex; align-items: center; gap: var(--s-2); height: 40px; padding: 0 var(--s-2) 0 4px; border: 1px solid transparent; background: none; border-radius: var(--r-full); color: var(--n-700); font-size: var(--fs-sm); font-weight: 600; }
.user-menu__btn:hover, .user-menu__btn[aria-expanded="true"] { background: var(--n-100); }
.user-menu__btn .fa-chevron-down { font-size: 10px; color: var(--subtle); transition: transform var(--t); }
.user-menu__btn[aria-expanded="true"] .fa-chevron-down { transform: rotate(180deg); }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 232px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 6px; z-index: 60; animation: hk-pop .16s var(--ease) both; transform-origin: top right; }
.dropdown__head { padding: 10px 12px 12px; border-bottom: 1px solid var(--n-100); margin-bottom: 6px; }
.dropdown__name { font-weight: 700; color: var(--ink); font-size: var(--fs-sm); }
.dropdown__mail { font-size: var(--fs-xs); color: var(--subtle); overflow-wrap: anywhere; }
.dropdown__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 500; color: var(--n-700); background: none; border: 0; text-align: left; }
.dropdown__item i { width: 16px; color: var(--subtle); text-align: center; }
.dropdown__item:hover { background: var(--n-50); color: var(--ink); }

.menu-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--n-700); }
.menu-btn:hover { background: var(--n-50); }
.mobile-nav { border-top: 1px solid var(--line); background: var(--surface); padding: var(--s-3) 0 var(--s-4); animation: hk-rise .18s var(--ease) both; }
.mobile-nav a:not(.btn) { display: flex; align-items: center; gap: var(--s-3); padding: 12px var(--s-2); border-radius: var(--r-sm); font-weight: 600; color: var(--n-700); }
.mobile-nav a:not(.btn) i { width: 18px; text-align: center; color: var(--subtle); }
.mobile-nav a:not(.btn):hover, .mobile-nav a[aria-current="page"] { background: var(--n-50); color: var(--ink); }
.mobile-nav__cta { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); margin-top: var(--s-3); }
@media (min-width: 820px) { .mobile-nav { display: none !important; } }

/* ── 12. Footer ───────────────────────────────────────────────────────── */
.site-footer { flex-shrink: 0; background: var(--n-900); color: rgba(255,255,255,.72); }
.site-footer__grid { display: grid; gap: var(--s-8); padding: var(--s-12) 0 var(--s-10); }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.site-footer h4 { color: rgba(255,255,255,.5); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: var(--s-4); }
.site-footer p, .site-footer li { font-size: var(--fs-sm); line-height: 1.7; }
.site-footer li + li { margin-top: var(--s-2); }
.site-footer a { color: rgba(255,255,255,.72); transition: color var(--t-fast); }
.site-footer a:hover { color: #fff; }
.site-footer__brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: var(--s-4); color: #fff; font-weight: 800; }
.site-footer__logo { display: inline-flex; background: #fff; border-radius: var(--r-sm); padding: 6px 10px; }
.site-footer__logo img { height: 28px; width: auto; }
.site-footer__bar { border-top: 1px solid rgba(255,255,255,.08); }
.site-footer__bar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2); padding-top: var(--s-5); padding-bottom: var(--s-5); font-size: var(--fs-xs); color: rgba(255,255,255,.45); }

/* ── 13. Hero ─────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background:
    radial-gradient(1000px 480px at 12% -10%, rgba(255,255,255,.14), transparent 60%),
    radial-gradient(700px 400px at 100% 110%, rgba(126,34,206,.55), transparent 60%),
    linear-gradient(135deg, #a53692 0%, #7c2585 50%, #3f1238 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%); mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .18; z-index: -1; mix-blend-mode: luminosity; }
.hero__inner { padding: var(--s-16) 0 var(--s-16); }
.hero--center .hero__inner { text-align: center; padding: var(--s-16) 0 var(--s-20); }
@media (min-width: 768px) { .hero--center .hero__inner { padding: 96px 0 112px; } .hero__inner { padding: var(--s-16) 0 72px; } }
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--brand-200); }
.hero__lead { color: rgba(255,255,255,.82); font-size: var(--fs-md); line-height: 1.65; max-width: 60ch; margin-top: var(--s-4); }
.hero--center .hero__lead { margin-left: auto; margin-right: auto; }
.hero__stats { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); margin-top: var(--s-10); }
.hero-stat { min-width: 132px; padding: var(--s-4) var(--s-5); border-radius: var(--r-lg); background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); backdrop-filter: blur(6px); }
.hero-stat b { display: block; color: #fff; font-size: var(--fs-3xl); font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-stat span { display: block; margin-top: 6px; font-size: var(--fs-xs); font-weight: 600; color: rgba(255,255,255,.7); letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 479px) {
  .hero__stats { flex-wrap: nowrap; gap: var(--s-2); }
  .hero-stat { min-width: 0; flex: 1; padding: var(--s-3) var(--s-2); }
  .hero-stat b { font-size: var(--fs-2xl); }
  .hero-stat span { font-size: 10px; letter-spacing: .02em; }
}
.hero__meta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.hero-chip { display: inline-flex; align-items: center; gap: var(--s-2); padding: 8px 14px; border-radius: var(--r-full); background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); font-size: var(--fs-sm); color: rgba(255,255,255,.85); }
.hero-chip i { color: var(--brand-200); }
.hero-chip b { color: #fff; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-8); }
.hero--center .hero__actions { justify-content: center; }
/* overlap content onto hero */
.pull-up { margin-top: -40px; position: relative; z-index: 2; }

/* ── 14. Hackathon cards & filters ────────────────────────────────────── */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-6); }
.tabs-pill { display: inline-flex; gap: 4px; padding: 4px; background: var(--n-100); border-radius: var(--r-md); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.tabs-pill::-webkit-scrollbar { display: none; }
.tabs-pill button { border: 0; background: none; padding: 7px 14px; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 600; color: var(--n-600); white-space: nowrap; transition: background var(--t-fast), color var(--t-fast); }
.tabs-pill button:hover { color: var(--ink); }
.tabs-pill button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); }
.tabs-pill .count { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--n-200); font-size: 11px; line-height: 18px; color: var(--n-600); }
.tabs-pill button[aria-pressed="true"] .count { background: var(--brand-50); color: var(--brand-700); }

.hk-card { display: flex; flex-direction: column; overflow: hidden; height: 100%; }
.hk-card__media { position: relative; height: 128px; background: linear-gradient(135deg, var(--brand-600), #7c2585 55%, #3f1238); overflow: hidden; }
.hk-card__media img { width: 100%; height: 100%; object-fit: cover; }
.hk-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(16,24,40,.35)); }
.hk-card__glyph { position: absolute; right: -12px; bottom: -24px; font-size: 104px; color: rgba(255,255,255,.1); transform: rotate(-12deg); }
.hk-card__badges { position: absolute; left: var(--s-4); right: var(--s-4); top: var(--s-4); display: flex; justify-content: space-between; gap: var(--s-2); z-index: 1; }
.hk-card__body { flex: 1; display: flex; flex-direction: column; padding: var(--s-5); }
.hk-card__theme { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-600); margin-bottom: 6px; }
.hk-card__title { font-size: var(--fs-lg); font-weight: 700; line-height: 1.3; color: var(--ink); transition: color var(--t-fast); }
.card-link:hover .hk-card__title { color: var(--brand-700); }
.hk-card__tagline { margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; }
.hk-card__facts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: var(--s-4); font-size: var(--fs-xs); color: var(--muted); }
.hk-card__facts span { display: inline-flex; align-items: center; gap: 6px; }
.hk-card__facts i { color: var(--n-400); }
.hk-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: auto; padding-top: var(--s-5); }
.hk-card__foot-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); width: 100%; padding-top: var(--s-4); border-top: 1px solid var(--n-100); font-size: var(--fs-sm); }
.hk-card__cta { font-weight: 700; color: var(--brand-600); display: inline-flex; align-items: center; gap: 6px; }
.hk-card__cta i { font-size: 11px; transition: transform var(--t) var(--ease); }
.card-link:hover .hk-card__cta i { transform: translateX(3px); }
.deadline { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--n-700); }
.deadline i { color: var(--n-400); }
.deadline--soon { color: var(--warning-700); }
.deadline--soon i { color: var(--warning-600); }
.price-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--r-full); background: rgba(255,255,255,.95); color: var(--ink); font-size: var(--fs-xs); font-weight: 700; box-shadow: var(--sh-xs); }

/* ── 15. Detail page ──────────────────────────────────────────────────── */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 768px) { .facts { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.fact { padding: var(--s-5); display: flex; gap: var(--s-3); align-items: flex-start; min-width: 0; }
.fact + .fact { border-left: 1px solid var(--line); }
@media (max-width: 767px) { .fact:nth-child(3) { border-left: 0; } .fact:nth-child(n+3) { border-top: 1px solid var(--line); } }
.fact__icon { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); flex-shrink: 0; font-size: 14px; }
.fact__k { font-size: var(--fs-xs); color: var(--subtle); font-weight: 500; }
.fact__v { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); line-height: 1.35; overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 479px) { .fact { flex-direction: column; gap: var(--s-2); padding: var(--s-4); } .fact__icon { width: 32px; height: 32px; font-size: 13px; } }

.timeline-dates { display: grid; }
.td { position: relative; display: flex; gap: var(--s-4); padding-bottom: var(--s-5); }
.td:last-child { padding-bottom: 0; }
.td::before { content: ""; position: absolute; left: 7px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.td:last-child::before { display: none; }
.td__dot { width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--n-300); background: var(--surface); flex-shrink: 0; position: relative; z-index: 1; }
.td.is-past .td__dot { border-color: var(--brand-600); background: var(--brand-600); box-shadow: inset 0 0 0 3px #fff; }
.td.is-next .td__dot { border-color: var(--brand-600); box-shadow: 0 0 0 4px var(--brand-100); }
.td__k { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.td__v { font-size: var(--fs-xs); color: var(--subtle); }

.file-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); transition: border-color var(--t-fast), background var(--t-fast); }
a.file-row:hover { border-color: var(--n-300); background: var(--n-25); }
.file-row + .file-row { margin-top: var(--s-2); }
.file-ico { width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center; font-size: 10px; font-weight: 800; letter-spacing: .02em; flex-shrink: 0; background: var(--n-100); color: var(--n-600); }
.file-ico--ppt { background: #fff4ed; color: #c4320a; }
.file-ico--pdf { background: var(--danger-50); color: var(--danger-700); }
.file-ico--xls { background: var(--success-50); color: var(--success-700); }
.file-ico--doc { background: var(--info-50); color: var(--info-700); }
.file-row__name { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.file-row__meta { font-size: var(--fs-xs); color: var(--subtle); }

.apply-card__price { font-size: var(--fs-3xl); font-weight: 800; color: var(--ink); letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.apply-card__price small { font-size: var(--fs-sm); font-weight: 600; color: var(--subtle); letter-spacing: 0; }
.countdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.countdown div { text-align: center; padding: 10px 4px; border-radius: var(--r-md); background: var(--n-50); border: 1px solid var(--n-100); }
.countdown b { display: block; font-size: var(--fs-xl); font-weight: 800; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 11px; color: var(--subtle); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* mobile sticky CTA */
.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom)); background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(16,24,40,.15); display: flex; align-items: center; gap: var(--s-3); }
@media (min-width: 1024px) { .mobile-cta { display: none; } }
.has-mobile-cta .site-footer { padding-bottom: 76px; }
@media (min-width: 1024px) { .has-mobile-cta .site-footer { padding-bottom: 0; } }

/* ── 16. Stepper (application status) ─────────────────────────────────── */
.steps { position: relative; }
.step { position: relative; display: flex; gap: var(--s-4); padding-bottom: var(--s-6); }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--line); border-radius: 2px; }
.step:last-child::before { display: none; }
.step.is-done::before { background: var(--brand-600); }
.step__dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--surface); border: 2px solid var(--line-strong); color: var(--n-400); font-size: 12px; font-weight: 700; }
.step.is-done .step__dot { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.step.is-current .step__dot { border-color: var(--brand-600); color: var(--brand-600); box-shadow: 0 0 0 5px var(--brand-100); }
.step.is-current .step__dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-600); }
.step.is-rejected .step__dot { background: var(--danger-50); border-color: var(--danger-600); color: var(--danger-700); box-shadow: 0 0 0 5px var(--danger-50); }
.step__body { padding-top: 5px; min-width: 0; }
.step__title { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }
.step__meta { font-size: var(--fs-xs); color: var(--subtle); margin-top: 2px; }
.step.is-upcoming .step__title { color: var(--n-500); font-weight: 600; }
.step__now { display: inline-flex; margin-left: var(--s-2); vertical-align: 1px; }

.progress { height: 8px; border-radius: 999px; background: var(--n-100); overflow: hidden; }
.progress__bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-500), var(--brand-600)); transition: width .6s var(--ease); }
.progress-sm { height: 6px; }
.mini-steps { display: flex; gap: 4px; }
.mini-steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--n-200); }
.mini-steps span.on { background: var(--brand-600); }

/* ── 17. Auth ─────────────────────────────────────────────────────────── */
.auth { display: grid; gap: 0; max-width: 980px; margin: 0 auto; overflow: hidden; }
@media (min-width: 900px) { .auth { grid-template-columns: 1fr 1.05fr; } }
.auth__aside { display: none; position: relative; padding: var(--s-10); color: #fff; overflow: hidden; isolation: isolate; }
@media (min-width: 900px) { .auth__aside { display: flex; flex-direction: column; } }
.auth__aside h2 { color: #fff; font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-top: var(--s-4); }
.auth__aside p { color: rgba(255,255,255,.78); margin-top: var(--s-3); font-size: var(--fs-sm); line-height: 1.7; }
.auth__points { margin-top: auto; padding-top: var(--s-8); display: grid; gap: var(--s-3); }
.auth__points li { display: flex; gap: var(--s-3); font-size: var(--fs-sm); color: rgba(255,255,255,.9); }
.auth__points i { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.12); flex-shrink: 0; font-size: 12px; }
.auth__main { padding: var(--s-8) var(--s-6); }
@media (min-width: 640px) { .auth__main { padding: var(--s-10); } }
.auth__title { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -.02em; }
.auth__sub { color: var(--muted); font-size: var(--fs-sm); margin-top: 6px; }
.auth__switch { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--n-100); font-size: var(--fs-sm); color: var(--muted); text-align: center; }
.or { display: flex; align-items: center; gap: var(--s-3); color: var(--subtle); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin: var(--s-5) 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.otp-sent { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: var(--n-50); border-radius: var(--r-md); border: 1px solid var(--n-100); font-size: var(--fs-sm); }
.otp-sent i { color: var(--success-600); }
.standalone { min-height: 100vh; display: grid; place-items: center; padding: var(--s-8) var(--s-4); background: radial-gradient(800px 400px at 50% -10%, var(--brand-100), transparent 70%), var(--bg); }

/* ── 18. Sticky action bar (forms) ────────────────────────────────────── */
.action-bar { position: sticky; bottom: 0; z-index: 30; margin-top: var(--s-6); padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom)); background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 -8px 24px -12px rgba(16,24,40,.14), var(--sh-sm); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.action-bar__note { font-size: var(--fs-xs); color: var(--subtle); display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 559px) { .action-bar > .row-wrap { width: 100%; flex-wrap: nowrap; } .action-bar .btn { flex: 1; } .action-bar__note { width: 100%; justify-content: center; } }

/* ── 19. Admin & jury shell ───────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }
.app__side {
  position: fixed; inset: 0 auto 0 0; z-index: 70; width: 264px; background: var(--n-900); color: rgba(255,255,255,.72);
  display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .22s var(--ease);
}
.app__side.is-open { transform: none; box-shadow: var(--sh-lg); }
.app__scrim { position: fixed; inset: 0; z-index: 65; background: rgba(16,24,40,.45); backdrop-filter: blur(2px); animation: hk-fade .2s both; }
@media (min-width: 1024px) {
  .app__side { position: sticky; top: 0; height: 100vh; transform: none; flex-shrink: 0; }
  .app__scrim { display: none; }
  .app__topbar .menu-btn { display: none; }
}
.app__brand { display: flex; align-items: center; gap: 10px; padding: var(--s-5) var(--s-5) var(--s-4); }
.app__brand-logo { display: inline-flex; background: #fff; border-radius: var(--r-sm); padding: 5px 8px; }
.app__brand-logo img { height: 24px; width: auto; }
.app__brand-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(140deg, var(--brand-600), #7e22ce); display: grid; place-items: center; color: #fff; font-size: 14px; flex-shrink: 0; }
.app__brand-name { color: #fff; font-weight: 700; font-size: var(--fs-sm); line-height: 1.2; }
.app__brand-name small { display: block; color: rgba(255,255,255,.45); font-size: 11px; font-weight: 500; }
.app__nav { flex: 1; overflow-y: auto; padding: var(--s-2) var(--s-3); }
.app__nav-label { padding: var(--s-4) var(--s-3) var(--s-2); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.35); }
.app__link { display: flex; align-items: center; gap: var(--s-3); padding: 9px var(--s-3); border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 500; color: rgba(255,255,255,.68); transition: background var(--t-fast), color var(--t-fast); }
.app__link i { width: 18px; text-align: center; font-size: 14px; color: rgba(255,255,255,.45); transition: color var(--t-fast); }
.app__link:hover { background: rgba(255,255,255,.06); color: #fff; }
.app__link:hover i { color: rgba(255,255,255,.8); }
.app__link[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--brand-500); }
.app__link[aria-current="page"] i { color: var(--brand-300); }
.app__link + .app__link { margin-top: 2px; }
.app__foot { padding: var(--s-4) var(--s-3); border-top: 1px solid rgba(255,255,255,.08); }
.app__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app__topbar { position: sticky; top: 0; z-index: 40; height: 60px; display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-4); background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
@media (min-width: 1024px) { .app__topbar { padding: 0 var(--s-8); } }
.app__crumbs { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--subtle); min-width: 0; }
.app__crumbs a:hover { color: var(--ink); }
.app__crumbs .sep { color: var(--n-300); font-size: 10px; }
.app__crumbs .cur { color: var(--ink); font-weight: 600; }
.app__content { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: var(--s-6) var(--s-4) var(--s-16); }
@media (min-width: 1024px) { .app__content { padding: var(--s-8) var(--s-8) var(--s-16); } }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-6); }
.page-head__title { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.page-head__sub { font-size: var(--fs-sm); color: var(--muted); margin-top: 4px; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.entity-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
.entity-head__title { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; font-size: var(--fs-xl); font-weight: 800; color: var(--ink); letter-spacing: -.015em; }
.subnav { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--line); margin-bottom: var(--s-6); overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { position: relative; display: inline-flex; align-items: center; gap: var(--s-2); padding: 12px var(--s-3); font-size: var(--fs-sm); font-weight: 600; color: var(--n-500); white-space: nowrap; transition: color var(--t-fast); }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current="page"] { color: var(--brand-700); }
.subnav a[aria-current="page"]::after { content: ""; position: absolute; left: var(--s-2); right: var(--s-2); bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--brand-600); }
.subnav i { font-size: 12px; opacity: .7; }

.stat-card { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); }
.stat-card__top { display: flex; align-items: center; justify-content: space-between; }
.stat-card__label { font-size: var(--fs-sm); font-weight: 500; color: var(--muted); }
.stat-card__icon { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); font-size: 14px; }
.stat-card__value { font-size: var(--fs-3xl); font-weight: 800; color: var(--ink); letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-card__hint { font-size: var(--fs-xs); color: var(--subtle); }

.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); padding: var(--s-4); border-bottom: 1px solid var(--line); }
.toolbar .field { min-width: 150px; }
.toolbar .field--grow { flex: 1 1 240px; }
@media (max-width: 639px) { .toolbar .field { flex: 1 1 100%; } .toolbar .btn { flex: 1; } }
.search-input { position: relative; }
.search-input i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--n-400); font-size: 13px; pointer-events: none; }
.search-input .input { padding-left: 36px; }

.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); padding: 10px var(--s-4); background: var(--brand-50); border-bottom: 1px solid var(--brand-100); font-size: var(--fs-sm); color: var(--brand-800); font-weight: 600; }
.bulk-bar[data-count="0"] { background: var(--n-25); color: var(--subtle); border-bottom-color: var(--line); font-weight: 500; }

.list-item { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); }
.list-item + .list-item { border-top: 1px solid var(--n-100); }
a.list-item { transition: background var(--t-fast); }
a.list-item:hover { background: var(--n-25); }
.list-item__icon { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); flex-shrink: 0; }

.builder-item { padding: var(--s-5); }
.builder-item__head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.builder-item__num { width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--n-100); color: var(--n-600); display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; flex-shrink: 0; }
.builder-item__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--n-100); }
.type-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--s-2); }
@media (min-width: 900px) { .type-list { grid-template-columns: minmax(0,1fr); } }
.type-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-sm); font-weight: 600; color: var(--n-700); text-align: left; transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast); }
.type-btn i { width: 16px; text-align: center; color: var(--subtle); }
.type-btn:hover { border-color: var(--brand-300); background: var(--brand-25); color: var(--brand-700); }
.type-btn:hover i { color: var(--brand-600); }
@media (min-width: 900px) { .sticky-col { position: sticky; top: calc(60px + var(--s-6)); } }

.score-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--n-100); }
.score-row:last-of-type { border-bottom: 0; }
.score-input { display: flex; align-items: center; gap: var(--s-2); }
.score-input .input { width: 84px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.score-total { display: flex; align-items: baseline; justify-content: space-between; padding: var(--s-4); border-radius: var(--r-md); background: var(--brand-50); border: 1px solid var(--brand-100); }
.score-total b { font-size: var(--fs-3xl); font-weight: 800; color: var(--brand-800); font-variant-numeric: tabular-nums; line-height: 1; }
.score-total small { color: var(--brand-700); font-weight: 600; }
.viewer { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--n-50); }
.viewer-empty { height: 260px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); display: grid; place-items: center; text-align: center; padding: var(--s-6); color: var(--subtle); font-size: var(--fs-sm); background: var(--n-25); }

/* jury top header */
.jury-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.jury-header__inner { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.jury-tabs { display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none; }
.jury-tabs::-webkit-scrollbar { display: none; }

/* ── 20. Motion ───────────────────────────────────────────────────────── */
@keyframes hk-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes hk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hk-pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }
.reveal { animation: hk-rise .4s var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ── 21. Print ────────────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .mobile-cta, .action-bar, .app__side, .app__topbar { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* form builder two-pane */
.fb-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--s-6); align-items: start; }
@media (min-width: 900px) { .fb-grid { grid-template-columns: 220px minmax(0,1fr); } }
