:root {
  --bg: #edf2ea;
  --card: #ffffff;
  --text: #173222;
  --muted: #526a5b;
  --primary: #006838;
  --primary-dark: #004d26;
  --accent: #ebb422;
  --accent-dark: #c29013;
  --border: #c4d3c0;
  --surface: #eef4e9;
  --surface-soft: #f8f6ec;
  --success: #006838;
  --warning: #b88714;
  --danger: #b42318;
  --heading: #102c1d;
  --label: #006838;
  --input-bg: #ffffff;
  --input-text: #173222;
  --card-shadow: 0 18px 36px rgba(11, 45, 25, 0.1);
  --header-start: #082917;
  --header-mid: #006838;
  --header-end: #008c4d;
  --footer-start: #0a2d1a;
  --footer-mid: #006838;
  --footer-end: #008c4d;
  --header-text: #ffffff;
  --menu-text: #f7fff7;
  --menu-border: rgba(255, 255, 255, 0.25);
  --menu-bg: rgba(255, 255, 255, 0.08);
  --bg-glow-accent: rgba(235, 180, 34, 0.12);
  --bg-glow-primary: rgba(0, 104, 56, 0.12);
  --bg-layer-start: #fafbf3;
  --bg-layer-end: #e3eee0;
  --toggle-bg: rgba(255, 255, 255, 0.88);
  --toggle-border: rgba(16, 44, 29, 0.12);
  --toggle-text: #163322;
  --toggle-shadow: 0 18px 32px rgba(11, 45, 25, 0.16);
  --toggle-icon-muted: #6d7e72;
}

html[data-theme="dark"] {
  --bg: #101714;
  --card: #17211d;
  --text: #e9f2ec;
  --muted: #aec2b8;
  --primary: #57b676;
  --primary-dark: #42955d;
  --accent: #ddb249;
  --accent-dark: #be8f1a;
  --border: #2e4438;
  --surface: #1f2a25;
  --surface-soft: #24312b;
  --success: #62c98b;
  --warning: #d2b052;
  --danger: #ff8b80;
  --heading: #f2f8f4;
  --label: #cde0d5;
  --input-bg: #101815;
  --input-text: #eef5f0;
  --card-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  --header-start: #09120e;
  --header-mid: #143423;
  --header-end: #1f5236;
  --footer-start: #09130e;
  --footer-mid: #11271a;
  --footer-end: #18422b;
  --header-text: #f5faf7;
  --menu-text: #f2faf5;
  --menu-border: rgba(235, 247, 239, 0.15);
  --menu-bg: rgba(255, 255, 255, 0.04);
  --bg-glow-accent: rgba(227, 181, 71, 0.12);
  --bg-glow-primary: rgba(83, 184, 115, 0.1);
  --bg-layer-start: #101813;
  --bg-layer-end: #0b120f;
  --toggle-bg: rgba(20, 29, 25, 0.92);
  --toggle-border: rgba(231, 242, 234, 0.12);
  --toggle-text: #eef8f2;
  --toggle-shadow: 0 18px 32px rgba(0, 0, 0, 0.42);
  --toggle-icon-muted: #9db2a6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", "Trebuchet MS", "Gill Sans MT", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 90% 10%, var(--bg-glow-accent), transparent 40%),
    radial-gradient(circle at 10% 85%, var(--bg-glow-primary), transparent 42%),
    linear-gradient(155deg, var(--bg-layer-start) 0%, var(--bg) 40%, var(--bg-layer-end) 100%);
  transition: background 0.25s ease, color 0.25s ease;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(
    135deg,
    var(--header-start) 0%,
    var(--header-mid) 60%,
    var(--header-end) 100%
  );
  border-bottom: 3px solid rgba(235, 180, 34, 0.85);
  box-shadow: 0 8px 22px rgba(8, 29, 17, 0.35);
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.site-header.scrolled {
  box-shadow: 0 12px 30px rgba(8, 29, 17, 0.42);
}

.site-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.78rem 1rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
  transition: padding 0.25s ease;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--header-text);
}

.site-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: #fff;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.site-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.site-brand-top {
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-brand-bottom {
  font-size: 0.8rem;
  opacity: 0.9;
}

.site-header-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
  flex-wrap: wrap;
  min-width: 0;
}

.menu-link {
  text-decoration: none;
  color: var(--menu-text);
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  padding: 0.68rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  position: relative;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.menu-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-1px);
}

.menu-link.is-active {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.menu-link.is-active::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: -0.4rem;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.site-header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  flex-shrink: 0;
}

.site-track-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.7rem 1.1rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #f0c253 100%);
  color: #173524;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid var(--accent);
  box-shadow: 0 10px 18px rgba(10, 32, 19, 0.18);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.site-track-link:hover,
.site-track-link.is-active {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(10, 32, 19, 0.22);
  background: linear-gradient(135deg, #dbad2d 0%, #f3c85b 100%);
}

.container {
  flex: 1;
  width: 100%;
  max-width: 940px;
  margin: 1.6rem auto 2rem;
  padding: 0 1rem;
}

.container.small {
  max-width: 590px;
}

.container.wide {
  max-width: 1240px;
}

img,
svg {
  max-width: 100%;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.portal-card p {
  min-height: 3rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-dark);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 16px;
  padding: 1.35rem;
  box-shadow: var(--card-shadow);
  position: relative;
  animation: rise-in 0.4s ease both;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.1rem;
  width: 68px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, rgba(211, 163, 38, 0.15) 100%);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(11, 45, 25, 0.12);
}

.hero {
  border-top: 5px solid var(--accent);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1,
h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--heading);
}

p {
  color: var(--muted);
}

.hero p {
  max-width: 70ch;
}

.landing-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.landing-runner {
  margin-top: -0.35rem;
}

.landing-runner-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(25, 86, 50, 0.15);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(9, 34, 19, 0.08);
  overflow: hidden;
}

.landing-runner-copy {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  width: 100%;
}

.landing-runner-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  background: rgba(0, 104, 55, 0.08);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.landing-runner-track {
  overflow: hidden;
  min-width: 0;
  flex: 1;
  width: 100%;
  max-width: 100%;
}

.landing-runner-text {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  min-width: max-content;
  animation: runner-scroll 24s linear infinite;
  white-space: nowrap;
  color: var(--heading);
  font-size: 0.95rem;
  font-weight: 600;
}

.landing-runner.is-closed {
  opacity: 0.96;
}

.landing-runner-text span::after {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 1.5rem;
  border-radius: 50%;
  background: rgba(0, 104, 55, 0.45);
}

@keyframes runner-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.landing-runner-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
}

.landing-runner-deadline {
  text-align: right;
  padding: 0.25rem 0;
}

.landing-runner-deadline span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.landing-runner-deadline strong {
  display: block;
  color: var(--heading);
  font-size: 1rem;
}

.landing-countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 1fr));
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.landing-countdown-segment {
  min-width: 0;
  padding: 0.45rem 0.4rem;
  border-radius: 10px;
  border: 1px solid rgba(25, 86, 50, 0.12);
  background: rgba(0, 104, 55, 0.05);
  text-align: center;
}

.landing-countdown-segment strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--heading);
  line-height: 1.1;
}

.landing-countdown-segment small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.landing-runner-deadline small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.landing-runner-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.58rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.landing-runner.is-open .landing-runner-tag {
  background: var(--primary);
  color: #fff;
}

.landing-runner.is-closed .landing-runner-tag {
  background: #d9e0dc;
  color: #365043;
}

.landing-runner-tag-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.95;
}

.landing-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 0.85rem;
  align-items: stretch;
}

.landing-hero-panel {
  padding: 1.35rem;
  border-top: 5px solid var(--accent);
  background:
    radial-gradient(circle at 85% 18%, rgba(235, 180, 34, 0.14), transparent 28%),
    linear-gradient(180deg, var(--card), var(--surface-soft));
}

.landing-hero-panel h1 {
  max-width: 22ch;
  font-size: clamp(1.45rem, 2.6vw, 2.35rem);
  line-height: 1.08;
  margin-bottom: 0.55rem;
}

.landing-lead {
  max-width: 56ch;
  font-size: 0.94rem;
  margin-bottom: 0.7rem;
}

.landing-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.landing-stat-grid div {
  border-radius: 14px;
  padding: 0.75rem 0.8rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
}

.landing-stat-grid strong {
  display: block;
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.landing-stat-grid span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.landing-offer-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.landing-offer-item {
  border-radius: 14px;
  padding: 0.72rem 0.82rem;
  background: rgba(247, 249, 244, 0.92);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.landing-offer-item strong {
  color: var(--heading);
  font-size: 0.9rem;
}

.landing-offer-item span {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.landing-illustration-panel {
  padding: 1.15rem;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(235, 180, 34, 0.08), rgba(0, 104, 56, 0.04)),
    var(--card);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.landing-illustration {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem 0.85rem;
  align-items: center;
  min-height: 100%;
}

.illustration-badge {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #f0c35c);
  color: #1a2f1d;
  font-weight: 800;
}

.illustration-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
}

.illustration-card strong {
  color: var(--heading);
}

.illustration-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.illustration-line {
  width: 2px;
  height: 1rem;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(235, 180, 34, 0.85), rgba(0, 104, 56, 0.35));
}

.landing-window-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(247, 250, 239, 0.98)),
    var(--card);
}

.landing-window-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.landing-window-status-dot {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--success);
}

.landing-window-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.landing-window-card {
  padding: 0.8rem 0.85rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  background: var(--surface-soft);
}

.landing-window-card.is-closed {
  background: linear-gradient(180deg, #f5f7f4, #eef2ee);
  border-color: #c9d1cb;
}

.landing-window-card strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--heading);
}

.landing-window-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.landing-window-card.is-open {
  background: linear-gradient(180deg, #e9f8ed, #f6fcf8);
  border-color: #b6dfc1;
}

.landing-window-card.is-open strong {
  color: #1a6a37;
}

.landing-brief-card {
  min-height: 100%;
}

.landing-checklist-card {
  max-width: 100%;
}

.landing-checklist {
  margin: 0.55rem 0 0;
  padding-left: 1.05rem;
  color: var(--text);
}

.landing-checklist li {
  margin: 0.35rem 0;
}

.landing-brief-copy {
  max-width: 44ch;
}

.landing-scroll-list {
  margin-top: 0.65rem;
  max-height: 220px;
  overflow-y: auto;
  display: grid;
  gap: 0.55rem;
  padding-right: 0.25rem;
}

.landing-scroll-list::-webkit-scrollbar {
  width: 0.55rem;
}

.landing-scroll-list::-webkit-scrollbar-thumb {
  background: rgba(200, 154, 31, 0.45);
  border-radius: 999px;
}

.landing-scroll-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.65rem 0.8rem;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
}

.landing-scroll-item strong {
  display: block;
  color: var(--heading);
}

.landing-scroll-item span {
  color: var(--muted);
  font-size: 0.8rem;
}

.landing-scroll-metric {
  min-width: 82px;
  text-align: right;
}

.landing-scroll-metric strong {
  font-size: 1.1rem;
  color: var(--primary-dark);
}

.landing-bottom-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.08fr);
  gap: 0.85rem;
  align-items: start;
}

.stats {
  display: flex;
  gap: 0.85rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.stats div {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), var(--surface));
  border: 1px solid var(--border);
  border-radius: 12px;
  border-top: 3px solid rgba(211, 163, 38, 0.72);
  padding: 0.75rem 0.95rem;
  min-width: 165px;
}

.stats.compact div {
  min-width: 118px;
}

.stats strong {
  display: block;
  color: var(--primary-dark);
  font-size: 1.35rem;
}

.actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.actions.tight {
  margin-top: 0;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 0.68rem 1.08rem;
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary) 0%, #24824b 100%);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 18px rgba(11, 45, 25, 0.14);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.btn:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #19663a 100%);
  transform: translateY(-1px);
  box-shadow: 0 14px 22px rgba(11, 45, 25, 0.18);
}

.btn.secondary {
  background: linear-gradient(180deg, #fffdf6 0%, var(--surface-soft) 100%);
  color: var(--heading);
  border: 1px solid rgba(211, 163, 38, 0.34);
  box-shadow: none;
}

.btn.danger {
  background: linear-gradient(135deg, var(--danger) 0%, #d84f44 100%);
}

.btn.danger:hover {
  background: #8d1d14;
}

button[disabled],
.btn[disabled] {
  opacity: 0.62;
  cursor: not-allowed;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.2rem;
  align-items: start;
}

.auth-form {
  grid-template-columns: 1fr;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--label);
}

.field-hint {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.84rem;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}

.checkbox-inline input {
  width: auto;
}

.terms-consent {
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
}

.terms-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.terms-consent-row input {
  width: auto;
  margin-top: 0.2rem;
}

.field-hint-spacer {
  visibility: hidden;
  user-select: none;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.58rem 0.68rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--input-text);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

input,
select {
  min-height: 2.65rem;
}

textarea {
  min-height: 2.65rem;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #d6e8d8;
  border-color: var(--primary);
}

.input-ok {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(29, 127, 61, 0.12);
}

.input-danger-blink {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.16);
  animation: danger-blink 0.8s ease 2;
}

@keyframes danger-blink {
  0%,
  100% {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.16);
  }

  50% {
    border-color: #ef8c80;
    box-shadow: 0 0 0 6px rgba(180, 35, 24, 0.08);
  }
}

.full-width {
  grid-column: 1 / -1;
}

.form-grid > .actions {
  grid-column: 1 / -1;
}

.alert {
  background: linear-gradient(180deg, #fff5f2 0%, #fff0eb 100%);
  color: var(--danger);
  border: 1px solid #f0c4bd;
  border-left: 4px solid var(--danger);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  margin: 0.8rem 0 1rem;
}

.notice {
  background: linear-gradient(180deg, #e9f7ee 0%, #ddf1e4 100%);
  color: var(--success);
  border: 1px solid #b6e3c3;
  border-left: 4px solid var(--success);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  margin: 0.8rem 0 1rem;
}

.badge {
  border-radius: 999px;
  padding: 0.26rem 0.68rem;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}

.badge.pending {
  color: var(--warning);
  background: #fbf0d2;
  border-color: #ecd392;
}

.badge.needs-correction {
  color: #874500;
  background: #ffe5be;
  border-color: #efc47d;
}

.badge.verified {
  color: var(--success);
  background: #dbf2e1;
  border-color: #b8dfc2;
}

.badge.approved {
  color: #0f5132;
  background: #d1e7dd;
  border-color: #a7cfbd;
}

.badge.rejected {
  color: var(--danger);
  background: #ffeae7;
  border-color: #f2c5be;
}

.summary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), var(--surface));
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 0.95rem;
  border-radius: 12px;
}

.summary + .summary,
.summary + .form-grid,
.form-grid + .summary {
  margin-top: 1rem;
}

.summary p {
  margin: 0.42rem 0;
  color: var(--text);
}

.summary h3 {
  margin: 0 0 0.2rem;
  color: var(--heading);
}

.history-toggle {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card-bg);
  overflow: hidden;
}

.history-toggle summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.1rem;
  font-weight: 700;
  color: var(--label);
}

.history-toggle summary::-webkit-details-marker {
  display: none;
}

.history-toggle[open] summary {
  border-bottom: 1px solid var(--border);
}

.history-toggle > .task-list,
.history-toggle > p {
  padding: 1rem 1.1rem 1.1rem;
}

.history-toggle-meta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.requirements-list {
  margin: 0.7rem 0 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.45rem;
}

.selection-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), var(--surface));
}

.selection-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.selection-panel-header h2,
.application-fields-header h2 {
  margin: 0.2rem 0 0;
  color: var(--heading);
}

.selection-panel-note {
  max-width: 19rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: right;
}

.selection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.2rem;
}

.selection-status-card {
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0.9rem 1rem;
  background: var(--surface-soft);
}

.selection-status-card strong {
  display: block;
  color: var(--heading);
}

.selection-status-message {
  margin: 0.35rem 0 0;
  color: var(--text);
}

.selection-status-card.tone-muted {
  border-color: var(--border);
  background: var(--surface-soft);
}

.selection-status-card.tone-success {
  border-color: #b8dfc2;
  background: #edf8f0;
}

.selection-status-card.tone-warning {
  border-color: #eed39b;
  background: #fff7e6;
}

.selection-status-card.tone-danger {
  border-color: #efb2a8;
  background: #fff2ef;
}

.selection-status-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.selection-status-metrics strong {
  display: inline;
  color: var(--primary-dark);
}

.application-fields {
  display: grid;
  gap: 1rem;
}

.is-hidden {
  display: none !important;
}

.application-fields.is-hidden {
  display: none;
}

.nested-form-grid {
  margin-top: 0;
}

.period-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.period-chip {
  border-radius: 999px;
  padding: 0.34rem 0.72rem;
  font-size: 0.82rem;
  font-weight: 800;
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
}

.period-chip.open {
  background: #dbf2e1;
  color: #166533;
  border-color: #b4e0c0;
}

.period-chip.closed {
  background: #f3f6f3;
  color: #56655c;
  border-color: #d4e0d5;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.86);
  table-layout: auto;
}

th,
td {
  padding: 0.76rem 0.82rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  line-height: 1.42;
}

th {
  background: linear-gradient(180deg, #fdf8eb 0%, #f3edd7 100%);
  color: var(--label);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

thead th {
  white-space: nowrap;
  vertical-align: middle;
}

tbody td {
  color: var(--text);
}

tbody td p,
tbody td small {
  margin-top: 0;
  margin-bottom: 0;
}

tbody td a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}

tbody td a:hover,
tbody td a:focus-visible {
  color: var(--primary);
  text-decoration: underline;
}

tbody tr:nth-child(even) {
  background: rgba(245, 249, 243, 0.75);
}

tbody tr:hover {
  background: rgba(211, 163, 38, 0.08);
}

.table-wrap table tbody tr:last-child td {
  border-bottom: none;
}

.table-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  min-height: 2rem;
}

.table-actions form {
  margin: 0;
}

td .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  white-space: nowrap;
}

th.table-number-cell,
td.table-number-cell,
th.table-count-cell,
td.table-count-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

th.table-status-cell,
td.table-status-cell,
th.table-action-cell,
td.table-action-cell {
  text-align: center;
}

td.table-status-cell {
  white-space: nowrap;
}

th.table-date-cell,
td.table-date-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

td.table-action-cell {
  min-width: 132px;
}

td.table-empty-state {
  padding: 1rem 0.9rem;
  color: var(--muted);
  text-align: center;
}

td.table-empty-state strong {
  color: var(--heading);
}

.admin-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.admin-account-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background:
    radial-gradient(circle at 85% 15%, rgba(211, 163, 38, 0.08), transparent 24%),
    var(--card);
}

.student-dashboard-hero .dashboard-badge-wrap {
  display: flex;
  align-items: flex-start;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.dashboard-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.dashboard-stat-grid {
  margin-bottom: 0;
}

.dashboard-stat-grid div strong {
  font-size: 1rem;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.timeline-step {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 0.8rem;
}

.timeline-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-top: 0.2rem;
  border: 2px solid var(--border);
  background: var(--card);
  position: relative;
}

.timeline-step:not(:last-child) .timeline-marker::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  width: 2px;
  height: calc(100% + 18px);
  transform: translateX(-50%);
  background: var(--border);
}

.timeline-step.is-complete .timeline-marker {
  background: var(--success);
  border-color: var(--success);
}

.timeline-step.is-current .timeline-marker {
  background: var(--accent);
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 4px rgba(235, 180, 34, 0.15);
}

.timeline-content {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), var(--surface-soft));
  padding: 0.9rem 1rem;
}

.timeline-content p {
  margin: 0.3rem 0 0;
}

.timeline-heading-row {
  align-items: baseline;
}

.timeline-state {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 700;
}

.task-list {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.link-btn {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-decoration: underline;
  color: var(--primary-dark);
  font: inherit;
  font-weight: 700;
}

.danger-text {
  color: var(--danger);
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.filter-row {
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.period-admin-grid {
  display: grid;
  gap: 0.75rem;
}

.checkbox-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), var(--surface-soft));
}

.checkbox-card input {
  width: auto;
  margin: 0;
}

.muted-note {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.2rem 0;
}

.site-footer {
  background: linear-gradient(
    135deg,
    #0d2416 0%,
    var(--footer-start) 18%,
    var(--footer-mid) 62%,
    var(--footer-end) 100%
  );
  color: #eaf7ef;
  border-top: 4px solid rgba(235, 180, 34, 0.9);
  margin-top: auto;
  position: relative;
  overflow: hidden;
  transition: background 0.25s ease;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 8% 18%, rgba(244, 210, 120, 0.1), transparent 24%),
    radial-gradient(circle at 88% 78%, rgba(255, 255, 255, 0.08), transparent 22%);
  pointer-events: none;
}

.site-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.15rem 1rem 0.95rem;
  position: relative;
  z-index: 1;
}

.site-footer-main {
  display: grid;
  gap: 1rem 1.2rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  align-items: center;
}

.site-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  min-width: 0;
  text-decoration: none;
}

.site-footer-logo-wrap {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  padding: 0.38rem;
}

.site-footer-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-footer-brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-footer-kicker {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 210, 120, 0.96);
}

.site-footer-title {
  margin: 0;
  font-size: 1.14rem;
  line-height: 1.18;
  color: #ffffff;
}

.site-footer-copy {
  margin: 0;
  color: rgba(234, 247, 239, 0.88);
  font-size: 0.9rem;
  line-height: 1.55;
}

.site-footer-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.85rem;
}

.site-footer-motto {
  display: inline-flex;
  align-items: center;
  align-self: flex-end;
  padding: 0.5rem 0.92rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #dbad2d 0%, #f1c64f 100%);
  color: #173524;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem 0.7rem;
}

.site-footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem 0.85rem;
  color: rgba(234, 247, 239, 0.82);
  font-size: 0.82rem;
  font-weight: 600;
}

.site-footer-meta a {
  color: rgba(244, 210, 120, 0.98);
  text-decoration: none;
}

.site-footer-meta a:hover,
.site-footer-meta a:focus-visible {
  color: #ffffff;
}

.site-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
  padding: 0.52rem 0.78rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #f4fbf7;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    color 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.site-footer-links a:hover,
.site-footer-links a:focus-visible {
  color: rgba(244, 210, 120, 0.98);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(244, 210, 120, 0.34);
  transform: translateY(-1px);
}

.site-footer-dev-link {
  color: rgba(244, 210, 120, 0.98);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 210, 120, 0.45);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer-dev-link:hover,
.site-footer-dev-link:focus-visible {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.75);
}

.site-footer-bottom {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: space-between;
  color: rgba(234, 247, 239, 0.8);
  font-size: 0.84rem;
}


.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--toggle-border);
  border-radius: 999px;
  background: var(--toggle-bg);
  color: var(--toggle-text);
  padding: 0.65rem 0.85rem;
  box-shadow: var(--toggle-shadow);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}

.theme-toggle-inline {
  margin-left: 0;
  position: static;
  z-index: auto;
  padding: 0.62rem 0.7rem;
  min-width: 2.8rem;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(7, 25, 15, 0.2);
}

.theme-toggle:hover {
  transform: translateY(-2px);
}

.theme-toggle:focus-visible {
  outline: 2px solid rgba(235, 180, 34, 0.7);
  outline-offset: 2px;
}

.theme-toggle-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--toggle-icon-muted);
}

.theme-toggle-icon svg {
  width: 100%;
  height: 100%;
}

.theme-toggle-text {
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.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;
}

html[data-theme="light"] .theme-toggle-icon-sun,
html[data-theme="dark"] .theme-toggle-icon-moon {
  color: var(--accent-dark);
}

html[data-theme="light"] .theme-toggle-icon-moon,
html[data-theme="dark"] .theme-toggle-icon-sun {
  opacity: 0.45;
}

html[data-theme="dark"] .landing-stat-grid div {
  background: rgba(20, 29, 25, 0.9);
  border-color: #355043;
}

html[data-theme="dark"] .landing-offer-item {
  background: rgba(20, 29, 25, 0.92);
  border-color: #355043;
}

html[data-theme="dark"] .landing-offer-item strong {
  color: #eef6f1;
}

html[data-theme="dark"] .landing-offer-item span {
  color: #c5d4cc;
}

html[data-theme="dark"] .landing-runner-box {
  background: rgba(23, 33, 29, 0.95);
  border-color: #2d493c;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] .landing-runner-label {
  background: rgba(87, 182, 118, 0.12);
  color: #aee5bf;
}

html[data-theme="dark"] .landing-runner-text,
html[data-theme="dark"] .landing-runner-deadline strong {
  color: #eff7f2;
}

html[data-theme="dark"] .landing-runner-deadline span,
html[data-theme="dark"] .landing-runner-deadline small {
  color: #bdd1c6;
}

html[data-theme="dark"] .landing-countdown-segment {
  background: rgba(87, 182, 118, 0.08);
  border-color: #2e4e3f;
}

html[data-theme="dark"] .landing-countdown-segment strong {
  color: #eff7f2;
}

html[data-theme="dark"] .landing-countdown-segment small {
  color: #c4d6cc;
}

html[data-theme="dark"] .landing-runner-text span::after {
  background: rgba(221, 178, 73, 0.58);
}

html[data-theme="dark"] .landing-runner.is-closed .landing-runner-tag {
  background: #26332d;
  color: #d5dfda;
}

html[data-theme="dark"] .landing-stat-grid span {
  color: #d5e3db;
}

html[data-theme="dark"] .landing-window-panel {
  background:
    linear-gradient(180deg, rgba(19, 28, 24, 0.96), rgba(14, 21, 18, 0.98)),
    var(--card);
}

html[data-theme="dark"] .landing-window-card.is-closed {
  background: linear-gradient(180deg, #1d2722, #18201c);
  border-color: #3a4b42;
}

html[data-theme="dark"] .landing-window-card.is-open {
  background: linear-gradient(180deg, #173125, #11251c);
  border-color: #2f6a46;
}

html[data-theme="dark"] .landing-window-card.is-open strong {
  color: #9fe0b7;
}

html[data-theme="dark"] .landing-window-card span {
  color: #d4e2db;
}

html[data-theme="dark"] .card:hover {
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .stats div,
html[data-theme="dark"] .summary,
html[data-theme="dark"] .selection-panel,
html[data-theme="dark"] .timeline-content,
html[data-theme="dark"] .checkbox-card,
html[data-theme="dark"] table,
html[data-theme="dark"] .table-wrap {
  background: linear-gradient(180deg, rgba(22, 31, 27, 0.96), rgba(17, 25, 21, 0.98));
}

html[data-theme="dark"] .table-wrap {
  border-color: #31463b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .btn.secondary {
  background: linear-gradient(180deg, #202b25 0%, #18211d 100%);
  color: #eef5f0;
  border-color: rgba(221, 178, 73, 0.28);
}

html[data-theme="dark"] th {
  background: linear-gradient(180deg, #352a12 0%, #2a220f 100%);
  color: #f2e0ab;
  border-bottom-color: #4b4022;
}

html[data-theme="dark"] tbody tr:nth-child(even) {
  background: rgba(28, 38, 33, 0.82);
}

html[data-theme="dark"] tbody td {
  color: #edf3ef;
}

html[data-theme="dark"] tbody td a {
  color: #b5e2c1;
}

html[data-theme="dark"] tbody td a:hover,
html[data-theme="dark"] tbody td a:focus-visible {
  color: #d8efdf;
}

html[data-theme="dark"] tbody tr:hover {
  background: rgba(221, 178, 73, 0.1);
}

html[data-theme="dark"] td.table-empty-state {
  color: #c5d4cc;
}

html[data-theme="dark"] td.table-empty-state strong {
  color: #eff7f2;
}

html[data-theme="dark"] .alert {
  background: #3a1814;
  border-color: #7a3228;
  color: #ffd7d1;
}

html[data-theme="dark"] .notice {
  background: #123226;
  border-color: #2d6a4b;
  color: #d9f7e4;
}

html[data-theme="dark"] .selection-status-card.tone-success {
  background: #143225;
  border-color: #2f6f4c;
}

html[data-theme="dark"] .selection-status-card.tone-warning {
  background: #3b2c11;
  border-color: #8d6b1b;
}

html[data-theme="dark"] .selection-status-card.tone-danger {
  background: #3a1714;
  border-color: #7d3028;
}

html[data-theme="dark"] .selection-status-message,
html[data-theme="dark"] .selection-status-card strong,
html[data-theme="dark"] .selection-status-metrics,
html[data-theme="dark"] .selection-status-metrics strong {
  color: #eef5f0;
}

html[data-theme="dark"] .badge.pending {
  background: #4a3a12;
  color: #f2d47f;
}

html[data-theme="dark"] .badge.needs-correction {
  background: #523012;
  color: #ffcd88;
}

html[data-theme="dark"] .badge.verified {
  background: #153325;
  color: #9fe0b7;
}

html[data-theme="dark"] .badge.approved {
  background: #163728;
  color: #b8f0ca;
}

html[data-theme="dark"] .badge.rejected {
  background: #3c1815;
  color: #ffc0b8;
}

html[data-theme="dark"] .period-chip.open {
  background: #143324;
  color: #a8e4bf;
  border-color: #2d6d4a;
}

html[data-theme="dark"] .period-chip.closed {
  background: #212b26;
  color: #d2ddd6;
  border-color: #46574e;
}

.portal-assistant-toggle,
.portal-assistant-panel,
.portal-feedback-toggle,
.portal-feedback-panel {
  pointer-events: auto;
}

.portal-assistant-toggle *,
.portal-feedback-toggle * {
  pointer-events: none !important;
}

.portal-assistant-toggle {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #145c34 0%, #1e7a45 58%, #2d9256 100%);
  color: #f6fff8;
  box-shadow: 0 10px 25px rgba(8, 29, 17, 0.22);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
}

.portal-assistant-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 28px rgba(8, 29, 17, 0.3);
}

.portal-assistant-avatar-wrap,
.portal-assistant-panel-avatar-wrap {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(16, 44, 29, 0.08);
  overflow: hidden;
}

.portal-assistant-avatar-wrap {
  width: 36px;
  height: 36px;
}

.portal-assistant-panel-avatar-wrap {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.portal-assistant-avatar,
.portal-assistant-panel-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-assistant-toggle-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  text-align: left;
}

.portal-assistant-toggle strong {
  font-size: 0.82rem;
}

.portal-assistant-toggle-kicker,
.portal-assistant-panel-kicker {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.portal-assistant-toggle .portal-assistant-toggle-kicker {
  color: #dff3e5;
}

.portal-assistant-toggle strong {
  color: #ffffff;
}

.portal-assistant-panel {
  position: fixed;
  right: 1.2rem;
  bottom: 5.2rem;
  z-index: 20005;
  width: min(340px, calc(100vw - 2.4rem));
  border-radius: 20px;
  border: 1px solid rgba(19, 59, 34, 0.1);
  background:
    radial-gradient(circle at top right, rgba(211, 163, 38, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 241, 0.98));
  box-shadow: 0 26px 50px rgba(8, 29, 17, 0.24);
  overflow: hidden;
}

.portal-assistant-panel[hidden] {
  display: none !important;
}

.portal-assistant-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.85rem;
  background: linear-gradient(135deg, rgba(18, 74, 40, 0.98), rgba(33, 106, 60, 0.96));
  color: #fff;
}

.portal-assistant-panel-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.portal-assistant-panel-head h2 {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: #fff;
}

.portal-assistant-close {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.portal-assistant-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.9rem 1rem 0;
}

.portal-assistant-chip {
  border: 1px solid rgba(23, 101, 58, 0.16);
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.portal-assistant-thread {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem;
  max-height: 360px;
  overflow-y: auto;
}

.portal-assistant-bubble {
  max-width: 88%;
  padding: 0.8rem 0.95rem;
  border-radius: 18px;
  font-size: 0.93rem;
  line-height: 1.5;
  white-space: pre-wrap;
  box-shadow: 0 10px 20px rgba(8, 29, 17, 0.08);
}

.portal-assistant-bubble.is-assistant {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid rgba(23, 101, 58, 0.08);
}

.portal-assistant-bubble.is-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary), #2a7a47);
  color: #fff;
}

.portal-assistant-form {
  padding: 0 1rem 1rem;
}

.portal-assistant-form textarea {
  min-height: 86px;
  resize: vertical;
}

.portal-assistant-form-row {
  margin-top: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.portal-assistant-status {
  color: var(--muted);
  line-height: 1.4;
}

html[data-theme="dark"] .portal-assistant-toggle {
  background: linear-gradient(135deg, #004826 0%, #006838 56%, #008c4d 100%);
  color: #f6fff8;
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .portal-assistant-avatar-wrap {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .portal-assistant-panel {
  background:
    radial-gradient(circle at top right, rgba(221, 178, 73, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(19, 27, 23, 0.98), rgba(13, 18, 16, 0.98));
  border-color: rgba(221, 178, 73, 0.14);
}

html[data-theme="dark"] .portal-assistant-chip,
html[data-theme="dark"] .portal-assistant-bubble.is-assistant {
  background: rgba(21, 31, 26, 0.95);
  color: #edf4ef;
  border-color: rgba(83, 184, 115, 0.12);
}

html[data-theme="dark"] .portal-assistant-status {
  color: #bccdc4;
}

@media (max-width: 980px) {
  .site-header-inner {
    flex-direction: column;
    display: flex;
    align-items: stretch;
    gap: 0.8rem;
  }

  .site-header-nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .site-menu {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.3rem;
  }

  .menu-link {
    text-align: center;
  }

  .menu-link.is-active::after {
    bottom: -0.2rem;
  }

  .site-header-tools {
    width: 100%;
    justify-content: space-between;
  }

  .site-track-link {
    flex: 1;
  }

  .theme-toggle-inline {
    margin-left: 0;
  }

  .landing-hero-grid,
  .landing-bottom-grid,
  .landing-window-grid,
  .landing-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-runner-box,
  .landing-runner-copy {
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-runner-copy,
  .landing-runner-track {
    width: 100%;
    max-width: 100%;
  }

  .landing-runner-actions {
    width: 100%;
    justify-content: space-between;
  }

  .admin-account-grid {
    grid-template-columns: 1fr;
  }

  .site-footer-main {
    grid-template-columns: 1fr;
  }

  .site-footer-side {
    align-items: flex-start;
  }

  .site-footer-motto,
  .site-footer-links,
  .site-footer-meta {
    align-self: flex-start;
  }

  .site-footer-links,
  .site-footer-meta {
    justify-content: flex-start;
  }

  /* Removed display: contents to prevent WebKit touch click bug */

  .portal-assistant-toggle {
    position: fixed !important;
    right: 1.0rem !important;
    bottom: 1.0rem !important;
    left: auto !important;
    top: auto !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    z-index: 20000 !important;
  }

  .portal-assistant-panel {
    position: fixed !important;
    left: 1.0rem !important;
    right: 1.0rem !important;
    bottom: 5.0rem !important;
    top: auto !important;
    transform: none !important;
    width: auto !important;
    max-height: calc(100vh - 6.5rem) !important;
    z-index: 20005 !important;
  }
}

@media (max-width: 768px) {
  .container {
    margin: 1.1rem auto 1.45rem;
    padding: 0 0.8rem;
  }

  .card {
    padding: 1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .selection-grid,
  .selection-panel-header {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-grid,
  .dashboard-quick-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    flex-direction: column;
  }

  .row-between {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-card p {
    min-height: auto;
  }

  .landing-runner {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .landing-runner-deadline {
    text-align: left;
  }

  .landing-hero-grid,
  .landing-bottom-grid,
  .landing-window-grid,
  .landing-stat-grid,
  .landing-offer-strip {
    grid-template-columns: 1fr;
  }

  .landing-hero-panel h1 {
    max-width: none;
  }

  .landing-illustration {
    grid-template-columns: auto 1fr;
  }

  .theme-toggle-text {
    font-size: 0.8rem;
  }

  .landing-runner-box {
    padding: 0.9rem 1rem;
  }

  .landing-runner-text {
    font-size: 0.92rem;
  }

  .landing-runner-copy,
  .landing-runner-track {
    width: 100%;
    max-width: 100%;
  }

  .landing-runner-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .landing-runner-deadline {
    text-align: left;
  }

  .landing-countdown {
    width: 100%;
    grid-template-columns: repeat(4, minmax(50px, 1fr));
  }

  .stats div {
    min-width: 0;
    width: 100%;
  }

  th,
  td {
    padding: 0.68rem 0.7rem;
  }

  th {
    font-size: 0.74rem;
  }

  td.table-action-cell {
    min-width: 118px;
  }

  .actions {
    align-items: stretch;
  }

  .actions .btn,
  .actions button,
  .table-actions .btn,
  .table-actions button {
    width: 100%;
    text-align: center;
  }

  .table-actions {
    align-items: stretch;
  }

  .site-footer-brand {
    align-items: flex-start;
  }

  .site-footer-logo-wrap {
    width: 60px;
    height: 60px;
    border-radius: 16px;
  }

  .site-footer-links {
    width: 100%;
    gap: 0.5rem;
  }

  .site-footer-links a {
    width: 100%;
    justify-content: center;
  }

  .site-footer-meta {
    width: 100%;
    flex-direction: column;
    gap: 0.25rem;
  }

  .site-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- Floating Testing Feedback Widget --- */

.portal-feedback-toggle {
  position: fixed;
  right: 1.2rem;
  bottom: 5.2rem;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #ebb422 0%, #c29013 100%);
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(8, 29, 17, 0.22);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
}

.portal-feedback-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 28px rgba(8, 29, 17, 0.3);
}

.portal-feedback-panel {
  position: fixed;
  right: 1.2rem;
  bottom: 9.2rem;
  z-index: 20005;
  width: min(340px, calc(100vw - 2.4rem));
  border-radius: 20px;
  border: 1px solid rgba(19, 59, 34, 0.1);
  background:
    radial-gradient(circle at top right, rgba(23, 101, 58, 0.05), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 241, 0.98));
  box-shadow: 0 26px 50px rgba(8, 29, 17, 0.24);
  overflow: hidden;
  padding: 1.2rem;
}

.portal-feedback-panel[hidden] {
  display: none !important;
}

.portal-feedback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

/* Dark theme overrides */
html[data-theme="dark"] .portal-feedback-panel {
  background:
    radial-gradient(circle at top right, rgba(83, 184, 115, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(19, 27, 23, 0.98), rgba(13, 18, 16, 0.98));
  border-color: rgba(83, 184, 115, 0.14);
}

/* Mobile responsive overrides */
@media (max-width: 980px) {
  .portal-feedback-toggle {
    position: fixed !important;
    right: 1.0rem !important;
    bottom: 5.0rem !important;
    left: auto !important;
    top: auto !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    z-index: 20000 !important;
    justify-content: center;
  }

  .portal-feedback-panel {
    position: fixed;
    left: 1.0rem;
    right: 1.0rem;
    bottom: 9.0rem;
    top: auto;
    transform: none;
    width: auto;
    max-height: calc(100vh - 10.5rem);
    z-index: 20005 !important;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Prevent horizontal wobblying/shaking on mobile devices */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Prevent auto-zooming on focus in mobile browsers (which causes wobblying/cursor lag) */
@media (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}
