:root {
  --bg: #081524;
  --bg-soft: #0e2036;
  --surface: rgba(12, 27, 42, 0.82);
  --surface-strong: #12253d;
  --panel: rgba(18, 37, 61, 0.96);
  --panel-alt: rgba(13, 28, 45, 0.9);
  --primary: #5cc8ff;
  --primary-strong: #2aa8ff;
  --secondary: #d9f4ff;
  --text: #ebf5ff;
  --text-soft: #a8bed6;
  --success: #48d597;
  --warning: #f7c96d;
  --danger: #ff7a7a;
  --border: rgba(157, 199, 255, 0.18);
  --shadow: 0 24px 80px rgba(4, 9, 18, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(92, 200, 255, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(104, 129, 255, 0.14), transparent 30%),
    var(--bg);
  color: var(--text);
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

img {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(92, 200, 255, 0.06), transparent 35%, rgba(50, 110, 255, 0.08));
}

.app-header,
.page-shell,
.app-footer {
  position: relative;
  z-index: 1;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-link,
.footer-links a,
.cookie-link {
  color: var(--text-soft);
  text-decoration: none;
}

.nav-link {
  font-size: 0.8rem;
  padding: 8px 10px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(92, 200, 255, 0.08);
  color: var(--text);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 18px 24px;
  backdrop-filter: blur(16px);
  background: rgba(6, 17, 29, 0.5);
  border-bottom: 1px solid var(--border);
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #8b9dff);
  color: #041827;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(92, 200, 255, 0.35);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 1.1rem;
}

.brand-copy span {
  color: var(--text-soft);
  font-size: 0.78rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 12px rgba(255, 122, 122, 0.8);
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 12px rgba(72, 213, 151, 0.9);
}

.page-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 36px 24px 50px;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 26px;
}

.hero-copy {
  padding: 18px 8px;
}

.eyebrow,
.panel-kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 14px;
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.05;
}

.hero-copy p {
  max-width: 60ch;
  margin: 0;
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.7;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.metric-card,
.card,
.panel,
.verify-card,
.referendum-card {
  background: rgba(13, 28, 45, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-card strong {
  font-size: 1.15rem;
}

.metric-card span {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.hero-visual {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mini-card {
  background: linear-gradient(180deg, rgba(143, 157, 255, 0.07), rgba(92, 200, 255, 0.04));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-card.success {
  background: linear-gradient(180deg, rgba(72, 213, 151, 0.12), rgba(72, 213, 151, 0.04));
}

.mini-card.accent {
  background: linear-gradient(180deg, rgba(92, 200, 255, 0.12), rgba(58, 130, 246, 0.05));
}

.label {
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-btn,
.secondary-btn,
.choice-btn {
  border: none;
  border-radius: 14px;
  padding: 0.95rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #061827;
  box-shadow: 0 12px 32px rgba(92, 200, 255, 0.3);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
}

.primary-btn:hover,
.secondary-btn:hover,
.choice-btn:hover {
  transform: translateY(-1px);
}

.small-btn {
  padding: 0.72rem 1rem;
  font-size: 0.85rem;
}

.auth-section,
.verify-section {
  margin-top: 12px;
}

.auth-grid,
.verify-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.panel,
.verify-card {
  padding: 22px;
}

.panel-header {
  margin-bottom: 12px;
}

.panel-header h2,
.verify-card h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
}

.description {
  margin: 0 0 18px;
  color: var(--text-soft);
  line-height: 1.7;
}

.stacked-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stacked-form label,
.inline-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stacked-form label span {
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 600;
}

.stacked-form input,
.inline-upload input {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(8, 21, 36, 0.72);
  color: var(--text);
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

.alt-panel {
  background: linear-gradient(180deg, rgba(17, 34, 54, 0.95), rgba(11, 27, 43, 0.82));
}

.banner {
  padding: 12px 14px;
  border-radius: 14px;
  margin: 18px 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.banner.offline {
  background: rgba(255, 122, 122, 0.1);
  border: 1px solid rgba(255, 122, 122, 0.3);
  color: #ffd4d4;
}

.banner.pending {
  background: rgba(92, 200, 255, 0.08);
  border: 1px solid rgba(92, 200, 255, 0.3);
  color: #dff6ff;
}

.inline-error {
  background: rgba(255, 122, 122, 0.08);
  border: 1px solid rgba(255, 122, 122, 0.28);
  color: #ffc4c4;
}

.status-box {
  min-height: 20px;
  color: var(--text-soft);
  margin-bottom: 18px;
}

.verified-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin-top: 28px;
  padding: 15px 18px;
  border: 1px solid rgba(91, 219, 168, 0.35);
  border-left: 4px solid #5bdba8;
  border-radius: 8px;
  background: rgba(91, 219, 168, 0.09);
  color: #c8f8e1;
}

.verified-banner strong {
  color: #74e5b5;
}

.qr-box {
  margin-top: 16px;
  color: var(--text-soft);
}

.verification-steps {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.verification-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  column-gap: 10px;
}

.verification-step span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(54, 176, 244, 0.16);
  color: #63c8ff;
  font-weight: 800;
}

.verification-step strong {
  color: var(--text);
  font-size: 0.94rem;
}

.verification-step small {
  color: var(--text-soft);
  font-size: 0.82rem;
}

.verify-note {
  margin: 14px 0 18px;
  padding: 11px 13px;
  border-left: 3px solid #f0b35b;
  background: rgba(240, 179, 91, 0.09);
  color: #f6d39b;
  font-size: 0.86rem;
  line-height: 1.45;
}

.rarimo-qr-canvas {
  display: block;
  width: 264px;
  max-width: 100%;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
}

.qr-heading {
  margin: 0 0 12px;
  color: var(--text);
  font-weight: 700;
}

.qr-phone-warning {
  padding: 14px;
  border: 1px solid rgba(240, 179, 91, 0.35);
  border-radius: 8px;
  background: rgba(240, 179, 91, 0.08);
}

.qr-phone-warning .rarimo-qr-canvas {
  display: none;
}

.device-help {
  max-width: 480px;
  margin: 12px 0 0;
  color: #f6d39b;
  font-size: 0.86rem;
  line-height: 1.45;
}

.rarimo-qr-canvas img {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
}

.proof-link {
  display: inline-block;
  margin-top: 12px;
}

.mobile-only-badge,
.mobile-only-help {
  display: none;
}

.referendum-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.referendum-card {
  padding: 20px;
}

.referendum-card h2 {
  margin: 0 0 16px;
  font-size: 1.3rem;
}

.referendum-card p {
  margin: 0 0 16px;
  color: var(--text-soft);
  line-height: 1.6;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.choice-btn {
  flex: 1 1 120px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
}

.choice-btn.selected {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #041827;
  border-color: transparent;
}

.vote-status {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.vote-status.synced {
  color: var(--success);
}

.vote-status.queued {
  color: var(--warning);
}

.feature-grid,
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.votes-table-wrap {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.list-section-title {
  margin: 18px 0 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
}

.votes-row {
  display: grid;
  grid-template-columns: 2.2fr 0.8fr 1fr;
  gap: 14px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
}

.votes-row-head {
  background: transparent;
  border: none;
  padding-top: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.votes-row p {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  width: fit-content;
}

.pill-live {
  background: rgba(72, 213, 151, 0.12);
  color: #9af0c9;
}

.pill-closed {
  background: rgba(255, 122, 122, 0.1);
  color: #ffc4c4;
}

.pill-upcoming {
  background: rgba(247, 201, 109, 0.12);
  color: #ffe0a2;
}

.feature-card,
.info-section {
  padding: 22px;
}

.feature-card h3,
.info-grid h3,
.legal-page h2,
.legal-page h3,
.legal-page h4 {
  margin-top: 0;
}

.feature-card p,
.info-grid p,
.legal-page p,
.legal-page li {
  color: var(--text-soft);
  line-height: 1.7;
}

.info-section {
  margin-top: 26px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--border);
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-column h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-column a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.86rem;
}

.footer-column a:hover {
  color: var(--primary);
}

.footer-bottom {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
}

.footer-open-source {
  color: var(--primary);
}

.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  background: rgba(9, 21, 33, 0.96);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.cookie-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cookie-copy {
  flex: 1;
}

.cookie-copy strong {
  display: block;
  margin-bottom: 6px;
}

.cookie-copy p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  min-width: 120px;
}

.cookie-link {
  color: var(--primary);
}

.hidden {
  display: none !important;
}

.app-footer {
  max-width: 1220px;
  margin: 0 auto;
  padding: 18px 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
}

.legal-shell {
  max-width: 980px;
  margin: 32px auto 64px;
  padding: 0 24px;
}

.legal-page {
  background: rgba(13, 28, 45, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}

.legal-page .lead {
  font-size: 1.05rem;
  color: var(--text-soft);
}

.legal-page ul,
.legal-page ol {
  padding-left: 20px;
}

.legal-page .legal-meta {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--primary);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.referendum-page-shell {
  max-width: 1180px;
  min-width: 0;
  margin: 0 auto;
  padding: 44px 24px 72px;
}

.referendum-hero {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 34px;
  align-items: stretch;
  padding: 48px 0 56px;
}

.referendum-hero-copy {
  min-width: 0;
  align-self: center;
  max-width: 760px;
}

.referendum-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.referendum-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(72, 213, 151, 0.12);
}

.referendum-status-live {
  color: var(--success);
}

.referendum-status-closed {
  color: var(--text-soft);
}

.referendum-status-closed::before {
  box-shadow: none;
}

.referendum-hero h1 {
  max-width: 780px;
  margin: 0;
  color: #f8fbff;
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.referendum-question {
  max-width: 780px;
  margin: 26px 0 0;
  color: #d7e6f5;
  font-size: clamp(1.08rem, 1.6vw, 1.35rem);
  line-height: 1.65;
}

.referendum-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 28px;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.referendum-meta-row span + span {
  padding-left: 22px;
  border-left: 1px solid var(--border);
}

.source-reference {
  display: inline-block;
  margin-top: 18px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.vote-panel {
  min-width: 0;
  align-self: center;
  padding: 28px;
  background: #f5f8fb;
  color: #10243a;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.vote-panel .panel-kicker {
  color: #176da5;
}

.vote-panel h2 {
  margin: 0;
  font-size: 1.75rem;
}

.vote-panel p {
  margin: 12px 0 18px;
  color: #53687a;
  line-height: 1.6;
}

.vote-choice-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.vote-choice-chip {
  padding: 8px 11px;
  color: #17334e;
  background: #e4edf5;
  border: 1px solid #c8d7e4;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 700;
}

.vote-cta {
  width: 100%;
  border-radius: 4px;
}

.vote-closed-note {
  display: block;
  padding: 13px;
  color: #53687a;
  background: #e8eef3;
  border-radius: 4px;
  font-weight: 700;
  text-align: center;
}

.vote-trust-note {
  display: block;
  margin-top: 14px;
  color: #718393;
  font-size: 0.72rem;
  line-height: 1.5;
}

.referendum-content-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 54px;
  align-items: start;
}

.referendum-article {
  min-width: 0;
  padding: 42px 0 0;
  border-top: 1px solid var(--border);
}

.referendum-article,
.referendum-sidebar,
.argument-card {
  min-width: 0;
}

.article-intro,
.article-section {
  padding: 0 0 34px;
}

.article-section {
  margin-top: 34px;
  border-top: 1px solid var(--border);
  padding-top: 34px;
}

.referendum-article h2 {
  margin: 0 0 18px;
  color: #f4f8fc;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.referendum-article p,
.referendum-article li {
  max-width: 70ch;
  color: var(--text-soft);
  line-height: 1.8;
}

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

.argument-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.035);
}

.argument-card h3 {
  margin: 12px 0 8px;
  font-size: 1.35rem;
}

.argument-for {
  border-top-color: var(--success);
}

.argument-against {
  border-top-color: var(--warning);
}

.argument-icon {
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.referendum-sidebar {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 104px;
}

.sidebar-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(13, 28, 45, 0.76);
}

.sidebar-card h2 {
  margin: 0 0 12px;
  font-size: 1.45rem;
}

.sidebar-card p {
  color: var(--text-soft);
  line-height: 1.7;
}

.sidebar-card a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.threshold-card {
  background: linear-gradient(145deg, rgba(18, 61, 91, 0.9), rgba(11, 30, 49, 0.92));
}

.threshold-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.threshold-line strong {
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.threshold-line span {
  color: var(--text-soft);
  font-size: 0.74rem;
  text-align: right;
}

@media (max-width: 900px) {
  .feature-grid,
  .info-grid,
  .votes-row {
    grid-template-columns: 1fr;
  }

  .app-header,
  .app-footer {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

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

  .referendum-hero,
  .referendum-content-grid {
    grid-template-columns: 1fr;
  }

  .referendum-sidebar {
    position: static;
  }
}

@media (max-width: 620px) {
  .referendum-page-shell {
    padding: 22px 18px 48px;
  }

  .referendum-hero {
    padding: 28px 0 38px;
  }

  .referendum-hero h1 {
    font-size: clamp(2.5rem, 14vw, 4rem);
  }

  .referendum-meta-row span + span {
    padding-left: 0;
    border-left: none;
  }

  .argument-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .hero-panel,
  .auth-grid,
  .verify-grid {
    grid-template-columns: 1fr;
  }

  .app-header,
  .app-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  .page-shell {
    padding: 22px 16px 104px;
  }

  .app-header {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .brand-wrap {
    min-width: 0;
    gap: 9px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 0.82rem;
  }

  .brand-copy {
    min-width: 0;
  }

  .brand-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
  }

  .brand-copy span {
    display: none;
  }

  .header-actions {
    width: auto;
    flex-shrink: 0;
  }

  .header-actions .small-btn {
    padding: 8px 10px;
    font-size: 0.7rem;
  }

  .top-nav {
    position: fixed;
    z-index: 100;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    width: 100%;
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
    background: rgba(6, 17, 29, 0.96);
    border-top: 1px solid rgba(141, 181, 213, 0.22);
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(18px);
  }

  .top-nav .nav-link {
    display: block;
    min-width: 0;
    padding: 7px 2px;
    border-radius: 8px;
    font-size: 0.68rem;
    line-height: 1.15;
    text-align: center;
  }

  .top-nav .nav-link:nth-child(n + 5) {
    display: none;
  }

  .app-footer {
    padding-bottom: 104px;
  }

  #verify-manual {
    order: -1;
    border-color: rgba(91, 219, 168, 0.4);
  }

  #verify-rarimo {
    display: none;
  }

  .mobile-only-badge {
    display: inline-block;
    margin-bottom: 10px;
    color: #74e5b5;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .mobile-only-help {
    display: block;
    margin: 14px 0 0;
    color: var(--text-soft);
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .inline-upload {
    align-items: stretch;
  }

  .inline-upload .primary-btn {
    width: 100%;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .status-bar {
    font-size: 0.72rem;
  }
}
