:root {
  color-scheme: dark;
  --bg: #071019;
  --bg-alt: #0d1823;
  --bg-soft: rgba(8, 18, 28, 0.8);
  --panel: rgba(11, 23, 35, 0.82);
  --panel-strong: #101d2a;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f7fb;
  --muted: rgba(232, 238, 247, 0.76);
  --accent: #f6b332;
  --accent-strong: #ffcb57;
  --accent-dark: #7b5412;
  --success: #4db980;
  --danger: #e16d63;
  --radius: 8px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --content-width: min(1180px, calc(100vw - 48px));
  --section-gap: 112px;
  --font: "Segoe UI", Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(circle at top left, rgba(246, 179, 50, 0.1), transparent 28%),
    linear-gradient(180deg, #05111b 0%, #081521 40%, #071019 100%);
  color: var(--text);
}

body.site-page {
  min-height: 100vh;
}

body.admin-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(8, 18, 28, 0.98), rgba(7, 16, 25, 0.98)),
    #071019;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 14, 22, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  width: var(--content-width);
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  color: #0d1218;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  box-shadow: 0 12px 22px rgba(246, 179, 50, 0.22);
  flex: 0 0 auto;
  overflow: hidden;
}

.brand-mark.has-logo {
  background: transparent;
  box-shadow: none;
  border: 0;
  overflow: visible;
}

.brand-mark.has-logo .brand-logo {
  transform: translateY(-3px) scale(1.06);
  transform-origin: center center;
  padding: 0;
  border-radius: 0;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 4px;
  border-radius: 10px;
}

.brand-mark-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-name {
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.nav-link {
  font-size: 14px;
  color: rgba(244, 247, 251, 0.84);
  transition: color 0.2s ease;
}

.nav-tab {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 247, 251, 0.84);
  font-size: 14px;
  font-weight: 700;
}

.nav-tab.is-active {
  background: rgba(246, 179, 50, 0.15);
  border-color: rgba(246, 179, 50, 0.28);
  color: #ffe6a8;
}

.nav-link-admin {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--accent-strong);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  white-space: nowrap;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: #11161c;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
  color: var(--text);
}

.driver-access-button,
#driverLogoutButton {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
}

.driver-access-button.is-active {
  background: rgba(246, 179, 50, 0.15);
  border-color: rgba(246, 179, 50, 0.28);
  color: #ffe6a8;
}

.button-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.button-danger {
  background: rgba(225, 109, 99, 0.14);
  border-color: rgba(225, 109, 99, 0.25);
  color: #ffd7d3;
}

.button-success {
  background: rgba(77, 185, 128, 0.15);
  border-color: rgba(77, 185, 128, 0.28);
  color: #d5ffe8;
}

.hero {
  position: relative;
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: flex-end;
  padding: 84px 0 72px;
  background:
    linear-gradient(180deg, rgba(7, 16, 25, 0.42), rgba(7, 16, 25, 0.9)),
    linear-gradient(90deg, rgba(5, 11, 17, 0.84), rgba(5, 11, 17, 0.25)),
    url("/app-assets/home-bg.png") center center / cover no-repeat;
}

.hero-inner {
  width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
  gap: 40px;
  align-items: end;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.hero h1,
.section-heading h2,
.admin-hero h1 {
  margin: 0;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(48px, 6.4vw, 88px);
  max-width: none;
  white-space: nowrap;
}

.hero-summary {
  margin-top: 18px;
  max-width: 690px;
  font-size: 20px;
  line-height: 1.55;
  color: rgba(245, 248, 251, 0.86);
}

.hero-description {
  margin-top: 18px;
  max-width: 640px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  margin-top: 30px;
}

.hero-note {
  margin-top: 18px;
  font-size: 13px;
  color: rgba(244, 247, 251, 0.72);
}

.hero-aside {
  padding: 22px 0;
  align-self: end;
}

.hero-media-card {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.hero-media-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.metrics-grid {
  display: grid;
  gap: 16px;
}

.metric-item {
  padding: 18px 18px 20px;
  border-radius: 8px;
  background: rgba(7, 16, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
}

.metric-value {
  font-size: 30px;
  font-weight: 800;
}

.metric-label {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.section {
  padding: var(--section-gap) 0;
}

.section-compact {
  padding: 34px 0 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-inner {
  width: var(--content-width);
  margin: 0 auto;
}

.section-heading {
  max-width: 760px;
}

.section-heading h2 {
  font-size: clamp(34px, 4vw, 52px);
}

.section-heading p {
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
}

.site-tab-strip,
.admin-tab-strip,
.editor-tab-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.site-tab-strip {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.site-tab-button,
.admin-tab-button,
.editor-tab-button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 700;
}

.site-tab-button.is-active,
.admin-tab-button.is-active,
.editor-tab-button.is-active {
  background: rgba(246, 179, 50, 0.14);
  border-color: rgba(246, 179, 50, 0.28);
  color: #ffe6a8;
}

.site-panel-section {
  padding-top: 28px;
}

.site-tab-panel {
  display: none;
}

.site-tab-panel.is-active,
.admin-tab-panel.is-active,
.editor-tab-panel.is-active {
  display: block;
}

.site-tab-panel + .site-tab-panel {
  margin-top: 0;
}

.tab-card-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.about-grid {
  margin-top: 36px;
  max-width: 860px;
}

.about-copy p {
  margin: 0;
  font-size: 17px;
  line-height: 1.8;
  color: rgba(244, 247, 251, 0.84);
}

.about-copy p + p {
  margin-top: 18px;
}

.feature-list {
  display: grid;
  gap: 14px;
}

.feature-item {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.feature-title {
  font-weight: 700;
}

.feature-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.events-list {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.event-card {
  min-height: 210px;
  padding: 22px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 29, 42, 0.92), rgba(10, 20, 31, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: rgba(244, 247, 251, 0.74);
}

.meta-pill {
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(246, 179, 50, 0.12);
  border: 1px solid rgba(246, 179, 50, 0.2);
  color: #ffe6a8;
}

.event-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
}

.event-summary {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  flex: 1 1 auto;
}

.event-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-strong);
}

.forms-grid {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.form-shell {
  padding: 26px 24px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(9, 19, 29, 0.95), rgba(11, 23, 35, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.form-shell h3 {
  margin: 0;
  font-size: 28px;
}

.form-shell p {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.form-grid {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  gap: 10px;
}

.form-row.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(244, 247, 251, 0.92);
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.textarea {
  min-height: 140px;
  padding: 14px;
  resize: vertical;
}

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  outline: none;
  border-color: rgba(246, 179, 50, 0.55);
  box-shadow: 0 0 0 3px rgba(246, 179, 50, 0.14);
}

.form-help {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(244, 247, 251, 0.62);
}

.status-message {
  margin-top: 18px;
  min-height: 22px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.status-message.success {
  color: #c8ffe3;
}

.status-message.error {
  color: #ffd3cf;
}

.driver-panel-shell,
.driver-dashboard {
  margin-top: 36px;
}

.driver-login-card,
.driver-dashboard-card,
.driver-dashboard-header {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 29, 42, 0.92), rgba(10, 20, 31, 0.98));
  box-shadow: var(--shadow);
}

.driver-login-card,
.driver-dashboard-card {
  padding: 24px;
}

.driver-dashboard-header {
  padding: 24px;
}

.driver-login-card {
  max-width: 560px;
}

.driver-login-card h3,
.driver-dashboard-card h3,
.driver-dashboard-header h3 {
  margin: 0;
}

.driver-login-card p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.driver-dashboard {
  display: grid;
  gap: 18px;
}

.driver-dashboard-subtitle {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.driver-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.driver-card-header h3 {
  font-size: 24px;
}

.driver-deliveries-list,
.driver-leaderboard-list {
  margin-top: 18px;
  display: grid;
}

.driver-contests-list {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.driver-list-item,
.driver-rank-row {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.driver-list-item:first-child,
.driver-rank-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.driver-list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.driver-list-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.driver-list-title {
  font-size: 16px;
  font-weight: 700;
}

.driver-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 13px;
  color: var(--muted);
}

.driver-list-side {
  display: grid;
  gap: 6px;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
  flex: 0 0 auto;
}

.driver-list-side strong {
  font-size: 16px;
  color: var(--text);
}

.driver-rank-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.driver-rank-index {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(246, 179, 50, 0.12);
  border: 1px solid rgba(246, 179, 50, 0.22);
  color: #ffe6a8;
  font-weight: 800;
  font-size: 13px;
}

.driver-rank-name {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.driver-rank-points {
  font-weight: 800;
  color: var(--accent-strong);
}

.driver-contest-card {
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.driver-contest-card h3 {
  margin: 14px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.driver-contest-card .event-summary {
  margin-top: 12px;
}

.driver-empty-state {
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.download-band {
  padding: 34px 0;
}

.download-shell {
  width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  gap: 24px;
  align-items: center;
}

.tab-download-shell {
  width: 100%;
  padding: 26px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 29, 42, 0.92), rgba(10, 20, 31, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.footer {
  padding: 32px 0 42px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: var(--content-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent-strong);
}

.admin-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 18, 28, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.admin-topbar-inner {
  width: var(--content-width);
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.admin-main {
  width: var(--content-width);
  margin: 0 auto;
  padding: 42px 0 56px;
}

.admin-hero h1 {
  font-size: clamp(34px, 4vw, 52px);
}

.admin-hero p {
  margin: 14px 0 0;
  max-width: 820px;
  color: var(--muted);
  line-height: 1.7;
}

.admin-layout {
  margin-top: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.admin-panel {
  padding: 22px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15, 27, 39, 0.95), rgba(9, 18, 28, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.admin-panel h2 {
  margin: 0;
  font-size: 24px;
}

.admin-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.panel-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-form {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}

.admin-form-actions {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.code-textarea {
  min-height: 320px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
}

.admin-tab-panel,
.editor-tab-panel {
  display: none;
}

.admin-tab-strip {
  margin-top: 28px;
  margin-bottom: 22px;
}

.editor-tab-strip {
  margin-top: 20px;
  margin-bottom: 20px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editor-list {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.editor-item {
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.editor-item-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.editor-item-title {
  font-size: 15px;
  font-weight: 700;
}

.stack-list {
  display: grid;
  gap: 14px;
}

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

.visual-editor-shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.visual-editor-sidebar {
  position: sticky;
  top: 96px;
}

.visual-editor-copy {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.visual-editor-stage {
  padding: 12px;
}

.visual-editor-frame {
  width: 100%;
  min-height: 760px;
  border: 0;
  border-radius: 8px;
  background: #071119;
}

.media-editor-card {
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.media-preview-frame {
  margin-top: 16px;
  min-height: 220px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.media-preview-frame-wide {
  min-height: 260px;
}

.media-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-preview-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

.input-file {
  padding-top: 11px;
  padding-bottom: 11px;
}

.application-card,
.registration-card {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.application-card h3,
.registration-card h3 {
  margin: 0;
  font-size: 18px;
}

.detail-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-row {
  display: grid;
  gap: 4px;
}

.detail-label {
  font-size: 11px;
  color: rgba(244, 247, 251, 0.54);
  text-transform: uppercase;
}

.detail-value {
  font-size: 14px;
  line-height: 1.6;
}

.login-shell {
  width: min(520px, calc(100vw - 32px));
  margin: 64px auto;
  padding: 30px 28px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 29, 42, 0.96), rgba(9, 18, 28, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.login-shell h1 {
  margin: 0;
  font-size: 34px;
}

.login-shell p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 1040px) {
  .hero-inner,
  .about-grid,
  .forms-grid,
  .admin-layout,
  .download-shell,
  .media-editor-grid,
  .visual-editor-shell,
  .driver-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .visual-editor-sidebar {
    position: static;
  }

  .events-list,
  .driver-contests-list {
    grid-template-columns: 1fr;
  }

  .driver-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --content-width: min(100vw - 28px, 100vw - 28px);
    --section-gap: 84px;
  }

  .topbar-inner,
  .admin-topbar-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .site-tab-strip,
  .admin-tab-strip,
  .editor-tab-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    min-height: auto;
    padding: 72px 0 56px;
  }

  .hero h1 {
    max-width: none;
    white-space: normal;
    font-size: clamp(40px, 14vw, 64px);
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 10px;
  }

  .brand-name {
    font-size: 21px;
  }

  .brand-subtitle {
    font-size: 12px;
  }

  .form-row.two-col,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .driver-summary-grid {
    grid-template-columns: 1fr;
  }

  .driver-list-item {
    flex-direction: column;
  }

  .driver-list-side {
    text-align: left;
  }

  .driver-rank-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .driver-rank-points {
    grid-column: 2;
  }

  .form-shell,
  .admin-panel,
  .login-shell,
  .driver-login-card,
  .driver-dashboard-card,
  .driver-dashboard-header {
    padding: 22px 18px;
  }
}
