/* ============================================================================
   Mockups — the mockup and quote studio. Governed by docs/DESIGN.md: every
   value comes from the tokens in /style.css. The one dark surface is the
   photo stage (a light box for the knife), the same in light and dark mode.
   ============================================================================ */

/* while a deal is open the studio's own action bar replaces the tab bar */
body.mk-editing .tabbar { display: none; }

#view-mockups header p { margin-bottom: 24px; }
.mk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.mk-actions:first-child { margin-top: 0; }
.mk-sm { min-height: 36px; padding: 0 12px; font-size: var(--fs-caption); }
.mk-wide { width: 100%; }
.mk-link {
  border: 0; background: none; padding: 0; margin: 0;
  font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.mk-link:hover { color: var(--accent-hover); }
@media (max-width: 767px) { .mk-link { position: relative; } .mk-link::after { content: ""; position: absolute; inset: -12px -4px; } }
.mk-fine { font-size: var(--fs-caption); color: var(--text-tertiary); margin: 8px 0; }
.mk-note, .mk-warn, .mk-err {
  border-radius: var(--r-md); padding: 12px 16px; margin: 12px 0;
  font-size: var(--fs-secondary); line-height: 1.45;
}
.mk-note { background: var(--info-soft); color: var(--text-primary); }
.mk-warn { background: var(--warning-soft); color: var(--warning); }
.mk-err  { background: var(--destructive-soft); color: var(--destructive); }
.mk-bad  { color: var(--destructive); }
.mk-dim  { color: var(--text-tertiary); }
.mk-panel { margin: 16px 0; padding: 20px; }
.mk-panel h2 { margin-bottom: 12px; }

/* ---- the deal list ---- */
.mk-rows, .mk-deals { display: flex; flex-direction: column; }
.mk-deals { background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); overflow: hidden; }
.mk-row, .mk-deal {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 56px; padding: 8px 0; text-align: left;
  border: 0; border-bottom: 1px solid var(--border-subtle); background: none;
  font-family: var(--font); color: var(--text-primary);
}
.mk-row:last-child, .mk-deal:last-child { border-bottom: 0; }
button.mk-row, .mk-deal { cursor: pointer; transition: background var(--dur-fast) var(--ease); }
.mk-deal { padding: 12px 16px; }
button.mk-row:hover, .mk-deal:hover { background: var(--surface-sunken); }
.mk-deal:active, button.mk-row:active { transform: scale(0.99); }
/* swipe a project left: its Delete sits behind the row (studio.js deleteProject) */
.mk-dealwrap { position: relative; overflow: hidden; border-bottom: 1px solid var(--border-subtle); transition: height var(--dur) var(--ease); }
.mk-dealwrap:last-child { border-bottom: 0; }
.mk-dealwrap .mk-deal {
  position: relative; z-index: 1; border-bottom: 0; background: var(--surface); touch-action: pan-y;
  transition: background var(--dur-fast) var(--ease), transform var(--dur) var(--ease);
}
.mk-dealwrap .mk-deal:hover { background: var(--surface-sunken); }
.mk-dealwrap .mk-deal:active { transform: none; background: var(--surface-sunken); }
.mk-dealwrap .mk-deal[aria-current="true"] { background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); }
.mk-dealwrap .mk-deal img { pointer-events: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
.mk-dealwrap.open .mk-deal, .mk-dealwrap.open .mk-deal:active { transform: translateX(-88px); }
.mk-dealwrap.mk-swiping .mk-deal { transition: background var(--dur-fast) var(--ease); }
.mk-dealdel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 88px; border: 0; cursor: pointer;
  background: var(--destructive); color: var(--surface); font-family: var(--font); font-size: var(--fs-secondary); font-weight: 600;
  /* not painted at rest: at a phone's fractional scale it would show as a red hairline at the row's edge */
  opacity: 0; transition: opacity 0s linear var(--dur);
}
.mk-dealwrap.open .mk-dealdel, .mk-dealwrap.mk-swiping .mk-dealdel, .mk-dealdel:focus-visible { opacity: 1; transition: none; }
.mk-dealdel:active { filter: brightness(0.9); }
.mk-dealwrap.open .mk-dealdel:disabled { cursor: default; opacity: 0.7; }
.mk-dealdel:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--surface); }
.mk-askdel {
  width: min(92vw, 440px); padding: var(--s5); border: 0; border-radius: var(--r-xl); color: var(--text-primary);
  background: var(--surface); box-shadow: var(--shadow-pop);
}
.mk-askdel::backdrop { background: rgba(0, 0, 0, 0.4); }
.mk-askdel h2 { margin: 0 0 var(--s3); color: var(--text-primary); font-size: var(--fs-section); font-weight: 600; letter-spacing: 0; text-transform: none; overflow-wrap: anywhere; }
.mk-askdel ul { margin: 0 0 var(--s3); padding-left: 20px; font-size: var(--fs-secondary); overflow-wrap: anywhere; }
.mk-askdel li + li { margin-top: var(--s1); }
.mk-askdel p { margin: 0 0 var(--s4); color: var(--text-secondary); font-size: var(--fs-secondary); }
.mk-askdel .actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.mk-askdel .btn { flex: 1 1 140px; }
@media (max-width: 767px) {
  .mk-askdel { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: calc(var(--s5) + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .mk-dealwrap, .mk-dealwrap .mk-deal, .mk-dealdel { transition: none; }
}
.mk-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mk-row-main b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-row-main small { font-size: var(--fs-caption); color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* on a phone the line under a deal wraps, so its follow-up date is never the part cut off */
@media (max-width: 767px) { .mk-row-main small { white-space: normal; overflow-wrap: anywhere; } }
.mk-thumb {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: var(--r-md);
  display: grid; place-items: center; overflow: hidden;
  background: var(--surface-sunken); color: var(--text-secondary); font-weight: 600;
}
.mk-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; background: #FFFFFF; }
.mk-seg { margin: 24px 0 12px; }
.mk-count { color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.mk-owner {
  display: block; width: 100%; margin: 12px 0; padding: 12px 16px; text-align: left;
  border: 1px dashed var(--border-strong); border-radius: var(--r-md); background: none;
  font-family: var(--font); font-size: var(--fs-secondary); color: var(--text-secondary); cursor: pointer;
}
.mk-owner:hover { background: var(--surface-sunken); }
.mk-cgp { font-size: var(--fs-caption); color: var(--text-tertiary); margin: 16px 0; font-variant-numeric: tabular-nums; }
.mk-foot { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 8px; }

/* stage tags: a word always, a tint as a second cue */
.tag.stage-new_lead { background: var(--info-soft); color: var(--info); }
.tag.stage-mockup_sent, .tag.stage-quote_proposed { background: var(--accent-soft); color: var(--accent); }
.tag.stage-in_communication { background: var(--info-soft); color: var(--info); }
.tag.stage-sample_needed { background: var(--warning-soft); color: var(--warning); }
.tag.stage-closed_won { background: var(--success-soft); color: var(--success); }
.tag.stage-closed_lost { background: var(--surface-sunken); color: var(--text-tertiary); }

/* ---- the studio ---- */
.mk-edhead { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.mk-edtitle { display: flex; flex-direction: column; min-width: 0; }
.mk-edtitle b { font-size: var(--fs-section); font-weight: 600; letter-spacing: -0.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-edtitle small { font-size: var(--fs-caption); color: var(--text-tertiary); }
.mk-iconback svg { width: 20px; height: 20px; }
.mk-edhead .iconbtn svg { stroke: currentColor; }

.mk-describe { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 8px; }
.mk-describe textarea {
  flex: 1; min-width: 0; min-height: 48px; resize: none; line-height: 1.4;
  border-radius: var(--r-md); font-size: var(--fs-body);
}
.mk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mk-chips:empty { display: none; }
.mk-chips .mk-fine { width: 100%; margin: 0; }
.mk-pick.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.mk-stage {
  position: relative; padding: 8px; border-radius: var(--r-lg);
  background: radial-gradient(120% 95% at 50% 38%, #3C3936 0%, #161514 72%);
}
.mk-view { overflow: hidden; border-radius: var(--r-md); }
#mk-out {
  display: block; width: 100%; height: auto;
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
  transition: transform var(--dur-slow) var(--ease), transform-origin var(--dur-slow) var(--ease);
}
#mk-out:active { cursor: grabbing; }
/* the scale and origin are aimZoom()'s: centered on the logo's spot */
.mk-view.zoomed #mk-out { transform: scale(var(--mk-zoom, 2.6)); }
/* one logo on each side (2026-10-23): the other side under the first, each named */
.mk-view2 { margin-top: 8px; }
#mk-out2 { display: block; width: 100%; height: auto; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
#mk-out2:active { cursor: grabbing; }
.mk-viewcap { margin: 4px 6px 6px; color: #CFCAC2; font-size: var(--fs-caption); letter-spacing: 0.01em; }
.mk-viewcap[hidden] { display: none; }
.mk-dual .mk-logo-thumb img { max-width: 100px; max-height: 60px; object-fit: contain; }
.mk-dual .mk-opt[disabled] { opacity: 0.45; cursor: not-allowed; }
.mk-stagemsg {
  position: absolute; left: 20px; right: 20px; bottom: 16px; margin: 0;
  padding: 8px 12px; border-radius: var(--r-md);
  background: rgba(14, 13, 12, 0.66); color: #F1EFEA; font-size: var(--fs-secondary);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.mk-stagemsg:empty { display: none; }
.mk-tools { display: grid; gap: 12px; margin: 12px 0 0; }
.mk-slider { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 12px; font-size: var(--fs-secondary); color: var(--text-secondary); }
.mk-slider input { width: 100%; margin: 0; accent-color: var(--accent); }
.mk-nudges { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-chip { min-height: 36px; padding: 6px 12px; font-size: var(--fs-caption); }
@media (max-width: 767px) { .mk-chip { min-height: 44px; } }
.mk-chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.mk-photoline { font-size: var(--fs-caption); color: var(--text-tertiary); margin: 0; }
.mk-notes .mk-warn { margin: 0 0 8px; }

.mk-step { padding: 0 0 24px; scroll-margin-top: calc(var(--mk-pin-top, 8px) + 12px); }
/* only the step on screen shows, so a section's rule above it is drawn only when a shown section came before */
.mk-steps > .mk-step:not(.mk-off):not([hidden]) ~ .mk-step:not(.mk-off) { padding-top: 24px; border-top: 1px solid var(--border-subtle); }
.mk-step h3 { margin: 0 0 16px; font-size: var(--fs-section); font-weight: 600; letter-spacing: -0.2px; }
.mk-step h4 { margin: 20px 0 8px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.mk-step h4 small { font-weight: 400; color: var(--text-tertiary); font-size: var(--fs-caption); }

.mk-form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mk-span2 { grid-column: 1 / -1; }
.mk-f { display: grid; gap: 6px; font-size: var(--fs-secondary); color: var(--text-secondary); min-width: 0; }
.mk-f input, .mk-f select, .mk-f textarea, .mk-addnote input, #lib-price-search, .mk-ed textarea, .mk-sub textarea {
  width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px;
  border-radius: var(--r-md); border: 1px solid var(--border-subtle);
  background: var(--surface); color: var(--text-primary);
  font-family: var(--font); font-size: var(--fs-body);
  transition: border-color var(--dur-fast) var(--ease);
}
.mk-f select { -webkit-appearance: none; appearance: none; padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-tertiary) 50%), linear-gradient(135deg, var(--text-tertiary) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.mk-f input:hover, .mk-f select:hover, .mk-f textarea:hover { border-color: var(--border-strong); }
.mk-f input:focus, .mk-f select:focus, .mk-f textarea:focus, .mk-ed textarea:focus, .mk-addnote input:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent;
}

.mk-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mk-swatches:empty { display: none; }
.mk-sw {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 16px 4px 6px;
  border: 1px solid var(--border-subtle); border-radius: var(--r-pill); background: var(--surface);
  font-family: var(--font); font-size: var(--fs-secondary); color: var(--text-primary); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease);
}
.mk-sw i { width: 28px; height: 28px; border-radius: 50%; display: block; box-shadow: inset 0 2px 4px rgba(255,255,255,0.28), inset 0 -3px 6px rgba(0,0,0,0.35), 0 0 0 1px var(--border-subtle); }
.mk-sw[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mk-seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.mk-seg2 .mk-oneside { grid-column: 1 / -1; flex-basis: 100%; margin: 4px 0 0; }
.mk-seg2:empty { display: none; }
.mk-sku { font-size: var(--fs-caption); color: var(--text-tertiary); margin: 12px 0 0; font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

.mk-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mk-opt {
  min-height: 48px; padding: 12px; text-align: left; line-height: 1.3;
  border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--surface);
  font-family: var(--font); font-size: var(--fs-secondary); color: var(--text-primary); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.mk-opt:hover { border-color: var(--border-strong); }
.mk-opt:active { transform: scale(0.98); }
.mk-opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* The engraving layouts (2026-11-12): Cutco's own arrangements as small drawings with Cutco's own
   names, three across; two across when a piece takes four or fewer. */
.mk-layouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mk-layouts.few { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mk-lay {
  display: grid; justify-items: center; align-content: start; gap: 4px; min-width: 0; min-height: 96px; padding: 12px 8px;
  border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--surface);
  font-family: var(--font); font-size: var(--fs-caption); line-height: 1.3; text-align: center; color: var(--text-primary); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.mk-lay svg { width: 64px; height: 44px; display: block; }
.mk-lay .g-logo { fill: var(--text-secondary); }
.mk-lay .g-text { fill: none; stroke: var(--text-tertiary); stroke-width: 3.5; stroke-linecap: round; }
.mk-lay .g-ring { fill: none; stroke: var(--border-strong); stroke-width: 1.5; }
.mk-lay span { overflow-wrap: anywhere; }
.mk-lay:hover { border-color: var(--border-strong); }
.mk-lay:active { transform: scale(0.98); }
.mk-lay:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mk-lay[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mk-lay[aria-pressed="true"] .g-logo { fill: var(--accent); }
.mk-lay[aria-pressed="true"] .g-text { stroke: var(--text-secondary); }
.mk-layoutnote { margin: 8px 0 0; }
.mk-layoutnote:empty { display: none; }

.mk-logo-row { display: flex; align-items: center; gap: 16px; }
.mk-logo-thumb {
  flex: 0 0 auto; width: 112px; height: 72px; border-radius: var(--r-md);
  display: grid; place-items: center; overflow: hidden;
  background: #FFFFFF; border: 1px solid var(--border-subtle);
}
.mk-logo-thumb img { max-width: 100px; max-height: 60px; object-fit: contain; }
.mk-logo-thumb span { font-size: var(--fs-micro); color: #8B867C; }
.mk-logo-big { width: 100%; height: 140px; }
.mk-logo-big img { max-width: 92%; max-height: 120px; }
.mk-logo-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.mk-lines { display: grid; gap: 8px; }
.mk-lines input { width: 100%; }
/* a set engraved piece by piece (2026-11-13): each piece Same, Its own or Blank, its own layout and words
   under it; pieces split by a hairline, never a box in a box */
.mk-each:empty { display: none; }
.mk-each { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-subtle); display: grid; gap: 12px; }
.mk-each h4 { margin: 0; }
.mk-each .mk-seg2 { margin-top: 0; }
.mk-each .mk-fine { margin: 0; }
.mk-each .mk-logo-thumb img { max-width: 100px; max-height: 60px; object-fit: contain; }
.mk-eachrow { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.mk-eachname { margin: 0; font-size: var(--fs-secondary); font-weight: 600; color: var(--text-primary); }
.mk-seg3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mk-seg3 .mk-opt { text-align: center; }
/* the second engraving (the Pocket Knife's handle beside its blade) */
.mk-second:empty { display: none; }
.mk-second { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-subtle); display: grid; gap: 12px; }
.mk-second h4 { margin: 0; }
.mk-second .mk-seg2 { margin-top: 0; }
.mk-second .mk-check small { display: block; color: var(--text-tertiary); font-size: var(--fs-caption); margin-top: 2px; }
.mk-second textarea { width: 100%; min-height: 132px; resize: vertical; }
.mk-second .mk-fine { margin: 0; }
.mk-fonts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mk-font {
  display: grid; gap: 2px; min-width: 0; padding: 12px 8px 8px; text-align: center;
  border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--surface); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease);
}
.mk-font .pv { font-size: 22px; line-height: 1.35; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-font .nm { font-size: var(--fs-micro); color: var(--text-tertiary); font-family: var(--font); }
.mk-font[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }


.mk-qty { display: grid; grid-template-columns: 48px 1fr 48px; gap: 8px; max-width: 240px; }
.mk-qty input { text-align: center; font-weight: 600; font-size: 20px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
  min-height: 48px; border-radius: var(--r-md); border: 1px solid var(--border-subtle); background: var(--surface); color: var(--text-primary); font-family: var(--font); }
.mk-qty input::-webkit-inner-spin-button, .mk-qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.mk-stepbtn {
  min-height: 48px; border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--surface);
  font-size: 22px; line-height: 1; color: var(--text-primary); cursor: pointer;
}
.mk-stepbtn:active { transform: scale(0.96); }
.mk-ladder { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; margin: 16px 0 4px; scrollbar-width: none; }
.mk-ladder::-webkit-scrollbar { display: none; }
.mk-rung {
  flex: 0 0 auto; min-height: 48px; padding: 6px 12px; border: 1px solid var(--border-subtle); border-radius: var(--r-md);
  background: var(--surface); font-family: var(--font); font-size: var(--fs-micro); color: var(--text-tertiary); text-align: center; line-height: 1.3;
  font-variant-numeric: tabular-nums; cursor: pointer; transition: border-color var(--dur-fast) var(--ease);
}
.mk-rung:hover { border-color: var(--border-strong); }
.mk-rung:active { transform: scale(0.97); }
.mk-rung b { display: block; font-size: 15px; color: var(--text-primary); }
.mk-rung.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.mk-rung.on b { color: var(--on-accent); }
.mk-checks { display: grid; gap: 8px; margin: 16px 0 12px; }
.mk-extras { margin: 0 0 12px; }
.mk-check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; color: var(--text-primary); cursor: pointer; }
.mk-check input { width: 20px; height: 20px; flex: 0 0 auto; margin: 0; accent-color: var(--accent); }
/* a tick box with a line under it saying what it means */
.mk-check > span { display: flex; flex-direction: column; gap: 2px; }
.mk-check > span small { display: block; font-size: var(--fs-caption); line-height: 1.35; color: var(--text-tertiary); }
.mk-check:has(> span small) { align-items: flex-start; padding: 8px 0; }
.mk-check:has(> span small) input { margin-top: 2px; }
.mk-breakdown { display: grid; gap: 8px; margin: 20px 0 0; font-variant-numeric: tabular-nums; }
.mk-line { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.mk-line span:first-child { color: var(--text-secondary); }
.mk-line.mk-total { border-top: 1px solid var(--border-subtle); padding-top: 12px; margin-top: 4px; font-size: 22px; font-weight: 600; }
.mk-line.mk-total span:first-child { color: var(--text-primary); }
.mk-nudge:empty { display: none; }
.mk-nudge {
  margin: 16px 0 0; padding: 12px 16px; font-size: var(--fs-secondary);
  border-left: 3px solid var(--warning); background: var(--warning-soft); border-radius: 0 var(--r-md) var(--r-md) 0;
}

.mk-proposal { display: block; padding: 0; border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: #FFFFFF; cursor: zoom-in; overflow: hidden; }
.mk-proposal img { display: block; max-width: 100%; max-height: 360px; margin: 0 auto; }
.mk-pending { margin: 16px 0; padding: 16px; border: 1px solid var(--border-strong); border-radius: var(--r-lg); background: var(--surface); }
.mk-email { display: grid; gap: 4px; font-size: var(--fs-secondary); }
.mk-email b { color: var(--text-tertiary); font-weight: 500; display: inline-block; min-width: 72px; }
.mk-email pre {
  margin: 8px 0 0; padding: 12px; white-space: pre-wrap; word-break: break-word;
  background: var(--surface-sunken); border-radius: var(--r-md); font-family: var(--font); font-size: var(--fs-secondary); line-height: 1.55;
}
#mk-sms, #mk-body { width: 100%; }
.mk-research { margin-top: 16px; padding: 16px; border-radius: var(--r-lg); background: var(--surface-sunken); }
.mk-research ul { margin: 4px 0 8px; padding-left: 20px; font-size: var(--fs-secondary); }
.mk-research a { color: var(--accent); }
.mk-cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 8px 0; }
.mk-cand { display: grid; gap: 6px; padding: 8px; background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--border-subtle); }
.mk-cand img { width: 100%; height: 72px; object-fit: contain; background: #FFFFFF; border-radius: var(--r-sm); }
.mk-cand small { font-size: var(--fs-micro); color: var(--text-tertiary); }

.mk-notelist { display: grid; gap: 8px; }
.mk-noteitem { padding: 12px; border-radius: var(--r-md); background: var(--surface-sunken); }
.mk-noteitem p { margin: 0 0 4px; font-size: var(--fs-secondary); white-space: pre-wrap; }
.mk-noteitem small { font-size: var(--fs-micro); color: var(--text-tertiary); }
.mk-addnote { display: flex; gap: 8px; margin-top: 8px; }
.mk-sample, .mk-package { margin: 12px 0; padding: 16px; border: 1px solid var(--border-subtle); border-radius: var(--r-lg); background: var(--surface); }
.mk-sample p, .mk-package p { margin: 0 0 8px; font-size: var(--fs-secondary); }
.mk-package textarea { font-family: ui-monospace, Menlo, monospace; font-size: var(--fs-micro); }
@media (max-width: 767px) { .mk-package textarea { font-size: 16px; } }   /* iOS zooms into a field under 16px */
.mk-msgs { margin: 0; padding-left: 20px; font-size: var(--fs-secondary); color: var(--text-secondary); }

/* the studio's action bar (instead of the tab bar while a deal is open) */
.mk-bar {
  position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 24px 0 0; padding: 8px;
  background: color-mix(in srgb, var(--surface-elevated) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
  border: 1px solid var(--border-subtle); border-radius: var(--r-pill); box-shadow: var(--shadow-pop);
}
.mk-bar-total { display: block; font-size: 22px; font-weight: 600; letter-spacing: -0.3px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.mk-bar-sub { font-size: var(--fs-micro); color: var(--text-tertiary); }
.mk-bar .btn { border-radius: var(--r-pill); white-space: nowrap; }
.mk-bar-text { flex: 1; min-width: 0; padding-left: 4px; }
.mk-barback[hidden] + .mk-bar-text { padding-left: 12px; }
.mk-barback { flex: 0 0 auto; }
.mk-barback svg { stroke: currentColor; }
.mk-bar-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mk-sheet {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center;
  padding: calc(20px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
  background: rgba(10, 9, 8, 0.88);
}
.mk-sheet[hidden] { display: none; }
.mk-sheet-in { display: grid; gap: 12px; justify-items: center; max-width: 720px; width: 100%; }
.mk-sheet img { max-width: 100%; max-height: 72vh; border-radius: var(--r-md); background: #FFFFFF; -webkit-touch-callout: default; }
.mk-sheet p { margin: 0; color: #F1EFEA; text-align: center; font-size: var(--fs-secondary); }

.mk-toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 520px); padding: 10px 16px; border-radius: var(--r-md);
  background: var(--text-primary); color: var(--bg); font-size: var(--fs-secondary); box-shadow: var(--shadow-pop);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.mk-toast.on { opacity: 1; transform: translate(-50%, 0); }
.mk-toast.has-act.on { display: flex; align-items: center; gap: var(--s3); pointer-events: auto; padding: 4px 4px 4px 16px; width: max-content; }
.mk-toast-act {
  flex: none; min-height: 44px; min-width: 64px; padding: 0 var(--s3); border: 0; border-radius: var(--r-sm, 8px); background: none; cursor: pointer;
  color: inherit; font-family: var(--font); font-size: var(--fs-secondary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px;
}
.mk-toast-act:hover { background: rgba(127, 127, 127, 0.2); }
.mk-toast-act:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.mk-toast.warn { background: var(--warning); color: #FFFFFF; }
.mk-toast.bad { background: var(--destructive); color: #FFFFFF; }

/* saving: the editor waits (only the bar shows progress) */
.mk-ed.is-busy .mk-grid { pointer-events: none; opacity: 0.55; transition: opacity var(--dur) var(--ease); }

/* the items on one proposal (1 to 4) */
.mk-items { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.mk-item {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 100%; padding: 6px 14px 6px 6px;
  border: 1px solid var(--border-subtle); border-radius: var(--r-pill); background: var(--surface);
  font-family: var(--font); font-size: var(--fs-caption); color: var(--text-secondary); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.mk-item:hover { border-color: var(--border-strong); color: var(--text-primary); }
.mk-item.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.mk-item-n {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-sunken); color: var(--text-secondary); font-weight: 600; font-variant-numeric: tabular-nums;
}
.mk-item.on .mk-item-n { background: var(--accent); color: var(--on-accent); }
.mk-item-add { padding: 6px 14px; border-style: dashed; }
.mk-item-remove { font-size: var(--fs-caption); margin-left: 4px; }

/* quantities on the proposal */
.mk-qopts { margin: 12px 0 0; }
.mk-qopts .mk-fine { margin: 0 0 6px; }
.mk-qrow { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-qfixed { cursor: default; background: var(--accent-soft); color: var(--accent); border-color: transparent; font-variant-numeric: tabular-nums; }
.mk-optlines { margin: 12px 0 0; padding: 12px 16px; border-radius: var(--r-md); background: var(--surface-sunken); }
.mk-optlines p { margin: 0; font-size: var(--fs-secondary); font-variant-numeric: tabular-nums; line-height: 1.7; }
.mk-optlines .mk-teaser { color: var(--accent); font-style: italic; }

/* more than one gift, and the page's color (2026-11-18) */
.mk-gifts { margin: 12px 0 0; }
.mk-gifts .mk-fine { margin: 4px 0 0; }
.mk-pagecolor { margin: 16px 0 0; }
.mk-plabel { margin: 0 0 8px; font-size: var(--fs-secondary); font-weight: 600; color: var(--text-primary); }
.mk-plabel small { margin-left: 6px; font-weight: 400; font-size: var(--fs-caption); color: var(--text-tertiary); }
.mk-swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mk-swatch {
  width: 44px; height: 44px; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--sw); border: 1px solid var(--border-strong);
}
.mk-swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--text-primary); }
.mk-swatch:focus-visible { outline: 2px solid var(--focus); outline-offset: 6px; }
.mk-swatch-pick {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 6px; cursor: pointer;
  border: 1px dashed var(--border-strong); border-radius: 22px; font-size: var(--fs-caption); color: var(--text-secondary);
}
.mk-swatch-pick input { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.mk-pick { margin: 16px 0 4px; }

/* your details: the proposal block */
.mk-subhead { margin: 28px 0 12px; font-size: var(--fs-section); font-weight: 600; letter-spacing: -0.2px; }
.mk-headshot { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.mk-headshot-img { width: 88px; height: 106px; border-radius: var(--r-md); overflow: hidden; background: var(--surface-sunken); display: grid; place-items: center; }
.mk-headshot-img img { width: 100%; height: 100%; object-fit: cover; }
.mk-headshot-img span { font-size: var(--fs-micro); color: var(--text-tertiary); }
/* Your details: the Cutco Gifting Professional logo, shown so the rep sees what goes on the page */
/* a custom gift box: one item, a tab per knife */
.mk-boxchips { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 8px 4px 6px; border-radius: var(--r-md);
  border: 1px solid var(--border-subtle); }
.mk-boxchips.on { border-color: var(--accent); }
.mk-boxchips > b { font-size: var(--fs-micro); font-weight: 600; color: var(--text-secondary); margin-right: 2px; }
.mk-slotchip { min-height: 36px; }
.mk-contents { color: var(--text-primary); font-weight: 500; }
/* the two ways in: Mockup, Quote generator */
.mk-start { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 12px; }
.mk-startbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 88px; padding: 16px 18px; text-align: left;
  border-radius: var(--r-md); border: 1px solid var(--border-subtle); background: var(--surface, #fff); color: var(--text-primary); cursor: pointer; font: inherit; }
.mk-startbtn b { font-size: 17px; font-weight: 650; color: var(--accent); }
.mk-startbtn small { font-size: var(--fs-micro); color: var(--text-tertiary); line-height: 1.35; }
.mk-startbtn:hover { border-color: var(--accent); }
.mk-startbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 420px) { .mk-start { grid-template-columns: 1fr; } }
/* or start from their logo file or their card */
.mk-fromlabel { margin: 4px 0 8px; }
.mk-from { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.mk-drop { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; min-height: 76px; padding: 14px 16px;
  text-align: left; border-radius: var(--r-md); border: 1.5px dashed var(--border-strong); background: transparent; color: var(--text-primary);
  cursor: pointer; font: inherit; }
.mk-drop b { font-size: 15px; font-weight: 600; }
.mk-drop small { font-size: var(--fs-micro); color: var(--text-tertiary); line-height: 1.35; }
.mk-drop:hover, .mk-drop:focus-within { border-color: var(--accent); }
.mk-dragging .mk-drop#mk-drop { border-color: var(--accent); background: var(--surface-sunken); }
.mk-dragging .mk-ed { outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: var(--r-md); }
.mk-startlogo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.mk-startlogo .mk-logo-thumb { width: 140px; height: 90px; }
.mk-startlogo-go { flex: 1; min-width: 200px; }
@media (max-width: 420px) { .mk-from { grid-template-columns: 1fr; } }
.mk-setmatch { margin: 10px 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-sunken); border: 1px solid var(--accent); }
.mk-setmatch p { margin: 0 0 10px; font-size: var(--fs-secondary); color: var(--text-primary); }
.mk-slots { display: grid; gap: 8px; margin: 8px 0; }
.mk-slot.on select { border-color: var(--accent); }
.mk-parts { margin: 4px 0 10px; }
.mk-part { font-size: var(--fs-micro); color: var(--text-tertiary); }
.mk-optlines .mk-reg { color: var(--text-tertiary); text-decoration-thickness: 1.5px; }
.mk-optlines .mk-plan { color: var(--accent); font-weight: 600; }
.mk-pro { flex-wrap: wrap; align-items: flex-start; margin-bottom: 16px; }
.mk-pro input { margin-top: 2px; }
.mk-pro span { flex: 1 1 calc(100% - 32px); min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mk-pro small { font-size: var(--fs-micro); color: var(--text-tertiary); }
.mk-pro img { flex: 0 0 auto; width: 220px; max-width: calc(100% - 32px); height: auto; margin-left: 32px; background: #FFFFFF; border-radius: var(--r-sm); padding: 8px; }
.mk-brand { min-height: 72px; display: flex; align-items: center; margin-bottom: 12px; }
.mk-brand img { max-height: 96px; max-width: 100%; background: #FFFFFF; border-radius: var(--r-sm); padding: 8px; }
.mk-price { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mk-price > .mk-check:first-child { flex: 1; min-width: 0; }
.mk-ts { flex: 0 0 auto; font-size: var(--fs-caption); color: var(--text-secondary); }

/* the card, with the logo box to drag */
.mk-cardcanvas { display: block; width: 100%; height: auto; margin: 8px 0 12px; border-radius: var(--r-md); touch-action: none; cursor: crosshair; background: #161514; }

/* ---- library ---- */
.mk-libgroup { margin: 20px 0; }
.mk-libgroup h4 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.mk-libgroup h4 small { color: var(--text-tertiary); font-weight: 400; font-size: var(--fs-caption); }
.mk-libgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.mk-libitem { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--surface); }
.mk-libitem img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-sm); background: #161514; }
.mk-libitem small { font-size: var(--fs-micro); color: var(--text-tertiary); }
.mk-libitem .mk-actions { margin: 0; }
.mk-marker canvas { display: block; width: 100%; height: auto; border-radius: var(--r-md); touch-action: none; cursor: crosshair; margin: 12px 0; background: #161514; }
.mk-prices { display: grid; gap: 0; max-height: 420px; overflow-y: auto; margin-top: 12px; }
.mk-price { border-bottom: 1px solid var(--border-subtle); font-size: var(--fs-secondary); }
.mk-price small { color: var(--text-tertiary); margin-left: 4px; }
.mk-price[hidden] { display: none; }

/* ---- chat: the in-app place a card points to ---- */
.msg-actions { align-self: flex-start; display: flex; gap: 8px; }
.msg-actions .btn { min-height: 40px; text-decoration: none; }

/* ---- wide screens: preview beside the form ---- */
@media (min-width: 900px) {
  body.mk-editing main { max-width: 1180px; }
  .mk-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  /* The preview stays in view. When it is taller than the window (two logos, a note being written) it
     scrolls on its own, so nothing in it ends up out of reach under the bottom bar (2026-10-26). The
     2px padding keeps focus rings at its edges from being cut off. */
  .mk-studio { position: sticky; top: 80px; max-height: calc(100vh - 176px); overflow-y: auto; overscroll-behavior: contain;
    padding: 2px; margin: -2px; scrollbar-width: thin; }
  .mk-fonts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .mk-studio { margin-bottom: 24px; }
}
@media (max-width: 420px) {
  .mk-form2 { grid-template-columns: 1fr; }
  .mk-opts { grid-template-columns: 1fr 1fr; }
  .mk-logo-row { align-items: flex-start; }
}
/* a mockup's last step is Share (its page and the share sheet); a quote's, and a mockup's after "Email it
   instead", is Send (names, email, the proposal and the email and text) */
.mk-ed.simple .mk-qonly, .mk-ed:not(.simple) .mk-simpleonly, .mk-ed:not(.mockup-mode) .mk-monly { display: none !important; }
.mk-ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 12px; }
.mk-way { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; min-height: 112px; padding: 16px 18px;
  text-align: left; border-radius: var(--r-md); border: 1px solid var(--border-subtle); background: var(--surface, #fff); color: var(--text-primary);
  cursor: pointer; font: inherit; transition: border-color 140ms ease-out, transform 100ms ease-out; }
.mk-way b { font-size: 17px; font-weight: 600; color: var(--accent); }
.mk-way small { font-size: var(--fs-caption); color: var(--text-tertiary); line-height: 1.4; }
.mk-way:hover, .mk-way:focus-within { border-color: var(--accent); }
.mk-way:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mk-way:active { transform: scale(0.98); }
.mk-way[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); }
.mk-dragging .mk-logostep .mk-way:last-child { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 640px) { .mk-ways { grid-template-columns: 1fr; } .mk-way { min-height: 76px; } }
@media (prefers-reduced-motion: reduce) { .mk-way { transition: none; } .mk-way:active { transform: none; } }
.mk-siteform { display: flex; align-items: flex-end; gap: 12px; margin: 0 0 12px; }
.mk-siteform .mk-f { flex: 1; margin: 0; }
@media (max-width: 420px) { .mk-siteform { flex-direction: column; align-items: stretch; } }
/* the card's logo can't be used (2026-10-26): why, then their website or the file */
.mk-noway, .mk-noway-ask { display: grid; gap: 12px; }
.mk-noway { margin: 4px 0 16px; }
.mk-noway p { margin: 0; }
.mk-noway .mk-actions { margin: 0; }
.mk-noway .mk-link { justify-self: start; }
.mk-pickable { cursor: pointer; font: inherit; color: inherit; text-align: left; transition: border-color 140ms ease-out; }
.mk-pickable:hover, .mk-pickable:focus-visible { border-color: var(--accent); }
.mk-pickable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mk-ask { border: 1px solid var(--accent); border-radius: var(--r-md); padding: 16px; background: var(--accent-soft); }
.mk-askq { margin: 0 0 12px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.mk-ask h3 { margin-top: 0; }
.mk-ok { margin: 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--success-soft); color: var(--success); font-size: var(--fs-secondary); }
.mk-ask:has(.mk-ok) { border: 0; padding: 0; background: transparent; }
.mk-proposal-sm img { max-height: 220px; }
.mk-ask[hidden] { display: none; }
/* a white logo made for a dark header must still show on the tap-to-pick tiles */
.mk-cand img { background: repeating-conic-gradient(#A9AFB5 0% 25%, #C9CED3 0% 50%) 50% / 12px 12px; }

/* ---- the home (2026-10-22 redesign): New menu, due first, projects beside a preview ---- */
.mk-newwrap { position: relative; }
.mk-newmenu { top: calc(100% + 8px); right: 0; min-width: 320px; }
.mk-newmenu > button, .mk-menufile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 56px; padding: 10px 12px; border-radius: var(--r-sm);
  font-family: var(--font); font-size: 15px; text-align: left; color: var(--text-primary); cursor: pointer;
}
.mk-newmenu > button b, .mk-menufile b { font-weight: 600; }
.mk-newmenu small, .mk-menufile small { font-size: var(--fs-caption); color: var(--text-tertiary); font-weight: 400; }
.mk-menufile:hover, .mk-menufile:focus-within { background: var(--surface-sunken); }
.mk-menufile:focus-within { outline: 2px solid var(--focus); outline-offset: -2px; }
.mk-due .mk-row { padding: 12px 16px; border-bottom: 0; }
.mk-home { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-items: start; }
.mk-home-preview { display: none; }
.mk-deal[aria-current="true"] { background: var(--accent-soft); }
.mk-thumb img.mk-shot { object-fit: cover; padding: 0; }
@media (min-width: 1100px) {
  .mk-home { grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); }
  .mk-home-preview { display: block; position: sticky; top: var(--s6); background: var(--surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); overflow: hidden; }
}
.mk-prev-img { aspect-ratio: 4 / 3; background: #161514; display: grid; place-items: center; }
.mk-prev-img img { width: 100%; height: 100%; object-fit: contain; }
.mk-prev-none { color: #A6A198; font-size: var(--fs-secondary); }
.mk-prev-body { padding: var(--s4) var(--s5) var(--s5); }
.mk-prev-who { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.mk-prev-who b { display: block; font-size: var(--fs-lead); }
.mk-prev-who small { display: block; color: var(--text-tertiary); font-size: var(--fs-caption); }
.mk-prev-facts { margin: 0 0 var(--s2); display: grid; gap: var(--s2); }
.mk-prev-facts div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s3); font-size: var(--fs-secondary); }
.mk-prev-facts dt { color: var(--text-tertiary); }
.mk-prev-facts dd { margin: 0; }
.mk-lower { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--border-subtle); }
.mk-lower .mk-cgp { margin-top: 0; }

/* How did ALMA do? (web/studio/rate.js, 2026-10-26): a quiet row under each result, never a popup.
   The row sits on the step it belongs to (no box of its own); the note opens on a sunken tone. */
.mk-rate-box { margin: 12px 0 4px; }
.mk-rate-box[hidden] { display: none; }
.mk-rate-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.mk-rate-q { font-size: var(--fs-secondary); color: var(--text-secondary); }
.mk-rate-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-rate-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
  background: none; border: 1px solid var(--border-strong); border-radius: var(--r-pill); color: var(--text-secondary);
  font: inherit; font-size: var(--fs-secondary); font-weight: 500; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), transform 100ms var(--ease);
}
.mk-rate-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.mk-rate-btn:hover { border-color: var(--border-control); color: var(--text-primary); background: var(--surface-sunken); }
.mk-rate-btn:active { transform: scale(0.98); }
.mk-rate-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mk-rate-done { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 44px; margin: 0; font-size: var(--fs-secondary); color: var(--text-secondary); }
.mk-rate-done svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--success); }
.mk-rate-done .mk-link { min-height: 44px; }
.mk-rate-form { display: grid; gap: 8px; padding: 16px; border-radius: var(--r-md); background: var(--surface-sunken); scroll-margin: 96px 0; }
.mk-rate-form .mk-actions { margin: 0; }
.mk-rate-form .mk-check { min-height: 44px; }
.mk-rate-msg { margin: 0; font-size: var(--fs-caption); color: var(--text-tertiary); }
.mk-rate-msg:empty { display: none; }
.mk-rate-msg.bad { color: var(--destructive); }
.mk-rate-row + .mk-rate-msg { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .mk-rate-btn { transition: none; } .mk-rate-btn:active { transform: none; } }

/* ---- the steps (2026-10-30, Alan: "a lot of steps, not sure what to do next"): a quote is Logo, Knife,
   Price, Send; a mockup Logo, Knife, Share. One step on screen, its extras under More, Next in the bar.
   The rules are web/studio/steps.js. ---- */
.mk-off, .mk-moreoff { display: none !important; }
.mk-stepbar { margin: 0 0 20px; }
.mk-steplist { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.mk-steplist li { flex: 1 1 0; min-width: 0; }
.mk-steplist li.mk-stepdeal { flex: 0 0 auto; }
.mk-steplist button, .mk-stepnow {
  width: 100%; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px 6px 6px;
  border: 0; border-radius: var(--r-pill); background: none; text-align: left;
  font-family: var(--font); font-size: var(--fs-secondary); color: var(--text-secondary);
}
.mk-steplist button { cursor: pointer; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.mk-steplist button:hover { background: var(--surface-sunken); color: var(--text-primary); }
.mk-steplist button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mk-steplist li.on .mk-stepnow { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.mk-sn {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-sunken); color: var(--text-secondary); font-weight: 600; font-size: var(--fs-caption); font-variant-numeric: tabular-nums;
}
.mk-sn svg { width: 16px; height: 16px; }
.mk-steplist li.on .mk-sn { background: var(--accent); color: var(--on-accent); }
.mk-steplist li.ok .mk-sn { background: var(--success-soft); color: var(--success); }
.mk-sl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-steplist li.mk-stepdeal button, .mk-steplist li.mk-stepdeal .mk-stepnow { padding: 6px 16px; border: 1px solid var(--border-subtle); }
.mk-steplist li.mk-stepdeal.on .mk-stepnow { border-color: transparent; }
/* the start screen: the later steps wait for the logo */
.mk-logostep .mk-steplist li:not(.on) .mk-stepnow { color: var(--text-tertiary); }
@media (max-width: 560px) {
  /* a phone: the number above its word, so four steps and the deal fit in one row */
  .mk-steplist button, .mk-stepnow { flex-direction: column; justify-content: center; gap: 2px; padding: 4px 2px; border-radius: var(--r-md); text-align: center; font-size: var(--fs-micro); }
  .mk-sn { flex-basis: 26px; width: 26px; height: 26px; }
  .mk-sl { max-width: 100%; }
  .mk-steplist li.mk-stepdeal button, .mk-steplist li.mk-stepdeal .mk-stepnow { padding: 4px 12px; justify-content: center; }
}
.mk-step h3[tabindex]:focus:not(:focus-visible), .mk-steph:focus:not(:focus-visible) { outline: none; }
.mk-steph { margin: 4px 0 8px; font-size: var(--fs-section); font-weight: 600; letter-spacing: -0.2px; }
.mk-lead { margin: -8px 0 16px; font-size: var(--fs-secondary); line-height: 1.45; color: var(--text-secondary); }
.mk-steph + .mk-lead { margin-top: 0; }
.mk-help { margin: 6px 0 0; font-size: var(--fs-caption); line-height: 1.4; color: var(--text-tertiary); }
.mk-help:empty { display: none; }
.mk-req { margin-left: 6px; font-size: var(--fs-micro); font-weight: 600; color: var(--accent); }
/* the rep's own name and phone, asked on the last step the first time (features.askMe) */
.mk-me { margin-top: 20px; }
.mk-me[hidden] { display: none; }
.mk-me .mk-subhead { margin-top: 0; }
.mk-me .mk-fine { margin: 0 0 12px; }
/* Next refused: why, beside the field, with the cursor on it */
.mk-need {
  margin: 0 0 8px; padding: 10px 14px; border-left: 3px solid var(--warning); border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--warning-soft); color: var(--warning); font-size: var(--fs-secondary); font-weight: 500; line-height: 1.4;
  scroll-margin: 120px 0;
}
/* More options: one closed line per step that says what is set inside it */
.mk-moreline {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; margin: 24px 0 0; padding: 10px 16px;
  border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--surface); text-align: left; cursor: pointer;
  font-family: var(--font); font-size: 15px; font-weight: 600; color: var(--text-primary);
  transition: border-color var(--dur-fast) var(--ease);
}
.mk-moreline:hover { border-color: var(--border-strong); }
.mk-moreline:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mk-moreline small { flex: 1; min-width: 0; text-align: right; font-weight: 400; font-size: var(--fs-caption); color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-moreline::after {
  content: ""; flex: 0 0 auto; width: 8px; height: 8px; margin: -4px 2px 0 0;
  border-right: 1.7px solid var(--text-tertiary); border-bottom: 1.7px solid var(--text-tertiary); transform: rotate(45deg);
  transition: transform var(--dur-fast) var(--ease);
}
.mk-moreline[aria-expanded="true"] { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.mk-moreline[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 4px; }
.mk-moreblock { padding: 4px 16px 16px; border: 1px solid var(--border-subtle); border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md); }
.mk-moreblock > h4:first-child { margin-top: 16px; }
.mk-moreblock .mk-checks { margin-top: 12px; }
/* the knife step: suggestions while typing, the list to browse */
.mk-suggest { display: grid; gap: 6px; margin: 0 0 12px; }
.mk-suggest:empty { display: none; }
.mk-suggest .mk-fine { margin: 0; }
.mk-sug {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 14px;
  border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--surface); text-align: left; cursor: pointer;
  font-family: var(--font); font-size: 15px; color: var(--text-primary);
}
.mk-sug b { font-weight: 500; }
.mk-sug small { flex: 0 0 auto; font-size: var(--fs-caption); color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.mk-sug:hover, .mk-sug.on { border-color: var(--accent); }
.mk-sug:active { transform: scale(0.99); }
.mk-browse { margin: 4px 0 0; }
.mk-describe textarea { min-height: 48px; }
.mk-addline, .mk-switch, .mk-waytext { margin: 16px 0 0; font-size: var(--fs-secondary); }
.mk-addline:empty { display: none; }
.mk-addline .mk-fine { margin: 0 0 0 4px; }
.mk-block { display: block; margin: 12px 0 0; text-align: left; }
.mk-logo-have { margin: 0 0 12px; }
.mk-logo-have[hidden] { display: none; }
.mk-step .mk-ways { grid-template-columns: 1fr; margin-top: 8px; }
.mk-step .mk-way { min-height: 68px; padding: 12px 16px; }
.mk-sliders { display: grid; gap: 12px; }
#mk-movehelp { margin: 0; }
.mk-pulse { animation: mk-pulse 1.6s var(--ease); }
@keyframes mk-pulse { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 30% { box-shadow: 0 0 0 5px var(--accent-soft); } }
@media (prefers-reduced-motion: reduce) { .mk-pulse { animation: none; } .mk-moreline::after { transition: none; } .mk-sug:active, .mk-rung:active { transform: none; } }

/* the picture: where the pinned view starts (under the phone's top bar) */
.mk-ed { --mk-pin-top: 8px; }
@media (max-width: 767px) { .mk-ed { --mk-pin-top: calc(var(--topbar-h, 52px) + env(safe-area-inset-top) + 8px); } }
/* Smaller, Bigger, Zoom in: on the picture's own dark stage, so they stay with it */
.mk-stagebar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 8px 0 0; }
.mk-stagebar .mk-chip { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); color: #F1EFEA; }
.mk-stagebar .mk-chip:hover { background: rgba(255, 255, 255, 0.18); }
.mk-stagebar .mk-chip[aria-pressed="true"] { background: #F1EFEA; border-color: transparent; color: #161514; }
.mk-stage:has(.mk-stagebar:not(.mk-off)) .mk-stagemsg { bottom: 64px; }
.mk-tools .mk-nudges:not(.mk-moreoff) + .mk-sliders { margin-top: 0; }
@media (max-width: 899px) {
  /* Logo and Knife: the step's question right under the picture, the picture's notes and fine-tuning after it */
  .mk-ed[data-step="logo"] .mk-grid, .mk-ed[data-step="knife"] .mk-grid { display: flex; flex-direction: column; }
  .mk-ed[data-step="logo"] .mk-stage, .mk-ed[data-step="knife"] .mk-stage { order: 0; margin-bottom: 20px; }
  .mk-ed[data-step="logo"] .mk-steps, .mk-ed[data-step="knife"] .mk-steps { order: 1; }
  .mk-ed[data-step="logo"] #mk-rate-mockup, .mk-ed[data-step="knife"] #mk-rate-mockup { order: 2; }
  .mk-ed[data-step="logo"] .mk-tools, .mk-ed[data-step="knife"] .mk-tools { order: 3; }
  /* Logo and Knife: the knife stays pinned at the top while the fields scroll under it (2026-10-30: on a
     phone you changed things you could not see). Price and Send don't need it: the bar has the total, and
     Send shows the page itself. */
  .mk-ed[data-step="logo"] .mk-studio, .mk-ed[data-step="knife"] .mk-studio { display: contents; }
  .mk-ed[data-step="logo"] .mk-stage, .mk-ed[data-step="knife"] .mk-stage {
    position: sticky; top: var(--mk-pin-top); z-index: 6; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  }
  .mk-ed[data-step="logo"] .mk-tools, .mk-ed[data-step="knife"] .mk-tools { margin: 0 0 8px; }
  .mk-ed:not([data-step="logo"]):not([data-step="knife"]) .mk-studio { display: none; }
  .mk-view { width: fit-content; max-width: 100%; margin: 0 auto; }
  #mk-out, #mk-out2 { width: auto; max-width: 100%; max-height: 30vh; margin: 0 auto; }
  .mk-stage:has(.mk-view2:not([hidden])) #mk-out, .mk-stage:has(.mk-view2:not([hidden])) #mk-out2 { max-height: 17vh; }
}

/* a mockup that went out: the next step is the quote (2026-11-27) */
.mk-nextq { margin: 0 0 20px; padding: 14px 16px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--text-primary); }
.mk-nextq p { margin: 0 0 12px; font-size: var(--fs-secondary); line-height: 1.45; }
.mk-nextq b { color: var(--accent); }
.mk-switch .mk-nextq { margin: 0; }
