/* MundaApp Market — one screen, one market, in the order a buyer reads it.
 *
 *   the photo answers "what am I looking at"
 *   the circle line answers "who is selling, and where"
 *   the price answers "what does one cost"
 *   the lot box answers "what does the whole lot cost, and what do I save"
 *   the ladder answers "what if I take ten, or twenty"
 *   the attributes answer "is it any good"
 *   the backers answer "do other people trust this price"
 *   the wayfinding answers "where do I stand"
 *   the pool answers "who is coming with me"
 *
 * Nothing below 12px (11px only for uppercase micro-labels), every control at
 * 44px, body contrast 9.3:1, muted on paper 5.2:1.
 */

@font-face {
  font-family: 'Munda Serif';
  src: url('https://mundaapp.pages.dev/fonts/fraunces.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Munda Sans';
  src: url('https://mundaapp.pages.dev/fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f7f4ec;
  --card: #ffffff;
  --ink: #14211a;
  --ink-2: #3d4a41;
  --muted: #5d6a60;
  --line: #e6e0d2;
  --green: #198a00;
  --green-deep: #0e5b22;
  --green-wash: #edf6e8;
  --orange: #ef7d00;
  --orange-wash: #fff3e2;
  --r: 18px;
  --shadow: 0 1px 2px rgba(20, 33, 26, .06), 0 8px 24px rgba(20, 33, 26, .07);
  --ribbon: linear-gradient(90deg, #198a00 0 58%, #de2010 58% 72%, #111 72% 86%, #ef7d00 86% 100%);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--paper); color: var(--ink);
  font-family: 'Munda Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.mk { max-width: 480px; margin: 0 auto; padding-bottom: 96px; }

/* ------------------------------------------------------------------ header */
/* The app's own header, drawn here so /market reads as a screen inside
   MundaApp rather than a second product: mark, wordmark, EN, account. */
.mk-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px 8px 14px;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.mk-brand { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.mk-brand__mark { display: block; width: 36px; height: 36px; border-radius: 10px; }
.mk-brand__txt { min-width: 0; }
.mk-brand__txt b { display: block; font-size: 18px; font-weight: 800; line-height: 1.02; letter-spacing: -.02em; }
.mk-brand__txt i { display: block; font-style: normal; font-size: 11px; line-height: 1.2; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.mk-top__tools { display: flex; align-items: center; gap: 2px; }
.mk-pill {
  display: inline-flex; align-items: center; height: 30px; padding: 0 10px;
  border-radius: 15px; background: #F4EFE0; color: var(--ink);
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
}
.mk-icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink-2);
  text-decoration: none;
}

/* -------------------------------------------------------------------- hero */
.mk-hero { position: relative; margin: 12px 14px 0; border-radius: 22px; overflow: hidden; }
.mk-hero img { display: block; width: 100%; height: 200px; object-fit: cover; }
.mk-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 26, 14, .05) 0%, rgba(8, 26, 14, .35) 46%, rgba(8, 26, 14, .86) 100%);
}
.mk-hero::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: var(--ribbon); z-index: 2;
}
.mk-hero__brand {
  position: absolute; top: 12px; left: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 12px 4px 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .94); color: var(--ink);
  font-size: 12px; font-weight: 800; letter-spacing: .01em;
}
.mk-hero__brand b { font-weight: 800; }
.mk-hero__brand img { width: 24px; height: 24px; border-radius: 7px; display: block; }
.mk-hero__in { position: absolute; inset: auto 0 0 0; padding: 16px 16px 15px; z-index: 1; color: #fff; }
.mk-hero__hello { font-family: 'Munda Serif', Georgia, serif; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; opacity: .88; }
.mk-hero__h { font-family: 'Munda Serif', Georgia, serif; font-size: 27px; line-height: 1.1; margin: 4px 0 8px; letter-spacing: -.01em; }
.mk-hero__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mk-hero__basket {
  border: 1px solid rgba(255,255,255,.26); color: #fff; font: inherit;
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 7px 11px; border-radius: 12px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .26);
  font-size: 12px;
}
.mk-hero__basket b { font-size: 16px; letter-spacing: -.01em; }
.mk-open {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 11px;
  background: rgba(25, 138, 0, .92); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.mk-open i { width: 7px; height: 7px; border-radius: 50%; background: #d8ffcb; animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(216,255,203,.6); }
  70% { box-shadow: 0 0 0 7px rgba(216,255,203,0); }
  100% { box-shadow: 0 0 0 0 rgba(216,255,203,0); }
}

/* ------------------------------------------------------------------ basket */
.mk-sec { padding: 22px 0 0; }
.mk-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 16px 10px; }
.mk-sec__head h2 { margin: 0; font-family: 'Munda Serif', Georgia, serif; font-size: 19px; letter-spacing: -.01em; }
.mk-sec__head a { font-size: 12px; font-weight: 600; color: var(--green-deep); text-decoration: none; }
.mk-sec__note { margin: 2px 16px 0; font-size: 12px; color: var(--muted); }

.mk-basket { display: flex; gap: 10px; overflow-x: auto; padding: 2px 16px 8px; scroll-snap-type: x mandatory; }
.mk-basket::-webkit-scrollbar { display: none; }
.mk-b {
  flex: 0 0 116px; scroll-snap-align: start; text-decoration: none; color: inherit;
  border: 2px solid transparent; border-radius: 16px;
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--ribbon) border-box;
  padding: 8px 8px 10px; box-shadow: var(--shadow);
}
.mk-b img { width: 100%; height: 74px; object-fit: cover; border-radius: 11px; display: block; }
.mk-b__tile {
  display: grid; place-items: center; height: 74px; border-radius: 11px;
  background: linear-gradient(165deg, #edf5e6, #f8f4e8 60%, #fdf0df);
  font-family: 'Munda Serif', Georgia, serif; font-size: 30px; color: rgba(14, 91, 34, .4);
}
.mk-b b { display: block; margin-top: 7px; font-size: 13px; letter-spacing: -.01em; }
.mk-b span { display: block; font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.mk-b strong { display: block; margin-top: 5px; font-size: 16px; letter-spacing: -.02em; }

/* ------------------------------------------------------------------ search */
.mk-search { display: flex; gap: 8px; padding: 0 16px 10px; }
.mk-search input {
  flex: 1; min-height: 46px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff;
  font: inherit; font-size: 14px; color: var(--ink);
}
.mk-search input::placeholder { color: var(--muted); }

/* -------------------------------------------------------------------- rail */
.mk-rail { display: flex; gap: 10px; overflow-x: auto; padding: 2px 16px 6px; scroll-snap-type: x mandatory; }
.mk-rail::-webkit-scrollbar { display: none; }
.mk-tile {
  position: relative; flex: 0 0 134px; height: 98px; scroll-snap-align: start;
  border: 2px solid transparent; border-radius: 16px; overflow: hidden; padding: 0;
  background: var(--ribbon); background-clip: border-box; text-align: left;
}
.mk-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mk-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,26,14,.02) 30%, rgba(8,26,14,.84) 100%); }
.mk-tile b { position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 1; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.mk-tile i { position: absolute; left: 10px; bottom: 28px; z-index: 1; font-style: normal; color: #fff; font-size: 12px; opacity: .92; }

/* ------------------------------------------------------------------- group */
.mk-stalls { display: grid; gap: 12px; padding: 8px 14px 0; }
.mk-market { display: grid; gap: 12px; padding-top: 14px; }
.mk-market__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 6px 2px 0; border-top: 1px solid var(--line); }
.mk-market__town h2 { margin: 0; font-family: 'Munda Serif', Georgia, serif; font-size: 22px; letter-spacing: -.015em; }
.mk-market__town p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.mk-market__meta { text-align: right; }
.mk-market__meta b { display: block; font-size: 13px; color: var(--green-deep); }
.mk-market__meta span { font-size: 12px; color: var(--muted); }
.mk-market__note { margin: -6px 2px 0; font-size: 12px; color: var(--muted); }

/* -------------------------------------------------------------------- card */
.mk-card {
  display: grid; grid-template-columns: 118px minmax(0, 1fr);
  border: 3px solid transparent; border-radius: var(--r);
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--ribbon) border-box;
  overflow: hidden; box-shadow: var(--shadow); position: relative;
}
.mk-card__ph {
  position: relative; display: block; width: 100%; height: 100%;
  border: 0; padding: 0; background: #e9e4d6; cursor: zoom-in; overflow: hidden;
}
.mk-card__ph img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; }
.mk-card__ph--none {
  display: grid; place-items: center; cursor: default;
  background: linear-gradient(165deg, #edf5e6 0%, #f8f4e8 55%, #fdf0df 100%);
}
.mk-card__ph--none::after { display: none; }
.mk-card__ph--none svg { width: 56px; height: 56px; color: rgba(14, 91, 34, .42); }
.mk-card__ph--none b {
  font-family: 'Munda Serif', Georgia, serif; font-size: 40px; font-weight: 600;
  color: rgba(14, 91, 34, .38); letter-spacing: -.04em;
}
.mk-card__ph--none::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--ribbon);
}
.mk-card__ph::after {
  content: ''; position: absolute; right: 7px; bottom: 7px; width: 22px; height: 22px;
  border-radius: 7px; background: rgba(20,33,26,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M5 2H2v3M9 2h3v3M5 12H2V9M9 12h3V9' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.mk-card__state {
  position: absolute; top: 10px; right: 8px;
  display: inline-flex; align-items: center; gap: 5px;
  height: 25px; padding: 0 8px; border-radius: 8px;
  background: rgba(255, 255, 255, .95); color: var(--muted);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.mk-card__state.is-open { background: rgba(25, 138, 0, .95); color: #fff; }
.mk-card__kind {
  position: absolute; top: 10px; left: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 7px; border-radius: 7px;
  background: rgba(20, 33, 26, .74); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
}
.mk-card__kind--net { background: rgba(138, 74, 0, .9); }

.mk-card__off {
  position: absolute; left: 8px; bottom: 8px;
  padding: 4px 8px; border-radius: 8px;
  background: rgba(20, 33, 26, .78); color: #fff; font-size: 12px; font-weight: 700;
}

.mk-card__body { padding: 13px 12px 12px; min-width: 0; }
.mk-card__circle { margin: 0 0 3px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-card__head { display: flex; align-items: flex-start; gap: 8px; }
.mk-card__head h3 { margin: 0; font-size: 16px; letter-spacing: -.015em; line-height: 1.24; flex: 1; min-width: 0; }
.mk-card__head b { font-size: 19px; letter-spacing: -.03em; white-space: nowrap; }
.mk-card__head b span { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.mk-lot { margin: 9px 0 0; padding: 8px 10px; border-radius: 12px; background: var(--orange-wash); border: 1px solid #f6e2c6; }
.mk-lot__line { display: flex; align-items: center; gap: 8px; }
.mk-lot__line b { font-size: 13px; color: #523610; letter-spacing: -.01em; }
.mk-lot__line em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #8a4a00; white-space: nowrap; }
.mk-lot__sub { margin-top: 3px; font-size: 12px; color: #7a5a22; }

.mk-tiers { display: flex; gap: 5px; margin-top: 9px; }
.mk-tiers button {
  flex: 1; min-height: 44px; padding: 5px 3px;
  border: 1px solid var(--line); border-radius: 10px; background: #fbfaf6;
  font: inherit; color: var(--ink); text-align: center;
}
.mk-tiers button i { display: block; font-style: normal; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.mk-tiers button b { display: block; font-size: 13px; margin-top: 1px; }
.mk-tiers button[aria-pressed="true"] { border-color: var(--green); background: var(--green-wash); box-shadow: inset 0 0 0 1px var(--green); }

.mk-attrs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.mk-attrs span { padding: 3px 8px; border-radius: 999px; background: #f4f7f1; border: 1px solid #e2ebdc; font-size: 12px; color: #34503a; }

.mk-back { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.mk-back b { color: var(--ink-2); }
.mk-back button {
  margin-left: auto; min-height: 44px; padding: 0 14px;
  border: 1px solid #cfe3c8; border-radius: 9px; background: var(--green-wash);
  color: var(--green-deep); font: inherit; font-size: 12px; font-weight: 700;
}

.mk-way { display: flex; align-items: flex-start; gap: 5px; margin: 8px 0 0; font-size: 12px; color: var(--ink-2); }
.mk-way svg { flex: 0 0 auto; margin-top: 1px; color: var(--muted); }
.mk-card__fine { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.mk-card__fine b { color: var(--ink-2); font-weight: 600; }

.mk-pool { display: flex; align-items: center; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }
.mk-faces { display: flex; }
.mk-faces i {
  width: 22px; height: 22px; margin-left: -6px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-deep); color: #fff; font-style: normal;
  font-size: 11px; font-weight: 700; border: 2px solid #fff;
}
.mk-faces i:first-child { margin-left: 0; }
.mk-pool__t { flex: 1; font-size: 12px; color: var(--muted); line-height: 1.3; }
.mk-pool__t b { color: var(--ink-2); }
.mk-pool button {
  min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px;
  background: var(--green-deep); color: #fff; font: inherit; font-size: 12px; font-weight: 700;
}
.mk-pool button[disabled] { background: #cfd8ce; color: #66756a; }
.mk-pool__bar { height: 5px; margin-top: 6px; border-radius: 3px; background: #eee7d8; overflow: hidden; }
.mk-pool__bar i { display: block; height: 100%; background: var(--orange); border-radius: 3px; }

.mk-acts2 { display: flex; gap: 7px; margin-top: 11px; }
.mk-acts2 button {
  flex: 1; min-height: 44px; border-radius: 11px;
  font: inherit; font-size: 13px; font-weight: 700;
}
.mk-find { background: var(--green-deep); color: #fff; border: 0; }
.mk-group { background: #fff; color: var(--ink); border: 1px solid var(--line); }

.mk-empty { margin: 4px 2px; padding: 18px 16px; border-radius: 16px; background: #fff; border: 1px dashed var(--line); font-size: 13px; color: var(--muted); text-align: center; }

/* --------------------------------------------------------------------- run */
.mk-runs { display: grid; gap: 10px; padding: 0 16px; }
.mk-run { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; box-shadow: var(--shadow); }
.mk-run__top { display: flex; align-items: flex-start; gap: 10px; }
.mk-run__ph {
  width: 54px; height: 54px; flex: 0 0 auto; border-radius: 12px; object-fit: cover;
  border: 2px solid transparent;
  background: linear-gradient(#eee, #eee) padding-box, var(--ribbon) border-box;
}
.mk-run__stall { margin: 2px 0 0; font-size: 12px; color: var(--ink-2); }
.mk-run__top h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.mk-run__top p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.mk-run__when { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--green-deep); white-space: nowrap; }
.mk-run__stats { display: flex; gap: 14px; margin-top: 10px; }
.mk-run__stats div { font-size: 12px; color: var(--muted); }
.mk-run__stats b { display: block; font-size: 16px; color: var(--ink); letter-spacing: -.02em; }
.mk-nb__join {
  width: 100%; min-height: 44px; margin-top: 9px;
  border: 0; border-radius: 12px; background: var(--green-deep); color: #fff;
  font: inherit; font-size: 13px; font-weight: 700;
}
.mk-nb__join[disabled] { background: #cfd8ce; color: #66756a; }

/* ------------------------------------------------------------------- units */
.mk-units { padding: 0 16px; display: grid; }
.mk-unit { display: grid; grid-template-columns: 78px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.mk-unit:first-child { border-top: 0; }
.mk-unit b { font-size: 13px; letter-spacing: .02em; }
.mk-unit p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.mk-units__photo { margin: 0 16px 12px; border-radius: 16px; overflow: hidden; }
.mk-units__photo img { display: block; width: 100%; height: 150px; object-fit: cover; }
.mk-units__photo figcaption { padding: 9px 12px; background: #fff; border: 1px solid var(--line); border-top: 0; font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------------ footer */
.mk-foot { margin: 26px 16px 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.mk-foot p { margin: 0 0 7px; }
.mk-foot a { color: var(--green-deep); }

/* The app's own shelf (css/tabbar.css), reproduced so the market page and the
   rest of MundaApp are the same component: the four-colour rule across the
   top, the cream plate, the gold-rimmed pill on the tab you are standing on. */
.mk-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  max-width: 480px; margin: 0 auto;
  display: flex; align-items: stretch; justify-content: space-between;
  padding: 3px 3px calc(0px + env(safe-area-inset-bottom));
  border-top: 0;
  background:
    linear-gradient(90deg, #0C6E42 0 25%, #C8102E 25% 50%, #14110E 50% 75%, #DFA03C 75% 100%) 0 0 / 100% 3px no-repeat,
    linear-gradient(180deg, #FFFCF3 0%, #FDF8EC 46%, #F8F1DE 100%);
  box-shadow: 0 -10px 26px -20px rgba(12, 40, 26, .65), inset 0 1px 0 #FFFFFF;
}
.mk-nav a {
  position: relative; flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 7px 0 5px;
  color: #63736A; font-size: 9.5px; font-weight: 650; letter-spacing: .05em;
  text-transform: uppercase; text-decoration: none;
}
.mk-nav a > span {
  line-height: 1.1; margin-top: 3px; position: relative; z-index: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.mk-nav a svg {
  width: 21px; height: 21px; stroke-width: 1.8; color: #5F6E65;
  position: relative; z-index: 1;
  transition: color .16s ease, transform .16s cubic-bezier(.25, 1, .5, 1);
}
.mk-nav a[aria-current="page"] { color: #0A5334; font-weight: 750; }
.mk-nav a[aria-current="page"]::before {
  content: ""; position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  width: 46px; height: 28px; border-radius: 11px;
  background: linear-gradient(180deg, #FFFBEF 0%, #FBF1DA 62%, #F5E7C8 100%);
  box-shadow: inset 0 0 0 1px #E3C58A, inset 0 1px 0 #FFFFFF, 0 6px 13px -11px rgba(120, 86, 20, .60);
  z-index: 0;
}
.mk-nav a[aria-current="page"] svg {
  color: #0A5334; stroke-width: 2.05;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .7));
  transform: translateY(-1px);
}
.mk-nav a[aria-current="page"] > span::after {
  content: ""; display: block; width: 13px; height: 2px; border-radius: 2px;
  margin: 2px auto 0; background: linear-gradient(90deg, #0C6E42, #17A16A);
}
.mk-nav a:active svg { transform: scale(.94); }

/* ---------------------------------------------------------------- sheet */
.mk-sheet { position: fixed; inset: 0; z-index: 95; background: rgba(11, 18, 13, .42); display: grid; align-items: end; }
.mk-sheet[hidden] { display: none; }
.mk-sheet__in {
  background: var(--paper); border-radius: 22px 22px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
  max-height: 86vh; overflow: auto; max-width: 480px; margin: 0 auto; width: 100%;
  box-shadow: 0 -18px 40px -24px rgba(10, 30, 16, .55);
}
.mk-sheet__grab { width: 42px; height: 4px; border-radius: 2px; background: #d9d2c1; margin: 4px auto 10px; }
.mk-sheet__head { display: flex; align-items: center; gap: 10px; }
.mk-sheet__head h2 { margin: 0; font-family: 'Munda Serif', Georgia, serif; font-size: 20px; letter-spacing: -.01em; flex: 1; }
.mk-sheet__x { min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: 13px; font-weight: 700; }
.mk-sheet__sub { margin: 4px 0 12px; font-size: 12px; color: var(--muted); }
.mk-sheet__row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.mk-sheet__row b { display: block; font-size: 14px; }
.mk-sheet__row span { display: block; font-size: 12px; color: var(--muted); }
.mk-sheet__price { font-size: 15px; font-weight: 700; text-align: right; }
.mk-sheet__price i { display: block; font-style: normal; font-size: 11px; color: var(--muted); font-weight: 500; }
.mk-sheet__pool { font-size: 11px; color: var(--muted); text-align: right; }
.mk-sheet__pool b { color: var(--green-deep); font-size: 12px; }
.mk-sheet__foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.mk-sheet__foot > div { flex: 1; }
.mk-sheet__foot b { display: block; font-size: 14px; }
.mk-sheet__foot span { font-size: 12px; color: var(--muted); }
.mk-sheet__foot button { min-height: 48px; padding: 0 18px; border: 0; border-radius: 13px; background: var(--green-deep); color: #fff; font: inherit; font-size: 14px; font-weight: 700; }
.mk-sheet__foot button[disabled] { background: #cfd8ce; color: #66756a; }

/* the photo, at full size */
.mk-light {
  position: fixed; inset: 0; z-index: 90; background: #0b120d;
  display: grid; place-items: center; padding: 14px;
}
.mk-light[hidden] { display: none; }
.mk-light img { max-width: 100%; max-height: calc(100% - 64px); object-fit: contain; border-radius: 12px; }
.mk-light__close {
  position: absolute; top: 12px; right: 12px; min-height: 44px; padding: 0 16px;
  border: 1px solid rgba(255,255,255,.3); border-radius: 12px;
  background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: 14px; font-weight: 700;
}

@media (prefers-reduced-motion: reduce) { .mk-open i { animation: none; } }
@media (max-width: 359px) { .mk-card { grid-template-columns: 96px minmax(0, 1fr); } }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 160ms; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ------------------------------------------------------- the answer card */
/* Used when the market has to justify itself: a question on top, the working
   below it, and a stated confidence for every claim. */
.mk-ans { border: 3px solid transparent; border-radius: 18px;
  background: linear-gradient(#fff, #fff) padding-box, var(--ribbon) border-box;
  padding: 14px 14px 12px; margin: 2px 0 12px; }
.mk-ans__q { margin: 0 0 4px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.mk-ans__q b { display: block; margin-top: 3px; font-size: 16px; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); text-transform: none; }
.mk-ans__h { margin: 14px 0 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--green-deep); }
.mk-ans p { margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.mk-ans__calc { display: grid; gap: 0; margin: 6px 0 10px; }
.mk-ans__line { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.mk-ans__line:first-child { border-top: 0; }
.mk-ans__line span { color: var(--muted); }
.mk-ans__line b { font-variant-numeric: tabular-nums; }
.mk-ans__sum { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0 0; border-top: 2px solid var(--ink); font-size: 15px; font-weight: 700; }
.mk-cer { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.mk-cer--hi { background: var(--green-wash); color: var(--green-deep); border: 1px solid #cfe3c8; }
.mk-cer--mid { background: var(--orange-wash); color: #8a4a00; border: 1px solid #f0dcc0; }
.mk-cer--lo { background: #f4f1ea; color: #6a6257; border: 1px solid #e2dccb; }
.mk-ans__ev { margin: 4px 0 0; padding-left: 16px; font-size: 12px; color: var(--muted); }
.mk-ans__ev li { margin-bottom: 4px; }
.mk-ans__ask { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.mk-ans__ask a { flex: 1; min-height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--green-deep); color: #fff; text-decoration: none; font-size: 14px; font-weight: 700; }
