/* Public pages of package K: the marketplace, storefronts, joining an
   organisation, trainer sign-up and invitations. Gateway brand tokens
   (DruidHub green #006d3f, Plus Jakarta Sans), light by default, complete
   dark theme under html[data-theme="dark"]. */
:root {
  --g-bg: #f4f1ec; --g-surface: #ffffff; --g-surface-raised: #faf9f7;
  --g-text: #1a1625; --g-text-sub: #5f5a6b; --g-text-soft: #7c7789;
  --g-border: #e6e0d4; --g-border-strong: #d6cfc2;
  --g-brand: #006d3f; --g-brand-hover: #005c35; --g-brand-text: #006d3f;
  --g-brand-soft: #e6f4ec; --g-on-brand: var(--dh-on-brand, #ffffff);
  --g-ok: #047857; --g-ok-soft: #ecfdf5;
  --g-warn: #92400e; --g-warn-soft: #fff7e6; --g-warn-line: #f59e0b;
  --g-bad: #b91c1c; --g-bad-soft: #fef2f2;
  --g-info: #1e40af; --g-info-soft: #eff6ff;
  --g-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --g-mono: 'JetBrains Mono', ui-monospace, monospace;
  --g-radius: 20px; --g-radius-sm: 14px;
  --g-shadow: 6px 6px 0 rgba(26,22,37,0.07);
  --g-thumb-1: #006d3f; --g-thumb-2: #00727c; --g-thumb-3: #5b3fc4; --g-thumb-4: #9a3412;
}
html[data-theme="dark"] {
  --g-bg: #0e0b14; --g-surface: #1a1625; --g-surface-raised: #231e30;
  --g-text: #ece8f4; --g-text-sub: #b0aabd; --g-text-soft: #8f89a0;
  --g-border: #2e2739; --g-border-strong: #3d3550;
  --g-brand: #00a35e; --g-brand-hover: #12b86d; --g-brand-text: #4ade80;
  --g-brand-soft: rgba(0,163,94,0.16); --g-on-brand: var(--dh-on-brand, #04170d);
  --g-ok: #6ee7b7; --g-ok-soft: rgba(16,185,129,.14);
  --g-warn: #fcd34d; --g-warn-soft: rgba(245,158,11,.14); --g-warn-line: #b45309;
  --g-bad: #fca5a5; --g-bad-soft: rgba(239,68,68,.14);
  --g-info: #93c5fd; --g-info-soft: rgba(59,130,246,.14);
  --g-shadow: 6px 6px 0 rgba(0,0,0,0.3);
  --g-thumb-1: #0b7d4c; --g-thumb-2: #0f7f88; --g-thumb-3: #6b50d6; --g-thumb-4: #b45309;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--g-font); background: var(--g-bg); color: var(--g-text); -webkit-font-smoothing: antialiased; min-height: 100vh; line-height: 1.5; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--g-brand-text); outline-offset: 2px; }
.pk-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--g-surface); color: var(--g-text); padding: 8px 14px; border-radius: 10px; font-weight: 700; }
.pk-skip:focus { left: 12px; }
.pk-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.pk-icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Header */
.pk-nav { position: sticky; top: 12px; z-index: 50; max-width: 1180px; margin: 12px auto 0; padding: 8px 10px 8px 16px; background: var(--g-surface); border-radius: 999px; box-shadow: var(--g-shadow); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
@media (max-width: 1212px) { .pk-nav { margin: 12px 16px 0; } }
.pk-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; color: var(--g-brand-text); text-decoration: none; letter-spacing: -.03em; white-space: nowrap; }
.pk-brand__mark { width: 30px; height: 30px; border-radius: 10px; background: var(--g-brand); color: var(--g-on-brand); display: inline-flex; align-items: center; justify-content: center; }
.pk-brand__mark svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }
.pk-nav__links { display: flex; align-items: center; gap: 2px; }
.pk-nav__link { padding: 8px 12px; font-size: 13px; font-weight: 700; color: var(--g-text-sub); text-decoration: none; border-radius: 999px; white-space: nowrap; }
.pk-nav__link:hover, .pk-nav__link[aria-current="page"] { background: var(--g-surface-raised); color: var(--g-text); }
.pk-nav__right { display: flex; align-items: center; gap: 6px; color: var(--g-text-sub); }
.pk-nav__right form { display: inline; }
@media (max-width: 860px) { .pk-nav__links { display: none; } }
@media (max-width: 420px) { .pk-hide-xs { display: none; } }
/* Phone menu: the inline links hide below 860px, so they move into a disclosure. */
.pk-menu { display: none; position: relative; }
@media (max-width: 860px) { .pk-menu { display: block; } }
.pk-menu__button { list-style: none; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--g-text); border: 1.5px solid var(--g-border); }
.pk-menu__button::-webkit-details-marker { display: none; }
.pk-menu__button:focus-visible { outline: 3px solid var(--g-brand-text); outline-offset: 2px; }
.pk-menu[open] .pk-menu__button { background: var(--g-surface-raised); }
.pk-menu__panel { position: absolute; right: 0; top: calc(100% + 12px); min-width: 210px; padding: 8px; display: flex; flex-direction: column; background: var(--g-surface); border: 1px solid var(--g-border); border-radius: 16px; box-shadow: var(--g-shadow); z-index: 60; }
.pk-menu__panel a { padding: 11px 12px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--g-text); text-decoration: none; }
.pk-menu__panel a:hover, .pk-menu__panel a:focus-visible { background: var(--g-surface-raised); outline: none; }

/* Buttons */
.pk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 9px 18px; font: inherit; font-size: 14px; font-weight: 800; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; }
.pk-btn--primary { background: var(--g-brand); color: var(--g-on-brand); }
.pk-btn--primary:hover { background: var(--g-brand-hover); }
.pk-btn--ghost { background: transparent; color: var(--g-text); border-color: var(--g-border-strong); }
.pk-btn--ghost:hover { background: var(--g-surface-raised); }
.pk-btn--quiet { background: var(--g-surface-raised); color: var(--g-text); }
.pk-btn--sm { min-height: 34px; padding: 6px 14px; font-size: 13px; }
.pk-btn--lg { min-height: 48px; padding: 12px 22px; font-size: 15px; }
.pk-btn--block { width: 100%; }
.pk-btn[disabled] { opacity: .55; cursor: not-allowed; }
button.pk-linkish { background: none; border: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--g-text-sub); cursor: pointer; padding: 8px 12px; border-radius: 999px; }
button.pk-linkish:hover { background: var(--g-surface-raised); color: var(--g-text); }

/* Page frame */
.pk-main { max-width: 1180px; margin: 0 auto; padding: 32px 16px 64px; }
.pk-main--narrow { max-width: 760px; }
.pk-main--form { max-width: 560px; }
.pk-head { margin-bottom: 24px; }
.pk-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; background: var(--g-brand-soft); color: var(--g-brand-text); font-size: 12px; font-weight: 800; border-radius: 999px; margin-bottom: 14px; align-self: flex-start; }
.pk-title { font-size: clamp(28px, 5vw, 44px); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; }
.pk-title--sm { font-size: clamp(24px, 4vw, 32px); }
.pk-sub { font-size: 16px; color: var(--g-text-sub); margin-top: 10px; max-width: 62ch; }
.pk-section { margin-top: 40px; }
.pk-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pk-section__title { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.pk-link { color: var(--g-brand-text); font-weight: 700; text-decoration: none; }
.pk-link:hover { text-decoration: underline; }

/* Cards */
.pk-card { background: var(--g-surface); border-radius: var(--g-radius); box-shadow: var(--g-shadow); padding: 24px; }
.pk-card--tight { padding: 18px; }
.pk-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .pk-grid--courses { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .pk-grid--courses { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .pk-grid--aside { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }

/* Course card */
.pk-course { background: var(--g-surface); border-radius: var(--g-radius); box-shadow: var(--g-shadow); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; min-width: 0; transition: transform .15s ease; }
.pk-course:hover { transform: translate(-2px, -2px); }
.pk-course__thumb { height: 128px; display: flex; align-items: flex-end; padding: 14px 16px; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .02em; background: var(--g-thumb-1); position: relative; }
.pk-course__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pk-course__thumb span { position: relative; background: rgba(0,0,0,.28); padding: 3px 10px; border-radius: 999px; }
.pk-course__thumb--1, .pk-course__thumb--5, .pk-course__thumb--9 { background: var(--g-thumb-2); }
.pk-course__thumb--2, .pk-course__thumb--6 { background: var(--g-thumb-3); }
.pk-course__thumb--3, .pk-course__thumb--7 { background: var(--g-thumb-4); }
.pk-course__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pk-course__seller { font-size: 12px; font-weight: 700; color: var(--g-text-sub); }
.pk-course__title { font-size: 16px; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; }
.pk-course__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.pk-price { font-size: 15px; font-weight: 800; margin-left: auto; white-space: nowrap; }
.pk-price--ask { font-size: 12px; font-weight: 700; color: var(--g-text-sub); white-space: normal; text-align: right; }

/* Pills */
.pk-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; background: var(--g-surface-raised); color: var(--g-text-sub); }
.pk-pill--brand { background: var(--g-brand-soft); color: var(--g-brand-text); }
.pk-pill--ok { background: var(--g-ok-soft); color: var(--g-ok); }
.pk-pill--warn { background: var(--g-warn-soft); color: var(--g-warn); }
.pk-pill--bad { background: var(--g-bad-soft); color: var(--g-bad); }
.pk-pill--info { background: var(--g-info-soft); color: var(--g-info); }

/* Notices */
.pk-notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--g-radius-sm); background: var(--g-surface); border: 1.5px solid var(--g-border); font-size: 14px; line-height: 1.55; margin-bottom: 16px; }
.pk-notice strong { display: block; }
.pk-notice--ok { background: var(--g-ok-soft); border-color: transparent; }
.pk-notice--warn { background: var(--g-warn-soft); border-color: var(--g-warn-line); }
.pk-notice--bad { background: var(--g-bad-soft); border-color: transparent; }
.pk-notice--info { background: var(--g-info-soft); border-color: transparent; }
.pk-notice .pk-icon { margin-top: 2px; }

/* Forms */
.pk-form { display: flex; flex-direction: column; gap: 14px; }
.pk-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pk-label { font-size: 13px; font-weight: 700; }
.pk-hint { font-size: 12px; color: var(--g-text-sub); line-height: 1.5; }
.pk-error { font-size: 12px; font-weight: 700; color: var(--g-bad); }
.pk-input, .pk-select, .pk-textarea { width: 100%; min-height: 44px; padding: 10px 14px; font: inherit; font-size: 15px; color: var(--g-text); background: var(--g-surface-raised); border: 1.5px solid var(--g-border); border-radius: 12px; }
html[data-theme="dark"] .pk-input, html[data-theme="dark"] .pk-select, html[data-theme="dark"] .pk-textarea { background: var(--g-bg); color-scheme: dark; }
.pk-textarea { min-height: 100px; resize: vertical; }
.pk-input:focus, .pk-select:focus, .pk-textarea:focus { outline: none; border-color: var(--g-brand); box-shadow: 0 0 0 3px var(--g-brand-soft); }
.pk-input::placeholder, .pk-textarea::placeholder { color: var(--g-text-soft); }
.pk-input[readonly] { color: var(--g-text-sub); }
.pk-two { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .pk-two { grid-template-columns: 1fr 1fr; } }
.pk-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.pk-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--g-brand); flex-shrink: 0; }
.pk-choice-grid { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 480px) { .pk-choice-grid { grid-template-columns: 1fr; } }
.pk-choice { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1.5px solid var(--g-border); border-radius: 12px; cursor: pointer; background: var(--g-surface); font-size: 13px; font-weight: 700; }
.pk-choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pk-choice:has(input:checked) { border-color: var(--g-brand); background: var(--g-brand-soft); color: var(--g-brand-text); }
.pk-choice:has(input:focus-visible) { outline: 3px solid var(--g-brand-text); outline-offset: 2px; }
.pk-choice small { font-weight: 500; color: var(--g-text-sub); }

/* Filters and pager */
.pk-filters { display: flex; flex-direction: column; gap: 16px; }
.pk-filters__group { border: 0; display: flex; flex-direction: column; gap: 6px; }
.pk-filters__group legend { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--g-text-sub); margin-bottom: 4px; }
.pk-pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 32px; flex-wrap: wrap; font-size: 14px; color: var(--g-text-sub); }

/* Tables */
.pk-table-wrap { overflow-x: auto; }
.pk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pk-table th { text-align: left; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--g-text-sub); padding: 12px 14px; background: var(--g-surface-raised); border-bottom: 1px solid var(--g-border); white-space: nowrap; }
.pk-table td { padding: 14px; border-bottom: 1px solid var(--g-border); vertical-align: top; }
.pk-table tbody tr:last-child td { border-bottom: none; }
.pk-table .pk-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk-mono { font-family: var(--g-mono); font-size: 12px; overflow-wrap: anywhere; }

/* Empty state */
.pk-empty { text-align: center; padding: 48px 20px; }
.pk-empty .pk-icon { width: 34px; height: 34px; color: var(--g-brand-text); margin: 0 auto 10px; }
.pk-empty h2 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.pk-empty p { color: var(--g-text-sub); font-size: 14px; max-width: 46ch; margin: 0 auto 16px; }

/* Footer */
.pk-footer { max-width: 1180px; margin: 0 auto; padding: 28px 16px 40px; border-top: 1px solid var(--g-border); display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--g-text-sub); }
.pk-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.pk-footer a { text-decoration: none; font-weight: 600; }
.pk-footer a:hover { color: var(--g-text); }
@media (prefers-reduced-motion: reduce) { .pk-course { transition: none; } }

/* Small utilities */
.pk-mt { margin-top: 16px; }

/* Shell tokens and the few shell classes a signed-in marketplace page uses,
   for visitors without an app shell (platform admins). Inside a shell the
   shell's own definitions apply instead. */
:root {
  --sh-bg: var(--g-bg); --sh-surface: var(--g-surface); --sh-surface-2: var(--g-surface-raised);
  --sh-border: var(--g-border); --sh-border-soft: var(--g-border); --sh-text: var(--g-text);
  --sh-text-2: var(--g-text-sub); --sh-text-3: var(--g-text-soft); --sh-accent: var(--g-brand);
  --sh-accent-soft: var(--g-brand-soft); --sh-accent-text: var(--g-brand-text);
  --sh-radius: 12px; --sh-radius-lg: var(--g-radius); --sh-shadow: var(--g-shadow);
  --sh-shadow-soft: 0 1px 2px rgba(26,22,37,.06);
}
.sh-page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.sh-page-header__title { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.sh-page-header__sub { font-size: 14px; color: var(--g-text-sub); }
.sh-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 800; text-decoration: none; border: 1.5px solid var(--g-border-strong); color: var(--g-text); background: var(--g-surface); }
.sh-btn--primary { background: var(--g-brand); border-color: var(--g-brand); color: var(--g-on-brand); }
.sh-btn--sm { padding: 6px 12px; font-size: 12px; }
