/* Mobile-first UI for flatm.at */
:root {
  --bg: #f7f6f1;
  --card: #ffffff;
  --border: #e5e2da;
  --border-2: #ece9e2;
  --muted: #5c5c5c;
  --text: #0b0b0b;
  --danger: #b42318;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(11, 11, 11, 0.08);
  --container: 980px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 16px;
}

.h1 {
  font-size: clamp(22px, 3.8vw, 28px);
  margin: 0;
  letter-spacing: -0.02em;
}

.h2 {
  font-size: 18px;
  margin: 0;
  letter-spacing: -0.01em;
}

.h3 {
  font-size: 15px;
  margin: 0;
  letter-spacing: -0.01em;
}

.sub {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 246, 241, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(229, 226, 218, 0.75);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar__logo {
  width: 44px;
  height: auto;
  flex: 0 0 auto;
}

.topbar__titles {
  min-width: 0;
}

.topbar__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10px;
  color: #6c6c6c;
  line-height: 1.1;
}

.topbar__title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar__tabs {
  display: none; /* desktop only */
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(229, 226, 218, 0.95);
  background: rgba(255, 255, 255, 0.7);
}

.topbar__tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 999px;
  min-height: 38px;
  padding: 8px 12px;
  font-weight: 900;
  cursor: pointer;
  color: #2f2f2f;
}

.topbar__tab.is-active {
  border-color: rgba(11, 11, 11, 0.18);
  background: rgba(255, 255, 255, 0.95);
}

.app {
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

.view {
  padding: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 1px 0 rgba(11, 11, 11, 0.02);
}

.card__head {
  margin-bottom: 14px;
}

.card__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 10px;
  color: #6c6c6c;
}

.card__title {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.kpi {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: #fbfaf7;
}

.kpi__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6c6c6c;
}

.kpi__value {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 700;
}

.day-list {
  display: grid;
  gap: 12px;
}

.day-group {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  padding: 12px;
  background: #ffffff;
}

.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.day-title {
  font-weight: 600;
  font-size: 14px;
}

.day-total {
  font-size: 12px;
  color: #6c6c6c;
}

.video-list {
  display: grid;
  gap: 8px;
}

.video-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfaf7;
}

.video-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.video-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-sub {
  font-size: 12px;
  color: #6c6c6c;
}

.video-clicks {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.top-links {
  display: grid;
  gap: 8px;
}

.top-link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfaf7;
}

.top-link-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.top-link-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-link-sub {
  font-size: 12px;
  color: #6c6c6c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-link-clicks {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.report-block {
  margin-top: 4px;
}

.report-block__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.report-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.input {
  width: 100%;
}

.report-summary {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.divider {
  height: 1px;
  background: var(--border-2);
  margin: 18px 0;
}

/* Sparkbar chart */
.sparkbar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  align-items: end;
  height: 90px;
  padding: 10px 10px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fbfaf7;
}

.sparkbar__bar {
  width: 100%;
  border-radius: 6px;
  background: rgba(11, 11, 11, 0.85);
  min-height: 2px;
}

.sparkbar__bar[data-zero="true"] {
  background: rgba(11, 11, 11, 0.18);
}

.search input {
  width: 100%;
}

.form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: end;
}

.form--modal {
  padding-bottom: 12px;
}

.form__actions {
  grid-column: 1 / -1;
}

.form__actions--modal {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #3d3d3d;
}

input,
select {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #d6d2c9;
  background: #ffffff;
  color: var(--text);
  font-size: 16px; /* iOS: evita zoom su focus */
}

input:focus,
select:focus {
  outline: 2px solid var(--text);
  outline-offset: 1px;
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.checkbox input {
  width: auto;
}

.advanced {
  grid-column: 1 / -1;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: #fbfaf7;
}

.advanced > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.advanced-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.advanced-section {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.advanced-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text);
}

.hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #6c6c6c;
  line-height: 1.35;
}

.hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  background: #f3f1ea;
  padding: 2px 6px;
  border-radius: 8px;
}

.button {
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  background: var(--text);
  color: #fff;
  min-height: 44px;
  line-height: 1;
  white-space: nowrap;
}

.button--block {
  width: 100%;
}

.button.ghost {
  background: transparent;
  border: 1px solid #cfcac0;
  color: var(--text);
}

.button.danger {
  background: var(--danger);
}

.message {
  grid-column: 1 / -1;
  font-size: 13px;
  margin: 0;
  color: #6c6c6c;
}

.message.success {
  color: #15803d;
}

.message.error {
  color: #b42318;
}

.empty {
  padding: 14px;
  color: #6c6c6c;
  border: 1px dashed #d6d2c9;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

/* Link cards (mobile) */
.link-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.link-card {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  padding: 14px;
  background: #fff;
}

.link-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.link-card__slug {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.link-card__meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fbfaf7;
  font-size: 12px;
  color: #2f2f2f;
  line-height: 1;
}

.badge--danger {
  background: rgba(180, 35, 24, 0.08);
  border-color: rgba(180, 35, 24, 0.25);
  color: #7f1d1d;
}

.link-card__url {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  word-break: break-word;
  line-height: 1.35;
}

.link-card__url a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-card__actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

/* Reports cards (mobile) */
.report-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.report-card {
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  padding: 14px;
  background: #fff;
}

.report-card__title {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.report-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.kv {
  border: 1px solid var(--border);
  background: #fbfaf7;
  border-radius: var(--radius-md);
  padding: 10px;
}

.kv__k {
  font-size: 11px;
  color: #6c6c6c;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.kv__v {
  margin-top: 4px;
  font-weight: 800;
}

/* Desktop table */
.table-wrap {
  overflow-x: auto;
}

.desktop-only {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-2);
  vertical-align: top;
}

th {
  text-align: left;
  color: #6c6c6c;
  font-weight: 700;
}

.slug {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.destination {
  max-width: 360px;
  word-break: break-all;
}

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

/* Bottom navigation */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(247, 246, 241, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(229, 226, 218, 0.85);
}

.bottom-nav__item {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 999px;
  min-height: 44px;
  font-weight: 800;
  cursor: pointer;
  color: #2f2f2f;
}

.bottom-nav__item.is-active {
  border-color: rgba(11, 11, 11, 0.18);
  background: rgba(255, 255, 255, 0.9);
}

.bottom-nav__label {
  font-size: 13px;
}

/* Modal (mobile sheet -> desktop dialog) */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 11, 11, 0.42);
}

.modal__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92vh;
  background: #fff;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border: 1px solid rgba(229, 226, 218, 0.8);
  box-shadow: var(--shadow);
  padding: 14px;
  overflow: auto;
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-2);
  margin-bottom: 12px;
}

.modal__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10px;
  color: #6c6c6c;
}

.modal__title {
  margin-top: 2px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 64px;
  z-index: 55;
  min-width: min(520px, calc(100vw - 24px));
  max-width: min(720px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(229, 226, 218, 0.95);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-showing {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.is-error {
  border-color: rgba(180, 35, 24, 0.25);
  background: rgba(255, 255, 255, 0.98);
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: none;
  }
}

@media (min-width: 720px) {
  .container {
    padding: 22px 20px;
  }

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

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

  .report-block__head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .report-controls {
    grid-template-columns: 180px 150px 150px auto;
    align-items: center;
  }

  .link-card__actions {
    grid-template-columns: auto auto auto;
    justify-content: start;
  }
}

@media (min-width: 960px) {
  .desktop-only {
    display: block;
  }

  .link-list,
  .report-list {
    display: none;
  }

  .bottom-nav {
    display: none;
  }

  .app {
    padding-bottom: 24px;
  }

  .topbar {
    padding: 12px 16px;
  }

  .topbar__logo {
    width: 52px;
  }

  .topbar__tabs {
    display: flex;
  }

  .modal__panel {
    left: 50%;
    top: 50%;
    bottom: auto;
    right: auto;
    transform: translate(-50%, -50%);
    width: min(860px, calc(100vw - 40px));
    max-height: min(86vh, 900px);
    border-radius: 20px;
  }
}

/* Restored layout styles for current HTML structure */
.panel {
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  padding: 14px;
}

.field-note {
  margin-top: -2px;
  font-size: 11px;
  color: rgba(92, 92, 92, 0.75);
}

.advanced-section--disabled {
  opacity: 0.55;
}

.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  margin-bottom: 10px;
}

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(92, 92, 92, 0.2);
  border-top-color: rgba(92, 92, 92, 0.65);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Shell / sidebar / links layout */
.shell {
  min-height: 100%;
  display: grid;
  grid-template-columns: 1fr;
}

.sidebar {
  display: none;
}

.main {
  min-width: 0;
}

.content {
  padding: 16px;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

.content__header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px 0 14px;
}

.content__header-right {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.create-inline {
  margin-bottom: 12px;
}

.create-inline__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.create-inline__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10px;
  color: #6c6c6c;
}

.create-inline__title {
  margin-top: 2px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.link-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border-2);
  background: transparent;
}

.link-row__avatar {
  align-self: start;
}

.link-row:first-child {
  border-top: 1px solid var(--border-2);
}

.link-row__avatar {
  width: 80px;
  height: 45px;
  border-radius: 9px;
  border: 1px solid rgba(229, 226, 218, 0.95);
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 12px;
  overflow: hidden;
}

.link-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-wrap {
  position: relative;
  width: 80px;
  height: 45px;
}

.link-row__thumb {
  cursor: pointer;
}

.thumb-download {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(229, 226, 218, 0.95);
  background: rgba(255, 255, 255, 0.9);
  color: #2f2f2f;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.thumb-wrap:hover .thumb-download,
.thumb-wrap.is-open .thumb-download {
  opacity: 1;
  pointer-events: auto;
}
.link-row__main {
  min-width: 0;
}

.link-row__slugline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.link-row__slug {
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-row__dest {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
}

.mini-btn {
  appearance: none;
  border: 1px solid rgba(229, 226, 218, 0.95);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  width: 26px;
  height: 22px;
  padding: 0;
  font-weight: 500;
  font-size: 12px;
  cursor: pointer;
  color: rgba(47, 47, 47, 0.9);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-row__side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-date {
  font-size: 12px;
  color: rgba(92, 92, 92, 0.8);
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fbfaf7;
  font-size: 11px;
  color: #2f2f2f;
  line-height: 1;
  white-space: nowrap;
}

.action-btn {
  appearance: none;
  border: 1px solid rgba(229, 226, 218, 0.95);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  padding: 4px 8px;
  font-weight: 500;
  font-size: 11px;
  cursor: pointer;
  color: #2f2f2f;
}

.action-btn--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
}

.action-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.action-btn--danger {
  border-color: rgba(180, 35, 24, 0.28);
  background: rgba(180, 35, 24, 0.06);
  color: rgba(180, 35, 24, 0.95);
}

.link-row__actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

@media (max-width: 720px) {
  .link-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border-2);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.6);
  }

  .link-row__avatar {
    display: none;
  }

  .link-row__side {
    justify-content: flex-start;
    gap: 8px;
  }

  .meta-date {
    display: none;
  }

  .link-row__actions {
    margin-left: auto;
  }
}

.pill--clicks {
  background: rgba(11, 11, 11, 0.04);
  font-variant-numeric: tabular-nums;
}

.pill--unique {
  background: rgba(11, 11, 11, 0.08);
  font-variant-numeric: tabular-nums;
}

.pill--tag {
  background: rgba(27, 96, 247, 0.06);
  border-color: rgba(27, 96, 247, 0.18);
}

.icon-btn {
  appearance: none;
  border: 1px solid rgba(229, 226, 218, 0.95);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  min-height: 30px;
  min-width: 30px;
  padding: 0 8px;
  font-weight: 500;
  cursor: pointer;
}

.floating-cta {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 55;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

@media (min-width: 960px) {
  .shell {
    grid-template-columns: 260px 1fr;
  }

  .sidebar {
    display: block;
    padding: 18px 14px;
    border-right: 1px solid rgba(229, 226, 218, 0.85);
    background: rgba(255, 255, 255, 0.35);
  }

  .sidebar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 14px;
  }

  .sidebar__logo {
    width: 38px;
    height: auto;
  }

  .sidebar__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 10px;
    color: #6c6c6c;
  }

  .sidebar__title {
    font-weight: 500;
    letter-spacing: -0.01em;
  }

  .sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 10px;
  }

  .nav-item {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    color: #2f2f2f;
  }

  .nav-item.is-active {
    border-color: rgba(11, 11, 11, 0.16);
    background: rgba(255, 255, 255, 0.9);
  }

  .topbar {
    display: none;
  }

  .floating-cta {
    display: none;
  }

  .content {
    padding: 20px 24px;
    padding-bottom: 24px;
  }

  .content__header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .content__header-right {
    grid-template-columns: 360px auto auto;
    align-items: center;
  }

  .analytics-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

