/* MarkerPin components. Uses tokens.css only (semantic and component layers).
   Naming: BEM. Block .card, element .card__body, modifier .card--link. State: .is-* classes or ARIA attributes
   ([aria-current], [aria-pressed], [aria-expanded], [aria-invalid], [aria-sort]); style the ARIA state, so the
   markup can't look selected without saying so. Layout helpers are .u-*. Shell parts: .site-*, .pub-*, .p-*. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-height) + 16px); }
body {
  margin: 0; background: var(--surface); color: var(--text);
  font-family: var(--font-sans); font-size: var(--body-size); line-height: var(--body-leading);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: var(--weight-bold); line-height: var(--leading-snug); text-wrap: balance; }
h1 { font-size: clamp(var(--text-32), 5vw, var(--text-40)); line-height: var(--leading-tight); letter-spacing: -0.02em; }
h2 { font-size: clamp(var(--text-24), 3.6vw, var(--text-32)); line-height: 1.15; letter-spacing: -0.015em; }
h3 { font-size: var(--text-20); letter-spacing: -0.01em; }
h4 { font-size: var(--text-16); }
p, ul, ol, dl, figure { margin: 0; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--surface-selected); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: var(--radius-md); box-shadow: var(--shadow-overlay); }
.skip-link:focus { top: 8px; }

.u-wrap { max-width: var(--website-width); margin-inline: auto; padding-inline: max(var(--space-4), env(safe-area-inset-left, 0px)); }
@media (min-width: 768px) { .u-wrap { padding-inline: var(--space-6); } }
.u-read { max-width: var(--reading-width); margin-inline: auto; padding-inline: var(--space-4); }
.u-stack > * + * { margin-top: var(--space-4); }
.u-stack-sm > * + * { margin-top: var(--space-2); }
.u-stack-lg > * + * { margin-top: var(--space-8); }
.u-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.u-between { justify-content: space-between; }
.u-muted { color: var(--text-muted); }
.u-small { font-size: var(--text-14); line-height: 1.45; }
.u-mono, .input.u-mono { font-family: var(--font-mono); font-feature-settings: "zero" 1; }
.u-num { font-variant-numeric: tabular-nums; }
.u-center { text-align: center; }

/* Eyebrow: the guide's mono chapter mark. Orange text on light, muted on ink. */
.eyebrow { font-family: var(--font-mono); font-size: var(--text-12); font-weight: var(--weight-medium); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-accent); }
.lede { font-size: var(--text-20); line-height: 1.5; color: var(--text-muted); max-width: 40ch; }

/* "Example / Örnek" caption required on every staged or stock image (brand guide 12) */
.example-tag { position: absolute; left: var(--space-3); top: var(--space-3); z-index: 2; background: rgba(255,255,255,.94); color: var(--text); font-size: var(--text-12); font-weight: var(--weight-bold); letter-spacing: .02em; padding: 2px 8px; border-radius: var(--radius-sm); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--button-height); padding: 0 var(--space-5); border-radius: var(--button-radius);
  font: var(--weight-bold) var(--text-16)/1.1 var(--font-sans); text-decoration: none; white-space: nowrap;
  border: 2px solid transparent; cursor: pointer; background: none; color: var(--text);
  transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--action); color: var(--text-on-action); }
.btn--primary:hover { background: var(--action-hover); }
.btn--secondary { border-color: var(--text); color: var(--text); background: var(--surface); }
.btn--secondary:hover { background: var(--surface-subtle); }
.btn--tertiary { padding-inline: var(--space-3); color: var(--text); }
.btn--tertiary:hover { background: var(--surface-subtle); }
.btn--danger { background: var(--status-danger); color: #fff; }
.btn--danger:hover { background: #912018; }
.btn--sm { min-height: var(--button-height-sm); padding-inline: var(--space-3); font-size: var(--text-14); }
.btn--lg { min-height: 52px; padding-inline: var(--space-6); font-size: var(--text-18); }
.btn--block { width: 100%; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--surface-subtle); color: var(--text-muted); border-color: var(--border); cursor: not-allowed; transform: none; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.on-ink .btn--secondary { border-color: #fff; color: #fff; background: transparent; }
.on-ink .btn--secondary:hover { background: rgba(255,255,255,.08); }
.on-ink :focus-visible { outline-color: var(--focus-ring-on-ink); }

.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-md); border: 0; background: none; color: var(--text); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--surface-subtle); }
.icon-btn--outlined { border: 1px solid var(--border-strong); }
.icon-btn--sm { width: 36px; height: 36px; }
.icon-btn[disabled] { color: var(--text-disabled); cursor: not-allowed; background: none; }
@media (hover: hover) {
  .icon-btn[data-tip]:hover::after, .icon-btn[data-tip]:focus-visible::after {
    content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
    background: var(--surface-ink); color: #fff; font-size: var(--text-12); font-weight: var(--weight-medium); padding: 4px 8px; border-radius: var(--radius-sm); white-space: nowrap; z-index: 30; pointer-events: none;
  }
}

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: var(--weight-bold); color: var(--link); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow .icon { width: 18px; height: 18px; transition: transform var(--duration-fast) var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(2px); }
.linklike { all: unset; color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; cursor: pointer; }   /* a button that reads as a link */
.linklike:hover { text-decoration-thickness: 2px; }
.linklike:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 2px; }
.link-external .icon { display: inline; width: 14px; height: 14px; vertical-align: -1px; margin-left: 3px; }

/* ---------- Form fields ---------- */
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field__label { font-weight: var(--weight-bold); font-size: var(--text-14); }
.field__label .opt { font-weight: var(--weight-regular); color: var(--text-muted); }
.field__hint { font-size: var(--text-14); color: var(--text-muted); line-height: 1.45; }
.field__error { font-size: var(--text-14); color: var(--status-danger); font-weight: var(--weight-bold); display: flex; gap: 6px; align-items: flex-start; line-height: 1.45; }
.field__error .icon { width: 16px; height: 16px; margin-top: 2px; }
.field__ok { font-size: var(--text-14); color: var(--status-success); font-weight: var(--weight-bold); display: flex; gap: 6px; align-items: center; }
.field__ok .icon { width: 16px; height: 16px; }
.input, .select, .textarea {
  width: 100%; min-height: var(--field-height); padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--field-radius);
  background: var(--surface); color: var(--text); font: var(--weight-regular) var(--text-16)/1.4 var(--font-sans);
}
.textarea { min-height: 120px; resize: vertical; line-height: var(--leading-body); }
.select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315171C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 0; border-color: var(--text); border-radius: var(--field-radius); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--status-danger); border-width: 2px; padding: 9px 11px; }
.input[readonly], .textarea[readonly] { background: var(--surface-subtle); border-style: dashed; }   /* read-only: full contrast, selectable */
.input[disabled], .select[disabled], .textarea[disabled] { background: var(--surface-subtle); color: var(--text-muted); border-color: var(--border); cursor: not-allowed; }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: var(--field-radius); overflow: hidden; background: var(--surface); }
.input-group:focus-within { outline: 2px solid var(--focus-ring); border-color: var(--text); }
.input-group:has(.input[aria-invalid="true"]) { border: 2px solid var(--status-danger); }
.input-group .input { border: 0; border-radius: 0; min-width: 0; }
.input-group .input:focus-visible { outline: 0; }
.input-group__affix { display: flex; align-items: center; padding: 0 12px; background: var(--surface-subtle); color: var(--text-muted); font-size: var(--text-14); white-space: nowrap; border-right: 1px solid var(--border); }
.input-group__affix--end { border-right: 0; border-left: 1px solid var(--border); }
.input-group .icon-btn { height: auto; border-radius: 0; }
.range-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--space-2); align-items: center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--text-16); line-height: 1.45; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--text); }
.check input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
/* margin-inline only: a block margin of 0 would cancel the .u-stack spacing above a fieldset */
.fieldset { border: 0; padding: 0; margin-inline: 0; min-width: 0; display: grid; gap: var(--space-2); }
.fieldset legend { font-weight: var(--weight-bold); font-size: var(--text-14); margin-bottom: 6px; padding: 0; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--text-16); }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--border-strong); position: relative; margin: 0; cursor: pointer; transition: background var(--duration-fast); flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform var(--duration-fast) var(--ease-out); }
.switch input:checked { background: var(--surface-ink); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.switch__state { font-size: var(--text-14); color: var(--text-muted); }
.combobox { position: relative; }
.combobox__list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-overlay); list-style: none; padding: 4px; margin: 0; max-height: 280px; overflow: auto; }
.combobox__option { padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.combobox__option[aria-selected="true"], .combobox__option:hover { background: var(--surface-subtle); }
.combobox__path { display: block; font-size: var(--text-13); color: var(--text-muted); }
.error-summary { border: 2px solid var(--status-danger); border-radius: var(--radius-md); padding: var(--space-4); background: var(--status-danger-bg); }
.error-summary h2 { font-size: var(--text-18); color: var(--status-danger); margin-bottom: var(--space-2); }
.error-summary a { color: var(--status-danger); font-weight: var(--weight-bold); }
.form-grid { display: grid; gap: var(--space-5); }
.form-grid > * { min-width: 0; }   /* long values (addresses, codes) wrap instead of widening the column */
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .form-grid--2 { grid-template-columns: minmax(0, 1fr); } }

/* Rich text toolbar */
.rte { border: 1px solid var(--border-strong); border-radius: var(--field-radius); overflow: hidden; }
.rte:focus-within { outline: 2px solid var(--focus-ring); border-color: var(--text); }
.rte__bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--border); background: var(--surface-subtle); }
.rte__bar button { min-width: 36px; height: 36px; border: 0; background: none; border-radius: var(--radius-sm); font: var(--weight-bold) var(--text-14) var(--font-sans); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.rte__bar button:hover, .rte__bar button[aria-pressed="true"] { background: var(--surface-muted); }
.rte__bar .sep { width: 1px; background: var(--border); margin: 6px 4px; }
.rte .textarea { border: 0; border-radius: 0; }
.rte .textarea:focus-visible { outline: 0; }

/* ---------- Tabs (language tabs and plain tabs) ---------- */
.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs [role="tab"] { appearance: none; border: 0; background: none; font: var(--weight-bold) var(--text-16) var(--font-sans); color: var(--text-muted); padding: 12px 14px; min-height: 44px; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--status-warning); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; border-radius: var(--radius-full); font-size: var(--text-13); font-weight: var(--weight-bold); white-space: nowrap; border: 1px solid transparent; }
.badge .icon { width: 14px; height: 14px; stroke-width: 2.5; }
.badge--draft { background: var(--surface-subtle); color: var(--text); border-color: var(--border); }
.badge--published, .badge--live { background: var(--status-success-bg); color: var(--status-success); }
.badge--archived, .badge--suspended { background: var(--surface-subtle); color: var(--text-muted); border-color: var(--border); }
.badge--pending, .badge--verifying { background: var(--status-warning-bg); color: var(--status-warning); }
.badge--failing { background: var(--status-danger-bg); color: var(--status-danger); }
.badge--role { background: var(--surface); color: var(--text-muted); border-color: var(--border); font-weight: var(--weight-medium); }

/* Hidden-on-plan marker: informative, never looks disabled */
.plan-note { display: inline-block; position: relative; padding-left: 22px; font-size: var(--text-14); color: var(--text); line-height: 1.4; }   /* text and link wrap as one sentence */
.plan-note .icon { position: absolute; left: 0; top: 2px; width: 16px; height: 16px; color: var(--text-accent); }
.plan-note a { font-weight: var(--weight-bold); }
.plan-note--block { display: block; padding: 10px 12px 10px 36px; border-radius: var(--radius-md); background: var(--surface-subtle); border-left: 3px solid var(--accent); }
.plan-note--block .icon { left: 12px; top: 12px; }

/* ---------- Usage meter ---------- */
.meter { display: grid; gap: 6px; }
.meter__head { display: flex; justify-content: space-between; gap: var(--space-3); font-size: var(--text-14); align-items: baseline; }
.meter__label { font-weight: var(--weight-bold); }
.meter__value { font-variant-numeric: tabular-nums; }
.meter__bar { height: var(--meter-height); background: var(--surface-muted); border-radius: 99px; overflow: hidden; }
.meter__fill { height: 100%; background: var(--surface-ink); border-radius: 99px; }
.meter__state { display: none; align-items: center; gap: 6px; font-size: var(--text-14); font-weight: var(--weight-bold); }
.meter__state .icon { width: 16px; height: 16px; }
.meter--caution .meter__fill { background: var(--status-warning); }
.meter--caution .meter__state { display: flex; color: var(--status-warning); }
.meter--full .meter__fill { background: var(--status-danger); }
.meter--full .meter__state { display: flex; color: var(--status-danger); }

/* ---------- Plan cards and comparison ---------- */
.plans { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-4); }
.plan-card { position: relative; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6) var(--space-5); border: 1px solid var(--border); border-radius: var(--card-radius); background: var(--surface); }
.plan-card__name { font-size: var(--text-20); }
.plan-card__for { font-size: var(--text-14); color: var(--text-muted); min-height: 2.9em; }
.plan-card__price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-1); font-size: var(--text-40); font-weight: var(--weight-display); letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan-card__price small { font-size: var(--text-14); font-weight: var(--weight-regular); line-height: var(--leading-snug); color: var(--text-muted); letter-spacing: 0; }
.plan-card__price .price-tax { flex-basis: 100%; }
/* Total with tax under an excl.-tax price, only where consumer law requires it (saas 4.1). Works in a plan card's price and in table cells. */
.price-tax { display: block; margin-top: var(--space-2); font-size: var(--text-14); font-weight: var(--weight-regular); line-height: var(--leading-snug); letter-spacing: 0; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.plan-card ul { list-style: none; padding: 0; display: grid; gap: 8px; font-size: var(--text-14); }
.plan-card li { display: flex; gap: 8px; align-items: flex-start; }
.plan-card li .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--text); }
.plan-card .btn { width: 100%; }
.plan-card--highlighted { border: 2px solid var(--text); }
.plan-card__flag { position: absolute; top: -12px; left: var(--space-5); background: var(--surface-ink); color: #fff; font-size: var(--text-12); font-weight: var(--weight-bold); padding: 3px 10px; border-radius: 99px; }
.plan-card--current { background: var(--surface-selected); border-color: var(--accent); }
.plan-card--current .plan-card__flag { background: var(--accent); color: var(--text); }
@media (max-width: 1100px) {
  .plans { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px var(--space-4) var(--space-4); margin-inline: calc(var(--space-4) * -1); scroll-padding-inline: var(--space-4); }
  .plan-card { flex: 0 0 min(280px, 82%); scroll-snap-align: start; }
}
.compare-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--card-radius); }
.compare { border-collapse: collapse; width: 100%; min-width: 760px; font-size: var(--text-14); }
.compare th, .compare td { padding: 12px 14px; border-top: 1px solid var(--border); text-align: center; font-variant-numeric: tabular-nums; }
.compare thead th { position: sticky; top: 0; background: var(--surface); border-top: 0; font-size: var(--text-16); z-index: 1; }
.compare th[scope="row"] { text-align: left; font-weight: var(--weight-regular); position: sticky; left: 0; background: var(--surface); min-width: 200px; }
.compare .compare__group th { background: var(--surface-subtle); text-align: left; font-family: var(--font-mono); font-size: var(--text-12); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); font-weight: var(--weight-medium); }
.compare .yes .icon, .compare .no .icon { margin: 0 auto; width: 18px; height: 18px; }
.compare .no { color: var(--text-disabled); }
.compare .is-current { background: var(--surface-selected); }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: var(--chip-height); padding: 4px 12px; border-radius: 99px; background: var(--surface-subtle); border: 1px solid var(--border); font-size: var(--text-14); line-height: 1.3; color: var(--text); }
button.chip { cursor: pointer; font-family: inherit; font-weight: var(--weight-bold); }
button.chip:hover { border-color: var(--text); }
/* Selected chips are ink, not orange: orange is kept for the one primary action per view */
.chip[aria-pressed="true"] { background: var(--surface-ink); color: var(--text-on-ink); border-color: var(--surface-ink); }
.chip[aria-pressed="true"]::before { content: ""; width: 10px; height: 6px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translateY(-2px); }
.chip__remove { border: 0; background: none; padding: 0; margin-right: -4px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; color: inherit; }
.chip__remove:hover { background: var(--surface-muted); }
.chip__remove .icon { width: 14px; height: 14px; }
.public button.chip:not([aria-pressed="true"]) { background: var(--surface); }

/* ---------- Public item content ---------- */
.months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; list-style: none; padding: 0; max-width: 420px; }
.months li { text-align: center; font-size: var(--text-12); padding: 6px 0; border-radius: var(--radius-sm); background: var(--surface-subtle); color: var(--text-muted); border: 1px solid var(--border); }
.months li.is-on { background: var(--action); color: var(--text-on-action); font-weight: var(--weight-bold); border-color: var(--action); }

.facts { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--border); }
.facts__group { grid-column: 1 / -1; font-family: var(--font-mono); font-size: var(--text-12); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); padding: var(--space-5) 0 var(--space-1); }
.facts__row { padding: var(--space-3) 0; border-bottom: 1px solid var(--border); min-width: 0; }
.facts dt { font-size: var(--text-14); color: var(--text-muted); }
.facts dd { margin: 2px 0 0; font-weight: var(--weight-bold); }
.facts dd .chips { margin-top: 4px; }
.facts dd .chip { font-weight: var(--weight-regular); }
.facts .yesno { display: inline-flex; gap: 6px; align-items: center; }
/* Long text and how-to steps in the fact list read as text, not as a short value */
.facts dd.facts__long { font-weight: var(--weight-regular); }
.facts__long ol { padding-left: 1.3em; display: grid; gap: 4px; }
/* An embedded video (a link field such as a how-to video), 16:9 */
.video-embed { aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-subtle); margin-top: 4px; }
.video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (min-width: 768px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-8); }
  .facts__row--wide { grid-column: 1 / -1; }
}

.callout { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: var(--space-4); border-radius: var(--radius-md); border: 1px solid; }
.callout .icon { width: 22px; height: 22px; margin-top: 2px; grid-row: span 2; }
.callout__title { font-weight: var(--weight-bold); }
.callout--warning { background: var(--status-warning-bg); border-color: #F1D59B; }
.callout--warning .icon { color: var(--status-warning); }
.callout--info { background: var(--status-info-bg); border-color: var(--border); }

.prose { max-width: 65ch; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: var(--text-24); margin-top: 1.6em; }
.prose h3 { font-size: var(--text-20); margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin: 0; padding-left: var(--space-4); border-left: 3px solid var(--border); color: var(--text-muted); }

/* Gallery and viewer */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; list-style: none; padding: 0; }
/* A link to the full photo until the lightbox exists; the same tile either way */
.gallery button, .gallery a { display: block; padding: 0; border: 0; background: var(--surface-subtle); aspect-ratio: 1; width: 100%; cursor: zoom-in; border-radius: var(--radius-sm); overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { font-size: var(--text-13); color: var(--text-muted); margin-top: 4px; }
.viewer { position: fixed; inset: 0; z-index: 60; background: rgba(10,11,14,.96); color: #fff; display: grid; grid-template-rows: auto 1fr auto; }
.viewer__bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 8px 16px; font-size: var(--text-14); }
.viewer__bar .icon-btn, .viewer__nav .icon-btn { color: #fff; }
.viewer__bar .icon-btn:hover, .viewer__nav .icon-btn:hover { background: rgba(255,255,255,.12); }
.viewer__stage { display: grid; place-items: center; padding: 0 8px; min-height: 0; }
.viewer__stage img { max-height: 100%; object-fit: contain; }
.viewer__nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
.viewer__caption { text-align: center; flex: 1; font-size: var(--text-16); }
.viewer :focus-visible { outline-color: #fff; }

.files { list-style: none; padding: 0; display: grid; gap: 8px; }
.files a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); text-decoration: none; color: var(--text); min-height: 56px; }
.files a:hover { border-color: var(--text); }
.files__meta { font-size: var(--text-14); color: var(--text-muted); }

/* ---------- Photo uploader ---------- */
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); padding: var(--space-6); text-align: center; display: grid; gap: var(--space-2); justify-items: center; background: var(--surface); }
.dropzone .icon { width: 28px; height: 28px; color: var(--text-muted); }
.dropzone.is-dragging { border-color: var(--accent); background: var(--surface-selected); }
.photo-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.photo-row { display: grid; grid-template-columns: auto 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.photo-row__thumb { width: 64px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-subtle); }
.photo-row__handle { cursor: grab; color: var(--text-muted); width: 28px; display: grid; place-items: center; }
.photo-row__name { font-size: var(--text-14); font-weight: var(--weight-bold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-row__meta { font-size: var(--text-13); color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.photo-row__actions { display: flex; gap: 2px; }
.photo-row--error { border-color: var(--status-danger); background: var(--status-danger-bg); }
.photo-row--hidden { border-style: dashed; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-muted); overflow: hidden; width: 140px; }
.progress > span { display: block; height: 100%; background: var(--surface-ink); }
.cover-flag { font-size: var(--text-12); font-weight: var(--weight-bold); background: var(--surface-ink); color: #fff; padding: 1px 6px; border-radius: var(--radius-sm); }

/* ---------- Step indicator ---------- */
.stepper { display: flex; gap: var(--space-2); list-style: none; padding: 0; counter-reset: st; }
.stepper li { flex: 1; counter-increment: st; padding-top: 10px; border-top: 4px solid var(--surface-muted); font-size: var(--text-14); color: var(--text-muted); }
.stepper li::before { content: counter(st) ". "; font-weight: var(--weight-bold); }
.stepper li[aria-current="step"] { border-top-color: var(--accent); color: var(--text); font-weight: var(--weight-bold); }
.stepper li.is-done { border-top-color: var(--text); color: var(--text); }
.stepper__text { font-size: var(--text-14); color: var(--text-muted); margin-bottom: var(--space-2); }
@media (max-width: 560px) { .stepper li { font-size: var(--text-13); line-height: 1.3; overflow-wrap: anywhere; } }   /* labels stay visible: the number alone says nothing */

/* ---------- Data table ---------- */
.table-wrap { border: 1px solid var(--border); border-radius: var(--card-radius); overflow: hidden; background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-14); }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th { background: var(--surface-subtle); font-weight: var(--weight-bold); color: var(--text); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFAFB; }
.table tbody tr[aria-selected="true"] { background: var(--surface-selected); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .check { width: 44px; }
.table__sort { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.table__sort:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.table__sort .icon { width: 14px; height: 14px; color: var(--text-muted); }
th[aria-sort="ascending"] .table__sort .icon, th[aria-sort="descending"] .table__sort .icon { color: var(--text); }
.table__thumb { width: 44px; height: 33px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-subtle); }
.table__primary { font-weight: var(--weight-bold); color: var(--text); text-decoration: none; }
.table__primary:hover { text-decoration: underline; }
.table__sub { display: block; font-size: var(--text-13); color: var(--text-muted); }
.bulk-bar { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; padding: 8px 8px 8px 16px; background: var(--surface-ink); color: #fff; border-radius: var(--radius-md); }
.bulk-bar .btn--secondary { border-color: #fff; color: #fff; background: transparent; }
.bulk-bar__count { font-weight: var(--weight-bold); margin-right: auto; }
@media (max-width: 767px) {
  .table--cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; }
  .table--cards tr { padding: 12px 14px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; }
  .table--cards td { padding: 0; border: 0; }
  .table--cards td[data-label]::before { content: attr(data-label) ": "; color: var(--text-muted); }
  .table--cards .num { text-align: left; }
  .table--cards .cell-main { grid-column: 2 / 3; }
  .table--cards .cell-wide { grid-column: 2 / -1; font-size: var(--text-13); }
  .table--cards .cell-thumb { display: none; }   /* the thumbnail would take the name's grid slot */
  /* .table--plain: tables without a leading checkbox or thumbnail. One column, actions last. */
  .table--cards.table--plain tr { grid-template-columns: minmax(0, 1fr); }
  .table--plain .cell-main, .table--plain .cell-wide, .table--plain .cell-end { grid-column: 1 / -1; overflow-wrap: anywhere; }
  .table--plain .cell-end { margin: var(--space-1) 0 calc(var(--space-1) * -1) calc(var(--space-3) * -1); }
  .table--plain .cell-end:has(> .btn--secondary, > .btn--primary) { margin-left: 0; }
}

/* ---------- Chart ---------- */
.chart { border: 1px solid var(--border); border-radius: var(--card-radius); padding: var(--space-5); background: var(--surface); }
.chart__legend { display: flex; gap: var(--space-5); list-style: none; padding: 0; font-size: var(--text-14); margin-bottom: var(--space-3); }
.chart__legend li { display: flex; align-items: center; gap: 8px; }
.chart__key { width: 18px; height: 3px; border-radius: 2px; background: var(--surface-ink); }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--surface-muted); }
.chart { container: chart / inline-size; }
.chart__line { fill: none; stroke: var(--text); stroke-width: 2.5; stroke-linejoin: round; }
.chart__line--b { stroke: var(--accent); stroke-dasharray: 6 4; }   /* dashed, so the two lines differ without color */
.chart__key--b { background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 9px); }
.chart__dot { fill: var(--text); stroke: var(--surface); stroke-width: 2; }
/* Axis text is in viewBox units (640 wide), so it scales with the chart. These steps keep it near 13 px on screen. */
.chart .axis text { fill: var(--text-muted); font-size: 8.5px; font-family: var(--font-sans); }
@container chart (max-width: 900px) { .chart .axis text { font-size: 10.5px; } }
@container chart (max-width: 700px) { .chart .axis text { font-size: 14px; } }
@container chart (max-width: 520px) { .chart .axis text { font-size: 19px; } }
@container chart (max-width: 400px) { .chart .axis text { font-size: 24px; } }
.chart__tip { position: absolute; background: var(--surface-ink); color: #fff; font-size: var(--text-13); padding: 6px 10px; border-radius: var(--radius-sm); pointer-events: none; white-space: nowrap; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: var(--space-12) var(--space-6); border: 1px dashed var(--border-strong); border-radius: var(--card-radius); display: grid; gap: var(--space-3); justify-items: center; }
.empty__icon { width: 48px; height: 48px; border-radius: 50%; background: var(--surface-subtle); display: grid; place-items: center; }
.empty__icon .icon { width: 24px; height: 24px; color: var(--text-muted); }
.empty h2, .empty h3 { font-size: var(--text-20); }
.empty p { color: var(--text-muted); max-width: 44ch; }

/* ---------- Alerts and toast ---------- */
.alert { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid; font-size: var(--text-14); line-height: 1.5; align-items: start; }
.alert > .icon { margin-top: 1px; }
.alert__title { font-weight: var(--weight-bold); font-size: var(--text-16); }
.alert--info { background: var(--status-info-bg); border-color: var(--border); }
.alert--success { background: var(--status-success-bg); border-color: #A6E3BF; }
.alert--success > .icon { color: var(--status-success); }
.alert--warning { background: var(--status-warning-bg); border-color: #F1D59B; }
.alert--warning > .icon { color: var(--status-warning); }
.alert--error { background: var(--status-danger-bg); border-color: #F5B5AE; }
.alert--error > .icon { color: var(--status-danger); }
.alert a { color: var(--text); font-weight: var(--weight-bold); }
.toast { position: fixed; z-index: 70; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; gap: 10px; align-items: center; background: var(--surface-ink); color: #fff; padding: 12px 8px 12px 16px; border-radius: var(--radius-md); box-shadow: var(--shadow-overlay); font-size: var(--text-14); max-width: calc(100vw - 32px); }
.toast .icon { color: #6CE9A6; }
.toast .icon-btn { color: #fff; width: 32px; height: 32px; }

/* ---------- Dialog and sheet ---------- */
.dialog { border: 0; padding: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-overlay); width: min(520px, calc(100vw - 32px)); color: var(--text); background: var(--surface-raised); }
.dialog::backdrop { background: rgba(21,23,28,.5); }
.dialog--static { position: relative; display: block; margin: 0; width: 100%; max-width: 520px; }
.dialog__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: var(--space-5) var(--space-5) 0; }
.dialog__head h2 { font-size: var(--text-20); padding-top: 8px; }
.dialog__body { padding: var(--space-3) var(--space-5) var(--space-5); display: grid; gap: var(--space-3); }
.dialog__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border); }
.sheet { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; background: var(--surface-raised); border-radius: 16px 16px 0 0; box-shadow: var(--shadow-overlay); padding: 8px 0 calc(12px + env(safe-area-inset-bottom, 0px)); max-height: 85vh; overflow: auto; }
.sheet--static { position: relative; }
.sheet__grab { width: 40px; height: 4px; border-radius: 2px; background: var(--surface-muted); margin: 0 auto 4px; }
.sheet__head { display: flex; justify-content: space-between; align-items: center; padding: 0 8px 0 20px; }
.sheet__head h2 { font-size: var(--text-18); }
.sheet__list { list-style: none; padding: 4px 8px; margin: 0; }
.sheet__list a, .sheet__list button { display: flex; gap: 14px; align-items: center; width: 100%; padding: 12px; min-height: 48px; border-radius: var(--radius-md); color: var(--text); text-decoration: none; font: var(--weight-bold) var(--text-16) var(--font-sans); background: none; border: 0; text-align: left; cursor: pointer; }
.sheet__list a:hover, .sheet__list button:hover { background: var(--surface-subtle); }
.sheet__sep { height: 1px; background: var(--border); margin: 6px 12px; }

/* ---------- Consent banner (same on website, public pages and Portal) ---------- */
.consent { position: fixed; z-index: 80; left: 16px; right: 16px; bottom: 16px; max-width: 560px; background: var(--surface-raised); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-overlay); padding: var(--space-5); display: grid; gap: var(--space-3); font-size: var(--text-14); }
.consent--static { position: relative; left: auto; right: auto; bottom: auto; }
.consent h2 { font-size: var(--text-16); }
.consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.consent__actions .btn { width: 100%; }   /* Accept and Reject: same style, same size (KVKK/GDPR) */
.consent__more { text-align: center; }

/* ---------- Ad slot (free plan, platform hosts only, off at launch) ---------- */
.ad-slot { margin-block: var(--space-8); }
.ad-slot__label { font-size: var(--text-12); color: var(--text-muted); letter-spacing: .04em; margin-bottom: 4px; }
.ad-slot__box { height: var(--ad-slot-height); background: var(--surface-subtle); border-radius: var(--radius-md); display: grid; place-items: center; color: var(--text-muted); font-size: var(--text-13); }

/* ---------- Language switch ---------- */
.lang-switch { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 99px; padding: 2px; font-size: var(--text-14); }
.lang-switch a { padding: 6px 12px; min-height: 32px; display: inline-flex; align-items: center; border-radius: 99px; color: var(--text); text-decoration: none; font-weight: var(--weight-bold); }
.lang-switch a[aria-current="true"] { background: var(--action); color: var(--text-on-action); }
.lang-switch a:not([aria-current]):hover { background: var(--surface-subtle); }

/* ---------- Cards and the physical label ---------- */
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-radius); overflow: hidden; color: var(--text); text-decoration: none; min-width: 0; }
.card__media { position: relative; aspect-ratio: 3 / 2; background: var(--surface-subtle); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: var(--space-5); display: grid; gap: var(--space-2); align-content: start; flex: 1; }
.card__body p:not(.label-mock *) { color: var(--text-muted); font-size: var(--text-16); }   /* not the text of a label shown in a card */
.card .facts { grid-template-columns: minmax(0, 1fr); }   /* a card is too narrow for the fact panel's two columns */
a.card:hover { border-color: var(--text); }
a.card:hover h3 { text-decoration: underline; text-underline-offset: .15em; }

/* The label as it is printed: one color, black on white (brand guide 11). Signature element of the site. */
.label-mock { display: grid; grid-template-columns: 34% 1fr; gap: 6%; align-items: center; aspect-ratio: 62 / 29; padding: 4% 5% 4% 3%; background: #fff; color: #000; border-radius: 6px; box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 10px 28px -10px rgba(21,23,28,.45), inset 0 0 0 1px rgba(0,0,0,.06); container-type: inline-size; }
.label-mock__qr svg { width: 100%; height: auto; color: #000; }
.label-mock__cat { font-size: 5.2cqi; font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: .06em; }
.label-mock__name { font-size: 10.5cqi; font-weight: var(--weight-bold); line-height: 1.05; letter-spacing: -.01em; }
.label-mock__sub { font-size: 5.4cqi; font-style: italic; margin-top: 1cqi; }
.label-mock__url { font-family: var(--font-mono); font-size: 4.4cqi; margin-top: 4cqi; }
.label-mock__cat, .label-mock__name, .label-mock__sub, .label-mock__url { display: block; }   /* spans or paragraphs */
.label-mock--metal { background: linear-gradient(135deg, #ECECE8, #CFCFC9 55%, #E6E6E1); }
/* QR label (saas 6.4): the code and the item's short ID under it */
.label-mock--qr-only { grid-template-columns: 1fr; aspect-ratio: auto; width: 40%; padding: 8% 8% 6%; gap: 2cqi; justify-items: center; }
.label-mock--qr-only .label-mock__qr { width: 100%; }
.label-mock__id { display: block; font-family: var(--font-mono); font-feature-settings: "zero" 1; font-size: 17cqi; font-weight: var(--weight-bold); line-height: 1; letter-spacing: .02em; }

/* Phone frame for embedded item pages */
.phone { background: var(--surface-ink); border-radius: 36px; padding: 10px; box-shadow: 0 30px 60px -24px rgba(21,23,28,.45); }
.phone .screen { background: var(--surface); border-radius: 27px; overflow: hidden; aspect-ratio: 9 / 19; position: relative; }
.phone .screen iframe { border: 0; width: 390px; transform-origin: 0 0; position: absolute; inset: 0 auto auto 0; }
.phone .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.breadcrumb { font-size: var(--text-14); }
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--text-muted); }
.breadcrumb a { color: inherit; }

.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; padding: var(--space-5) 40px var(--space-5) 0; font-weight: var(--weight-bold); font-size: var(--text-18); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-70%) rotate(45deg); transition: transform var(--duration-fast); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding-bottom: var(--space-5); color: var(--text-muted); max-width: 65ch; }

/* ---------- Choice card: a radio or checkbox with a title and a line of text; the whole card is the label ---------- */
.choice-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-4); }
.choice-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--space-3); align-content: start; padding: var(--space-4); border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; }
.choice-card:hover { border-color: var(--text); }
.choice-card:has(input:checked) { border: 2px solid var(--text); padding: calc(var(--space-4) - 1px); background: var(--surface-selected); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.choice-card input { grid-row: span 2; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--text); }
.choice-card > :not(input) { grid-column: 2; }
.choice-card__title { font-weight: var(--weight-bold); }
.choice-card__text { font-size: var(--text-14); color: var(--text-muted); }
.choice-card > .choice-card__preview { grid-column: 1 / -1; margin-top: var(--space-3); display: grid; place-items: center; min-height: 140px; padding: var(--space-4); border-radius: var(--radius-md); background: var(--surface-subtle); }
.choice-card__preview .label-mock { width: 100%; }
.choice-card__preview .label-mock--qr-only { width: 40%; }
.choice-card .plan-note { margin-top: var(--space-2); }
/* Shown so the Member knows it exists, never hidden: the radio is disabled and a plan note says where it is */
.choice-card[aria-disabled="true"] { cursor: default; border-style: dashed; }
.choice-card[aria-disabled="true"]:hover { border-color: var(--border-strong); }
.choice-card[aria-disabled="true"] .choice-card__title { color: var(--text-muted); }

/* ---------- Section tabs: each section is its own URL, so links with aria-current, not ARIA tabs ---------- */
.tabs--nav { margin-bottom: var(--space-6); }
.tabs--nav a { font: var(--weight-bold) var(--text-16) var(--font-sans); color: var(--text-muted); text-decoration: none; padding: 12px 14px; min-height: 44px; border-bottom: 3px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; white-space: nowrap; }
.tabs--nav a:hover { color: var(--text); }
.tabs--nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- Toolbar: filters above a table ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; margin-bottom: var(--space-4); }
.toolbar .field { flex: 0 1 200px; }
.toolbar .field--grow { flex: 1 1 300px; }

/* ---------- Pager: real links (?page=2) that work without JavaScript; htmx may add "Show more" ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-5); }
.pager--center { flex-direction: column; justify-content: center; gap: var(--space-4); margin-top: var(--space-6); }
.pager__status { font-size: var(--text-14); color: var(--text-muted); }
.pager ol { display: flex; flex-wrap: wrap; gap: var(--space-1); list-style: none; padding: 0; justify-content: center; }
.pager ol a, .pager ol [aria-current] { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius-md); color: var(--text); text-decoration: none; font-weight: var(--weight-bold); font-size: var(--text-14); }
.pager ol a:hover { background: var(--surface-subtle); }
.pager ol [aria-current="page"] { background: var(--surface-ink); color: var(--text-on-ink); }   /* ink like a selected chip: orange stays for the one primary action */

/* ---------- Split view and tree (Admin catalog). The tree is the ARIA tree pattern: roving tabindex, arrow keys. ---------- */
.split { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 1023px) { .split { grid-template-columns: minmax(0, 1fr); } }
.tree, .tree [role="group"] { list-style: none; margin: 0; padding: 0; }
.tree [role="group"] { padding-left: var(--space-5); }
.tree [role="treeitem"] { outline: 0; }
.tree__row { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--space-2) 0 var(--space-1); border-radius: var(--radius-sm); font-size: var(--text-14); cursor: pointer; }
.tree__row:hover { background: var(--surface-subtle); }
.tree [role="treeitem"]:focus-visible > .tree__row { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.tree [aria-selected="true"] > .tree__row { background: var(--surface-selected); box-shadow: inset 3px 0 0 var(--accent); font-weight: var(--weight-bold); }
.tree [aria-expanded="false"] > [role="group"] { display: none; }
.tree__twist { width: 20px; display: grid; place-items: center; color: var(--text-muted); }
.tree__twist .icon { width: 16px; height: 16px; transition: transform var(--duration-fast) var(--ease-out); }
.tree [aria-expanded="false"] > .tree__row .tree__twist .icon { transform: rotate(-90deg); }
.tree__count { margin-left: auto; font-size: var(--text-13); color: var(--text-muted); font-weight: var(--weight-regular); font-variant-numeric: tabular-nums; }

/* ---------- One-time codes, recovery codes and a QR tile (2FA setup, QR logo choices) ---------- */
.code-input { font-family: var(--font-mono); font-size: var(--text-24); letter-spacing: .3em; text-align: center; max-width: 220px; }
.codes { max-width: 420px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-6); list-style: none; padding: var(--space-4); margin: 0; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); font-family: var(--font-mono); font-feature-settings: "zero" 1; }
.qr-box { width: 100%; max-width: 168px; padding: var(--space-3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.qr-box svg { width: 100%; height: auto; }

/* ---------- Prose additions: figures, tables and code in Markdown-rendered text ---------- */
.prose figure { margin-block: var(--space-8); }
.prose figcaption { font-size: var(--text-14); color: var(--text-muted); margin-top: var(--space-3); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-16); }
.prose th, .prose td { text-align: left; padding: var(--space-3) var(--space-3) var(--space-3) 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-weight: var(--weight-bold); }
.prose code { font-family: var(--font-mono); font-size: .9em; }

/* =====================================================================
   Shell: website (markerpin.com/<lang>/…)
   ===================================================================== */
.site-head { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--border); }
.site-head__bar { display: flex; align-items: center; gap: var(--space-6); height: var(--header-height); }
.site-logo { display: flex; flex: none; }
.site-logo img { height: 28px; width: auto; }
.site-nav { display: flex; gap: 2px; flex: 1; }
.site-nav > ul { display: flex; gap: 2px; list-style: none; padding: 0; margin: 0; }
.site-nav__link { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px; border-radius: var(--radius-md); color: var(--text); text-decoration: none; font: var(--weight-bold) var(--text-16) var(--font-sans); background: none; border: 0; cursor: pointer; }
.site-nav__link:hover { background: var(--surface-subtle); }
.site-nav__link[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.site-nav__link .icon { width: 16px; height: 16px; transition: transform var(--duration-fast); }
.site-nav__link[aria-expanded="true"] .icon { transform: rotate(180deg); }
.site-nav li { position: relative; }
.site-menu { position: absolute; top: calc(100% + 8px); left: 0; width: 560px; display: none; grid-template-columns: 1fr 1fr; gap: 4px; padding: 10px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-overlay); list-style: none; }
.site-nav__link[aria-expanded="true"] + .site-menu { display: grid; }
.site-menu a { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 10px 12px; border-radius: var(--radius-md); text-decoration: none; color: var(--text); }
.site-menu a:hover { background: var(--surface-subtle); }
.site-menu .icon { grid-row: span 2; margin-top: 2px; color: var(--text-accent); }
.site-menu b { font-size: var(--text-16); }
.site-menu span { font-size: var(--text-14); color: var(--text-muted); line-height: 1.35; }
.site-head__end { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.site-lang { display: inline-flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; font-size: var(--text-14); font-weight: var(--weight-bold); padding: 8px 10px; border-radius: var(--radius-md); }
.site-lang:hover { background: var(--surface-subtle); }
.site-lang .icon { width: 18px; height: 18px; }
.site-head__menu { display: none; }
@media (max-width: 1023px) {
  .site-nav, .site-head__end .site-lang, .site-head__end .site-signin { display: none; }
  .site-head__menu { display: inline-grid; }
  .site-head__bar { gap: var(--space-3); }
}
/* Phone menu sheet: full height, groups as accordions, language at the bottom */
.site-sheet { position: fixed; inset: 0; z-index: 60; background: var(--surface); display: flex; flex-direction: column; overflow: auto; }
.site-sheet--static { position: relative; inset: auto; border: 1px solid var(--border); }
.site-sheet__head { display: flex; justify-content: space-between; align-items: center; height: var(--header-height); padding: 0 8px 0 16px; border-bottom: 1px solid var(--border); }
.site-sheet details { border-bottom: 1px solid var(--border); }
.site-sheet summary, .site-sheet__link { display: flex; justify-content: space-between; align-items: center; padding: 16px; font-weight: var(--weight-bold); font-size: var(--text-18); cursor: pointer; list-style: none; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.site-sheet details summary { border-bottom: 0; }
.site-sheet summary::-webkit-details-marker { display: none; }
.site-sheet details ul { list-style: none; padding: 0 16px 12px; margin: 0; }
.site-sheet details a { display: block; padding: 10px 0; color: var(--text); text-decoration: none; }
.site-sheet__foot { margin-top: auto; padding: 16px; display: grid; gap: 10px; }

.site-foot { background: var(--surface-ink); color: var(--text-on-ink); padding: var(--space-16) 0 var(--space-8); font-size: var(--text-14); }
.site-foot a { color: var(--text-on-ink); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot :focus-visible { outline-color: var(--focus-ring-on-ink); }
.site-foot__top { display: grid; grid-template-columns: 1.3fr repeat(5, 1fr); gap: var(--space-8); }
.site-foot__brand img { height: 26px; width: auto; }
.site-foot__brand p { color: var(--text-on-ink-muted); margin-top: var(--space-4); max-width: 28ch; }
.site-foot h2 { font-family: var(--font-mono); font-size: var(--text-12); font-weight: var(--weight-medium); letter-spacing: .08em; text-transform: uppercase; color: var(--text-on-ink-muted); margin-bottom: var(--space-3); }
.site-foot ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.site-foot__base { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid #2A2D35; display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); justify-content: space-between; color: var(--text-on-ink-muted); }
.site-foot__base nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.site-foot__company { color: var(--text-on-ink-muted); font-size: var(--text-13); margin-top: var(--space-4); }
@media (max-width: 1023px) { .site-foot__top { grid-template-columns: repeat(3, 1fr); } .site-foot__brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .site-foot__top { grid-template-columns: repeat(2, 1fr); } }

/* Website sections */
.section { padding: var(--space-24) 0; }
.section--tight { padding: var(--space-16) 0; }
.section--subtle { background: var(--surface-subtle); }
.section--ink { background: var(--surface-ink); color: var(--text-on-ink); }
.section--ink .u-muted, .section--ink .lede { color: var(--text-on-ink-muted); }
.section--ink .eyebrow { color: var(--accent); }   /* orange on ink is 5.75:1 */
.section-head { max-width: 720px; margin-bottom: var(--space-12); display: grid; gap: var(--space-3); }
.section-head p { font-size: var(--text-18); color: var(--text-muted); }
.section--ink .section-head p { color: var(--text-on-ink-muted); }
.grid { display: grid; gap: var(--space-6); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1023px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); } .section { padding: var(--space-16) 0; } .section--tight { padding: var(--space-12) 0; } }

.hero { padding: var(--space-12) 0 var(--space-20); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--space-12); align-items: center; }
.hero h1 { font-size: clamp(2.25rem, 5.6vw, var(--text-56)); font-weight: var(--weight-display); letter-spacing: -0.025em; line-height: 1.04; max-width: 15ch; }
.hero .lede { margin-top: var(--space-5); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.hero__fine { margin-top: var(--space-3); font-size: var(--text-14); color: var(--text-muted); }
@media (max-width: 1023px) { .hero__grid { grid-template-columns: minmax(0, 1fr); } .hero { padding-top: var(--space-8); } }

/* Market hero: photo with ink scrim */
.photo-hero { position: relative; min-height: 520px; display: flex; align-items: flex-end; color: #fff; background: var(--surface-ink); overflow: hidden; }
.photo-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(21,23,28,.86) 0%, rgba(21,23,28,.6) 50%, rgba(21,23,28,.15) 85%), linear-gradient(0deg, rgba(21,23,28,.55), rgba(21,23,28,0) 50%); }
.photo-hero .u-wrap { position: relative; z-index: 2; width: 100%; padding-top: var(--space-16); padding-bottom: var(--space-12); }   /* top: clear of the example tag */
.photo-hero h1 { font-weight: var(--weight-display); font-size: clamp(2.25rem, 5vw, var(--text-48)); max-width: 16ch; }
.photo-hero p { font-size: var(--text-20); max-width: 44ch; margin-top: var(--space-4); color: #E8E9EC; }
.photo-hero a:not(.btn) { color: #fff; }
.photo-hero :focus-visible { outline-color: #fff; }
@media (max-width: 767px) { .photo-hero::before { background: linear-gradient(0deg, rgba(21,23,28,.88), rgba(21,23,28,.62)); } }   /* the text spans the photo on a phone */

/* Numbered steps (How it works) */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8); list-style: none; padding: 0; counter-reset: s; }
.steps > li { counter-increment: s; border-top: 2px solid var(--text); padding-top: var(--space-5); display: grid; gap: var(--space-2); align-content: start; }
.steps > li::before { content: "0" counter(s); font-family: var(--font-mono); font-size: var(--text-14); color: var(--text-accent); font-weight: var(--weight-medium); }
@media (max-width: 767px) { .steps { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); } }

/* Tick lists: a check (or a dash for "the old way") in front of each line */
.ticks { list-style: none; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .35em; width: 12px; height: 7px; border-left: 2.5px solid var(--text); border-bottom: 2.5px solid var(--text); transform: rotate(-45deg); }
.ticks--no li { color: var(--text-muted); }
.ticks--no li::before { width: 12px; height: 0; border-left: 0; border-bottom-color: var(--text-disabled); transform: none; top: .7em; }
.ticks--on-ink li::before { border-color: var(--accent); }

/* Product shot: an item photo with its label, and the live item page in a phone (W2.1, W4.2).
   Stand-in until real photos of labels on items exist (shot list). Always carries an example tag. */
.shot { position: relative; padding: 0 0 40px; margin: 0; }
.shot__photo { position: relative; width: 78%; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-subtle); }
.shot__photo > img { width: 100%; height: 100%; object-fit: cover; }
.shot__label { position: absolute; left: 6%; bottom: 7%; width: 64%; container-type: inline-size; transform: rotate(-2deg); }
.shot__phone { position: absolute; right: 0; bottom: 0; width: 42%; }
@media (max-width: 1023px) { .shot { max-width: 520px; margin-inline: auto; } }

/* Old way / new way */
.ways { align-items: start; }
.ways > div { display: grid; gap: var(--space-5); padding: var(--space-8); border-radius: var(--card-radius); border: 1px solid var(--border); container-type: inline-size; }
.ways__new { border: 2px solid var(--text) !important; }
.static-sign { display: grid; gap: 4px; justify-items: center; padding: 28px 16px; max-width: 380px; background: linear-gradient(135deg, #8A8F98, #6E737C); color: #ECEDEF; border-radius: 6px; font-family: Georgia, serif; letter-spacing: .12em; text-align: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 20px -10px rgba(0,0,0,.4); }
.static-sign span { font-size: var(--text-14); letter-spacing: .04em; font-style: italic; }

/* Pricing teaser on ink */
.price-teaser { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-8) var(--space-12); align-items: center; }
.price-teaser > .u-row { grid-column: 1 / -1; }
@media (max-width: 1023px) { .price-teaser { grid-template-columns: minmax(0, 1fr); } }

/* Example tag in a caption line instead of over a photo */
.example-tag--inline { position: static; flex: none; display: inline-block; margin-right: var(--space-2); background: var(--surface-subtle); }

/* Market page: the example item page, a real 390 px phone layout zoomed into the frame */
.market-example { max-width: 320px; margin-inline: auto; width: 100%; }
.market-example .screen > .public { width: 390px; zoom: calc(300 / 390); }

/* Fact-panel excerpt inside a website card (Item pages) */
.ip-sample { margin-top: var(--space-4); padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md); }
.ip-sample .facts { border-top: 0; }

/* Product render centered in a card's media, until the product photos exist (labels catalog) */
.product-shot { display: grid; place-items: center; height: 100%; padding: var(--space-6); }
.product-shot .label-mock:not(.label-mock--qr-only) { width: 80%; }
.product-shot--pair { grid-template-columns: 2fr 1fr; gap: var(--space-4); align-items: center; }
.product-shot--pair .label-mock, .product-shot--pair .label-mock:not(.label-mock--qr-only) { width: 100%; }

/* A whole panel as one link (Resources, Guides) */
.res-link { color: inherit; text-decoration: none; transition: border-color var(--duration-fast); }
.res-link:hover { border-color: var(--border-strong); }
.res-link:hover .link-arrow { text-decoration: underline; }
.res-link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.res-link__title { font-size: var(--text-20); }

/* A list link with icon, title and one line (404 page), the same shape as the mega menu items */
.nf-link { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3); align-items: start; padding: var(--space-3) 0; min-height: 44px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
li:last-child > .nf-link { border-bottom: 0; }
.nf-link .icon { margin-top: 2px; }
.nf-link b { display: block; }
.nf-link b + span { display: block; font-size: var(--text-14); color: var(--text-muted); }
.nf-link:hover b { text-decoration: underline; }

/* Guide article */
.guide { display: grid; grid-template-columns: minmax(0, 720px); justify-content: center; }
.guide-labels { display: grid; grid-template-columns: 1fr 2fr 2fr; gap: var(--space-5); align-items: end; padding: var(--space-6); background: var(--surface-subtle); border-radius: var(--card-radius); }
.guide-labels .label-mock--qr-only { width: 100%; }
.guide-labels > div > p { font-size: var(--text-13); color: var(--text-muted); margin-top: var(--space-2); text-align: center; }
@media (max-width: 560px) { .guide-labels { grid-template-columns: 1fr 1fr; } .guide-labels > :first-child { grid-column: span 2; max-width: 40%; justify-self: center; } }

/* Help: search and grouped questions with a side table of contents */
.help-search { max-width: 560px; }
.help-group + .help-group { margin-top: var(--space-10); }
.help-group h2 { font-size: var(--text-20); margin-bottom: var(--space-4); }
.help-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-12); align-items: start; }
.help-toc { position: sticky; top: calc(var(--header-height) + var(--space-6)); }
.help-toc ul { list-style: none; padding: 0; display: grid; gap: var(--space-1); }
.help-toc a { display: block; padding: var(--space-2) 0; color: var(--text); text-decoration: none; }
.help-toc a:hover { text-decoration: underline; }
@media (max-width: 1023px) { .help-layout { grid-template-columns: minmax(0, 1fr); } .help-toc { display: none; } }

/* Changelog: a date column beside each entry */
.changelog { list-style: none; padding: 0; margin: 0; }
.changelog > li { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--space-8); padding-block: var(--space-8); border-top: 1px solid var(--border); }
.changelog > li:first-child { border-top: 0; padding-top: 0; }
.changelog time { font-family: var(--font-mono); font-size: var(--text-14); color: var(--text-muted); padding-top: var(--space-1); }
.changelog h2 { font-size: var(--text-24); }
.changelog__items { list-style: none; padding: 0; display: grid; gap: var(--space-4); margin-top: var(--space-5); }
.changelog__items li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.changelog__items .badge { justify-self: start; }
@media (max-width: 767px) {
  .changelog > li { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .changelog__items li { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); }
}

/* Legal template: sticky table of contents, print-friendly */
.legal-head { max-width: 760px; }
.legal-head .alert { margin-top: var(--space-6); }
.legal { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: var(--space-12); align-items: start; margin-top: var(--space-10); }
.legal-toc { position: sticky; top: calc(var(--header-height) + var(--space-6)); }
.legal-toc h2 { font-size: var(--text-14); margin-bottom: var(--space-2); }
.legal-toc ol { list-style: none; padding: 0; margin: 0; display: grid; }
.legal-toc a { display: block; padding: var(--space-2) 0; color: var(--text); text-decoration: none; font-size: var(--text-14); line-height: 1.35; }
.legal-toc a:hover { text-decoration: underline; }
.legal .prose { max-width: none; }
.legal .prose h2:first-child { margin-top: 0; }
.legal-note { color: var(--text-muted); }
@media (max-width: 1023px) {
  .legal { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .legal-toc { position: static; padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--card-radius); }
}
@media print {
  .site-head, .site-sheet, .site-foot, .skip-link, .breadcrumb, .legal-toc, .legal-print, .consent { display: none !important; }
  .section { padding: 0 !important; }
  .legal { display: block; margin-top: var(--space-6); }
  .prose a::after { content: " (" attr(href) ")"; font-size: .85em; }
}
.cookie-table { width: 100%; border-collapse: collapse; font-size: var(--text-14); min-width: 640px; }
.cookie-table th, .cookie-table td { text-align: left; vertical-align: top; padding: var(--space-3); border-bottom: 1px solid var(--border); }
.cookie-table thead th { font-weight: var(--weight-bold); background: var(--surface-subtle); }
.cookie-table th[scope="row"] { font-weight: var(--weight-medium); white-space: nowrap; }

/* Media kit: a logo tile on light, fog or ink, and download links */
.kit-tile { display: grid; place-items: center; aspect-ratio: 16 / 9; padding: var(--space-8); background: var(--surface); border-bottom: 1px solid var(--border); }
.kit-tile img { max-width: 70%; max-height: 60%; }
.kit-tile--ink { background: var(--surface-ink); }
.kit-tile--subtle { background: var(--surface-subtle); }
.kit-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.kit-links a { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; }

/* Pricing: the comparison as one plan at a time below 768 px (plan picker), equal plan columns, buttons at the bottom */
.compare-picker { display: none; }
.compare-picker > section + section { margin-top: var(--space-10); }
.compare-picker h3 { margin-bottom: var(--space-2); }
@media (max-width: 767px) { .compare-matrix { display: none; } .compare-picker { display: block; } }
.plan-card > .btn { margin-top: auto; white-space: normal; text-align: center; padding-block: var(--space-2); }
.compare { table-layout: fixed; }
.compare thead th:first-child { width: 28%; }

/* Page layouts of single website pages. Each is used on the one page named. */
/* web-how-it-works: one step per row, text beside its screen */
.hiw { grid-template-columns: minmax(0, 1fr); gap: var(--space-16); }
.hiw > li { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
.hiw > li::before { grid-column: 1 / -1; }
.hiw__text { display: grid; gap: var(--space-3); align-content: start; }
@media (min-width: 960px) { .hiw > li { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-12); align-items: start; } }
/* web-portal: text beside its screen */
.pt-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); align-items: center; }
.pt-phone { margin: 0; max-width: 300px; width: 100%; margin-inline: auto; }
@media (min-width: 960px) { .pt-row { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-12); } }
/* web-item-pages: the example phones */
.ip-phone { margin: 0; max-width: 320px; width: 100%; margin-inline: auto; display: grid; gap: var(--space-3); text-align: center; }
.ip-pair { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); max-width: 560px; width: 100%; margin-inline: auto; }
.ip-types .card__body { display: grid; align-content: start; gap: var(--space-2); }
.ip-steps { padding-left: 1.2em; font-weight: var(--weight-regular); }
/* web-labels-product: hero labels, the four label types, the QR logo choices */
.lp-hero { margin: 0; display: grid; gap: var(--space-5); max-width: 440px; width: 100%; margin-inline: auto; }
.lp-hero .label-mock--metal { width: 86%; justify-self: end; }
.lp-hero figcaption { display: flex; gap: var(--space-2); align-items: baseline; }
.lp-types { list-style: none; padding: 0; }
.lp-types .card__body { display: grid; gap: var(--space-2); align-content: start; height: 100%; }
.lp-type__mock { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; min-height: 140px; padding: var(--space-4); background: var(--surface-subtle); border-radius: var(--radius-md); margin-bottom: var(--space-2); }
.lp-type__mock .label-mock { width: 100%; }
.lp-type__mock .label-mock--qr-only { width: 42%; justify-self: center; }
.lp-custom { grid-template-columns: 1fr 34%; }
.lp-custom > .label-mock__qr { order: 2; }
.lp-plan { margin-top: auto; }
.lp-qrs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); text-align: center; }
.lp-qrs li { display: grid; gap: var(--space-3); justify-items: center; }
/* web-brand-domain: before and after, and the address map */
.bd-ba { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); justify-content: center; gap: var(--space-8); }
.bd-ba figure { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.bd-ba figcaption { display: grid; gap: 2px; text-align: center; overflow-wrap: anywhere; }
.bd-ba figcaption .u-mono { font-size: var(--text-12); }
.bd-note { text-align: center; margin-top: var(--space-6); }
.bd-map { margin-top: var(--space-12); align-items: start; }
.bd-addr { display: grid; gap: var(--space-3); margin: 0; }
.bd-addr dt { font-size: var(--text-14); color: var(--text-muted); }
.bd-addr dd { margin: 2px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.bd-addr .icon { color: var(--text-muted); }
.bd-compare { min-width: 560px; }
@media (max-width: 599px) { .bd-ba { gap: var(--space-4); } }
/* web-security: export contents, a description list rather than links */
.bd-file { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); }

/* =====================================================================
   Shell: public pages (item, collection, profile). Neutral; subscriber-themable.
   ===================================================================== */
.public { background: var(--surface); }
.pub-top { border-bottom: 1px solid var(--border); background: var(--surface); }
.pub-top__bar { max-width: var(--reading-width); margin: 0 auto; padding: 0 var(--space-4); height: 60px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.pub-top__brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: var(--weight-bold); font-size: var(--text-16); min-width: 0; }
.pub-top__brand img { max-height: var(--logo-max-height); max-width: 180px; width: auto; }
.pub-top__brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-main { max-width: var(--reading-width); margin: 0 auto; padding: 0 0 var(--space-12); }
.pub-section { padding: 0 var(--space-4); margin-top: var(--space-8); }
.pub-foot { border-top: 1px solid var(--border); background: var(--surface-subtle); font-size: var(--text-14); color: var(--text-muted); }
.pub-foot__in { max-width: var(--reading-width); margin: 0 auto; padding: var(--space-6) var(--space-4) calc(var(--space-8) + env(safe-area-inset-bottom, 0px)); display: grid; gap: var(--space-4); }
.pub-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pub-foot a { color: var(--text); }
.pub-foot button.linklike { color: var(--text); }
/* Platform credit: plans without own branding only. MarkerPin's own part of the page, so it uses the brand. */
.pub-credit { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-size: var(--text-13); }
.pub-credit img { height: 18px; width: auto; }

/* Item page */
.item-cover { position: relative; aspect-ratio: 4 / 3; background: var(--surface-subtle); overflow: hidden; }
.item-cover img { width: 100%; height: 100%; object-fit: cover; }
.item-cover__count { position: absolute; right: 12px; bottom: 12px; background: rgba(21,23,28,.78); color: #fff; font-size: var(--text-13); font-weight: var(--weight-bold); padding: 4px 10px; border-radius: 99px; display: flex; gap: 6px; align-items: center; text-decoration: none; }
.item-cover__count .icon { width: 14px; height: 14px; }
.item-head { padding: var(--space-5) var(--space-4) 0; display: grid; gap: var(--space-2); }
.item-head__cat { font-size: var(--text-14); font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.item-head h1 { font-size: clamp(var(--text-32), 8vw, var(--text-40)); font-weight: var(--weight-display); letter-spacing: -0.02em; line-height: 1.08; }
.item-head__sub { font-style: italic; color: var(--text-muted); font-size: var(--text-18); }
.item-head__summary { font-size: var(--text-20); line-height: 1.5; margin-top: var(--space-2); }
.more-list { list-style: none; padding: 0; border-top: 1px solid var(--border); }
.item-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); min-height: 72px; }
.item-row img, .item-row__ph { width: 64px; height: 64px; border-radius: var(--radius-md); object-fit: cover; background: var(--surface-subtle); display: grid; place-items: center; color: var(--text-muted); }
.item-row__cat { font-size: var(--text-13); color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: var(--weight-bold); }
.item-row__name { font-weight: var(--weight-bold); font-size: var(--text-18); line-height: 1.25; }
.item-row__sum { display: block; font-size: var(--text-14); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-row .icon { color: var(--text-muted); }
.item-row:hover .item-row__name { text-decoration: underline; }
.report-link { display: inline-flex; gap: 8px; align-items: center; color: var(--text-muted); font-size: var(--text-14); }
.report-link .icon { width: 16px; height: 16px; }

/* Wider public page for lists: the collection page has two columns of rows from 1024 px (UI 2.2) */
.public--wide .pub-top__bar, .public--wide .pub-main, .public--wide .pub-foot__in { max-width: var(--website-width); }
.item-list { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--space-8); }
@media (min-width: 1024px) { .item-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Profile head (UI 2.3): round 96 px photo, display name, description clamped to four lines with "Read more" */
.profile-head { display: grid; gap: var(--space-4); justify-items: start; padding: var(--space-8) var(--space-4) 0; }
.profile-head__photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--surface-subtle); }
.profile-head h1 { font-size: clamp(var(--text-32), 8vw, var(--text-40)); font-weight: var(--weight-display); letter-spacing: -0.02em; line-height: 1.08; }
.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.profile-bio:has([aria-expanded="true"]) .clamp { display: block; }

/* =====================================================================
   Shell: Portal (portal.markerpin.com). MarkerPin-branded on every plan.
   ===================================================================== */
.portal { display: grid; grid-template-columns: var(--portal-sidebar-width) minmax(0, 1fr); min-height: 100vh; background: var(--surface-subtle); }
.p-side { background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow: auto; }
.p-side__logo { display: flex; align-items: center; height: 64px; padding: 0 20px; }
.p-side__logo img { height: 24px; width: auto; }
.switcher { margin: 0 12px 12px; position: relative; }
.switcher__btn { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; text-align: left; font-family: inherit; color: var(--text); }
.switcher__btn:hover { border-color: var(--text); }
.switcher__avatar { width: 32px; height: 32px; border-radius: var(--radius-md); background: var(--surface-ink); color: #fff; display: grid; place-items: center; font-weight: var(--weight-bold); font-size: var(--text-14); overflow: hidden; }
.switcher__avatar img { width: 100%; height: 100%; object-fit: cover; }
.switcher__avatar--muted { background: var(--text-muted); }   /* every subscription but the first */
.switcher__name { font-weight: var(--weight-bold); font-size: var(--text-14); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.switcher__role { font-size: var(--text-12); color: var(--text-muted); display: block; }
.switcher__menu { position: absolute; z-index: 30; left: 0; right: -60px; top: calc(100% + 4px); background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-overlay); padding: 6px; list-style: none; margin: 0; }
.switcher__menu a { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 8px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); }
.switcher__menu a:hover, .switcher__menu a[aria-current="true"] { background: var(--surface-subtle); }
.p-nav { list-style: none; padding: 0 8px; margin: 0; display: grid; gap: 2px; }
.p-nav a { display: flex; gap: 12px; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--radius-md); color: var(--text); text-decoration: none; font-weight: var(--weight-bold); font-size: var(--text-14); }
.p-nav a:hover { background: var(--surface-subtle); }
.p-nav a[aria-current="page"] { background: var(--surface-subtle); box-shadow: inset 3px 0 0 var(--accent); }
.p-nav .icon { color: var(--text-muted); }
.p-nav a[aria-current="page"] .icon { color: var(--text); }
.p-nav__group { font-family: var(--font-mono); font-size: var(--text-12); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); padding: 18px 12px 6px; }
.p-side__foot { margin-top: auto; padding: 12px 8px 16px; border-top: 1px solid var(--border); }
.p-body { min-width: 0; display: flex; flex-direction: column; }
.p-top { position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-6); background: var(--surface); border-bottom: 1px solid var(--border); }
.p-top__search { flex: 1; max-width: 420px; }
.p-top__search .input-group { border-color: var(--border); }
.p-top__end { margin-left: auto; display: flex; gap: var(--space-1); align-items: center; }
.p-top__phone { display: none; }
.avatar { text-decoration: none; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-muted); display: grid; place-items: center; font-weight: var(--weight-bold); font-size: var(--text-14); color: var(--text); border: 0; cursor: pointer; }
.p-main { padding: var(--space-8) var(--space-6) var(--space-16); max-width: 1180px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; align-items: flex-end; margin-bottom: var(--space-6); }
.page-head h1 { font-size: var(--text-32); }
.page-head__crumbs { font-size: var(--text-14); color: var(--text-muted); margin-bottom: 4px; }
.page-head__crumbs a { color: var(--text-muted); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-radius); padding: var(--space-6); }
.panel + .panel { margin-top: var(--space-5); }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-5); flex-wrap: wrap; }
.panel__head h2 { font-size: var(--text-20); }
.panel__head p { color: var(--text-muted); font-size: var(--text-14); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-radius); padding: var(--space-5); display: grid; gap: 4px; }
.stat__label { font-size: var(--text-14); color: var(--text-muted); }
.stat__value { font-size: var(--text-32); font-weight: var(--weight-display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; line-height: 1.1; }
.stat__delta { font-size: var(--text-13); color: var(--text-muted); }
/* Staff banner: persistent, not dismissible while assigned (saas 1.7) */
.staff-banner { display: flex; gap: 10px; align-items: center; padding: 10px var(--space-6); background: var(--surface-ink); color: #fff; font-size: var(--text-14); }
.staff-banner .icon { color: var(--accent); }
.staff-banner a { color: #fff; font-weight: var(--weight-bold); margin-left: auto; white-space: nowrap; }
.staff-banner :focus-visible { outline-color: #fff; }
/* Admin area marker */
.admin-mark { display: inline-flex; gap: 6px; align-items: center; font-family: var(--font-mono); font-size: var(--text-12); letter-spacing: .08em; text-transform: uppercase; color: var(--text-accent); }
/* Sticky status bar of editors: top on desktop, bottom on a phone */
.statusbar { position: sticky; top: 64px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: 10px var(--space-6); background: rgba(255,255,255,.97); border-bottom: 1px solid var(--border); }
.statusbar__save { font-size: var(--text-14); color: var(--text-muted); display: inline-flex; gap: 6px; align-items: center; }
.statusbar__save .icon { width: 16px; height: 16px; }
.statusbar__end { margin-left: auto; display: flex; gap: var(--space-2); align-items: center; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: var(--space-8); align-items: start; }
.editor__toc { position: sticky; top: 140px; font-size: var(--text-14); }
.editor__toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; border-left: 2px solid var(--border); }
.editor__toc a { display: block; padding: 6px 12px; color: var(--text-muted); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.editor__toc a:hover { color: var(--text); }
.editor__toc a[aria-current="true"] { color: var(--text); border-left-color: var(--accent); font-weight: var(--weight-bold); }
.editor-section { scroll-margin-top: 150px; }
.editor-section h2 { font-size: var(--text-20); display: flex; align-items: center; gap: 10px; }
.editor-section h2 .num { font-family: var(--font-mono); font-size: var(--text-13); color: var(--text-accent); font-weight: var(--weight-medium); }
.kept-group { border: 1px dashed var(--border-strong); border-radius: var(--radius-md); }
.kept-group summary { padding: 12px 14px; cursor: pointer; font-weight: var(--weight-bold); font-size: var(--text-14); }
.kept-group > div { padding: 0 14px 14px; display: grid; gap: var(--space-4); }
/* Phone bottom navigation: Collections, Labels, Scans, More */
.p-bottom { display: none; }
@media (max-width: 1023px) {
  .portal { grid-template-columns: minmax(0, 1fr); }
  .p-side { display: none; }
  .p-top { padding: 0 var(--space-2) 0 var(--space-3); }
  .p-top__search { display: none; }
  .p-top__phone { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
  .p-top__phone .switcher { margin: 0; flex: 1; min-width: 0; }
  .p-top__phone .switcher__btn { border: 0; padding: 6px 4px; }
  .p-main { padding: var(--space-5) var(--space-4) calc(96px + env(safe-area-inset-bottom, 0px)); }
  .page-head h1 { font-size: var(--text-24); }
  .panel { padding: var(--space-4); }
  .staff-banner { padding: 10px var(--space-4); align-items: flex-start; }
  .p-bottom { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .p-bottom a, .p-bottom button { display: grid; justify-items: center; gap: 2px; padding: 8px 0 10px; min-height: 60px; color: var(--text-muted); text-decoration: none; font: var(--weight-bold) var(--text-12) var(--font-sans); background: none; border: 0; cursor: pointer; }
  .p-bottom .icon { width: 24px; height: 24px; }
  .p-bottom [aria-current="page"] { color: var(--text); box-shadow: inset 0 3px 0 var(--accent); }
  .editor { grid-template-columns: minmax(0, 1fr); }
  .editor__toc { display: none; }
  .statusbar { position: fixed; top: auto; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; padding: 8px var(--space-3); border-top: 1px solid var(--border); border-bottom: 0; }
  .statusbar .badge, .statusbar__view-label { display: none; }
  .p-main--editor { padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 1024px) { .u-phone-only { display: none !important; } }
@media (max-width: 1023px) { .u-desktop-only { display: none !important; } }

/* =====================================================================
   Shell: authentication (portal.markerpin.com/signin etc.)
   ===================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth__form { display: flex; flex-direction: column; padding: var(--space-6) var(--space-6) var(--space-12); }
.auth__form > header { display: flex; justify-content: space-between; align-items: center; }
.auth__form > header img { height: 26px; width: auto; }
.auth__card { width: 100%; max-width: 420px; margin: auto; padding-top: var(--space-10); display: grid; gap: var(--space-5); }
.auth__card h1 { font-size: var(--text-32); }
.auth__art { position: relative; background: var(--surface-ink); overflow: hidden; }
.auth__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.auth__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(21,23,28,.9), rgba(21,23,28,0) 55%); }
.auth__art p { z-index: 1; position: absolute; left: 48px; right: 48px; bottom: 48px; color: #fff; font-size: var(--text-24); font-weight: var(--weight-bold); line-height: 1.3; max-width: 22ch; }
@media (max-width: 900px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth__art { display: none; } }

/* =====================================================================
   Mockup scaffolding. Never shipped: these exist only in the design files.
   ===================================================================== */
/* State divider: a mockup page shows its other states below the main one, each after this label
   (PAGES.md, states checklist). <p class="state-divider">State: …</p> */
.state-divider { margin: var(--space-12) 0 var(--space-5); padding-top: var(--space-3); border-top: 2px dashed var(--border-strong); font: var(--weight-medium) var(--text-12)/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.pub-main .state-divider { margin-inline: var(--space-4); }

/* Browser frame: an iframe of a 1280 px wide mockup, scaled to fit by mock.js (website product pages) */
.browser { margin: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-raised); overflow: hidden; }
.browser__bar { display: flex; align-items: center; height: 36px; padding: 0 var(--space-3); background: var(--surface-subtle); border-bottom: 1px solid var(--border); }
.browser__bar::before { content: ""; width: 44px; height: 10px; background: radial-gradient(circle 5px at 5px 5px, var(--border-strong) 98%, transparent) 0 0 / 17px 10px repeat-x; flex: none; }
.browser__url { flex: 1; max-width: 320px; margin-inline: auto; font-family: var(--font-mono); font-size: var(--text-12); color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-full); padding: 3px 12px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser__screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); }
.browser__screen iframe { position: absolute; inset: 0 auto auto 0; width: 1280px; border: 0; transform-origin: 0 0; }

/* components.html: layout of the reference page */
.cx { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.cx-nav { position: sticky; top: 0; height: 100vh; overflow: auto; padding: var(--space-5) var(--space-4); border-right: 1px solid var(--border); font-size: var(--text-14); }
.cx-nav img { height: 24px; width: auto; margin-bottom: var(--space-1); }
.cx-nav p { color: var(--text-muted); margin-bottom: var(--space-4); }
.cx-nav ol { list-style: none; padding: 0; display: grid; gap: 2px; }
.cx-nav a { color: var(--text); text-decoration: none; display: block; padding: 3px var(--space-2); border-radius: var(--radius-sm); }
.cx-nav a:hover { background: var(--surface-subtle); }
.cx-main { padding: var(--space-10) var(--space-12) 120px; max-width: 1080px; }
.cx-main > h1 { font-size: var(--text-40); font-weight: var(--weight-display); letter-spacing: -.02em; }
.cx-main > .lede { max-width: 60ch; margin-top: var(--space-2); }
.cx-sec { padding-top: 56px; scroll-margin-top: var(--space-4); }
.cx-sec > h2 { font-size: var(--text-24); display: flex; gap: var(--space-3); align-items: baseline; }
.cx-sec > h2 small { font: var(--weight-medium) var(--text-12) var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-accent); }
.cx-sec > p { color: var(--text-muted); max-width: 70ch; margin-top: 6px; }
.cx-demo { margin-top: var(--space-4); padding: var(--space-6); border: 1px solid var(--border); border-radius: var(--radius-lg); display: grid; gap: var(--space-5); }
.cx-demo--subtle { background: var(--surface-subtle); }
.cx-demo--ink { background: var(--surface-ink); }
.cx-demo--ink .cx-cap { color: var(--text-on-ink-muted); }
.cx-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.cx-cap { font: var(--weight-medium) var(--text-12) var(--font-mono); color: var(--text-muted); letter-spacing: .04em; display: block; margin-bottom: 6px; }
.cx-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.cx-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.cx-swatch { display: grid; gap: var(--space-1); font-size: var(--text-13); }
.cx-swatch i { display: block; height: 56px; border-radius: var(--radius-md); border: 1px solid var(--border); }
.cx-hover { background: var(--action-hover) !important; }
.cx-focus { outline: 2px solid var(--focus-ring) !important; outline-offset: 2px; }
@media (max-width: 900px) { .cx { grid-template-columns: 1fr; } .cx-nav { display: none; } .cx-main { padding: var(--space-6) var(--space-4) var(--space-20); } .cx-grid2, .cx-grid3 { grid-template-columns: 1fr; } }

/* index.html: the overview of every file */
.idx { max-width: var(--website-width); margin: 0 auto; padding: var(--space-10) var(--space-4) var(--space-24); }
.idx header img { height: 28px; width: auto; }
.idx h1 { font-size: var(--text-40); font-weight: var(--weight-display); letter-spacing: -.02em; margin-top: var(--space-6); }
.idx-found { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3); margin-top: var(--space-8); }
.idx-found a { display: grid; gap: var(--space-1); padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-lg); text-decoration: none; color: var(--text); }
.idx-found a:hover { border-color: var(--text); }
.idx-found small, .idx-group small { color: var(--text-muted); font-size: var(--text-13); }
.idx-group { margin-top: var(--space-10); }
.idx-group h2 { font-size: var(--text-20); padding-bottom: var(--space-2); border-bottom: 1px solid var(--border); }
.idx-group ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-1) var(--space-6); margin-top: var(--space-3); }
.idx-group li { display: grid; gap: 2px; padding: var(--space-2) 0; font-size: var(--text-14); line-height: 1.4; }
.idx-group li a { font-weight: var(--weight-bold); font-family: var(--font-mono); color: var(--text); }
.idx-group li .idx-missing { font-family: var(--font-mono); color: var(--text-muted); }
.idx-group li .idx-tags { font-family: var(--font-mono); font-size: var(--text-12); color: var(--text-muted); }

/* Action menu: the list under a "More actions" icon button (item editor), opened with data-toggle="hidden".
   Its parent sets position: relative. */
.menu { position: absolute; z-index: 30; right: 0; top: calc(100% + 4px); min-width: 240px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-overlay); padding: 6px; list-style: none; margin: 0; }
.menu a, .menu button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px; border: 0; background: none; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); font: inherit; font-size: var(--text-14); text-align: left; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--surface-subtle); }
