/* Mambo Software - sector showcase
   Tokens lifted from the reference build: Plus Jakarta Sans, warm off-white canvas,
   Mambo red primary, white cards on hairline borders. */

:root {
  --background: oklch(97.5% .006 30);
  --foreground: oklch(20% .02 20);
  --card: oklch(100% 0 0);
  --primary: oklch(56% .21 27);
  --primary-foreground: oklch(99% 0 0);
  --secondary: oklch(95% .012 30);
  --muted: oklch(95% .01 30);
  --muted-foreground: oklch(50% .02 20);
  --accent: oklch(94% .03 27);
  --border: oklch(91% .012 30);
  --ring: oklch(56% .21 27);
  --radius: .75rem;

  --radius-card: 16px;
  --radius-hero: 24px;

  --shadow-card: 0 1px 2px oklch(20% .02 20 / .05);
  --shadow-lift: 0 2px 4px oklch(20% .02 20 / .06), 0 14px 28px -12px oklch(20% .02 20 / .18);
  --shadow-plate: 0 10px 30px -12px oklch(20% .02 20 / .45);

  --rainbow: #d7262b #e8651c #e9a400 #3fa535 #1b8fd2 #5b4bc4;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box }

/* Several hidden elements are given a display value by their own rules - the
   session-aware nav pair and the two login forms among them - so the attribute
   has to win every time. */
[hidden] { display: none !important }

html { -webkit-text-size-adjust: 100% }

body {
  margin: 0;
  font: 400 16px/1.5 var(--font);
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none }

button { font: inherit; color: inherit }

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- shell ---------- */

.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 12px 16px;
}

@media (min-width: 768px) { .masthead { padding: 12px 32px; gap: 8px } }

.masthead__nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap }

@media (min-width: 768px) { .masthead__nav { gap: 8px } }

.masthead--split { justify-content: space-between }

/* On a phone the logo takes the row, so the secondary links give up their place
   and only the cart and the account action stay reachable. */
@media (max-width: 640px) {
  .navlink:not(.navlink--cart) { display: none }
}

.masthead__brand {
  white-space: nowrap;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: -.3px;
}

.navlink {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--foreground);
  transition: background-color .16s ease;
}

.navlink:hover { background: var(--muted) }

.navlink--cart { display: inline-flex; align-items: center; gap: 6px }

.badge {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.navlink--cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-card);
  transition: filter .16s ease, transform .16s ease;
}

.navlink--cta:hover { filter: brightness(1.08) }
.navlink--cta:active { transform: translateY(1px) }

/* ---------- work area: hero + board ---------- */

.work {
  flex: 1;
  display: grid;
  gap: 16px;
  padding: 0 16px 16px;
  min-height: 0;
}

@media (min-width: 768px) { .work { padding: 0 32px 32px } }
@media (min-width: 1024px) {
  /* Fills the first screen exactly like the reference, but the page can still scroll
     to the footer instead of clipping it. */
  .work { grid-template-columns: 5fr 6fr; min-height: calc(100vh - 68px) }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 340px;
  border-radius: var(--radius-hero);
  background: var(--secondary);
  isolation: isolate;
}

@media (min-width: 1024px) { .hero { height: 100%; min-height: 0 } }

.hero__media { position: absolute; inset: 0; z-index: -2 }

.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero__media img.is-live { opacity: 1 }

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, oklch(20% .02 20 / .55) 0%, oklch(20% .02 20 / .35) 45%, oklch(35% .12 27 / .72) 100%);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 32px 24px;
  text-align: center;
  color: #fff;
}

.plate {
  padding: 20px;
  border-radius: var(--radius-card);
  /* Solid white, not translucent: the logo artwork is a white tile and any tint
     behind it would show as a seam around the edges. */
  background: #fff;
  box-shadow: var(--shadow-plate);
}

.hero__tagline {
  margin: 0;
  max-width: 30ch;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
  text-wrap: balance;
  text-shadow: 0 1px 12px oklch(20% .02 20 / .35);
}

.rainbow {
  display: flex;
  gap: 3px;
  width: min(260px, 70%);
  height: 6px;
}

.rainbow i {
  flex: 1;
  border-radius: 999px;
  background: var(--segment, var(--primary));
}

/* ---------- logo ---------- */

/* Supplied artwork: diamond mark, wordmark and the six-segment rule in one file.
   The PNG is a solid white tile rather than a transparent cut-out, so it is read as
   a deliberate badge - rounded and lifted - instead of a square of paper pasted on
   the page. Swap in a transparent export and drop the two rules below it. */
.brand__logo {
  display: block;
  height: 32px;
  width: auto;
  border-radius: 9px;
  box-shadow: var(--shadow-card);
}

.plate__logo {
  display: block;
  width: min(320px, 62vw);
  height: auto;
}

/* ---------- board: heading + sector grid ---------- */

.board {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  min-width: 0;
}

.board__head { display: grid; gap: 4px }

.board__title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.6px;
}

.board__lede {
  margin: 0;
  max-width: 52ch;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted-foreground);
}

.grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px;
  min-height: 0;
}

@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)) } }

/* ---------- tabs: the three product groups ---------- */

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
  scrollbar-width: none;
  /* Without this the nowrap labels set a min-content width that stretches the whole
     board column - and the hero beside it - past the viewport. */
  min-width: 0;
}

.tabs::-webkit-scrollbar { display: none }

@media (max-width: 620px) {
  /* Three groups do not fit one row on a phone, and a scrollable strip hides the
     third. Two rows keeps every tab reachable without a gesture. */
  .tabs { flex-wrap: wrap }
  .tab { flex: 1 1 calc(50% - 2px) }
}

.tab {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}

.tab:hover { color: var(--foreground) }

.tab.is-active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.tab__count {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted-foreground);
}

.tab.is-active .tab__count {
  background: oklch(100% 0 0 / .22);
  color: var(--primary-foreground);
}

/* ---------- sector tile ---------- */

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

@media (min-width: 1024px) { .tile { gap: 12px } }

.tile:hover,
.tile:focus-visible {
  transform: translateY(-2px);
  border-color: var(--tint, var(--primary));
  box-shadow: var(--shadow-lift);
}

.tile__icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-card);
  background: var(--tint, var(--primary));
  color: #fff;
  overflow: hidden;
}

.tile__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  transition: opacity .16s ease;
}

.tile:hover .tile__icon::after { opacity: .12 }

.tile__icon svg { position: relative; z-index: 1; width: 24px; height: 24px }

.tile__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  /* Keeps "Timesheet / Clock-ins" from breaking one letter onto the second line. */
  text-wrap: balance;
}

.tile__sub {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted-foreground);
}

/* The app count, derived from the catalogue row. */
.tile__meta {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--muted-foreground);
}

.tile:hover .tile__meta {
  background: var(--accent);
  color: var(--foreground);
}

/* ---------- footer ---------- */

.footnotes {
  display: grid;
  gap: 16px;
  padding: 24px 16px 32px;
  border-top: 1px solid var(--border);
  background: var(--card);
  scroll-margin-top: 16px;
}

@media (min-width: 768px) {
  .footnotes { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding: 28px 32px 36px }
}

.footnotes--single { grid-template-columns: minmax(0, 1fr) }

.note h2 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.note p { margin: 0 0 8px; font-size: 14px; line-height: 1.5 }

.note a { font-size: 14px; font-weight: 600; color: var(--primary) }
.note a:hover { text-decoration: underline }

/* ---------- sector detail page ---------- */

.crumbs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.crumbs a:hover { color: var(--primary) }

.detail {
  display: grid;
  gap: 24px;
  padding: 8px 16px 40px;
}

@media (min-width: 768px) { .detail { padding: 8px 32px 48px } }

.detail__band {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-hero);
  background: var(--tint, var(--primary));
  color: #fff;
  box-shadow: var(--shadow-lift);
}

.detail__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-card);
  background: #fff;
  color: var(--tint, var(--primary));
}

.detail__icon svg { width: 28px; height: 28px }

.detail__kicker {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  opacity: .82;
}

.detail__title { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.6px }
.detail__sub { margin: 2px 0 0; font-size: 14px; opacity: .85 }

.detail__body { display: grid; gap: 12px; max-width: 62ch }
.detail__body h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-foreground) }
.detail__body p { margin: 0; font-size: 15px; line-height: 1.6 }

/* The feature list is an accordion - one row open at a time, so ten apps do
   not turn the page into a wall of text. */

.apps {
  display: grid;
  margin: 0;
  max-width: 72ch;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.app__heading { margin: 0 }

.app__toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease;
}

.app:first-child .app__toggle { border-top: 0 }

.app__toggle:hover { background: var(--muted) }
.app__toggle[aria-expanded="true"] { background: var(--accent) }

.app__num {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  color: var(--muted-foreground);
}

.app__title { flex: 1; min-width: 0 }

.app__chevron {
  flex: none;
  color: var(--muted-foreground);
  transition: transform .18s ease;
}

.app__toggle[aria-expanded="true"] .app__chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.app__panel {
  padding: 0 16px 14px 44px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted-foreground);
}

.app__panel p { margin: 0 }

@media (max-width: 480px) { .app__panel { padding-left: 16px } }

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
  transition: border-color .16s ease, transform .16s ease;
}

.pill:hover { border-color: var(--primary); transform: translateY(-1px) }

.pill--solid { border-color: transparent; background: var(--primary); color: var(--primary-foreground) }

/* ---------- entrance ---------- */

@media (prefers-reduced-motion: no-preference) {
  .tile, .hero__inner { animation: rise .5s cubic-bezier(.2,.7,.3,1) both }
  .tile { animation-delay: calc(var(--i, 0) * 28ms) }
  .hero__inner { animation-delay: 40ms }

  @keyframes rise {
    from { opacity: 0; transform: translateY(10px) }
    to { opacity: 1; transform: none }
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: filter .16s ease, border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.btn:hover { border-color: var(--primary); transform: translateY(-1px) }
.btn:active { transform: translateY(0) }
.btn:disabled { opacity: .6; cursor: progress; transform: none }

.btn--solid { border-color: transparent; background: var(--primary); color: var(--primary-foreground) }
.btn--solid:hover { filter: brightness(1.08) }
.btn--block { width: 100% }

/* The order band is a saturated tint, so the buttons invert instead of matching. */
.detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.detail__band { flex-wrap: wrap }

.detail__actions .btn {
  background: oklch(100% 0 0 / .14);
  border-color: oklch(100% 0 0 / .46);
  color: #fff;
  box-shadow: none;
}

.detail__actions .btn:hover { background: oklch(100% 0 0 / .24) }

.detail__actions .btn--solid {
  background: #fff;
  border-color: transparent;
  color: var(--tint, var(--primary));
}

/* ---------- form controls ---------- */

input, textarea, select {
  font: 400 15px/1.4 var(--font);
  color: var(--foreground);
}

input:not([type=checkbox]):not([type=radio]), textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  transition: border-color .16s ease;
}

input::placeholder, textarea::placeholder { color: oklch(62% .02 20) }

input:not([type=checkbox]):not([type=radio]):focus-visible,
textarea:focus-visible { outline-offset: 0; border-color: var(--ring) }

input:disabled { background: var(--muted); color: var(--muted-foreground) }

input[aria-invalid=true], textarea[aria-invalid=true] { border-color: #d7262b }

.form, .sidepanel__form { display: grid; gap: 12px }

.form label, .sidepanel__form label:not(.switch), .payfield {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
}

.form__pair { display: grid; gap: 12px }

@media (min-width: 520px) { .form__pair { grid-template-columns: repeat(2, minmax(0, 1fr)) } }

.form__fine {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted-foreground);
}

/* ---------- login gate ---------- */

.gate {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 16px;
}

.gate__card {
  width: 100%;
  max-width: 460px;
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-hero);
  background: var(--card);
  box-shadow: var(--shadow-lift);
}

.gate__title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.5px }

.gate__lede, .gate__note {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted-foreground);
}

.gate__note { font-weight: 600; color: var(--foreground) }

.tabs--roles { overflow: visible }

.gate__modes {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--secondary);
}

.mode {
  flex: 1;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.mode:hover { color: var(--foreground) }
.mode.is-active { background: var(--card); color: var(--foreground); box-shadow: var(--shadow-card) }

.gate__error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: oklch(94% .05 27);
  color: oklch(46% .19 27);
  font-size: 13px;
  font-weight: 600;
}

.gate__foot {
  padding: 0 16px 24px;
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted-foreground);
}

.gate__foot a { color: var(--primary); font-weight: 600 }
.gate__foot a:hover { text-decoration: underline }

/* ---------- account profile ---------- */

.account {
  flex: 1;
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 8px 16px 40px;
}

@media (min-width: 1024px) {
  .account { grid-template-columns: 300px minmax(0, 1fr); padding: 8px 32px 48px }
}

.account__main { display: grid; gap: 22px; align-content: start; min-width: 0 }
.account__head { display: grid; gap: 4px }

.sidepanel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

@media (min-width: 1024px) { .sidepanel { position: sticky; top: 16px } }

.sidepanel__title, .sidepanel__orders h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.sidepanel__who { display: flex; align-items: center; gap: 10px }

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 17px;
  font-weight: 700;
}

.sidepanel__name { display: block; font-size: 15px; font-weight: 700 }
.sidepanel__role { display: block; font-size: 12px; color: var(--muted-foreground) }

.sidepanel__toggles {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 12px 0 0;
  border: 0;
}

.sidepanel__toggles legend {
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
}

.switch {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
}

/* The box itself is replaced by the track, but stays focusable and checked. */
.switch input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
}

.switch > span {
  position: relative;
  flex: none;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--muted);
  transition: background-color .16s ease;
}

.switch > span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform .16s ease;
}

.switch input:checked + span { background: var(--primary) }
.switch input:checked + span::after { transform: translateX(16px) }
.switch input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 2px }

.sidepanel__saved { margin: 0; font-size: 13px; font-weight: 700; color: oklch(48% .13 145) }

.sidepanel__orders { display: grid; gap: 6px }
.sidepanel__orders ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none }
.sidepanel__orders li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px }

.muted { color: var(--muted-foreground) }

/* ---------- ownership grid ---------- */

.ownergroup { display: grid; gap: 10px }

.ownergroup__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.grid--own {
  flex: none;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  grid-auto-rows: auto;
}

.owncard {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.owncard:hover { border-color: var(--tint, var(--primary)); box-shadow: var(--shadow-lift) }
.owncard.is-owned { border-color: var(--tint, var(--primary)) }

.owncard__check {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--tint, var(--primary));
  cursor: pointer;
}

.owncard__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--tint, var(--primary));
  color: #fff;
}

.owncard__body { flex: 1; display: grid; gap: 1px; min-width: 0 }
.owncard__name { font-size: 14px; font-weight: 700; line-height: 1.25 }
.owncard__sub { font-size: 12px; color: var(--muted-foreground) }

.owncard__state {
  margin-top: 4px;
  justify-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--muted);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-foreground);
}

.owncard.is-owned .owncard__state { background: var(--tint, var(--primary)); color: #fff }

.owncard__count {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-foreground);
  white-space: nowrap;
}

/* ---------- cart and payment ---------- */

.checkout {
  flex: 1;
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 8px 16px 40px;
}

@media (min-width: 1024px) {
  .checkout { grid-template-columns: minmax(0, 1.4fr) minmax(320px, .85fr); padding: 8px 32px 48px }
}

.checkout__lines { display: grid; gap: 12px; align-content: start; min-width: 0 }

.checkout__pay {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

@media (min-width: 1024px) { .checkout__pay { position: sticky; top: 16px } }

.cartlines { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none }

.cartline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--tint, var(--primary));
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.cartline__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--tint, var(--primary));
  color: #fff;
}

.cartline__body { flex: 1; display: grid; gap: 1px; min-width: 0 }
.cartline__name { font-size: 15px; font-weight: 700 }
.cartline__name:hover { color: var(--primary) }
.cartline__meta { font-size: 12px; color: var(--muted-foreground) }

.cartline__intent {
  justify-self: start;
  margin-top: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.cartline__price { flex: none; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums }

.cartline__remove {
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-size: 16px;
  line-height: 1;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease;
}

.cartline__remove:hover { border-color: var(--primary); color: var(--primary) }

.pay__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.payoptions { display: grid; gap: 8px }

.payoption {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}

.payoption:hover { border-color: var(--primary) }
.payoption.is-active { border-color: var(--primary); background: var(--accent) }

.payoption input { flex: none; width: 17px; height: 17px; accent-color: var(--primary) }

.payoption__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--secondary);
  color: var(--primary);
}

.payoption__body { flex: 1; display: grid; gap: 1px }
.payoption__label { font-size: 14px; font-weight: 700 }
.payoption__note { font-size: 12px; color: var(--muted-foreground) }

.payhint, .payfine {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted-foreground);
}

.paytotal {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.paytotal div { display: flex; justify-content: space-between; gap: 12px }
.paytotal dt { margin: 0; font-size: 13px; color: var(--muted-foreground) }
.paytotal dd { margin: 0; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums }

.done {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-hero);
  background: var(--card);
  box-shadow: var(--shadow-lift);
}

@media (min-width: 1024px) { .done { grid-column: 1 / -1 } }

.done__title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.4px }

.ref {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--muted);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- contact ---------- */

.contact {
  flex: 1;
  display: grid;
  gap: 20px;
  align-content: start;
  padding: 8px 16px 40px;
}

@media (min-width: 768px) { .contact { padding: 8px 32px 48px } }

.contact__head { display: grid; gap: 6px }

.contact__split { display: grid; gap: 16px; align-items: start }

@media (min-width: 960px) {
  .contact__split { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}

.contact__card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-hero);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.card__title { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.3px }

.contact__facts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none }
.contact__facts li { display: flex; gap: 12px; font-size: 14px; line-height: 1.45 }

.contact__fact-label {
  flex: none;
  width: 84px;
  padding-top: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.contact__fact-link { color: var(--primary); font-weight: 700 }
.contact__fact-link:hover { text-decoration: underline }

.contact__map {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--secondary);
}

.contact__map iframe { display: block; width: 100%; height: 280px; border: 0 }
.contact__maplink { margin: 0 }

.contact__status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

.contact__status--good { background: oklch(95% .05 150); color: oklch(42% .13 150) }
.contact__status--bad { background: oklch(94% .05 27); color: oklch(46% .19 27) }
.contact__status--warn { background: oklch(95% .06 85); color: oklch(45% .12 75) }

.contact__fallback { display: grid; gap: 10px; justify-items: start }
