/* Veylmont One — design tokens from the canvas. Dark is the default; light is opt-in. */
:root,
[data-theme='dark'] {
  --bg: #0b1412;
  --surface: #13201c;
  --surface-2: #182a25;
  --ink: #e8eeeb;
  --muted: #9aaba5;
  --faint: #66756f;
  --line: #263732;
  --line-soft: #1c2a26;
  --line-strong: #3e514a;
  --primary: #13785f;
  --primary-ink: #5ccba8;
  --primary-soft: #12352c;
  --brass: #d9a64e;
  --brass-soft: #33281a;
  --brass-faint: #241d12;
  --brass-line: #4a3b1e;
  --brass-text: #ecd3a2;
  --placeholder: #1b332c;
  --seg: #0f1916;
  --deep: #1c352e;
  --deep-2: #2c4f45;
  --deep-ink: #ffffff;
  --deep-muted: #c9d3cf;
  --deep-faint: #9db0a9;
  --danger: #f08a7e;
  --danger-line: #5a2e28;
  --danger-soft: #2e1a17;
  --on-primary: #ffffff;
  --on-brass: #1a1408;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}
[data-theme='light'] {
  --bg: #f2f4f3;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --ink: #10201b;
  --muted: #52605b;
  --faint: #7a8783;
  --line: #dce2df;
  --line-soft: #eef1ef;
  --line-strong: #9aa8a3;
  --primary: #0d5c49;
  --primary-ink: #0d5c49;
  --primary-soft: #e3efea;
  --brass: #8a6420;
  --brass-soft: #f4ead7;
  --brass-faint: #fbf7ef;
  --brass-line: #e8d6b2;
  --brass-text: #5c4314;
  --placeholder: #d5e3dd;
  --seg: #e6eae8;
  --deep: #10201b;
  --deep-2: #1e332c;
  --danger: #a3352b;
  --danger-line: #e9c3be;
  --danger-soft: #fbeeec;
  --shadow: 0 1px 0 rgba(16, 32, 27, 0.04);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans Arabic', 'Readex Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
a {
  color: var(--primary-ink);
}
a:hover {
  color: var(--ink);
}
h1,
h2,
h3 {
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}
h1 {
  font-size: 24px;
}
h2 {
  font-size: 18px;
}
h3 {
  font-size: 16px;
}
p {
  margin: 0;
}
input,
select,
textarea,
button {
  font: inherit;
  color: inherit;
}
input[type='text'],
input[type='email'],
input[type='tel'],
input[type='number'],
input[type='date'],
input[type='search'],
select,
textarea {
  width: 100%;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0 12px;
  height: 46px;
}
textarea {
  height: auto;
  min-height: 84px;
  padding: 10px 12px;
  resize: vertical;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary-ink);
  outline-offset: 2px;
}
input[aria-invalid='true'],
select[aria-invalid='true'] {
  border-color: var(--danger);
}
input[type='checkbox'],
input[type='radio'] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}
.num {
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}

/* layout */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.app-main {
  flex: 1;
  padding: 20px 20px 96px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-weight: 600;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.tabbar {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  margin: 0 auto;
  max-width: 520px;
  display: flex;
  justify-content: space-around;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 8px 8px calc(14px + env(safe-area-inset-bottom));
  z-index: 10;
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 64px;
  font-size: 11.5px;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
}
.tabbar a[aria-current='page'] {
  color: var(--primary-ink);
  font-weight: 600;
}

.portal {
  display: flex;
  flex-wrap: wrap;
  min-height: 100vh;
}
.sidebar {
  flex: 1 1 240px;
  max-width: 280px;
  background: var(--deep);
  color: var(--deep-ink, #fff);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.sidebar .brand {
  color: #fff;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--deep-muted, #c9d3cf);
  text-decoration: none;
  font-size: 14px;
}
.sidebar nav a[aria-current='page'] {
  background: var(--deep-2);
  color: #fff;
  font-weight: 600;
}
.sidebar .section {
  margin-top: 10px;
  padding: 0 14px;
  font-size: 12px;
  color: var(--deep-faint, #9db0a9);
  font-weight: 600;
}
.sidebar .foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--deep-muted, #c9d3cf);
}
.portal-main {
  flex: 999 1 560px;
  min-width: 0;
  padding: 28px 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
@media (max-width: 860px) {
  .sidebar {
    max-width: none;
    flex-basis: 100%;
    padding: 14px 16px;
  }
  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  .sidebar nav a {
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }
  .sidebar .section {
    width: 100%;
    margin-top: 4px;
  }
  .portal-main {
    padding: 18px 16px 40px;
  }
}

/* components */
.page-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}
.kicker {
  font-size: 13px;
  color: var(--muted);
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
}
.card.tight {
  padding: 14px 16px;
}
.card.brass {
  background: var(--brass-faint);
  border-color: var(--brass-line);
  color: var(--brass-text);
}
.card.primary-soft {
  background: var(--primary-soft);
  border-color: var(--primary-soft);
}
.card.deep {
  background: var(--deep);
  border-color: var(--deep);
  color: #fff;
}
.card.deep .muted {
  color: var(--deep-muted, #c9d3cf);
}
.card.danger {
  border-color: var(--danger-line);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.xs {
  font-size: 12px;
}
.strong {
  font-weight: 600;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.row.between {
  justify-content: space-between;
}
.row.nowrap {
  flex-wrap: nowrap;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stack.lg {
  gap: 16px;
}
.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid.cols-sm {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat .label {
  font-size: 13px;
  color: var(--muted);
}
.stat .value {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}
.stat .value small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.stat.brass {
  border-color: var(--brass-line);
}
.stat.brass .label,
.stat.brass .value {
  color: var(--brass);
}
.stat.danger {
  border-color: var(--danger-line);
}
.stat.danger .label,
.stat.danger .value {
  color: var(--danger);
}
.stat.good .value {
  color: var(--primary-ink);
}
.stat.brass .value small,
.stat.danger .value small {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary, #fff);
  font-weight: 600;
}
.btn.primary:hover {
  color: #fff;
  filter: brightness(1.08);
}
.btn.brass {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--on-brass, #1a1408);
  font-weight: 600;
}
.btn.ghost {
  background: transparent;
}
.btn.danger {
  color: var(--danger);
}
.btn.block {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}
.btn.sm {
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 10px;
}
.btn.dashed {
  border-style: dashed;
  color: var(--primary-ink);
}
.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
}
.icon-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 7px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.good {
  background: var(--primary-soft);
  color: var(--primary-ink);
}
.badge.brass {
  background: var(--brass-soft);
  color: var(--brass);
}
.badge.neutral {
  background: var(--seg);
  color: var(--muted);
}
.badge.danger {
  border: 1px solid var(--danger-line);
  color: var(--danger);
  background: transparent;
}
.badge.inverse {
  background: var(--brass);
  color: var(--on-brass, #1a1408);
}

.progress {
  position: relative;
  height: 10px;
  border-radius: 5px;
  background: var(--primary-soft);
  overflow: visible;
}
.progress > .fill {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  border-radius: 5px;
  background: var(--primary);
}
.progress > .fill.brass {
  background: var(--brass);
}
.progress > .fill.danger {
  background: var(--danger);
}
.progress > .mark {
  position: absolute;
  top: -3px;
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: var(--ink);
}
.progress > .mark.next {
  background: var(--brass);
}
.progress.thin {
  height: 6px;
}
.progress.deep {
  background: var(--deep-2);
}

.list {
  display: flex;
  flex-direction: column;
}
.list > .item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.list > .item:last-child {
  border-bottom: none;
}
.list > .item.hl {
  background: var(--brass-faint);
  margin: 0 -16px;
  padding-inline: 16px;
  border-radius: 10px;
}

.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  text-align: start;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: none;
}
tr.total td {
  font-weight: 600;
  border-top: 1px solid var(--line);
}
td.actions {
  text-align: end;
}
.td-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
}
.field .hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}
.field .err {
  font-weight: 500;
  color: var(--danger);
  font-size: 12px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  font-weight: 400;
}
.choice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
}
.choice.selected,
.choice:has(input:checked) {
  border: 2px solid var(--primary-ink);
  padding: 13px 15px;
}
.choice input {
  margin-top: 3px;
}
.segment {
  display: flex;
  background: var(--seg);
  border-radius: 12px;
  padding: 4px;
  gap: 2px;
}
.segment a,
.segment button {
  flex: 1;
  min-height: 38px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}
.segment [aria-current='true'],
.segment label:has(input:checked) > span {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}
.segment label > span {
  background: transparent;
  color: var(--muted);
  font-weight: 400;
}
[dir='rtl'] .icon-flip {
  transform: scaleX(-1);
}
.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 13px;
}
.pill[aria-current='true'] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  font-weight: 600;
}

.hero-img {
  height: 150px;
  border-radius: 16px;
  background: var(--placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  position: relative;
  overflow: hidden;
}
.hero-img.tall {
  height: 220px;
  border-radius: 0;
}
.hero-img > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
}
.gallery a {
  flex: 0 0 auto;
  scroll-snap-align: start;
}
.gallery img {
  height: 120px;
  width: 170px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.thumb {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}
.hero-img .corner {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
}
.cycle-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
}
.cycle-card:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}
.cycle-card .hero-img {
  border-radius: 0;
  height: 128px;
}
.cycle-card .body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mini {
  flex: 1;
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--primary-soft);
}
.mini .l {
  font-size: 11.5px;
  color: var(--muted);
}
.mini .v {
  font-weight: 600;
  font-size: 17px;
  color: var(--primary-ink);
}
.mini.brass {
  background: var(--brass-soft);
}
.mini.brass .v {
  color: var(--brass);
}

.timeline {
  display: flex;
  flex-direction: column;
}
.timeline .step {
  display: flex;
  gap: 14px;
}
.timeline .rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.timeline .dot {
  width: 28px;
  height: 28px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.timeline .dot.done {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.timeline .dot.current {
  border: 3px solid var(--brass);
}
.timeline .dot.bad {
  border-color: var(--danger);
  color: var(--danger);
}
.timeline .line {
  width: 2px;
  flex: 1;
  min-height: 24px;
  background: var(--line);
}
.timeline .line.done {
  background: var(--primary);
}
.timeline .content {
  padding: 3px 0 18px;
}
.timeline .step:last-child .content {
  padding-bottom: 0;
}
.timeline .step:last-child .line {
  display: none;
}

.avatars {
  display: flex;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 17px;
  border: 2px solid var(--surface);
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}
.avatar + .avatar {
  margin-inline-start: -10px;
}
.avatar.b {
  background: var(--brass);
  color: var(--on-brass, #1a1408);
}
.avatar.c {
  background: var(--deep-2);
}
.avatar.more {
  background: var(--primary-soft);
  color: var(--primary-ink);
}

.unit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.unit {
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  position: relative;
}
.unit.taken {
  background: var(--seg);
  border-color: var(--seg);
  color: var(--faint);
  cursor: not-allowed;
}
.unit input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: inherit;
}
.unit:has(input:checked) {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.legend .sw {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  vertical-align: -2px;
  margin-inline-end: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.legend .sw.taken {
  background: var(--seg);
  border-color: var(--seg);
}
.legend .sw.yours {
  background: var(--primary);
  border-color: var(--primary);
}

.flash {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.flash.ok {
  background: var(--primary-soft);
  color: var(--primary-ink);
}
.flash.error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger-line);
}
.note {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.steps3 {
  display: flex;
  gap: 8px;
}
.steps3 > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.steps3 > div > i {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}
.steps3 > div.done > i {
  background: var(--primary);
}
.steps3 > div.done {
  color: var(--primary-ink);
  font-weight: 600;
}
.steps3 > div.cur {
  color: var(--ink);
  font-weight: 600;
}
.steps3 > div.cur > i {
  background: var(--primary);
}
.stages {
  display: flex;
  gap: 6px;
}
.stages > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}
.stages > div > i {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}
.stages > div.done {
  color: var(--primary-ink);
  font-weight: 600;
}
.stages > div.done > i {
  background: var(--primary);
}
.tier-list .item .dot {
  width: 24px;
  height: 24px;
  border-radius: 12px;
  border: 2px solid var(--line);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tier-list .item .dot.done {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.tier-list .item .dot.next {
  border-color: var(--brass);
}
.sticky-cta {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  margin: 0 auto;
  max-width: 520px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 10;
}
.prefs {
  display: flex;
  gap: 6px;
  align-items: center;
}
.prefs button {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sidebar .prefs button {
  background: transparent;
  border-color: var(--deep-2);
  color: var(--deep-muted, #c9d3cf);
}
.center {
  text-align: center;
}
.auth {
  max-width: 440px;
  margin: 0 auto;
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 100vh;
}
.code-input {
  letter-spacing: 0.4em;
  font-size: 24px;
  text-align: center;
  height: 60px;
  direction: ltr;
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.kv .k {
  color: var(--muted);
}
.divider {
  height: 1px;
  background: var(--line);
}
.landing-hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.landing-hero h1 {
  font-size: 30px;
}
.inline-form {
  display: inline;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
details > summary {
  cursor: pointer;
  font-weight: 600;
}
@media (max-width: 480px) {
  .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media print {
  .tabbar,
  .sidebar,
  .sticky-cta,
  .prefs,
  .btn {
    display: none !important;
  }
}

/* File inputs (ID photos): a full-width dashed drop area with the app's button style. */
input[type='file'] {
  width: 100%;
  padding: 14px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
input[type='file']:hover,
input[type='file']:focus-visible {
  border-color: var(--primary);
}
input[type='file']::file-selector-button {
  margin-inline-end: 12px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2, var(--surface));
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Profile photos inside avatar circles. */
img.avatar.photo {
  object-fit: cover;
  padding: 0;
  background: var(--surface-2);
}

/* Developer logos */
.dev-logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface-2, #fff);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--muted);
}
.dev-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.dev-logo.lg {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}
.dev-logo.md {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.dev-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}
.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  margin-inline: -4px;
  padding-inline: 4px;
}
.rail > * {
  flex: 0 0 min(300px, 82%);
  scroll-snap-align: start;
}
.search-box {
  display: flex;
  gap: 8px;
}
.search-box input {
  flex: 1;
}

/* ───────────── v1.9: covers, logos, project facts ───────────── */
.clamp1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logo-tile {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.logo-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.logo-tile.mono {
  background: linear-gradient(135deg, var(--primary) 0%, #0b3d31 100%);
  border-color: transparent;
  color: #fff;
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.logo-tile.sm {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 10px;
}
.logo-tile.sm img {
  padding: 2px;
}
.logo-tile.md {
  font-size: 15px;
}
.logo-tile.lg {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  font-size: 24px;
}
.logo-tile.xl {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  font-size: 32px;
}

.cover {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  height: 172px;
  background: #0f2a23;
}
.cover.hero {
  height: 260px;
  border-radius: 22px;
}
.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}
.cover.brand {
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(92, 203, 168, 0.28) 0%, transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(217, 166, 78, 0.22) 0%, transparent 60%),
    linear-gradient(160deg, #165f4c 0%, #0d3b30 55%, #0a2a22 100%);
}
.cover-rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.cover-rings circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1.5;
}
.cover-brand {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
}
.cover-name {
  color: #fff;
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  max-width: 90%;
}
.cover.hero .cover-name {
  font-size: 20px;
}
.cover-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, transparent 32%, transparent 62%, rgba(0, 0, 0, 0.4) 100%);
}
.cover.brand .cover-shade {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, transparent 35%);
}
.cover .corner {
  position: absolute;
  top: 12px;
  z-index: 2;
}
.cover .corner.start {
  inset-inline-start: 12px;
}
.cover .corner.end {
  inset-inline-end: 12px;
}
.cover-foot {
  position: absolute;
  bottom: 10px;
  inset-inline-end: 12px;
  z-index: 2;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  padding: 3px 10px;
  border-radius: 999px;
}
.discount-pill {
  display: inline-flex;
  align-items: center;
  background: var(--brass);
  color: var(--on-brass, #1a1408);
  font-weight: 700;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
[data-theme='light'] .discount-pill {
  color: #fff;
}

.cycle-card {
  border-radius: 22px;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.cycle-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}
.cycle-card .cover {
  height: 172px;
}
.cycle-card .body {
  gap: 14px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 640px) {
  .facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.fact {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.fact-icon {
  grid-row: 1 / span 2;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-ink);
}
.fact-l {
  font-size: 12px;
  color: var(--muted);
}
.fact-v {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.chip svg {
  color: var(--primary-ink);
}

.masterplan {
  position: relative;
  display: block;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}
.masterplan img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  background: #fff;
}
.masterplan-pdf {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 150px;
  color: var(--primary-ink);
  background: var(--primary-soft);
  font-weight: 700;
}
.masterplan-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--primary-ink);
}
.brand-nudge {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cover .logo-tile.mono {
  background: rgba(255, 255, 255, 0.96);
  color: #0d5c49;
}
.cover.card .cover-name {
  font-size: 20px;
  line-height: 1.3;
}
.cover-dev {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12.5px;
}
.card.brand-nudge {
  flex-direction: row;
  align-items: center;
}
@media (max-width: 520px) {
  .card.brand-nudge {
    flex-wrap: wrap;
  }
}
/* A fieldset is as wide as its widest child by default (min-width: min-content), so a wide table inside
   pushed the whole page sideways on phones (and in the app's portal view). */
fieldset {
  min-width: 0;
}
.plan-block {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Payment rows: three inputs that always fit the card, even on a small phone. */
.plan-rows {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}
.plan-rows th {
  white-space: normal;
  line-height: 1.35;
  vertical-align: bottom;
}
.plan-rows th:nth-child(1) {
  width: 46%;
}
.plan-rows th:nth-child(2) {
  width: 22%;
}
.plan-rows td {
  padding-inline: 4px;
}
.plan-rows input {
  width: 100%;
  min-width: 0;
}
.plan-block legend {
  font-weight: 700;
  padding: 0 6px;
}
.schedule {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.schedule .srow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.schedule .srow:last-child {
  border-bottom: none;
}
.schedule .srow.total {
  background: var(--primary-soft);
  font-weight: 700;
}
.schedule .when {
  font-size: 12px;
  color: var(--muted);
}

/* ===== Marketing home page (signed-out "/"): full-width, desktop-first ===== */
body.mk {
  --mk-max: 1200px;
  --mk-r: 20px;
  background: var(--bg);
  font-size: 16px;
  overflow-x: hidden;
}
.mk .mk-wrap {
  max-width: var(--mk-max);
  margin: 0 auto;
  padding: 0 32px;
}
.mk h1,
.mk h2,
.mk h3 {
  letter-spacing: -0.01em;
}
.mk .flash {
  max-width: var(--mk-max);
  margin: 16px auto 0;
}
html:has(body.mk) {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

/* nav */
.mk-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.mk-nav-in {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}
.mk-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.mk-brand > span:not(.mk-logo) {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.mk-brand b {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 600;
}
.mk-brand small {
  font-size: 11.5px;
  color: var(--muted);
}
.mk-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #0a4a3a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  flex: none;
}
.mk-links {
  display: flex;
  gap: 26px;
  margin-inline-start: 12px;
}
.mk-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
}
.mk-links a:hover {
  color: var(--ink);
}
.mk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
}

/* buttons */
.mk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.mk-btn:hover {
  transform: translateY(-1px);
}
.mk-btn.lg {
  min-height: 52px;
  padding: 0 26px;
  font-size: 15.5px;
  border-radius: 14px;
}
.mk-btn.primary {
  background: var(--primary);
  color: var(--on-primary);
}
.mk-btn.primary:hover {
  color: var(--on-primary);
  background: color-mix(in srgb, var(--primary) 85%, #fff);
}
.mk-btn.ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}
.mk-btn.ghost:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}
.mk-btn.brass {
  background: var(--brass);
  color: var(--on-brass);
}
[data-theme='light'] .mk-btn.brass {
  color: #fff;
}

/* hero */
.mk-hero {
  position: relative;
  padding: 88px 0 96px;
  overflow: hidden;
}
.mk-hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto;
  height: 720px;
  background: radial-gradient(ellipse 50% 60% at 75% 30%, color-mix(in srgb, var(--primary) 32%, transparent), transparent 70%),
    radial-gradient(ellipse 35% 40% at 15% 10%, color-mix(in srgb, var(--brass) 14%, transparent), transparent 70%);
  pointer-events: none;
}
[dir='rtl'] .mk-hero::before {
  transform: scaleX(-1);
}
.mk-hero-in {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.mk-eyebrow,
.mk-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brass-text);
  background: var(--brass-faint);
  border: 1px solid var(--brass-line);
  padding: 5px 12px;
  border-radius: 999px;
}
.mk-hero h1 {
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.15;
  margin: 22px 0 20px;
  font-weight: 700;
}
.mk-lead {
  font-size: 18.5px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 0 32px;
  line-height: 1.75;
}
.mk-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.mk-stores {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.mk-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 176px;
  padding: 9px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  transition: transform 0.15s ease;
  direction: ltr;
}
.mk-store:hover {
  color: var(--bg);
  transform: translateY(-1px);
}
.mk-store span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}
.mk-store small {
  font-size: 11px;
  opacity: 0.75;
}
[dir='rtl'] .mk-store small {
  direction: rtl;
}
.mk-store b {
  font-size: 18px;
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-weight: 600;
}

/* hero illustration */
.mk-hero-art {
  position: relative;
  display: flex;
  justify-content: center;
}
.mk-cycle {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.02);
  transform: rotate(-1.5deg);
}
[dir='rtl'] .mk-cycle {
  transform: rotate(1.5deg);
}
.mk-cycle-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}
.mk-tag {
  font-size: 12px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  padding: 2px 10px;
  border-radius: 999px;
}
.mk-dot-live {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary-ink);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary-ink) 22%, transparent);
}
.mk-cycle-cover {
  height: 150px;
  background: linear-gradient(180deg, var(--primary-soft), var(--placeholder));
  display: flex;
  align-items: flex-end;
}
.mk-cycle-cover svg {
  width: 100%;
  height: 120px;
}
.mk-cycle-cover rect {
  fill: color-mix(in srgb, var(--primary) 55%, var(--surface));
}
.mk-cycle-cover rect.w {
  fill: color-mix(in srgb, var(--brass) 70%, #fff);
  opacity: 0.8;
}
.mk-cycle-body {
  padding: 20px 22px 22px;
}
.mk-cycle-name {
  font-family: 'Readex Pro', system-ui, sans-serif;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 14px;
}
.mk-cycle-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.mk-cycle-stats div {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
}
.mk-cycle-stats small {
  font-size: 12px;
  color: var(--muted);
}
.mk-cycle-stats b {
  font-size: 26px;
  font-family: 'Readex Pro', system-ui, sans-serif;
}
.mk-brass {
  color: var(--brass);
}
.mk-meter {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--seg);
  border: 1px solid var(--line-soft);
}
.mk-meter-fill {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-ink));
}
[dir='rtl'] .mk-meter-fill {
  background: linear-gradient(270deg, var(--primary), var(--primary-ink));
}
.mk-meter-tick {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-inline-start: -7px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-strong);
}
.mk-meter-tick.on {
  border-color: var(--brass);
  background: var(--brass);
}
.mk-meter-labels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  text-align: end;
}
.mk-cycle-next {
  font-size: 13px;
  color: var(--brass-text);
  margin: 14px 0 16px;
}
.mk-cycle-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}
.mk-cycle-price small {
  color: var(--muted);
}
.mk-cycle-price span {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.mk-cycle-price s {
  color: var(--faint);
  font-size: 13px;
}
.mk-cycle-price b {
  font-size: 20px;
  font-family: 'Readex Pro', system-ui, sans-serif;
}
.mk-float {
  position: absolute;
  top: 120px;
  inset-inline-end: -16px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 260px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 13px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.5);
}
.mk-float svg {
  flex: none;
  color: var(--primary-ink);
}

/* trust strip */
.mk-trust {
  border-block: 1px solid var(--line-soft);
  background: var(--surface);
}
.mk .mk-trust-in {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-block: 26px;
}
.mk-trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}
.mk-trust-item svg {
  flex: none;
  color: var(--primary-ink);
}

/* sections */
.mk-section {
  padding: 104px 0;
}
.mk-section.alt {
  background: var(--surface);
  border-block: 1px solid var(--line-soft);
}
.mk-head {
  max-width: 640px;
  margin-bottom: 52px;
}
.mk-head.center {
  margin-inline: auto;
  text-align: center;
}
.mk-head h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.25;
  margin: 18px 0 14px;
  font-weight: 700;
}
.mk-head p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
  margin: 0;
}
.mk-note {
  font-size: 13px;
  color: var(--faint);
  margin-top: -32px;
}

/* steps */
.mk-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: s;
}
.mk-steps li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--mk-r);
  padding: 28px 24px;
}
.mk-steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 48px;
  inset-inline-end: -21px;
  width: 22px;
  border-top: 2px dashed var(--line-strong);
}
.mk-step-n {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-weight: 700;
  font-family: 'Readex Pro', system-ui, sans-serif;
  margin-bottom: 18px;
}
.mk-steps h3,
.mk-feature h3,
.mk-who h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.mk-steps p,
.mk-feature p,
.mk-who p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.75;
  margin: 0;
}

/* tiers */
.mk-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.mk-ladder {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: end;
  height: 320px;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.mk-rung {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 10px;
  text-align: center;
}
.mk-rung-bar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12px;
  border-radius: 14px 14px 6px 6px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 70%, var(--surface)), var(--primary-soft));
  border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent);
}
.mk-rung-bar b {
  font-size: 20px;
  font-family: 'Readex Pro', system-ui, sans-serif;
  color: var(--ink);
}
.mk-rung.on .mk-rung-bar {
  background: linear-gradient(180deg, var(--brass), color-mix(in srgb, var(--brass) 30%, var(--surface)));
  border-color: var(--brass);
}
.mk-rung.on .mk-rung-bar b {
  color: var(--on-brass);
}
.mk-rung small {
  font-size: 12px;
  color: var(--muted);
}

/* features */
.mk-grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.mk-grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.mk-feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--mk-r);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.mk-feature:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.mk-ico {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-ink);
  margin-bottom: 18px;
}
.mk-ico.lg {
  width: 60px;
  height: 60px;
  border-radius: 18px;
}
.mk-ico.brass {
  background: var(--brass-soft);
  color: var(--brass);
}
.mk-who {
  display: block;
  padding: 36px;
  border-radius: 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.mk-who:hover {
  color: var(--ink);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.mk-who h3 {
  font-size: 22px;
}
.mk-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  color: var(--primary-ink);
  font-weight: 600;
  font-size: 14.5px;
}
[dir='rtl'] .mk-more svg,
[dir='rtl'] .mk-web-link svg {
  transform: scaleX(-1);
}

/* developers */
.mk-dev {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 56px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--deep), var(--deep-2));
  color: var(--deep-ink, #fff);
  border: 1px solid var(--line);
}
.mk-dev .mk-head {
  margin-bottom: 32px;
}
.mk-dev .mk-head p {
  color: var(--deep-muted, #c9d3cf);
}
.mk-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mk-checks li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 15px;
}
.mk-checks li > span {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--brass);
  color: var(--on-brass);
}

/* company */
.mk-company {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mk-company .mk-logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  margin-bottom: 18px;
}
.mk-company .mk-logo svg {
  width: 32px;
  height: 32px;
}
.mk-company .mk-head {
  margin-bottom: 0;
  max-width: 720px;
}

/* download */
.mk-download {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 48px;
  align-items: center;
  padding: 56px 64px;
  border-radius: 28px;
  background: radial-gradient(ellipse 60% 90% at 90% 50%, color-mix(in srgb, var(--primary) 30%, transparent), transparent 70%), var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.mk-download h2 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  margin-bottom: 12px;
}
.mk-download p {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 28px;
}
.mk-web-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 14.5px;
  text-decoration: none;
}
.mk-phone {
  justify-self: center;
  width: 220px;
  height: 400px;
  border-radius: 40px;
  padding: 10px;
  background: #0a0f0e;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.6), inset 0 0 0 2px #2a3532;
  margin-block: -20px -110px;
}
.mk-phone-screen {
  height: 100%;
  border-radius: 31px;
  background: linear-gradient(180deg, #13201c, #0b1412);
  padding: 34px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mk-ph-bar {
  height: 12px;
  width: 50%;
  border-radius: 6px;
  background: #263732;
}
.mk-ph-card {
  border-radius: 16px;
  background: #182a25;
  border: 1px solid #263732;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mk-ph-card.dim {
  opacity: 0.5;
}
.mk-ph-card span {
  height: 8px;
  border-radius: 4px;
  background: #2c4f45;
}
.mk-ph-card span.short {
  width: 60%;
  background: #263732;
}
.mk-ph-meter {
  height: 8px;
  border-radius: 4px;
  background: #0f1916;
  overflow: hidden;
  margin-top: 4px;
}
.mk-ph-meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #13785f, #d9a64e);
}

/* faq */
.mk .mk-faq-wrap {
  max-width: 860px;
}
.mk-faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mk-faq details {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 24px;
}
.mk-faq details[open] {
  border-color: var(--line-strong);
}
.mk-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 0;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.mk-faq summary::-webkit-details-marker {
  display: none;
}
.mk-faq summary::after {
  content: '+';
  color: var(--primary-ink);
  font-size: 22px;
  line-height: 1;
}
.mk-faq details[open] summary::after {
  content: '−';
}
.mk-faq p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.8;
}

/* footer */
.mk-footer {
  border-top: 1px solid var(--line-soft);
  padding: 40px 0;
}
.mk-footer-in {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.mk-footer nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.mk-footer nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
.mk-footer nav a:hover {
  color: var(--ink);
}
.mk-rights {
  margin-inline-start: auto;
  color: var(--faint);
  font-size: 13px;
}

/* responsive (still full-width, collapses gracefully on tablets and phones) */
@media (max-width: 1080px) {
  .mk-links {
    display: none;
  }
  .mk-hero-in,
  .mk-split,
  .mk-dev,
  .mk-download {
    grid-template-columns: 1fr;
  }
  .mk-hero-art {
    margin-top: 16px;
  }
  .mk-steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .mk-steps li::after {
    display: none;
  }
  .mk .mk-trust-in,
  .mk-grid3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .mk-phone {
    display: none;
  }
}
@media (max-width: 640px) {
  .mk .mk-wrap {
    padding: 0 16px;
  }
  .mk-nav-in {
    gap: 12px;
  }
  .mk-brand small,
  .mk-actions > .mk-btn,
  .mk-actions > .prefs form:nth-child(2) {
    display: none;
  }
  .mk-hero {
    padding: 48px 0 64px;
  }
  .mk-section {
    padding: 64px 0;
  }
  .mk-steps,
  .mk .mk-trust-in,
  .mk-grid3,
  .mk-grid2 {
    grid-template-columns: 1fr;
  }
  .mk-dev,
  .mk-download {
    padding: 32px 22px;
  }
  .mk-ladder {
    height: 260px;
    padding: 16px;
    gap: 10px;
  }
  .mk-float {
    display: none;
  }
  .mk-rights {
    margin-inline-start: 0;
  }
}
.mk-section.mk-sg-wrap {
  padding-bottom: 0;
}
.mk-sg {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 36px 40px;
  border-radius: 24px;
  border: 1px dashed var(--brass-line);
  background: var(--brass-faint);
}
.mk-sg .mk-ico {
  margin: 0;
}
.mk-sg h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}
.mk-sg p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}
@media (max-width: 860px) {
  .mk-sg {
    grid-template-columns: 1fr;
    padding: 28px 22px;
  }
}
/* signed-in account chip on the marketing site */
.mk-user {
  position: relative;
}
.mk-user summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  min-height: 42px;
  padding: 0 12px 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13.5px;
}
[dir='rtl'] .mk-user summary {
  padding: 0 6px 0 12px;
}
.mk-user summary::-webkit-details-marker {
  display: none;
}
.mk-user[open] summary,
.mk-user summary:hover {
  border-color: var(--line-strong);
}
.mk-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  flex: none;
}
.mk-user-id {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mk-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.55);
  z-index: 30;
}
.mk-menu-head {
  display: flex;
  flex-direction: column;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 6px;
}
.mk-menu-head small {
  color: var(--muted);
  font-size: 12px;
}
.mk-menu-head b {
  font-size: 13.5px;
  overflow-wrap: anywhere;
}
.mk-menu a,
.mk-menu button {
  display: block;
  width: 100%;
  text-align: start;
  padding: 10px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  background: none;
  border: 0;
  cursor: pointer;
}
.mk-menu a:hover,
.mk-menu button:hover {
  background: var(--surface-2);
}
.mk-menu button {
  color: var(--danger);
}
@media (max-width: 640px) {
  .mk-user-id {
    display: none;
  }
  .mk-user summary {
    padding: 0 4px;
  }
}

/* ===== Contact page ===== */
.ct-hero {
  padding: 72px 0 40px;
}
.ct-hero h1 {
  margin: 18px 0 14px;
}
.ct-body {
  padding: 0 0 96px;
}
.mk .ct-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.ct-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ct-card,
.ct-map-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px;
}
.ct-card h2 {
  font-size: 18px;
  margin-bottom: 16px;
}
.ct-nums {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ct-num {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
}
.ct-num-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ct-ico {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-ink);
}
.ct-num-label {
  font-weight: 600;
}
.ct-num-phone {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  font-family: 'Readex Pro', system-ui, sans-serif;
  letter-spacing: 0.02em;
}
.ct-num-hours {
  font-size: 12.5px;
  color: var(--muted);
}
.ct-num-actions {
  display: flex;
  gap: 8px;
}
.mk-btn.wa {
  background: #1f9d55;
  color: #fff;
}
.mk-btn.wa:hover {
  background: #1a8749;
  color: #fff;
}
.ct-facts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
}
.ct-fact {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
}
a.ct-fact:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.ct-fact > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ct-fact small {
  color: var(--muted);
  font-size: 12.5px;
}
.ct-fact b {
  font-weight: 600;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.ct-empty {
  padding: 16px;
  color: var(--muted);
}
.ct-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ct-soc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}
.ct-soc:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}
.ct-map-card {
  padding: 0;
  overflow: hidden;
}
.ct-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  flex-wrap: wrap;
}
.ct-map-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 360px;
}
.ct-map {
  display: block;
  width: 100%;
  height: 460px;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--placeholder);
}
[data-theme='dark'] .ct-map:not(.ct-map-empty) {
  filter: grayscale(0.25) brightness(0.92);
}
.ct-map-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.ct-devs {
  display: block;
  padding: 18px 22px;
  border-radius: 18px;
  border: 1px dashed var(--brass-line);
  background: var(--brass-faint);
  color: var(--brass-text);
  text-decoration: none;
  font-size: 14px;
}
.ct-devs:hover {
  color: var(--ink);
}
@media (max-width: 960px) {
  .mk .ct-grid {
    grid-template-columns: 1fr;
  }
  .ct-map {
    height: 340px;
  }
}
@media (max-width: 640px) {
  .ct-hero {
    padding: 44px 0 28px;
  }
  .ct-card {
    padding: 20px 16px;
  }
  .ct-num-actions,
  .ct-num-actions .mk-btn {
    width: 100%;
  }
  .ct-num-actions .mk-btn {
    flex: 1;
  }
}

/* Floating WhatsApp chat button */
.mk-wa-fab {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  z-index: 40;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1f9d55;
  color: #fff;
  box-shadow: 0 14px 30px -8px rgba(31, 157, 85, 0.55), 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease;
}
.mk-wa-fab::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #1f9d55;
  animation: mk-wa-pulse 2.4s ease-out infinite;
}
.mk-wa-fab:hover {
  color: #fff;
  transform: translateY(-2px) scale(1.04);
}
.mk-wa-tip {
  position: absolute;
  inset-inline-end: 72px;
  white-space: nowrap;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateX(6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
[dir='rtl'] .mk-wa-tip {
  transform: translateX(-6px);
}
.mk-wa-fab:hover .mk-wa-tip,
.mk-wa-fab:focus-visible .mk-wa-tip {
  opacity: 1;
  transform: none;
}
@keyframes mk-wa-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mk-wa-fab::before {
    animation: none;
  }
}
@media (max-width: 640px) {
  .mk-wa-fab {
    bottom: 16px;
    inset-inline-end: 16px;
    width: 54px;
    height: 54px;
  }
  .mk-wa-tip {
    display: none;
  }
}

/* Mobile / tablet menu */
.mk-burger {
  display: none;
  position: relative;
}
.mk-burger summary {
  list-style: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.mk-burger summary::-webkit-details-marker {
  display: none;
}
.mk-burger summary span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.mk-burger[open] summary span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mk-burger[open] summary span:nth-child(2) {
  opacity: 0;
}
.mk-burger[open] summary span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
.mk-burger-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  width: min(300px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 30;
}
.mk-burger-menu > a:not(.mk-btn) {
  padding: 12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}
.mk-burger-menu > a:not(.mk-btn):hover {
  background: var(--surface-2);
}
.mk-burger-sep {
  height: 1px;
  background: var(--line-soft);
  margin: 6px 0 8px;
}
.mk-burger-menu .mk-btn {
  width: 100%;
  margin-bottom: 8px;
}
.mk-burger-menu .prefs {
  justify-content: center;
}
@media (max-width: 1080px) {
  .mk-burger {
    display: block;
  }
}

/* Developer team permissions */
.pill:has(input:checked) {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  font-weight: 600;
}
.pill:has(input:focus-visible) {
  outline: 2px solid var(--primary-ink);
  outline-offset: 2px;
}
.dt-perms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.dt-perm {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: var(--surface);
}
.dt-perm:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.dt-perm input {
  margin-top: 3px;
  accent-color: var(--primary);
}
.dt-perm span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dt-perm b {
  font-size: 13.5px;
  font-weight: 600;
}
.dt-perm small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
@media (max-width: 640px) {
  .dt-perms {
    grid-template-columns: 1fr;
  }
}

/* Star rating (feedback): row-reverse so hovering/choosing a star lights it and the ones before it */
.fb-stars {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}
[dir='rtl'] .fb-stars {
  flex-direction: row-reverse;
}
.fb-stars label {
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  color: var(--line-strong);
  transition: color 0.12s ease, transform 0.12s ease;
}
.fb-stars label:hover,
.fb-stars label:hover ~ label,
.fb-stars label:has(input:checked),
.fb-stars label:has(input:checked) ~ label {
  color: var(--brass);
}
.fb-stars label:has(input:focus-visible) {
  outline: 2px solid var(--primary-ink);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ── Portal on phones: never wider than the screen, tasks first, bottom tabs ── */
.portal-main > *,
.portal-main .row > *,
.portal-main .card,
.portal-main form {
  min-width: 0;
  max-width: 100%;
}
.m-top,
.ptabbar,
.m-only {
  display: none;
}
.m-hint {
  background: var(--primary-soft);
  color: var(--primary-ink);
  border-radius: 12px;
  padding: 10px 14px;
}

/* what needs you */
.todo {
  gap: 14px;
}
.todo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  min-height: 64px;
}
.todo-item:hover {
  border-color: var(--line-strong);
}
.todo-item.danger {
  border-color: var(--danger-line);
  background: var(--danger-soft);
}
.todo-item.brass {
  border-color: var(--brass-line);
  background: var(--brass-faint);
}
.todo-ic {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-ink);
}
.todo-ic.brass {
  background: var(--brass-soft);
  color: var(--brass-text);
}
.todo-ic.danger {
  background: var(--surface);
  color: var(--danger);
}
.todo-ic.good {
  background: var(--primary-soft);
  color: var(--primary-ink);
}
.todo-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.todo-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-ink);
}
[dir='ltr'] .todo-cta svg {
  transform: scaleX(-1);
}
.todo-empty {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 860px) {
  .portal.has-tabs {
    display: block;
    min-height: 0;
  }
  .portal.has-tabs .sidebar {
    display: none;
  }
  .portal.has-tabs .m-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 9;
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    background: var(--deep);
    color: #fff;
  }
  .portal.has-tabs .m-top .brand {
    color: #fff;
  }
  .m-sub {
    color: var(--deep-faint, #9db0a9);
    font-weight: 400;
  }
  .portal.has-tabs .portal-main {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
  .portal.has-tabs .m-only {
    display: block;
  }
  .ptabbar {
    display: flex;
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    z-index: 10;
    justify-content: space-around;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 6px 6px calc(10px + env(safe-area-inset-bottom));
  }
  .ptabbar > a,
  .ptab-more > summary {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-height: 52px;
    justify-content: center;
    font-size: 11.5px;
    color: var(--muted);
    text-decoration: none;
    list-style: none;
    cursor: pointer;
  }
  .ptab-more {
    flex: 1;
    display: flex;
  }
  .ptab-more > summary::-webkit-details-marker {
    display: none;
  }
  .ptabbar > a[aria-current='page'] {
    color: var(--primary-ink);
    font-weight: 600;
  }
  .ptab-ic {
    position: relative;
    display: inline-flex;
  }
  .ptab-badge {
    position: absolute;
    top: -6px;
    inset-inline-end: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--brass);
    color: var(--on-brass);
    font-size: 11px;
    font-weight: 700;
    display: grid;
    place-items: center;
  }
  .ptab-sheet {
    position: fixed;
    inset-inline: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 70vh;
    overflow-y: auto;
  }
  .ptab-sheet > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--ink);
    text-decoration: none;
  }
  .ptab-sheet > a[aria-current='page'] {
    background: var(--primary-soft);
    color: var(--primary-ink);
    font-weight: 600;
  }
  .ptab-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 4px;
    border-top: 1px solid var(--line-soft);
    margin-top: 4px;
  }
}

/* tables become one card per row on phones */
@media (max-width: 640px) {
  .portal-main .table-wrap:has(td[data-label]) {
    overflow: visible;
  }
  .portal-main table:has(td[data-label]) thead {
    display: none;
  }
  .portal-main table:has(td[data-label]),
  .portal-main table:has(td[data-label]) tbody {
    display: block;
    width: 100%;
  }
  .portal-main table:has(td[data-label]) tbody tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 6px 14px;
    margin-bottom: 10px;
    background: var(--surface);
  }
  .portal-main table:has(td[data-label]) tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-soft);
    text-align: end;
    min-width: 0;
  }
  .portal-main table:has(td[data-label]) tbody td:last-child {
    border-bottom: 0;
  }
  .portal-main table:has(td[data-label]) tbody td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 13px;
    text-align: start;
    flex: none;
    max-width: 45%;
  }
  .portal-main table:has(td[data-label]) tbody td.actions {
    display: block;
    padding-top: 10px;
  }
  .portal-main table:has(td[data-label]) .td-actions {
    justify-content: stretch;
  }
  .portal-main table:has(td[data-label]) .td-actions > *,
  .portal-main table:has(td[data-label]) .td-actions form,
  .portal-main table:has(td[data-label]) .td-actions .btn {
    flex: 1 1 auto;
  }
  .portal-main table:has(td[data-label]) .td-actions .btn {
    min-height: 44px;
    justify-content: center;
    width: 100%;
  }
  .portal-main table:has(td[data-label]) td input,
  .portal-main table:has(td[data-label]) td select {
    max-width: 60%;
  }
  .portal-main .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portal-main .page-head h1 {
    font-size: 22px;
  }
}

/* phone with call / WhatsApp buttons */
.phone-links { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.btn.xs { min-height: 28px; padding: 3px 9px; font-size: 12px; gap: 4px; border-radius: 8px; }
.btn.xs.wa { color: #1f9d55; }
.form-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.audit-detail { font-size: 12px; color: var(--muted); word-break: break-word; max-width: 360px; }

/* Admin: app home placement — one row per Cycle, stacked on phones. */
.showcase-list {
  display: flex;
  flex-direction: column;
}
.showcase-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 96px;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.showcase-row:last-child {
  border-bottom: none;
}
.showcase-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.showcase-field select,
.showcase-field input {
  width: 100%;
  min-width: 0;
}
@media (max-width: 720px) {
  .showcase-row {
    grid-template-columns: 1fr 1fr;
  }
  .showcase-row > :first-child {
    grid-column: 1 / -1;
  }
}

/* One-page offer form: file inputs per document */
.upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.upload-slot { display: flex; flex-direction: column; gap: 6px; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.upload-slot input[type='file'] { max-width: 100%; font-size: 13px; }

.ct-devs-ctas,
.mk-dev-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.ct-devs-ctas .mk-btn {
  direction: ltr;
}
