/* ERPeace components. Colours, fonts and sizes come from tokens.css; nothing here names a colour of its own. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: var(--fs-body)/1.55 var(--font); -webkit-font-smoothing: antialiased; }
:is(:lang(ar), :lang(ur)) body, body:is(:lang(ar), :lang(ur)) { font-family: var(--font-ar); line-height: 1.7; }
a { color: var(--link); text-underline-offset: .18em; }
h1, h2, h3 { color: var(--heading); line-height: 1.25; font-weight: 700; }
h1 { font-family: var(--font-head); font-weight: 800; font-size: var(--fs-h1); margin: .1rem 0 .35rem; letter-spacing: -.01em; }
h2 { font-size: var(--fs-h2); margin: 0 0 .8rem; }
h3 { font-size: var(--fs-h3); margin: 0 0 .5rem; }
:is(:lang(ar), :lang(ur)) h1 { letter-spacing: 0; font-family: var(--font-ar); font-weight: 700; }
p { margin: 0 0 .8rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sprite { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.quiet { color: var(--muted); }
.small { font-size: var(--fs-small); }
.tiny { font-size: .75rem; }
.warn-text { color: var(--warn); }
[dir="rtl"] .flip { transform: scaleX(-1); }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 50; padding: .6rem 1rem; border-radius: var(--radius-btn); background: var(--brand); color: var(--on-brand); }
.skip:focus { top: 1rem; }

/* ------------------------------------------------------------------ the shell: side menu, top bar, page */
body.with-side { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); background: linear-gradient(to right, var(--nav) var(--side-w), var(--bg) 0); }
[dir="rtl"] body.with-side { background: linear-gradient(to left, var(--nav) var(--side-w), var(--bg) 0); }
.frame { min-width: 0; display: flex; flex-direction: column; min-height: 100vh;
  background: radial-gradient(38rem 26rem at 0% 0%, var(--glow-warm), transparent 70%), radial-gradient(44rem 30rem at 100% 0%, var(--glow-cool), transparent 70%); }
main { width: 100%; max-width: 1200px; margin: 0 auto; padding: var(--space-5) var(--space-5) var(--space-6); flex: 1; outline: none; }
.bare main { max-width: 1100px; }
.legal { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-5) var(--space-5); text-align: center; }

.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-4);
  padding: var(--space-4) var(--space-3); background: var(--nav); color: var(--on-nav); }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: var(--space-1) var(--space-2) var(--space-2); }
.brand { display: inline-flex; align-items: center; border-radius: 8px; }
.brand .logo-row { display: block; height: 2.6rem; width: auto; }
.side :focus-visible { outline-color: var(--on-nav); }
.side-nav { display: grid; gap: 2px; }
.side-link { display: flex; align-items: center; gap: var(--space-3); min-height: 2.6rem; padding: .45rem var(--space-3); border-radius: var(--radius-btn);
  color: var(--nav-muted); text-decoration: none; font-weight: 600; font-size: .95rem; position: relative; }
.side-link .ico { flex: none; opacity: .9; }
.side-label { flex: 1; min-width: 0; }
a.side-link:hover { background: var(--nav-hover); color: var(--on-nav); }
.side-link.on { background: var(--nav-on-bg); color: var(--on-nav); }
.side-link.on::before { content: ''; position: absolute; inset-inline-start: -.75rem; top: .55rem; bottom: .55rem; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
[dir="rtl"] .side-link.on::before { border-radius: 4px 0 0 4px; }
.side-link.on .ico { color: var(--accent); opacity: 1; }
.side-link.soon { opacity: .55; cursor: default; }
.soon-tag { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: .05rem .45rem; border-radius: var(--radius-pill); border: 1px solid currentColor; }
:is(:lang(ar), :lang(ur)) .soon-tag { text-transform: none; letter-spacing: 0; font-size: .75rem; }
.side-head { margin: var(--space-4) var(--space-3) var(--space-1); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--nav-muted); }
:is(:lang(ar), :lang(ur)) .side-head { text-transform: none; letter-spacing: 0; font-size: .8rem; }
.side-foot { margin: auto var(--space-3) 0; font-size: .8rem; color: var(--nav-muted); display: grid; gap: var(--space-2); }
.gold-rule { display: block; width: 2rem; height: 3px; border-radius: 3px; background: var(--amber); }
.icon-btn.side-close, .scrim { display: none; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--space-3); min-height: 4rem; padding: var(--space-2) var(--space-5);
  background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--glass-line); }
.bare .topbar { background: var(--bar); color: var(--on-bar); border-bottom: 0; }
.bare .topbar :focus-visible { outline-color: var(--on-bar); }
.top-tools { margin-inline-start: auto; display: flex; align-items: center; gap: var(--space-2); }
.icon-btn.menu-btn { display: none; }
.icon-btn { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--radius-btn); color: inherit; text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); }
.side .icon-btn:hover { background: var(--nav-hover); }
.chip-btn { font: inherit; font-size: var(--fs-small); font-weight: 600; padding: .4rem .8rem; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.chip-btn:hover { border-color: var(--brand); }
.bare .chip-btn { background: transparent; color: var(--on-bar); border-color: rgba(255, 255, 255, .45); }
.lang-btn { display: inline-flex; align-items: center; gap: .4rem; }
.lang-menu { min-width: 12rem; }
.lang-menu .pop-item[dir=rtl] { text-align: end; }

/* Search */
.search { position: relative; flex: 1; max-width: 28rem; }
.search .ico { position: absolute; inset-inline-start: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-inline-start: 2.4rem; border-radius: var(--radius-btn); background: var(--glass); border-color: var(--glass-line); }
.search input:focus { background: var(--card); }

/* Pop-up menus (company switcher, account) */
.pop { position: relative; }
.pop > summary { list-style: none; cursor: pointer; }
.pop > summary::-webkit-details-marker { display: none; }
.pop-menu { position: absolute; z-index: 30; top: calc(100% + .4rem); inset-inline-start: 0; min-width: 16rem; max-height: 70vh; overflow-y: auto; display: grid; gap: 2px; padding: var(--space-2);
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-hover); }
.pop-menu.end { inset-inline-start: auto; inset-inline-end: 0; }
.pop-item { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: .55rem var(--space-3); border: 0; border-radius: var(--radius-btn); background: none;
  font: inherit; color: var(--text); text-decoration: none; text-align: start; cursor: pointer; }
.pop-item:hover { background: var(--surface-2); }
.pop-item.on { background: var(--brand-soft); font-weight: 600; }
.pop-item.all { color: var(--link); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-btn) var(--radius-btn); margin-top: var(--space-1); }
.pop-note { padding: .4rem var(--space-3); margin: 0; }
.pop-who { display: grid; padding: var(--space-2) var(--space-3) var(--space-3); border-bottom: 1px solid var(--line); margin-bottom: var(--space-1); overflow-wrap: anywhere; }
.switch-btn { display: flex; align-items: center; gap: var(--space-3); padding: .35rem var(--space-3) .35rem .35rem; border: 1px solid var(--line); border-radius: var(--radius-btn); background: var(--card); max-width: 17rem; }
.switch-btn:hover { border-color: var(--brand); }
.switch-text { display: grid; min-width: 0; line-height: 1.2; }
.switch-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-btn .ico { color: var(--muted); margin-inline-start: .35rem; }
.chev { flex: none; color: var(--muted); transition: transform calc(.15s * var(--motion, 1)); }
.pop[open] .chev { transform: rotate(180deg); }
.avatar-btn { display: block; border-radius: 50%; }
.avatar { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; font-size: .85rem;
  box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--amber); }
.theme-pick { display: grid; gap: var(--space-1); padding: var(--space-2) var(--space-3); margin: 0; }
.segmented { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; padding: 3px; border-radius: var(--radius-btn); background: var(--surface-2); }
.segmented button { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; padding: .35rem .4rem; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--card); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }

/* ------------------------------------------------------------------ building blocks */
.inline { display: inline; margin: 0; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.6rem; padding: .5rem 1.05rem; border-radius: var(--radius-btn);
  border: 1px solid var(--line-strong); background: var(--card); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color calc(.15s * var(--motion, 1)), border-color calc(.15s * var(--motion, 1)), box-shadow calc(.15s * var(--motion, 1)); }
.btn:hover { border-color: var(--link); }
.btn:not(.primary):not(.ghost):not(.danger) { background: var(--glass); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.btn.primary { background: var(--brand-grad); color: var(--on-brand); border-color: transparent; box-shadow: var(--brand-glow); }
.btn.primary:hover { box-shadow: var(--brand-glow), var(--brand-glow); filter: brightness(1.05); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--link); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.small { min-height: 2.1rem; padding: .3rem .75rem; font-size: var(--fs-small); }
.btn.wide { width: 100%; min-height: 3rem; font-size: 1.05rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; box-shadow: none; filter: none; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--space-5); margin: var(--space-5) 0; }
.card > :last-child { margin-bottom: 0; }
.card.narrow { max-width: 34rem; margin-inline: auto; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.card-head h2 { margin: 0; }
.flash { display: flex; gap: var(--space-2); align-items: flex-start; padding: .75rem 1rem; border-radius: var(--radius-btn); background: var(--ok-soft); color: var(--ok); border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.flash.error { background: var(--danger-soft); color: var(--danger); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash.info { background: var(--info-soft); color: var(--info-text); }
.badge { display: inline-block; padding: .05rem .55rem; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 600; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
/* Status chips: the dot carries the colour as well as the words, never the colour alone */
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .12rem .6rem; border-radius: var(--radius-pill); font-size: .78rem; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--muted); }
.chip .dot { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.info { background: var(--info-soft); color: var(--info-text); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.dev .dot { background: none; border: 2px solid currentColor; width: .55rem; height: .55rem; }
.crumbs { margin: 0 0 .5rem; font-size: var(--fs-small); }
.crumbs a { text-decoration: none; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin-bottom: var(--space-4); }
.page-head > div { min-width: 0; }
.page-head p { margin: 0; }
.page-head > .actions { margin-inline-start: auto; }
.page-head .co-logo, .page-head .co-mono { width: 3.5rem; height: 3.5rem; font-size: 1.1rem; }
.eyebrow { margin: 0 0 .2rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
:is(:lang(ar), :lang(ur)) .eyebrow { letter-spacing: 0; text-transform: none; font-size: .85rem; }

/* Forms */
.stack { display: grid; gap: var(--space-4); margin-bottom: var(--space-4); }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain > li { justify-content: space-between; padding-block: .25rem; border-bottom: 1px solid var(--line); }
ul.plain > li:last-child { border-bottom: 0; }
label { display: grid; gap: .35rem; font-weight: 600; }
label.check { display: flex; align-items: center; gap: .6rem; font-weight: 400; }
.hint { font-weight: 400; font-size: var(--fs-small); color: var(--muted); }
input, textarea, select { font: inherit; min-height: 2.75rem; padding: .55rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--radius-btn); background: color-mix(in srgb, var(--card) 70%, transparent); color: var(--text); width: 100%;
  transition: border-color calc(.15s * var(--motion, 1)), box-shadow calc(.15s * var(--motion, 1)); }
textarea { min-height: 6rem; border-radius: min(var(--radius-btn), 14px); } /* round "pill" corners would cut off the text */
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--link); box-shadow: var(--focus-ring); }
input[aria-invalid="true"] { border-color: var(--danger); }
input[type=checkbox], input[type=radio] { width: 1.15rem; height: 1.15rem; min-height: 0; accent-color: var(--brand); }
input::placeholder { color: var(--muted); opacity: 1; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-btn); padding: .6rem .9rem; display: grid; gap: .5rem; }
legend { font-weight: 600; padding: 0 .3rem; }
.icons { display: flex; flex-wrap: wrap; gap: .8rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
code { background: var(--surface-2); padding: .1rem .35rem; border-radius: 6px; font-size: .9em; }
.secret-once { font-size: 1rem; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
table.list { width: 100%; border-collapse: collapse; background: var(--card); }
.table-wrap table.list { border-radius: 0; }
table.list th, table.list td { text-align: start; padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list th { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); }
:is(:lang(ar), :lang(ur)) table.list th { text-transform: none; letter-spacing: 0; font-size: .85rem; }
table.list tbody tr:last-child td { border-bottom: 0; }
/* Phones (phone check, 2026-11-05): a wide table becomes one card per row, each cell with its column name. */
@media (max-width: 600px) {
  table.stack-phone thead { display: none; }
  table.stack-phone, table.stack-phone tbody, table.stack-phone tr, table.stack-phone td { display: block; width: 100%; }
  table.stack-phone tr { padding: .5rem 0; border-bottom: 1px solid var(--line); }
  table.stack-phone tbody tr:last-child { border-bottom: 0; }
  table.stack-phone td { border-bottom: 0; padding: .3rem 1rem; }
  table.stack-phone td[data-label]::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 700; color: var(--muted); }
}
table.list tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }

/* Sign-in */
.signin { max-width: 26rem; margin: 2.5rem auto; text-align: center; display: grid; gap: .9rem; justify-items: center; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem 1.75rem; box-shadow: var(--glass-hi), var(--shadow-hover); position: relative; overflow: hidden; }
.signin::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--amber), var(--sky)); }
.signin h1 { margin: 0; }
.signin .stack { width: 100%; text-align: start; }
.signin-logo img { display: block; width: 13.75rem; max-width: 100%; height: auto; }

/* Sign-in, "split screen": the always-dark Glow welcome (front-page tokens) beside the form, which follows the look */
body.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); min-height: 100vh; }
.split-hello { display: flex; flex-direction: column; gap: var(--space-6); padding: 3rem 4rem; color: var(--front-peach); background:
  radial-gradient(34rem 28rem at 0% 30%, var(--front-glow-warm), transparent 70%),
  radial-gradient(34rem 28rem at 100% 95%, var(--front-glow-cool), transparent 70%), var(--nav); }
[dir="rtl"] .split-hello { background:
  radial-gradient(34rem 28rem at 100% 30%, var(--front-glow-warm), transparent 70%),
  radial-gradient(34rem 28rem at 0% 95%, var(--front-glow-cool), transparent 70%), var(--nav); }
.split-hello :focus-visible { outline-color: var(--front-sky); }
.split-logo { align-self: flex-start; border-radius: 8px; }
.split-logo .logo { display: block; height: 150px; width: auto; }
.split-words { margin-block: auto; max-width: 40rem; }
.split-eyebrow { font-weight: 600; letter-spacing: .3em; font-size: .8rem; color: var(--front-sky); margin: 0 0 1rem; }
:is(:lang(ar), :lang(ur)) .split-eyebrow { letter-spacing: 0; font-size: .95rem; }
.split-big { font-family: var(--front-font); font-weight: 800; font-size: clamp(2.4rem, 4.4vw, 4rem); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 1.25rem; }
:is(:lang(ar), :lang(ur)) .split-big { font-family: var(--font-ar); font-weight: 700; letter-spacing: 0; line-height: 1.3; }
.split-big em { display: block; font-style: normal; color: var(--front-amber); }
.split-lead { font-size: 1.15rem; color: var(--front-soft); margin: 0 0 1.5rem; max-width: 30rem; }
.split-apps { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.split-apps li { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: var(--radius-pill); font-weight: 600; font-size: .9rem;
  background: var(--front-glass-btn); border: 1px solid var(--front-glass-line); }
.split-apps .dot { width: .6rem; height: .6rem; border-radius: 50%; }
.split-apps .sky { background: var(--front-sky); } .split-apps .amber { background: var(--front-amber); } .split-apps .peach { background: var(--front-peach); }
.split-legal { margin: 0; font-size: .85rem; color: var(--front-soft); }
.split-side { display: flex; flex-direction: column; padding: 2.5rem 4rem; background:
  radial-gradient(28rem 20rem at 100% 0%, var(--glow-cool), transparent 70%), var(--bg); }
[dir="rtl"] .split-side { background: radial-gradient(28rem 20rem at 0% 0%, var(--glow-cool), transparent 70%), var(--bg); }
.split-lang { align-self: flex-end; display: flex; gap: var(--space-2); margin: 0; }
.split-form { margin: auto; width: 100%; max-width: 24rem; padding: var(--space-6) 0; flex: 0 1 auto; }
.split-form h1 { font-size: 2.2rem; margin: 0 0 .25rem; }
.split-form > .quiet { margin-bottom: var(--space-5); }
.split-form .flash { margin-bottom: var(--space-4); }
.split-forgot { text-align: center; margin: 0; }

/* ------------------------------------------------------------------ companies and apps */
.co-cards { list-style: none; padding: 0; margin: var(--space-4) 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--space-4); }
.co-card { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-5); min-height: 6.5rem; background: var(--card); border: 1px solid var(--line);
  border-top: 5px solid var(--co, var(--accent)); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: box-shadow calc(.15s * var(--motion, 1)), transform calc(.15s * var(--motion, 1)); }
.co-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.co-logo { width: 3rem; height: 3rem; object-fit: contain; border-radius: var(--radius-icon); background: #fff; flex: none; }
.co-mono { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: var(--radius-icon); background: var(--co, var(--navy)); color: var(--co-ink, #fff); font-weight: 700; flex: none; }
.co-mono.sm { width: 2rem; height: 2rem; border-radius: 8px; font-size: .75rem; }
.co-name { display: grid; min-width: 0; }
.co-name b { color: var(--heading); }

.app-tiles { list-style: none; padding: 0; margin: var(--space-4) 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--space-4); }
.app-tiles li { display: grid; gap: .35rem; justify-items: start; align-content: start; }
.app-tile { width: 100%; display: grid; gap: .45rem; justify-items: start; align-content: start; padding: var(--space-5); min-height: 9.5rem; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: box-shadow calc(.15s * var(--motion, 1)), transform calc(.15s * var(--motion, 1)), border-color calc(.15s * var(--motion, 1)); }
.app-tile b { font-size: 1.1rem; color: var(--heading); }
a.app-tile:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.app-tile.off { opacity: .72; }
.app-ico { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: var(--radius-icon); background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--accent) 22%, var(--card))); color: var(--brand); flex: none; box-shadow: var(--glass-hi); }
.app-ico.lg { width: 4rem; height: 4rem; border-radius: var(--radius-lg); }

/* Dashboard */
.stats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--space-4); margin: var(--space-4) 0 var(--space-5); }
.stat { display: flex; gap: var(--space-4); align-items: center; padding: var(--space-4) var(--space-5); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat .app-ico { background: var(--surface-2); color: var(--heading); }
.stat b { display: block; font-size: 1.6rem; line-height: 1.1; color: var(--heading); font-variant-numeric: tabular-nums; }
.stat.attention .app-ico { background: var(--warn-soft); color: var(--warn); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-5); align-items: start; }
.grid-2 > .card { margin: 0; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; }
.rows > li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.rows > li:last-child { border-bottom: 0; }
.rows .grow { flex: 1; min-width: 10rem; display: grid; }
.row-note { flex-basis: 100%; margin: 0; }
.chips { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.empty { text-align: center; padding: var(--space-6) var(--space-4); color: var(--muted); }
/* Search (search.ejs): a big box on the page, and each result with where it was found. */
.search-big { position: relative; display: flex; gap: var(--space-2); margin-bottom: var(--space-4); max-width: 40rem; }
.search-big .ico { position: absolute; inset-inline-start: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-big input { flex: 1; min-width: 0; padding-inline-start: 2.6rem; }
.found { margin-bottom: var(--space-4); }
.found-head { display: flex; align-items: center; gap: var(--space-3); margin: 0 0 var(--space-2); }
.found-head .app-ico { width: 2.4rem; height: 2.4rem; }
.found-sec { margin: var(--space-4) 0 0; font-size: var(--fs-small); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.found .crumbs { overflow-wrap: anywhere; }
.avatar.sm { width: 2rem; height: 2rem; font-size: .75rem; }
.empty .app-ico { margin: 0 auto var(--space-3); }

/* Marketplace */
.market { list-style: none; padding: 0; margin: var(--space-4) 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--space-4); }
.market-card { display: grid; grid-template-rows: auto 1fr auto; gap: var(--space-3); height: 100%; padding: var(--space-5); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.market-card header { display: flex; gap: var(--space-3); align-items: flex-start; }
.market-card header > div { display: grid; gap: .25rem; justify-items: start; min-width: 0; }
.market-card h2 { font-size: 1.1rem; margin: 0; }
.market-card h2 a { color: inherit; text-decoration: none; }
a.market-card { color: inherit; text-decoration: none; }
a.market-card:hover, a.market-card:focus-visible { border-color: var(--brand); box-shadow: var(--shadow-hover); }
.market-card h2 a:hover { text-decoration: underline; }
.market-card footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.price { font-weight: 700; color: var(--heading); }
.features { margin: 0; padding: 0; list-style: none; display: grid; gap: .45rem; }
.features li { display: flex; gap: .5rem; align-items: flex-start; }
.features svg { flex: none; color: var(--brand); margin-top: .2rem; }
.for-company { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; }
.for-company select { width: auto; min-width: 12rem; }

/* Colours: palette cards are radio buttons; the pills show the palette's own colours */
.pal-set { border: 0; padding: 0; margin: 0 0 var(--space-5); display: block; }
.pal-set > legend { font-weight: 700; color: var(--heading); font-size: 1.05rem; padding: 0; margin-bottom: var(--space-2); }
.pal-group { margin: var(--space-4) 0 var(--space-2); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
:is(:lang(ar), :lang(ur)) .pal-group { letter-spacing: 0; text-transform: none; font-size: .85rem; }
.pal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr)); gap: var(--space-3); }
.pal { position: relative; display: grid; gap: .45rem; padding: .65rem; border-radius: var(--radius-btn); border: 1px solid var(--glass-line); background: var(--surface-2); cursor: pointer; font-weight: 600; }
.pal.same { max-width: 12rem; margin-bottom: var(--space-2); }
.pal input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pal:hover { border-color: var(--link); }
.pal:has(input:checked) { border-color: var(--link); box-shadow: var(--focus-ring), var(--shadow-hover); }
.pal:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.pal b { font-size: .88rem; }
.pal-on { display: none; font-size: .75rem; color: var(--link); }
.pal:has(input:checked) .pal-on { display: block; }
.pal-pills { display: grid; }
.pal-pills i { height: 1rem; border-radius: var(--radius-pill); margin-top: -.3rem; box-shadow: var(--shadow); }
.pal-pills i:first-child { margin-top: 0; }
.pal-pills i.ghost { background: transparent; border: 1.5px dashed var(--line-strong); box-shadow: none; }
.pal-select select { width: auto; min-width: 14rem; }
/* The tabs of the Design system page (2026-11-02; first Colours and the Typography Studio, 2026-11-01). */
.ty-tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-4); }
.ty-tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .95rem; border-radius: var(--radius-pill); border: 1px solid var(--glass-line); background: var(--glass); color: var(--text); font-weight: 600; text-decoration: none; }
.ty-tabs a:hover { border-color: var(--link); }
.ty-tabs a[aria-current="page"] { background: var(--nav-on-bg); border-color: transparent; color: var(--heading); }
.ds-title { margin: var(--space-2) 0 var(--space-1); }
/* Typography (2026-11-02): two short lists of fonts, each a button written in its own font; a click uses it. */
.ty-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.ty-list ul.plain > li { padding: 0; border: 0; }
.ty-font { position: relative; display: grid; gap: .1rem; width: 100%; padding: .55rem var(--space-3); padding-inline-end: 2.4rem; border: 1px solid transparent; border-radius: var(--radius-btn);
  background: none; color: var(--text); font-family: var(--ty-f); text-align: start; cursor: pointer; }
.ty-font:hover { background: var(--surface-2); }
.ty-font[aria-current="true"] { background: var(--nav-on-bg); border-color: var(--glass-line); }
.ty-font-name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: 1.2rem; line-height: 1.25; color: var(--heading); }
.ty-font-name .chip { font-family: var(--font); }
.ty-font-sample { font-size: var(--fs-small); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ty-scales { display: grid; gap: var(--space-2); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.ty-preview { margin: 0 0 var(--space-2); color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ty-range { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .15rem var(--space-2); font-size: var(--fs-small); }
.ty-range input { grid-column: 1 / -1; width: 100%; accent-color: var(--brand); }
.ty-range output { color: var(--muted); font-variant-numeric: tabular-nums; }
.ty-more summary { cursor: pointer; color: var(--link); }
.ty-more[open] { display: grid; gap: var(--space-2); }
.ty-font-on { position: absolute; inset-inline-end: var(--space-3); top: 50%; translate: 0 -50%; color: var(--link); display: inline-flex; }
/* Light and dark, and corner shapes: radio cards like the palettes, each with a small picture of itself. */
.look-pills i:nth-child(1) { background: #0B132B; } .look-pills i:nth-child(2) { background: #1C2541; } .look-pills i:nth-child(3) { background: #5BC0DE; }
.look-pills.light i:nth-child(1) { background: #FBF8F3; } .look-pills.light i:nth-child(2) { background: #EEF1F6; } .look-pills.light i:nth-child(3) { background: #1E6E8C; }
.look-pills.auto i:nth-child(1) { background: linear-gradient(90deg, #FBF8F3 50%, #0B132B 50%); } .look-pills.auto i:nth-child(2) { background: linear-gradient(90deg, #EEF1F6 50%, #1C2541 50%); }
.look-pills.auto i:nth-child(3) { background: linear-gradient(90deg, #1E6E8C 50%, #5BC0DE 50%); }
.look-pills.palette i:nth-child(1) { background: var(--bg); } .look-pills.palette i:nth-child(2) { background: var(--card); } .look-pills.palette i:nth-child(3) { background: var(--brand); }
.pal-grid.wide { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.pal .small { font-weight: 400; }
.shape-demo { display: grid; gap: .45rem; padding: .7rem; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--card); }
.shape-demo i { display: block; height: 1.5rem; border-radius: var(--rb); background: var(--surface-2); border: 1px solid var(--line-strong); }
.shape-demo i:last-child { width: 55%; background: var(--brand); border-color: transparent; }
.look-own { max-width: 24rem; }
.look-own .segmented button { font-size: .9rem; padding: .5rem; }

/* Design page */

/* Glass: every card-like part shares the same see-through surface, thin sky edge and soft light */
.card, .stat, .app-tile, .co-card, .market-card, .table-wrap, .signin, .pop-menu { background: var(--glass); border-color: var(--glass-line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.card, .stat, .co-card, .market-card, .table-wrap, .app-tile:not(:hover) { box-shadow: var(--glass-hi), var(--shadow); }
table.list { background: transparent; }
.co-card { border-top-color: var(--co, var(--accent)); }
.stat .app-ico { background: linear-gradient(135deg, var(--surface-2), color-mix(in srgb, var(--accent) 24%, var(--card))); }

/* ------------------------------------------------------------------ smaller screens */
@media (max-width: 960px) {
  body.split { display: flex; flex-direction: column; }
  .split-side { flex: 1; }
  .split-hello { padding: 1.25rem 16px 1.25rem; gap: var(--space-3); }
  .split-legal { font-size: .78rem; }
  .split-logo .logo { height: 96px; }
  .split-words { margin-block: 0; }
  .split-big { font-size: 1.9rem; margin: 0; }
  .split-eyebrow, .split-lead, .split-apps { display: none; }
  .split-side { padding: 1rem 16px 2rem; }
  .split-form { margin: 0 auto; padding-top: var(--space-4); }
  body.with-side, [dir="rtl"] body.with-side { display: block; background: var(--bg); }
  .icon-btn.menu-btn { display: inline-grid; }
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 40; width: min(var(--side-w), 85vw); height: 100%; display: none; box-shadow: var(--shadow-hover); }
  .side:target { display: flex; }
  .side:target ~ .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(11, 20, 36, .45); }
  .icon-btn.side-close { display: inline-grid; color: var(--on-nav); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  main { padding: var(--space-4) 16px var(--space-5); }
  .legal { padding: 0 16px var(--space-4); }
  .topbar { flex-wrap: wrap; padding: var(--space-2) 16px; gap: var(--space-2); }
  .with-side .search { order: 5; flex-basis: 100%; max-width: none; }
  .switcher { flex: 1; min-width: 0; }
  .switch-btn { max-width: none; }
  .brand .logo-row { height: 2.2rem; }
  h1 { font-size: 1.4rem; }
  .facts { grid-template-columns: 1fr; }
  .facts dd { margin-bottom: .4rem; }
  .pop-menu { position: fixed; inset-inline: 12px; top: 4.2rem; min-width: 0; }
  .market, .co-cards, .app-tiles { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .stat { flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--space-3) var(--space-4); }
  .stat .app-ico { width: 2.4rem; height: 2.4rem; }
  table.list th, table.list td { padding: .6rem .7rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* A company's own look (looks.js): a band in its colour, with its background pattern, on its page and its card. */
.band { position: relative; isolation: isolate; overflow: hidden; }
.page-head.band { background: color-mix(in srgb, var(--brand) 10%, var(--card)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); }
.band::before, .band::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; }
.band.pattern-stars::before { opacity: .3; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cg fill='none' stroke='black' stroke-width='1.3' transform='translate(22 22)'%3E%3Crect x='-10' y='-10' width='20' height='20'/%3E%3Crect x='-10' y='-10' width='20' height='20' transform='rotate(45)'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 44px 44px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cg fill='none' stroke='black' stroke-width='1.3' transform='translate(22 22)'%3E%3Crect x='-10' y='-10' width='20' height='20'/%3E%3Crect x='-10' y='-10' width='20' height='20' transform='rotate(45)'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 44px 44px; }
.band.pattern-dots::after { opacity: .5; background-image: radial-gradient(var(--accent) 1.5px, transparent 1.7px); background-size: 14px 14px; }

/* The Appearance page */
.look-edit { display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: flex-start; }
.look-form { flex: 999 1 26rem; min-width: 0; margin-top: 0; }
.look-sample { flex: 1 1 20rem; position: sticky; top: 5rem; }
.look-sample .pal-group { margin-top: 0; }
.sample { display: grid; gap: var(--space-4); padding: var(--space-4); background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.sample .page-head { margin: 0; }
.sample .co-mono { width: 2.75rem; height: 2.75rem; }
.sample-name { color: var(--heading); }
.sample .app-tile { min-height: 0; }
.sample-link { color: var(--link); text-decoration: underline; }
.sample-input { display: block; padding: .55rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--radius-btn); background: var(--card); color: var(--muted); }
.pattern-demo { display: block; height: 3rem; border: 1px solid var(--line-strong); border-radius: var(--radius-btn); background: var(--card); }

/* ------------------------------------------------------------------ phone check (2026-11-05)
   On phones and touch screens, everything that can be tapped is at least 44 × 44 points (Apple's rule).
   Desktops with a mouse keep the smaller sizes. In style.css, as the sign-in page does not load styles.css. */
@media (max-width: 960px), (pointer: coarse) {
  .btn.small { min-height: 2.75rem; }
  .lang-btn { min-height: 2.75rem; min-width: 2.75rem; justify-content: center; }
  .brand, .split-logo { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .market-card h2 a, .rows .grow > a { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; }
  .ty-tabs a { min-height: 2.75rem; }
  label.check { min-height: 2.75rem; }
}
/* Long addresses and codes (the Stripe webhook address) wrap instead of sticking out of a phone screen. */
code { overflow-wrap: anywhere; }
/* A "back" arrow points the way the page reads: to the right in Arabic and Urdu. */
.back-arrow { display: inline-block; }
[dir="rtl"] .back-arrow { transform: scaleX(-1); }

/* Settings → Brand (owner, 2026-11-05): the site's own logo picture, or its own name beside the tree. */
img.logo-own { object-fit: contain; max-width: 100%; }
.brand img.logo-row { height: 2.6rem; width: auto; max-width: 13rem; }
.split-logo img.logo-stack { max-width: 22rem; }
img.logo-mark { width: 100%; height: 100%; }
.logo-named { text-decoration: none; display: inline-flex; align-items: center; gap: .55rem; height: 2.6rem; color: inherit; }
.logo-named > svg { height: 100%; width: auto; flex: none; }
.logo-named .lg-w { font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; letter-spacing: -.01em; line-height: 1; white-space: nowrap; color: var(--heading); }
.brand .logo-named .lg-w { color: currentColor; }
.logo-stack.logo-named { flex-direction: column; justify-content: center; gap: .6rem; }
.logo-stack.logo-named > svg { height: 70%; }
.logo-stack.logo-named .lg-w { font-size: 2rem; }
.brand-preview { display: flex; flex-wrap: wrap; gap: 1rem; margin-block-end: 1rem; }
.brand-preview-box { display: flex; flex-direction: column; gap: .6rem; padding: 1rem; border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 12px; min-width: 14rem; flex: 1; }
.brand-preview-stack .logo { height: 120px; width: auto; max-width: 100%; }
.file-btn { position: relative; align-self: flex-start; justify-self: start; width: fit-content; cursor: pointer; }
.brand:has(.logo-named), .split-logo:has(.logo-named) { text-decoration: none; }
/* A company's own logo (owner, 2026-11-05): small in menus and lists, and its card on the Appearance page. */
.co-logo.sm { width: 2rem; height: 2rem; border-radius: 8px; }
.co-logo-row { display: flex; gap: 1.25rem; align-items: flex-start; }
.co-logo-row > .co-logo, .co-logo-row > .co-mono { width: 5rem; height: 5rem; font-size: 1.4rem; }
.co-logo-row .stack { gap: .75rem; }
/* Settings → Email → wording (owner, 2026-11-05): one block per email. */
.mail-wording { padding-block: 1rem; border-top: 1px solid var(--line); }
.mail-wording h3 { display: flex; align-items: center; gap: .6rem; margin: 0; }
.mail-wording textarea { width: 100%; font: inherit; font-weight: 400; line-height: 1.5; min-height: 12rem; }
/* Settings → Brand → Menu (owner, 2026-11-05): one row per menu item. */
.menu-edit { display: grid; gap: .6rem; }
.menu-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; }
.menu-row.off input[name^="label_"] { opacity: .55; }
.menu-row .check { white-space: nowrap; }
/* Undo and history on the look pages (2026-11-05). */
.look-hist .card-head h2 { display: inline-flex; align-items: center; gap: .4rem; }
.look-hist .btn[disabled] { opacity: .5; cursor: default; }
.look-hist details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.hist-list { list-style: none; margin: 0; padding: 0; }
.hist-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding-block: .6rem; border-block-start: 1px solid var(--line); }
.hist-list li > div { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.hist-change s { color: var(--muted); }
.hist-list .link { min-height: 44px; }

/* Sizes and motion (2026-11-05, src/sizes.js). "Comfortable" and "Balanced" are tokens.css as it always was. */
html[data-density="compact"] { --space-1: .2rem; --space-2: .375rem; --space-3: .55rem; --space-4: .75rem; --space-5: 1.1rem; --space-6: 1.5rem; }
html[data-density="spacious"] { --space-1: .3rem; --space-2: .65rem; --space-3: 1rem; --space-4: 1.35rem; --space-5: 2rem; --space-6: 2.75rem; }
html[data-density="compact"] .card { padding: var(--space-4); }
html[data-density="spacious"] .card { padding: var(--space-6); }
html[data-motion="subtle"] { --motion: .6; }
html[data-motion="expressive"] { --motion: 1.6; }
html[data-motion="none"] *, html[data-motion="none"] *::before, html[data-motion="none"] *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: no-preference) {
  html[data-motion="expressive"] main > * { animation: motion-in calc(.35s * var(--motion, 1)) cubic-bezier(.2, .8, .2, 1) both; }
  html[data-motion="expressive"] main > *:nth-child(2) { animation-delay: .04s; }
  html[data-motion="expressive"] main > *:nth-child(3) { animation-delay: .08s; }
  html[data-motion="expressive"] main > *:nth-child(n+4) { animation-delay: .12s; }
  html[data-motion="expressive"] :is(.co-card, .app-tile, .pal):hover { transform: translateY(-3px); }
}
@keyframes motion-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* The little pictures on the Sizes and motion tab. */
.size-demo { display: flex; gap: 6px; height: 34px; align-items: stretch; }
.size-demo i { flex: 1; border-radius: 6px; background: color-mix(in srgb, var(--brand) 35%, var(--surface-2)); }
.size-demo.density-compact { gap: 2px; }
.size-demo.density-spacious { gap: 12px; padding-inline: 6px; }
.size-demo.motion-none i { opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
  .size-demo[class*="motion-"]:not(.motion-none) i { animation: demo-bob 1.6s ease-in-out infinite; }
  .size-demo.motion-subtle i { animation-duration: 2.4s; --lift: -2px; }
  .size-demo.motion-expressive i { animation-duration: 1.1s; --lift: -8px; }
  .size-demo i:nth-child(2) { animation-delay: .15s; }
  .size-demo i:nth-child(3) { animation-delay: .3s; }
}
@keyframes demo-bob { 50% { transform: translateY(var(--lift, -4px)); } }

/* Pick any colour (2026-11-05) */
.own-colours { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3, 12px); margin: var(--space-3, 12px) 0; }
.own-colour { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm, 10px); cursor: pointer; min-height: 44px; }
.own-colour > span { display: flex; flex-direction: column; }
.own-colour input[type=color] { inline-size: 48px; block-size: 48px; padding: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: none; cursor: pointer; flex: none; }
.own-logo h3 { margin: var(--space-3, 12px) 0 4px; font-size: 1rem; }
.own-logo label.btn { position: relative; }
/* Typography ready-made sets (2026-11-05) */
.ty-preset { inline-size: 100%; text-align: start; font: inherit; color: inherit; cursor: pointer; }
.ty-preset[aria-current="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.ty-preset-sample { font-size: 2rem; line-height: 1.1; color: var(--heading, var(--text)); }
/* Locks (2026-11-05) */
.rows label.lock-row, .lock-row { display: flex; flex-direction: row; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.lock-row input { inline-size: 20px; block-size: 20px; flex: none; }
.lock-row > span { display: flex; flex-direction: column; }
.look-locked { display: flex; gap: 8px; align-items: center; }
form[inert], fieldset[disabled] { opacity: .55; }

/* Customise this page (2026-11-06, Design Studio step six) */
.icon-btn.cz-toggle { display: inline-flex; align-items: center; gap: 6px; width: auto; white-space: nowrap; padding-inline: 10px; background: transparent; border: 1px solid var(--line-strong, var(--line)); color: var(--text); font: inherit; cursor: pointer; }
.icon-btn.cz-toggle:hover { background: var(--surface-2); }
.cz-toggle[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
@media (max-width: 700px) { .cz-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
html.cz-on .cz-lit { outline: 3px dashed var(--brand); outline-offset: 3px; cursor: pointer; }
html.cz-on main:hover { cursor: pointer; }
.cz-panel { inset-inline-end: 16px; inset-inline-start: auto; inset-block-start: 80px; margin: 0; inline-size: min(420px, calc(100vw - 32px)); max-block-size: calc(100vh - 100px); overflow: auto;
  background: var(--card); color: var(--text); border: 1px solid var(--line-strong, var(--line)); border-radius: var(--radius, 16px); padding: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.cz-panel::backdrop { background: transparent; }
.cz-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cz-head h2 { margin: 0; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.cz-tabs { margin: 10px 0; flex-wrap: wrap; }
.cz-tabs [aria-selected="true"] { background: var(--brand); color: var(--on-brand); }
.cz-panel fieldset { border: 0; padding: 0; margin: 0 0 10px; }
.cz-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-block-size: 260px; overflow: auto; }
.cz-sw { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; text-align: center; min-block-size: 44px; }
.cz-sw input { position: absolute; opacity: 0; pointer-events: none; }
.cz-sw:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.cz-sw:has(input:focus-visible) { outline: 2px solid var(--focus); }
.cz-sw-dots { display: flex; }
.cz-sw-dots i { inline-size: 16px; block-size: 16px; border-radius: 50%; margin-inline-start: -4px; border: 1px solid rgba(0, 0, 0, .15); }
.cz-sw-dots.same { inline-size: 40px; block-size: 16px; border-radius: 8px; border: 1px dashed var(--muted); }
.cz-choice { flex-wrap: wrap; }
.cz-choice label { position: relative; cursor: pointer; }
.cz-choice input { position: absolute; opacity: 0; }
.cz-choice span { display: inline-block; padding: 8px 12px; border-radius: 999px; min-block-size: 44px; line-height: 28px; }
.cz-choice input:checked + span { background: var(--brand); color: var(--on-brand); }
.cz-choice input:focus-visible + span { outline: 2px solid var(--focus); }
.cz-undo { margin-top: 8px; }
/* Settings → Brand → Dashboard (owner, 2026-11-05). */
.dash-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.dash-pick legend { width: 100%; margin-bottom: .3rem; }
/* A card left alone on its row (the others hidden) takes the whole row. */
.dash-grid > .card:first-child:last-child, .dash-grid > .wide + .card:last-child { grid-column: 1 / -1; }

/* The dashboard builder (2026-11-06, src/dashboard.js): ?arrange= shows each card's buttons to move or hide it. */
.dash-arrange { border: 2px dashed var(--brand); }
.dash-arrange .card-head h2 { display: inline-flex; align-items: center; gap: .4rem; }
.dash-arrange .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.dash-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin: 0 0 .6rem; padding-block-end: .5rem; border-block-end: 1px dashed var(--line); }
.dash-tools-name { flex: 1; min-width: 8rem; font-weight: 600; }
.dash-tools .icon-btn { width: 44px; height: 44px; border: 1px solid var(--line); }
.dash-tools .icon-btn[disabled] { opacity: .35; cursor: default; }
.dash-tools svg.up { transform: rotate(180deg); }
.dash-tools .btn { min-height: 44px; }
.dash-off > :not(.dash-tools) { opacity: .4; }
.dash-off { border-style: dashed; }

/* Templates (2026-11-06, src/templates.js): a whole look in one click. */
.tpl-dots { display: flex; gap: 0; margin-block-end: .5rem; }
.tpl-dots i { inline-size: 28px; block-size: 28px; border-radius: 50%; margin-inline-end: -8px; border: 2px solid var(--card, rgba(0,0,0,.2)); }
.tpl-parts { color: var(--muted); }

/* Final checks (2026-11-06): styles that tint the page (Clay) or lay glass over a picture (Glass in light mode) make the
   standard grey text and accent links too faint there. Mixed toward the text colour, they read in light and dark alike. */
:is([data-style="clay"], [data-style="glass"][data-theme="light"], [data-style="glass-side"][data-theme="light"]) {
  --tint-muted: color-mix(in srgb, var(--muted) 45%, var(--text)); --tint-brand: color-mix(in srgb, var(--brand) 55%, var(--text)); --tint-link: color-mix(in srgb, var(--link, var(--accent)) 55%, var(--text));
}
/* --tint-muted is worked out on <html> from the palette's --muted; <body> and everything in it then use it as --muted. */
:is([data-style="clay"], [data-style="glass"][data-theme="light"], [data-style="glass-side"][data-theme="light"]) body { --muted: var(--tint-muted); --link: var(--tint-link); }
:is([data-style="clay"], [data-style="glass"][data-theme="light"], [data-style="glass-side"][data-theme="light"])  .eyebrow { color: var(--tint-brand); }
:is([data-style="clay"], [data-style="glass"][data-theme="light"], [data-style="glass-side"][data-theme="light"]) main a:not(.btn):not(.tab):not(.icon-btn):not(.ty-tabs a) { color: var(--tint-link); }
:is([data-style="glass"], [data-style="glass-side"])[data-theme="light"] footer.legal { color: var(--text); width: fit-content; margin-inline: auto; padding: .3rem .9rem; border-radius: 999px; background: color-mix(in srgb, var(--card) 88%, transparent); }

/* ------------------------------------------------------------------ Documents (owner, 2026-11-10) */
.doc-upload-row { display: grid; grid-template-columns: minmax(12rem, 16rem) 1fr; gap: var(--space-4); align-items: stretch; }
.doc-upload-row > label:first-child { align-content: start; }
.doc-drop { display: grid; justify-items: center; align-content: center; gap: .35rem; text-align: center; padding: var(--space-5) var(--space-4); border: 2px dashed var(--line-strong); border-radius: var(--radius); cursor: pointer; font-weight: 400; min-height: 7.5rem; }
.doc-drop:hover, .doc-drop.over, .doc-drop:focus-within { border-color: var(--brand); background: var(--brand-soft, var(--surface-2)); }
.doc-drop svg { color: var(--brand); }
.doc-progress:not(:empty) { margin-top: var(--space-3); }
.ok-text { color: var(--ok); }
.doc-cats { margin: var(--space-4) 0; }
.doc-cats .chip-btn { text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; }
.doc-cats .chip-btn.on { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.doc-cats .count { font-weight: 400; opacity: .75; }
.doc-search { display: flex; gap: var(--space-2); margin-bottom: var(--space-4); }
.doc-search input { flex: 1; }
.doc-name { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; }
.doc-kind { display: inline-block; padding: .05rem .45rem; border-radius: .35rem; font-size: .7rem; font-weight: 700; letter-spacing: .02em; background: var(--surface-2); color: var(--muted); }
.doc-kind[data-kind="PDF"] { background: var(--danger-soft); color: var(--danger); }
.doc-kind[data-kind="Picture"] { background: var(--ok-soft); color: var(--ok); }
.doc-kind[data-kind="Word"] { background: var(--info-soft); color: var(--info-text); }
.doc-kind[data-kind="Excel"] { background: var(--ok-soft); color: var(--ok); }
.doc-actions { flex-wrap: nowrap; justify-content: flex-end; }
.doc-main-actions { margin: var(--space-4) 0; }
.doc-grid { margin-top: var(--space-4); }
.doc-grid > div > .card:first-child { margin-top: 0; }
.doc-preview { padding: var(--space-2); min-height: 20rem; display: grid; }
.doc-preview img { max-width: 100%; height: auto; margin: auto; border-radius: calc(var(--radius) - 4px); }
.doc-preview iframe { width: 100%; min-height: 70vh; border: 0; border-radius: calc(var(--radius) - 4px); background: #fff; }
.doc-sent { display: grid; gap: var(--space-3); margin-bottom: var(--space-4); }
.doc-mail { margin-top: var(--space-4); }
.doc-mail summary, .inline-confirm summary { cursor: pointer; }
.doc-mail summary { font-weight: 600; color: var(--link); }
.doc-mail[open] summary { margin-bottom: var(--space-3); }
.inline-confirm { margin-top: var(--space-4); }
.inline-confirm summary { list-style: none; display: inline-flex; }
.inline-confirm summary::-webkit-details-marker { display: none; }
.inline-confirm[open] summary { margin-bottom: var(--space-3); }
.doc-links { margin-top: var(--space-4); }
.doc-link-page { text-align: center; margin-top: 10vh; }
.doc-link-page .app-ico { margin: 0 auto var(--space-3); }
.doc-print-page { margin: 0; background: #fff; color: #111; }
.doc-print-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid #ddd; }
.doc-print-hint { padding: 0 var(--space-4); }
.doc-print-frame { display: block; width: 100%; height: calc(100vh - 7rem); border: 0; object-fit: contain; }
@media print {
  .doc-print-bar, .doc-print-hint { display: none; }
  .doc-print-frame { height: auto; max-height: none; }
}
@media (max-width: 760px) {
  .doc-upload-row { grid-template-columns: 1fr; }
  .doc-list thead { display: none; }
  .doc-list tr { display: grid; grid-template-columns: 1fr auto; gap: .25rem .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
  .doc-list td { border: 0; padding: 0; }
  .doc-list td:first-child { grid-column: 1 / -1; }
  .doc-list td:last-child { grid-column: 1 / -1; }
  .doc-actions { justify-content: flex-start; }
  .doc-actions .btn.small { min-height: 2.75rem; min-width: 2.75rem; }
}

/* Keeps visually hidden table labels inside their scroll box, so the page itself never scrolls sideways (WCAG 1.4.10). */
.table-wrap { position: relative; }
