/* ---------------------------------------------------------------------------
   Q-Spain — design system
   Mobile-first, no build step, light + dark via prefers-color-scheme.
--------------------------------------------------------------------------- */

:root {
  --bg: #f3f4f8;
  --bg-accent-1: rgba(99, 102, 241, 0.10);
  --bg-accent-2: rgba(168, 85, 247, 0.08);
  --card: #ffffff;
  --card-soft: #f8f9fc;
  --text: #171923;
  --text-soft: #4a5162;
  --muted: #7a8194;
  --border: #e5e8f0;
  --border-strong: #d4d9e5;

  --primary: #4f46e5;
  --primary-strong: #4338ca;
  --primary-soft: #eef2ff;
  --primary-text: #3730a3;

  --green-soft: #ecfdf5; --green-text: #047857; --green-dot: #10b981;
  --amber-soft: #fffbeb; --amber-text: #b45309; --amber-dot: #f59e0b;
  --red-soft:   #fef2f2; --red-text:   #b91c1c; --red-dot:   #ef4444;
  --gray-soft:  #f1f3f7; --gray-text:  #4b5563; --gray-dot:  #9ca3af;

  --shadow-sm: 0 1px 2px rgba(23, 25, 35, 0.05);
  --shadow-md: 0 1px 3px rgba(23, 25, 35, 0.06), 0 6px 16px -6px rgba(23, 25, 35, 0.10);
  --shadow-lg: 0 4px 12px rgba(23, 25, 35, 0.08), 0 16px 40px -12px rgba(23, 25, 35, 0.18);

  --radius: 16px;
  --radius-sm: 10px;
  --focus-ring: 0 0 0 3px rgba(99, 102, 241, 0.25);

  /* Uniform control heights so inputs, selects and buttons always line up. */
  --control-h: 42px;
  --control-h-sm: 34px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101219;
    --bg-accent-1: rgba(99, 102, 241, 0.14);
    --bg-accent-2: rgba(168, 85, 247, 0.10);
    --card: #191c26;
    --card-soft: #1f2330;
    --text: #eef0f6;
    --text-soft: #c3c8d6;
    --muted: #8b92a5;
    --border: #2a2f3e;
    --border-strong: #394052;

    --primary: #818cf8;
    --primary-strong: #a5b4fc;
    --primary-soft: rgba(99, 102, 241, 0.16);
    --primary-text: #c7d2fe;

    --green-soft: rgba(16, 185, 129, 0.14); --green-text: #6ee7b7;
    --amber-soft: rgba(245, 158, 11, 0.14); --amber-text: #fcd34d;
    --red-soft:   rgba(239, 68, 68, 0.14);  --red-text:   #fca5a5;
    --gray-soft:  rgba(156, 163, 175, 0.14); --gray-text: #cbd0da;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.55);
    --focus-ring: 0 0 0 3px rgba(129, 140, 248, 0.35);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(60rem 40rem at 110% -10%, var(--bg-accent-2), transparent 60%),
    radial-gradient(50rem 34rem at -20% 0%, var(--bg-accent-1), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.015em; }
h1 { font-size: 1.55rem; }

code { background: var(--card-soft); border: 1px solid var(--border); border-radius: 6px; padding: 0.05rem 0.35rem; font-size: 0.86em; }

/* --- Top bar ------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.65rem clamp(1rem, 4vw, 1.6rem);
  background: color-mix(in srgb, var(--card) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--text) !important;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: block;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.topbar nav { display: flex; gap: 0.3rem; align-items: center; flex-wrap: wrap; margin-left: auto; }
.topbar nav a {
  display: inline-flex;
  align-items: center;
  height: var(--control-h-sm);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0 0.7rem;
  border-radius: 999px;
}
.topbar nav a:hover { background: var(--card-soft); text-decoration: none; color: var(--text); }
.topbar nav a.active { background: var(--primary-soft); color: var(--primary-text); }

.user-chip {
  display: inline-flex;
  align-items: center;
  height: var(--control-h-sm);
  gap: 0.45rem;
  padding: 0 0.75rem 0 0.32rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text) !important;
  font-weight: 600;
  font-size: 0.9rem;
}
.user-chip:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow-sm); }

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  overflow: hidden;
  flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.lang-switch { display: inline-flex; height: var(--control-h-sm); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang-switch a {
  display: inline-flex;
  align-items: center;
  padding: 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lang-switch a:hover { text-decoration: none; background: var(--card-soft); }
.lang-switch a.active { background: var(--primary-soft); color: var(--primary-text); }

/* --- Layout ------------------------------------------------------------- */

.container { max-width: 980px; margin: 0 auto; padding: clamp(1rem, 3.5vw, 1.75rem); }

body.auth-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
}
body.auth-page > main.container {
  display: grid;
  width: 100%;
  max-width: none;
  min-height: 0;
  padding: 0;
}

.page-head { margin-bottom: 1.1rem; }
.page-head h1 { margin: 0.15rem 0 0.25rem; }
.page-head .sub { color: var(--muted); font-size: 0.94rem; margin: 0; }
.page-title { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.breadcrumb { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.4rem; display: inline-block; }

/* --- Cards -------------------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.35rem);
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow-md);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card.warn { border-left: 4px solid var(--amber-dot); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}
.section-head h3 { margin: 0; font-size: 1.06rem; display: inline-flex; align-items: center; gap: 0.45rem; }
.section-head .icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary-soft);
  font-size: 0.9rem;
  flex: none;
}

/* --- Flash / errors ------------------------------------------------------ */

.flash, .errors {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.94rem;
  box-shadow: var(--shadow-sm);
}
.flash { background: var(--green-soft); color: var(--green-text); border: 1px solid color-mix(in srgb, var(--green-dot) 35%, transparent); }
.errors { background: var(--red-soft); color: var(--red-text); border: 1px solid color-mix(in srgb, var(--red-dot) 35%, transparent); }
.errors ul { margin: 0; padding-left: 1.1rem; }

/* --- Forms ---------------------------------------------------------------- */

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.82rem;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

input[type="text"], input[type="number"], textarea, select, input[type="file"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
input[type="text"], input[type="number"], select {
  height: var(--control-h);
  padding-top: 0;
  padding-bottom: 0;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
textarea { min-height: 96px; resize: vertical; }
::placeholder { color: var(--muted); opacity: 0.8; }

.field { margin-bottom: 1rem; }
.field .hint { color: var(--muted); font-size: 0.82rem; margin-top: 0.3rem; text-transform: none; }

.row-form { display: flex; gap: 0.55rem; align-items: flex-end; flex-wrap: wrap; }
.row-form .field { margin-bottom: 0; flex: 1; min-width: 130px; }
.inline-form { display: inline; }
input.qty-input { width: 76px !important; text-align: center; height: var(--control-h-sm); padding: 0 0.4rem; }
.add-line input.qty-input { height: var(--control-h); }

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: linear-gradient(180deg, #5b54f0, var(--primary) 60%);
  color: #fff !important;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  height: var(--control-h);
  padding: 0 1.05rem;
  font-size: 0.93rem;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none !important;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.08s ease, box-shadow 0.12s ease, filter 0.12s ease;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.btn.secondary {
  background: var(--card);
  color: var(--text) !important;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn.secondary:hover { background: var(--card-soft); filter: none; }

.btn.danger {
  background: transparent;
  color: var(--red-text) !important;
  border-color: color-mix(in srgb, var(--red-dot) 40%, transparent);
  box-shadow: none;
}
.btn.danger:hover { background: var(--red-soft); filter: none; }
.btn.danger.solid { background: #dc2626; color: #fff !important; border-color: transparent; }
.btn.danger.solid:hover { background: #b91c1c; }

.btn.small { height: var(--control-h-sm); padding: 0 0.66rem; font-size: 0.82rem; border-radius: 8px; }

/* --- Badges --------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.62rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--primary-soft);
  color: var(--primary-text);
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}
.badge.plain::before { display: none; }
.badge.gray  { background: var(--gray-soft);  color: var(--gray-text); }
.badge.green { background: var(--green-soft); color: var(--green-text); }
.badge.amber { background: var(--amber-soft); color: var(--amber-text); }
.badge.red   { background: var(--red-soft);   color: var(--red-text); }

/* --- Tables ----------------------------------------------------------------- */

.table-wrap { overflow-x: auto; margin: 0 -0.35rem; padding: 0 0.35rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  border-bottom-color: var(--border-strong);
}
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.total-line td { border-top: 2px solid var(--border-strong); font-weight: 750; }

/* --- Lists ------------------------------------------------------------------- */

.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.68rem 0.25rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.list li:last-child { border-bottom: none; }
.list li:hover { background: color-mix(in srgb, var(--card-soft) 60%, transparent); border-radius: 8px; }
.list .grow { flex: 1; min-width: 150px; }
.list a { color: var(--text); font-weight: 600; }
.list a:hover { color: var(--primary); }

.muted { color: var(--muted); font-size: 0.88rem; font-weight: 400; }
.total-line { font-weight: 750; }

/* --- Stats row (dashboard) ------------------------------------------------ */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.7rem; margin-bottom: 1.1rem; }
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.95rem;
  box-shadow: var(--shadow-sm);
}
.stat .value { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.stat .label { font-size: 0.78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stat.warn .value { color: var(--amber-text); }

/* --- Empty states -------------------------------------------------------- */

.empty {
  text-align: center;
  color: var(--muted);
  padding: 1.6rem 1rem;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--card-soft) 55%, transparent);
}
.empty .glyph { font-size: 1.7rem; display: block; margin-bottom: 0.35rem; }

/* --- Participant blocks ---------------------------------------------------- */

.participant {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.95rem;
  margin-bottom: 0.8rem;
  background: var(--card-soft);
}
.participant .who { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.participant .who .name { font-weight: 700; }
.participant .actions { margin-top: 0.6rem; display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; }

/* --- Details / manage panel ------------------------------------------------ */

details.panel { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card-soft); margin-bottom: 1.1rem; }
details.panel > summary {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  -webkit-user-select: none;
  user-select: none;
}
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform 0.15s ease; }
details.panel[open] > summary::after { transform: rotate(180deg); }
details.panel .panel-body { padding: 0 1rem 1rem; }

/* --- Auth page ---------------------------------------------------------------- */

.auth-wrap { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 1.5rem 1rem; }
body.auth-page .auth-wrap { width: 100%; height: 100%; min-height: 0; padding: 1rem; }
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem 1.7rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.auth-card .logo-lg {
  width: 104px;
  height: 104px;
  border-radius: 20px;
  display: inline-block;
  object-fit: cover;
  margin-bottom: 0.8rem;
  box-shadow: var(--shadow-md);
}
.auth-card h1 { margin: 0 0 0.3rem; font-size: 1.35rem; }
.auth-card .tagline { color: var(--muted); font-size: 0.93rem; margin: 0 0 1.4rem; }
.mystery-card { max-width: 320px; }
.mystery-mark { color: var(--muted); font-size: 1.5rem; letter-spacing: 0.3em; margin-right: -0.3em; }
.telegram-login-widget {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--card);
}
.telegram-login-widget iframe {
  display: block;
  border: 0;
  background: transparent !important;
  color-scheme: light;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1.4rem 0 1rem;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-card form { text-align: left; }

/* --- Collapsible section (catalog) ---------------------------------------------- */

details.collapse > summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-soft);
  font-weight: 650;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  -webkit-user-select: none;
  user-select: none;
}
details.collapse > summary::-webkit-details-marker { display: none; }
details.collapse > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform 0.15s ease; }
details.collapse[open] > summary::after { transform: rotate(180deg); }
details.collapse > summary:hover { border-color: var(--border-strong); }
details.collapse[open] > summary { margin-bottom: 0.7rem; }

/* --- My-order sticky save bar ---------------------------------------------------- */

.order-savebar {
  position: sticky;
  bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  z-index: 5;
}

/* --- Catalog table column balance ---------------------------------------------- */

.catalog-table th:first-child { width: 42%; }
.catalog-table td:nth-child(2) { min-width: 170px; }
.catalog-table td:nth-child(2) .muted { white-space: nowrap; }
.catalog-table td:nth-child(3) { white-space: nowrap; }

/* --- Inline qty editing & add-line (organizer) -------------------------------- */

.qty-form {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}
.qty-form .qty-input { width: 62px !important; padding: 0 0.4rem; }

.add-line {
  margin-top: 0.7rem;
  padding: 0.7rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--card) 60%, transparent);
}

/* --- Discreet inline "add" toggle ---------------------------------------------- */

.label-row { display: flex; align-items: center; gap: 0.5rem; }
.label-row label { margin-bottom: 0; }

.add-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px dashed var(--border-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease;
}
.add-toggle:hover { border-color: var(--primary); color: var(--primary); }
.add-toggle.open { border-style: solid; border-color: var(--primary); color: var(--primary); }

/* --- Import notices ------------------------------------------------------------ */

.import-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.7rem;
  font-size: 0.93rem;
  border: 1px solid var(--border-strong);
  background: var(--card-soft);
}
.import-notice.completed { border-color: color-mix(in srgb, var(--green-dot) 40%, transparent); background: var(--green-soft); color: var(--green-text); }
.import-notice.failed { border-color: color-mix(in srgb, var(--red-dot) 40%, transparent); background: var(--red-soft); color: var(--red-text); }

/* --- File dropzone ------------------------------------------------------------ */

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1.8rem 1rem;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--card-soft) 55%, transparent);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--primary); outline: none; }
.dropzone.dragging { border-color: var(--primary); background: var(--primary-soft); }
.dropzone .dz-icon { font-size: 1.8rem; }

.file-list { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.file-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.4rem;
  background: var(--card);
}
.file-list .file-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 600; font-size: 0.92rem; }

/* --- Spinner ----------------------------------------------------------------- */

.spinner {
  display: inline-block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid var(--primary-soft);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Misc -------------------------------------------------------------------- */

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

@media (max-width: 560px) {
  .topbar nav a { padding: 0.35rem 0.5rem; font-size: 0.86rem; }
  .hide-sm { display: none; }
}
