:root {
  --bg: #090d11;
  --bg-soft: #0d1419;
  --panel: #101922;
  --panel-2: #14202a;
  --line: #263542;
  --text: #e8f2ee;
  --muted: #91a39d;
  --accent: #8be0b0;
  --accent-2: #67c7ee;
  --primary-action: #2f7d55;
  --license-blue-bg: rgba(64, 127, 255, 0.18);
  --license-blue-border: rgba(64, 127, 255, 0.44);
  --license-blue-text: #7fb0ff;
  --danger: #ff6b7a;
  --warning: #ffd166;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

section[id] {
  scroll-margin-top: 18px;
}

.topbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0;
}

.brand-logo,
.footer-logo,
.brand-wordmark,
.footer-wordmark {
  width: 76px;
  height: 76px;
  border-radius: 0;
  display: block;
  object-fit: contain;
}

.brand-wordmark {
  width: 230px;
  height: 61px;
  object-fit: contain;
  border-radius: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav a,
.link-button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}

.nav a.active,
.nav a:hover,
.link-button:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 0;
  margin-top: 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.footer-brand,
.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  width: 46px;
  height: 46px;
}

.footer-wordmark {
  width: 150px;
  height: 40px;
  object-fit: contain;
  border-radius: 0;
}

.footer-version {
  color: var(--muted);
  font-size: 12px;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.legal-text {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.65;
}

.legal-text p {
  margin: 0;
}

.legal-text h2 {
  margin: 18px 0 0;
  color: var(--text);
  font-size: 1.08rem;
}

.legal-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.deletion-request-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.deletion-request-form h2 {
  margin: 0;
}

.legal-meta {
  margin: 8px 0 0;
  color: var(--muted);
}

.auth-grid {
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: center;
  gap: 54px;
}

.login-grid {
  grid-template-columns: minmax(0, 1fr) 420px;
}

.login-grid .auth-panel {
  border-left: 1px solid var(--line);
  padding-left: 40px;
}

.auth-copy p:not(.eyebrow) {
  margin: 16px 0 0;
}

.auth-copy h1 + p {
  margin-top: 14px;
}

.feature-list {
  display: grid;
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.feature-text strong {
  color: var(--text);
  font-size: 15px;
}

.feature-icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 999px;
  background: rgba(139, 224, 176, 0.14);
  display: grid;
  place-items: center;
}

.feature-icon::before {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) translate(1px, -1px);
}

.auth-copy h1,
.page-head h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
}

.auth-copy p:not(.eyebrow) {
  max-width: 540px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel,
.metric {
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
}

.narrow {
  max-width: 560px;
}

.auth-panel,
form.panel {
  display: grid;
  gap: 16px;
}

.medical-captcha {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.medical-captcha legend {
  padding: 0 6px;
  color: var(--accent);
  font-weight: 800;
}

.medical-captcha-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.medical-captcha-option {
  position: relative;
  min-height: 78px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #0a1117;
  cursor: pointer;
  user-select: none;
}

.medical-captcha-option:hover,
.medical-captcha-option:has(input:checked) {
  color: var(--text);
  border-color: rgba(139, 224, 176, 0.7);
  background: rgba(139, 224, 176, 0.1);
}

.medical-captcha-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.medical-captcha-targets span {
  padding: 5px 8px;
  border: 1px solid rgba(139, 224, 176, 0.32);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(139, 224, 176, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.medical-captcha-error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.medical-captcha .medical-captcha-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.medical-captcha .medical-captcha-option {
  position: relative;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #081017;
}

.medical-captcha .medical-captcha-option.is-selected {
  border-color: rgba(139, 224, 176, 0.78);
  background: rgba(139, 224, 176, 0.1);
}

.medical-captcha .captcha-visual {
  width: 98px;
  height: 98px;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}

.medical-captcha .captcha-order {
  position: absolute;
  right: 7px;
  top: 7px;
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #06110d;
  background: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.medical-captcha .captcha-order:empty {
  display: none;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h2 {
  margin: 0;
  font-size: 18px;
}

label {
  display: grid;
  gap: 8px;
}

label span,
.muted {
  color: var(--muted);
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #0a1117;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
}

.primary-button,
.secondary-button,
.danger-button,
.primary-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
}

.primary-button,
.primary-link {
  color: #ffffff;
  background: var(--primary-action);
}

.secondary-button {
  color: var(--text);
  background: var(--panel-2);
  border-color: var(--line);
}

.compact-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.debug-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(420px, 1.2fr);
  gap: 16px;
  align-items: start;
}

.debug-json-input {
  width: 100%;
  min-height: 520px;
  resize: vertical;
  margin: 12px 0;
  font: 13px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.debug-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.debug-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.debug-fields input,
.debug-fields textarea {
  width: 100%;
  color: var(--text);
}

.debug-fields textarea {
  min-height: 120px;
  resize: vertical;
}

.debug-wide { grid-column: 1 / -1; }

.debug-service-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.debug-service-fields strong { color: var(--text); }

.analogs-form {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}

.analogs-form input { flex: 1; min-width: 0; }

.analogs-source { margin-top: 12px; font-size: 13px; }

.analogs-group { margin-bottom: 18px; }

.analogs-group h3 { margin: 0 0 8px; }

.analogs-latin {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.analogs-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.analogs-list li {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.analogs-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.analogs-tag-original {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 820px) {
  .debug-grid { grid-template-columns: minmax(0, 1fr); }
  .debug-json-input { min-height: 320px; }
}

@media (max-width: 520px) {
  .debug-fields { grid-template-columns: minmax(0, 1fr); }
}

.secondary-button.disabled {
  opacity: 0.45;
  cursor: default;
}

.danger-button {
  color: var(--danger);
  background: rgba(255, 107, 122, 0.08);
  border-color: rgba(255, 107, 122, 0.25);
}

.notice {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
}

.flash-alert {
  margin: 4px 0 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 700;
  animation: fade-away 4s ease forwards;
}

.flash-alert.success {
  color: var(--accent);
  background: rgba(139, 224, 176, 0.12);
  border: 1px solid rgba(139, 224, 176, 0.24);
}

@keyframes fade-away {
  0%, 72% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

.danger {
  color: var(--danger);
  background: rgba(255, 107, 122, 0.08);
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.account-chip {
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--bg-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.version-chip {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent);
  background: var(--bg-soft);
  font-weight: 800;
  white-space: nowrap;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.admin-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-metrics.secondary .metric {
  min-height: 82px;
}

.ai-check-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.ai-check-panel p {
  margin: 0;
}

.manage-panel {
  display: grid;
  gap: 16px;
}

.manage-grid {
  align-items: start;
}

.manage-grid > .panel {
  align-self: start;
}

/* The second card spans two rows, so the third one sits under the first without a gap left by the row height */
.manage-grid > .panel:nth-child(2) {
  grid-row: span 2;
}

@media (max-width: 860px) {
  .manage-grid > .panel:nth-child(2) {
    grid-row: auto;
  }
}

.settings-list {
  display: grid;
  gap: 0;
}

.manage-panel .section-title .status {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Buttons that set their own display must still disappear when hidden. */
[hidden] {
  display: none !important;
}

.manage-panel .section-title {
  margin-bottom: 0;
}

.manage-panel .debug-service-fields {
  margin-top: 0;
}

.form-error {
  color: var(--danger);
}

.manage-panel .form-error,
.manage-panel .muted {
  margin: 0;
  font-size: 13px;
}

.manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* A start button is green (primary-button); while its process runs it turns red. */
.action-button {
  gap: 10px;
  width: fit-content;
}

.action-button.running {
  color: #ffffff;
  background: #c4384b;
  border-color: #c4384b;
}

.action-button:disabled {
  cursor: default;
}

.button-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.action-button.loading .button-spinner {
  display: inline-block;
}

.ai-check-result {
  max-height: 360px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080d12;
  color: var(--text);
  white-space: pre-wrap;
}

.ai-check-result.success {
  border-color: rgba(139, 224, 176, 0.45);
}

.ai-check-result.error {
  border-color: rgba(255, 107, 122, 0.55);
  color: var(--danger);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.metric {
  min-height: 96px;
  padding: 18px;
  display: grid;
  align-content: space-between;
}

.metric span {
  color: var(--muted);
}

.metric strong {
  font-size: 32px;
}

.metric strong.small {
  font-size: 16px;
}

.grid {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.users-panel {
  min-width: 0;
}

.users-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.anonymous-toggle-form {
  margin: 0;
}

.toggle-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.toggle-control input {
  position: absolute;
  opacity: 0;
}

.toggle-control span {
  width: 34px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  position: relative;
  transition: background 160ms ease, border-color 160ms ease;
}

.toggle-control span::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 160ms ease, background 160ms ease;
}

.toggle-control input:checked + span {
  border-color: var(--primary-action);
  background: var(--primary-action);
}

.toggle-control input:checked + span::after {
  transform: translateX(14px);
  background: white;
}

.toggle-control input:focus-visible + span {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.user-tabs {
  display: grid;
  gap: 14px;
}

.tab-list {
  display: flex;
  gap: 8px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.tab-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.tab-button:hover,
.tab-button.is-active {
  color: var(--text);
  border-color: rgba(103, 199, 238, 0.35);
  background: rgba(103, 199, 238, 0.11);
}

.tab-panel {
  display: grid;
  gap: 14px;
}

.tab-panel[hidden] {
  display: none;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.stack {
  display: grid;
  gap: 0;
}

.row-card {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.row-card:last-child {
  border-bottom: 0;
}

.row-card div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.row-card strong,
.row-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-card span {
  color: var(--muted);
}

.right {
  text-align: right;
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.status {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #111a22;
}

.status.active {
  color: var(--accent);
  background: rgba(139, 224, 176, 0.1);
}

.license-badge {
  width: fit-content;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 9px 13px;
  border: 1px solid var(--license-blue-border);
  border-radius: 8px;
  color: var(--license-blue-text) !important;
  background: var(--license-blue-bg);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  cursor: default;
  user-select: none;
}

.status.trial {
  color: var(--accent-2);
  background: rgba(103, 199, 238, 0.1);
}

.status.pending {
  color: var(--warning);
  background: rgba(255, 209, 102, 0.1);
}

.status.expired {
  color: var(--warning);
  background: rgba(255, 209, 102, 0.1);
}

.status.revoked {
  color: var(--danger);
  background: rgba(255, 107, 122, 0.1);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.users-table-wrap {
  overflow: visible;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
}

tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.025);
}

.users-table {
  table-layout: fixed;
  min-width: 0;
}

.users-table th,
.users-table td {
  padding: 10px 8px;
  font-size: 14px;
}

.users-table th:nth-child(1) { width: 18%; }
.users-table th:nth-child(2) { width: 6%; }
.users-table th:nth-child(3) { width: 9%; }
.users-table th:nth-child(4) { width: 7%; }
.users-table th:nth-child(5) { width: 8%; }
.users-table th:nth-child(6),
.users-table th:nth-child(7),
.users-table th:nth-child(8),
.users-table th:nth-child(9) { width: 5%; }
.users-table th:nth-child(10) { width: 11%; }
.users-table th:nth-child(11) { width: 14%; }
.users-table th:nth-child(12) { width: 7%; }

.users-table th:nth-child(n + 6):nth-child(-n + 9),
.users-table td:nth-child(n + 6):nth-child(-n + 9) {
  text-align: center;
}

.users-table .date-cell,
.users-table td:last-child {
  white-space: normal;
}

td .license-badge {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 14px;
}

td .status {
  padding: 4px 7px;
  font-size: 13px;
}

.table-action {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.table-sort {
  color: inherit;
  text-decoration: none;
}

.table-sort:hover,
.table-sort.is-active {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.anonymous-panel {
  margin-top: 12px;
}

.anonymous-table-wrap {
  overflow-x: visible;
}

.anonymous-table {
  table-layout: fixed;
  min-width: 0;
}

.anonymous-table th,
.anonymous-table td {
  padding: 10px 8px;
  font-size: 14px;
}

.anonymous-table th:nth-child(1) { width: 30%; }
.anonymous-table th:nth-child(2) { width: 18%; }
.anonymous-table th:nth-child(3),
.anonymous-table th:nth-child(4) { width: 8%; }
.anonymous-table th:nth-child(5) { width: 12%; }
.anonymous-table th:nth-child(6),
.anonymous-table th:nth-child(7) { width: 12%; }

.email-cell,
.date-cell,
.guid-cell,
.version-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--accent-2);
  background: linear-gradient(180deg, rgba(103, 199, 238, 0.13), rgba(139, 224, 176, 0.055));
  box-shadow: inset 0 -1px 0 rgba(103, 199, 238, 0.28);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

td {
  color: var(--text);
}

td a {
  color: var(--accent);
  font-weight: 700;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pagination-info {
  color: var(--muted);
  font-size: 14px;
}

.pagination.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.table-note {
  margin: 10px 0 0;
}

.inline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.license-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 12px 0 4px;
  border-top: 1px solid var(--line);
  background: transparent;
}

.license-editor label,
.license-editor div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.license-editor strong,
.license-editor span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.license-editor span {
  color: var(--muted);
}

.license-editor-actions {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .auth-grid,
  .grid.two,
  .admin-grid,
  .metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-grid .auth-panel {
    border-left: none;
    padding-left: 0;
  }

  .page-head,
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .nav {
    flex-wrap: wrap;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .license-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .panel {
    padding: 16px;
  }

  .inline-fields,
  .license-editor {
    grid-template-columns: minmax(0, 1fr);
  }

  .row-card {
    align-items: stretch;
    flex-direction: column;
  }

  .right {
    text-align: left;
  }
}

/* Pricing page (/pricing) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.pr {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 72px;
  padding: 24px 0 56px;
}

.pr-icon {
  width: 22px;
  height: 22px;
  flex: none;
}

/* buttons */
.pr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.pr-btn:hover {
  transform: translateY(-1px);
}

.pr-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #06140d;
}

.pr-btn.primary:hover {
  background: #a5edc5;
}

.pr-btn.ghost {
  background: transparent;
  color: var(--text);
}

.pr-btn.ghost:hover {
  border-color: var(--accent);
}

.pr-btn.block {
  width: 100%;
}

.pr-btn[aria-disabled="true"] {
  cursor: default;
}

.pr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pr-actions.center {
  justify-content: center;
}

/* hero */
.pr-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: center;
  padding: 28px 0 0;
}

.pr-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.08;
}

.pr-lead {
  margin: 0 0 20px;
  max-width: 620px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

.pr-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--warning) 50%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--warning) 10%, transparent);
  color: var(--warning);
  font-size: 14px;
  font-weight: 700;
}

.pr-pill .pr-icon {
  width: 18px;
  height: 18px;
}

/* the phone illustration */
.pr-phone {
  justify-self: center;
  width: min(300px, 100%);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow), 0 0 80px color-mix(in srgb, var(--accent) 14%, transparent);
  transform: rotate(2deg);
}

.pr-phone-screen {
  display: grid;
  gap: 10px;
  padding: 20px 14px 18px;
  border-radius: 24px;
  background: var(--bg-soft);
}

.pr-phone-title {
  margin: 0 0 4px 4px;
  font-size: 20px;
  font-weight: 800;
}

.pr-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.pr-note strong,
.pr-note small {
  display: block;
}

.pr-note strong {
  font-size: 14px;
}

.pr-note small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
}

.pr-note-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent-2) 16%, transparent);
  color: var(--accent-2);
}

.pr-note.warn .pr-note-icon {
  background: color-mix(in srgb, var(--warning) 16%, transparent);
  color: var(--warning);
}

.pr-note.ok .pr-note-icon {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

/* trust strip */
.pr-trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: -28px 0 0;
  padding: 18px 20px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.pr-trust li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pr-trust strong,
.pr-trust small {
  display: block;
}

.pr-trust strong {
  font-size: 14.5px;
}

.pr-trust small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.pr-trust-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

/* sections */
.pr-section {
  display: grid;
  gap: 28px;
  scroll-margin-top: 20px;
}

.pr-section-head {
  text-align: center;
}

.pr-section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.6vw, 38px);
}

.pr-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

/* plan cards */
.pr-plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.pr-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 22px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pr-plan.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, var(--panel)), var(--panel) 40%);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}

.pr-plan h3 {
  margin: 0;
  font-size: 24px;
}

.pr-plan-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #06140d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pr-plan-tagline {
  margin: 0;
  color: var(--muted);
}

.pr-plan-price {
  margin: 14px 0 0;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
}

.pr-plan-promo {
  margin: 0 0 10px;
  min-height: 1.4em;
  color: var(--warning);
  font-size: 14px;
  font-weight: 700;
}

.pr-plan-lead {
  margin: 14px 0 2px;
  font-size: 14px;
  font-weight: 700;
}

.pr-plan-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pr-plan-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.pr-plan-list .pr-icon {
  width: 19px;
  height: 19px;
  margin-top: 1px;
}

.pr-plan-list li.yes .pr-icon {
  color: var(--accent);
}

.pr-plan-list li.no {
  color: var(--muted);
  opacity: 0.7;
}

.pr-plan-note {
  margin: auto 0 0;
  padding-top: 16px;
  color: var(--muted);
  font-size: 13.5px;
}

/* features */
.pr-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.pr-feature {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pr-feature h3 {
  margin: 14px 0 8px;
  font-size: 18px;
}

.pr-feature p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.pr-feature-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-2) 14%, transparent);
  color: var(--accent-2);
}

/* steps */
.pr-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pr-steps li {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pr-steps h3 {
  margin: 14px 0 8px;
  font-size: 20px;
}

.pr-steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.pr-step-n {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #06140d;
  font-weight: 800;
}

/* comparison table */
.pr-table-wrap {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.pr-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.pr-table th,
.pr-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.pr-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel-2);
}

.pr-table thead strong,
.pr-table thead small {
  display: block;
}

.pr-table thead strong {
  font-size: 17px;
}

.pr-table thead small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
}

.pr-table tbody th[scope="row"] {
  width: 30%;
  text-align: left;
  font-weight: 600;
}

.pr-table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.pr-table .pr-group th {
  padding: 20px 16px 8px;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
}

.pr-table td.yes .pr-icon {
  color: var(--accent);
}

.pr-table td.no .pr-icon {
  color: var(--muted);
  opacity: 0.5;
}

.pr-table td.text {
  font-size: 14px;
  line-height: 1.35;
}

.pr-table .featured {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.pr-table thead th.featured {
  background: color-mix(in srgb, var(--accent) 14%, var(--panel-2));
}

.pr-disclaimer {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
}

/* faq */
.pr-faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.pr-faq details {
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.pr-faq details[open] {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.pr-faq summary {
  cursor: pointer;
  font-weight: 700;
  line-height: 1.4;
}

.pr-faq details p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

/* final call */
.pr-cta {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 48px 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 16px;
  background: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--accent) 16%, var(--panel)), var(--panel) 70%);
  text-align: center;
  scroll-margin-top: 20px;
}

.pr-cta h2 {
  margin: 0;
  font-size: clamp(26px, 3.8vw, 40px);
}

.pr-cta p {
  margin: 0 0 6px;
  max-width: 560px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

/* QR code to the Google Play page: a white tile keeps it scannable in both themes; hidden on touch-first phones where the button is enough */
.pr-qr {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.pr-qr img {
  padding: 8px;
  border-radius: 12px;
  background: #fff;
}

@media (max-width: 560px) {
  .pr-qr {
    display: none;
  }
}

@media (max-width: 1100px) {
  .pr-plans,
  .pr-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pr-trust {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .pr {
    gap: 56px;
  }

  .pr-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .pr-phone {
    transform: none;
  }

  .pr-steps,
  .pr-faq {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .pr-plans,
  .pr-features,
  .pr-trust {
    grid-template-columns: minmax(0, 1fr);
  }

  .pr-actions .pr-btn {
    width: 100%;
  }
}

/* the comparison table keeps its own look instead of the global table header style */
.pr-table th {
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-transform: none;
}

.pr-table thead th {
  background: var(--panel-2);
  box-shadow: inset 0 -1px 0 var(--line);
}

.pr-table thead th.featured {
  background: color-mix(in srgb, var(--accent) 14%, var(--panel-2));
}

.pr-table .pr-group th {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

/* One-page site: header with anchors */
body.landing .topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 0 8px;
  padding: 8px 0;
  --topbar-bg: color-mix(in srgb, var(--bg) 88%, transparent);
}

/* the panel and its line reach both edges of the window, not only the width of the page */
body.landing .topbar::before,
body.landing .topbar::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  clip-path: inset(0 -100vmax);
}

body.landing .topbar::before {
  inset: 0;
  background: var(--topbar-bg);
  box-shadow: 0 0 0 100vmax var(--topbar-bg);
  backdrop-filter: blur(10px);
}

body.landing .topbar::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--line) 70%, transparent);
}

body.landing .brand-logo {
  width: 46px;
  height: 46px;
}

body.landing section[id] {
  scroll-margin-top: 84px;
}

.nav a.nav-login {
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 700;
}

.nav a.nav-login:hover {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  text-decoration: none;
}

.pr-hero-art {
  justify-self: center;
  width: 100%;
  display: grid;
  place-items: center;
}

/* ---- the illustrations of the app screens ---- */
.mk {
  width: min(320px, 100%);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow), 0 0 80px color-mix(in srgb, var(--accent) 12%, transparent);
}

.mk.tilt-r {
  transform: rotate(2deg);
}

.mk.tilt-l {
  transform: rotate(-2deg);
}

.mk-screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  min-height: 380px;
  padding: 20px 14px 18px;
  border-radius: 24px;
  background: var(--bg-soft);
}

.mk-title {
  margin: 0 0 2px 4px;
  font-size: 20px;
  font-weight: 800;
}

.mk-title.sm {
  font-size: 15px;
}

.mk-sub {
  margin: -6px 0 2px 4px;
  color: var(--muted);
  font-size: 13px;
}

.mk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.mk-item strong,
.mk-item small {
  display: block;
}

.mk-item strong {
  font-size: 13.5px;
}

.mk-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.mk-badge {
  flex: none;
  padding: 4px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-2) 16%, transparent);
  color: var(--accent-2);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.mk-badge.ok {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.mk-badge.warn {
  background: color-mix(in srgb, var(--warning) 18%, transparent);
  color: var(--warning);
}

.mk-badge.bad {
  background: color-mix(in srgb, var(--danger) 18%, transparent);
  color: var(--danger);
}

.mk-fab {
  position: absolute;
  right: 18px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #06140d;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* schedule */
.mk-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.mk-week span {
  padding: 7px 0;
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.mk-week span.on {
  background: var(--accent);
  color: #06140d;
  font-weight: 800;
}

.mk-slot {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.mk-slot.done {
  opacity: 0.72;
}

.mk-time {
  flex: none;
  min-width: 46px;
  color: var(--accent-2);
  font-size: 15px;
  font-weight: 800;
}

.mk-slot-body {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.mk-slot-body strong {
  font-size: 13.5px;
}

.mk-slot-body small {
  color: var(--muted);
  font-size: 12px;
}

.mk-btns {
  display: flex;
  flex-basis: 100%;
  gap: 6px;
  margin-top: 2px;
}

.mk-btns b {
  padding: 6px 7px;
  white-space: nowrap;
  font-size: 11.5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}

.mk-btns b.go {
  border-color: var(--accent);
  background: var(--accent);
  color: #06140d;
}

.mk-tick {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

.mk-tick .pr-icon {
  width: 16px;
  height: 16px;
}

/* diary */
.mk-dots {
  display: flex;
  gap: 8px;
  padding: 4px;
}

.mk-dots i {
  flex: 1;
  height: 10px;
  border-radius: 6px;
  background: var(--line);
}

.mk-dots i.ok {
  background: var(--accent);
}

.mk-dots i.warn {
  background: var(--warning);
}

.mk-dots i.bad {
  background: var(--danger);
}

/* the date card and the intake rows of the diary, as in the app */
.mk-datecard {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
}

.mk-di {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  --tone: var(--accent-2);
}

.mk-di.ok { --tone: var(--accent); }
.mk-di.warn { --tone: var(--warning); }
.mk-di.bad { --tone: var(--danger); }

.mk-di-ic {
  display: grid;
  place-items: center;
  width: 26px;
  color: var(--tone);
}

.mk-di-ic .pr-icon {
  width: 22px;
  height: 22px;
}

.mk-di-body {
  display: grid;
  flex: 1;
  gap: 1px;
}

.mk-di-body strong {
  font-size: 14px;
}

.mk-di-body small {
  color: var(--muted);
  font-size: 12px;
}

.mk-di-r {
  display: grid;
  justify-items: end;
  color: var(--tone);
}

.mk-di-r b {
  font-size: 13.5px;
}

.mk-di-r small {
  font-size: 11.5px;
}

.mk-acts {
  display: flex;
  flex-basis: 100%;
  gap: 6px;
  padding-top: 2px;
}

.mk-acts b {
  padding: 6px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

.mk-acts b.ok { color: var(--accent); }
.mk-acts b.warn { color: var(--warning); }
.mk-acts b.bad { color: var(--danger); }

/* the week strip of the diary */
.mk-weekcard {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.mk-label.muted {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 700;
  text-transform: none;
}

.mk-weekbars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.mk-weekbars span {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--muted);
  font-size: 11px;
}

.mk-weekbars span.on {
  color: var(--accent);
  font-weight: 800;
}

.mk-weekbars i {
  display: block;
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--muted) 28%, transparent);
}

.mk-weekbars .ok i { background: var(--accent); }
.mk-weekbars .warn i { background: var(--warning); }
.mk-weekbars .bad i { background: var(--danger); }

.mk-sum {
  margin: 2px 0 0 4px;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 700;
}

/* scan */
.mk-viewfinder {
  position: relative;
  display: grid;
  place-items: center;
  height: 210px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 40%, #1b2a33, #0a1014 75%);
  overflow: hidden;
}

.mk-viewfinder i {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 3px solid var(--accent);
}

.mk-viewfinder i.c1 { top: 24px; left: 24px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.mk-viewfinder i.c2 { top: 24px; right: 24px; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.mk-viewfinder i.c3 { bottom: 24px; left: 24px; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.mk-viewfinder i.c4 { bottom: 24px; right: 24px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }

.mk-code {
  width: 96px;
  height: 96px;
  padding: 6px;
  border-radius: 6px;
  background: #e8f2ee;
  color: #0b1216;
}

.mk-code svg {
  display: block;
  width: 100%;
  height: 100%;
}

.mk-laser {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 50%;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}

.mk-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}

.mk-result strong,
.mk-result small {
  display: block;
}

.mk-result strong {
  font-size: 14px;
}

.mk-result small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.mk-result .pr-note-icon {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

/* analogs */
.mk-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--accent-2);
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
}

.mk-search span {
  color: var(--text);
  font-weight: 600;
}

.mk-search .pr-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-2);
}

/* instruction */
.mk-source {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

.mk-source .pr-icon {
  width: 20px;
  height: 20px;
}

.mk-acc {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.mk-acc strong {
  font-size: 13.5px;
}

.mk-acc i {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: var(--line);
}

.mk-acc i.s {
  width: 78%;
}

.mk-acc i.xs {
  width: 52%;
}

/* AI search */
.mk-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.4;
}

.mk-bubble.user {
  justify-self: end;
  border-bottom-right-radius: 4px;
  background: var(--primary-action);
}

.mk-answer {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  border-top-left-radius: 4px;
  background: var(--panel);
}

.mk-label {
  margin: 4px 0 0;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
}

.mk-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--bg-soft);
}

.mk-chip .pr-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-2);
}

.mk-chip strong,
.mk-chip small {
  display: block;
}

.mk-chip strong {
  font-size: 13.5px;
}

.mk-chip small {
  color: var(--muted);
  font-size: 12px;
}

.mk-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* sync */
.mk-sync {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.mk-spacer {
  height: 40px;
}

.mk.mk-small {
  width: 150px;
  padding: 8px;
  border-radius: 24px;
}

.mk-small .mk-screen {
  min-height: 230px;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 18px;
}

.mk-line {
  height: 34px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.mk-line.s {
  width: 70%;
}

.mk-cloud {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 90px;
}

.mk-cloud span {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.mk-cloud .pr-icon {
  width: 32px;
  height: 32px;
}

.mk-cloud b {
  display: block;
  width: 100%;
  height: 0;
  border-top: 2px dashed color-mix(in srgb, var(--accent) 60%, transparent);
  position: absolute;
  top: 31px;
  left: -26px;
  right: -26px;
  width: calc(100% + 52px);
  z-index: -1;
}

.mk-cloud small {
  color: var(--muted);
  font-size: 12px;
}

/* welcome dialog and limits */
.mk-dialog {
  display: grid;
  gap: 10px;
  justify-items: start;
  width: min(340px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-2);
  box-shadow: var(--shadow), 0 0 80px color-mix(in srgb, var(--warning) 14%, transparent);
  transform: rotate(-1.5deg);
}

.mk-dialog strong {
  font-size: 20px;
  line-height: 1.25;
}

.mk-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.mk-gift {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--warning) 16%, transparent);
  color: var(--warning);
}

.mk-gift .pr-icon {
  width: 28px;
  height: 28px;
}

.mk-ok {
  justify-self: end;
  padding: 8px 18px;
  color: var(--accent);
  font-weight: 800;
}

.mk-limits {
  display: grid;
  gap: 6px;
  max-width: 420px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.mk-limits p {
  display: flex;
  justify-content: space-between;
  margin: 0;
  font-size: 14px;
}

.mk-limits p + .mk-meter {
  margin-bottom: 8px;
}

.mk-meter {
  height: 8px;
  border-radius: 6px;
  background: var(--line);
  overflow: hidden;
}

.mk-meter i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--accent);
}

/* ---- the feature rows ---- */
.lp-rows {
  display: grid;
  gap: 72px;
}

.lp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.lp-row.flip .lp-row-copy {
  order: 2;
}

.lp-row-art {
  display: grid;
  place-items: center;
  padding: 28px 0;
  border-radius: 20px;
  background: radial-gradient(70% 70% at 50% 45%, color-mix(in srgb, var(--accent-2) 11%, transparent), transparent 75%);
}

.lp-row-copy h3 {
  margin: 12px 0 10px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
}

.lp-row-copy > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.lp-row-copy ul,
.lp-login-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-row-copy li,
.lp-login-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}

.lp-row-copy li .pr-icon,
.lp-login-list li .pr-icon {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--accent);
}

.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-2) 13%, transparent);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
}

.lp-badge .pr-icon {
  width: 17px;
  height: 17px;
}

/* the gift band */
.lp-gift {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 40px;
  align-items: center;
  margin-top: 28px;
  padding: 36px;
  border: 1px solid color-mix(in srgb, var(--warning) 40%, var(--line));
  border-radius: 16px;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--warning) 9%, var(--panel)), var(--panel) 70%);
}

.lp-gift h3 {
  margin: 12px 0 10px;
  font-size: clamp(24px, 3vw, 32px);
}

.lp-gift-copy > p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.lp-gift-note {
  margin: 10px 0 0 !important;
  font-size: 13.5px;
}

.lp-gift-art {
  display: grid;
  place-items: center;
}

/* the login section */
.lp-login {
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 48px;
  align-items: center;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.lp-login-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.4vw, 36px);
}

.lp-login-copy > p:not(.eyebrow) {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.lp-login .auth-panel h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

@media (max-width: 960px) {
  .lp-row,
  .lp-gift,
  .lp-login {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .lp-row.flip .lp-row-copy {
    order: 0;
  }

  .lp-rows {
    gap: 56px;
  }

  .lp-gift,
  .lp-login {
    padding: 24px;
  }

  body.landing .nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 14px;
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  body.landing .topbar {
    flex-wrap: wrap;
  }

  body.landing .nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 16px;
    padding-bottom: 4px;
  }
}

/* the theme switch in the footer */
.theme-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.theme-switch button {
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.theme-switch button:hover {
  color: var(--text);
}

.theme-switch button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

@media (max-width: 860px) {
  .site-footer {
    gap: 14px;
  }
}

/* the login page: a little air under the header */
.lp-login-page {
  margin: 28px 0 24px;
}

/* the pills of the first screen */
.pr-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.pr-pills .pr-pill {
  margin: 0;
}

.pr-pill.clean {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

/* the "no ads" section */
.lp-noads {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 40px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 16px;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 10%, var(--panel)), var(--panel) 70%);
}

.lp-noads-copy h2 {
  margin: 12px 0 12px;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.12;
}

.lp-noads-copy > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.lp-noads-copy ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-noads-copy li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}

.lp-noads-copy li .pr-icon {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--accent);
}

.mk-noads {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  width: 100%;
}

.mk-na {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.mk.mk-small.mk-wide {
  width: 170px;
}

.mk-wide .mk-screen {
  min-height: 300px;
}

.mk-adbanner {
  margin-top: 28px;
  padding: 16px 8px;
  border: 1px dashed var(--muted);
  border-radius: 8px;
  background: repeating-linear-gradient(135deg, transparent 0 8px, color-mix(in srgb, var(--muted) 14%, transparent) 8px 16px);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.mk-na-cap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.mk-na-cap .pr-icon {
  width: 18px;
  height: 18px;
}

.mk-na-cap.bad {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger);
}

.mk-na-cap.ok {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

@media (max-width: 960px) {
  .lp-noads {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 24px;
  }
}

/* the small illustrations (the sync pair, the "with ads / without ads" pair) shrink with the screen instead of widening the page */
@media (max-width: 480px) {
  .mk-sync > .mk,
  .mk-noads > .mk-na {
    min-width: 0;
  }

  .mk.mk-small {
    width: min(150px, 34vw);
  }

  .mk.mk-small.mk-wide {
    width: min(170px, 38vw);
  }

  .mk-noads {
    gap: 12px;
  }

  .mk-na {
    min-width: 0;
  }
}

@media (max-width: 340px) {
  .mk.mk-small {
    width: 30vw;
  }
}

/* the comparison table on a phone: compact cells and a sticky first column, the plans scroll sideways under it */
@media (max-width: 640px) {
  .pr-table {
    min-width: 620px;
  }

  .pr-table th,
  .pr-table td {
    padding: 10px 8px;
  }

  .pr-table th {
    font-size: 13.5px;
  }

  .pr-table thead strong {
    font-size: 15px;
  }

  .pr-table thead small,
  .pr-table small {
    font-size: 11.5px;
  }

  .pr-table td.text {
    font-size: 13px;
  }

  .pr-table thead th:first-child,
  .pr-table tbody th[scope="row"] {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 132px;
    min-width: 132px;
    background: var(--panel);
    box-shadow: 1px 0 0 var(--line);
  }

  .pr-table thead th:first-child {
    z-index: 3;
    background: var(--panel-2);
  }

  .pr-table .pr-group th {
    padding: 16px 8px 6px;
  }
}
