/* the user portal: top bar, navigation on the left, content; same look as the studio */
html { background: var(--bg); }
body.portal { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font-family: var(--font); }
.portal a { color: var(--accent); }
.portal svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* top bar like the studio */
.p-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 16px; background: #fffdf9; border-bottom: 1px solid rgba(51, 40, 32, 0.12); }
.p-brand { font-size: 14px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text) !important; text-decoration: none; white-space: nowrap; }
.p-brand span { color: var(--accent); }
.p-grow { flex: 1; }
.p-menu { display: none; width: 36px; height: 36px; border: 0; background: none; color: var(--text); cursor: pointer; border-radius: 6px; }
.p-studio { height: 34px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; background: var(--ink); color: var(--ink-text) !important; font-size: 14px; font-weight: 600; text-decoration: none; }
.p-studio:hover { background: var(--accent); }
.p-user { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; max-width: 240px; }
.p-user span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-pro { padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.portal .lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.portal .lang-switch button { height: 30px; padding: 0 10px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.portal .lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--ink-text); }

/* layout */
.p-layout { flex: 1; display: grid; grid-template-columns: 236px minmax(0, 1fr); width: 100%; max-width: 1240px; margin: 0 auto; }
.p-nav { position: sticky; top: 52px; align-self: start; display: grid; gap: 2px; padding: 22px 14px; }
.p-nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--text) !important; text-decoration: none; font-size: 15px; }
.p-nav-item:hover { background: var(--surface); }
.p-nav-item[aria-current] { background: var(--surface); color: var(--accent) !important; font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.p-ext { margin-left: auto; color: var(--faint); font-size: 12px; }
.p-main { padding: 28px 28px 80px; min-width: 0; outline: none; }
.p-loading { color: var(--faint); }
.p-foot { display: flex; flex-wrap: wrap; gap: 16px; padding: 18px 20px 96px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.p-foot a { color: var(--muted) !important; }

/* building blocks for the modules */
.p-view h1 { font-size: 30px; line-height: 1.2; margin: 0 0 6px; }
.p-view > p.p-lead, .p-lead { margin: 0 0 22px; color: var(--muted); font-size: 16px; }
.p-view h2 { font-size: 19px; margin: 28px 0 12px; }
.p-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--accent); color: #fff !important; font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.p-btn:hover { filter: brightness(0.95); }
.p-btn.alt { background: var(--surface); color: var(--text) !important; border: 1px solid var(--line); }
.p-btn.small { height: 32px; padding: 0 12px; font-size: 14px; }
.p-btn[disabled] { opacity: 0.6; cursor: wait; }
.p-msg { font-weight: 600; margin: 10px 0; }
.p-msg.ok { color: #2e7d4f; }
.p-msg.bad { color: var(--danger); }
.p-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 18px; }
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.p-tile { display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; align-items: start; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text) !important; text-decoration: none; transition: border-color .15s, transform .15s; }
.p-tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.p-tile .p-ico { grid-row: span 2; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.p-tile b { font-size: 16px; }
.p-tile small { color: var(--muted); font-size: 14px; line-height: 1.45; }
.p-signin { max-width: 460px; margin: 40px auto; text-align: center; }
.p-signin svg { width: 44px; height: 44px; color: var(--accent); }
.p-empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.p-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 0 0 20px; overflow-x: auto; }
.p-tab { padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; white-space: nowrap; }
.p-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.p-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.p-table th, .p-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.p-table th { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.p-table tr.p-row { cursor: pointer; }
.p-table tr.p-row:hover td { background: var(--surface); }
.p-state { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--sand); color: var(--text); }
.p-state.open { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.p-state.closed { background: rgba(46, 125, 79, .14); color: #2e7d4f; }
.p-form { display: grid; gap: 12px; max-width: 720px; }
.p-form label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.p-form input[type="text"], .p-form textarea, .p-dialog input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 15px; font-weight: 400; }
.p-form textarea { min-height: 160px; resize: vertical; }
.p-hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.p-files { display: flex; flex-wrap: wrap; gap: 8px; }
.p-file { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; background: var(--surface); color: var(--text) !important; text-decoration: none; }
.p-file button { border: 0; background: none; cursor: pointer; color: var(--muted); }
.p-thread { display: grid; gap: 14px; max-width: 820px; }
.p-article { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.p-article.support { border-left: 4px solid var(--accent); }
.p-article.mine { background: color-mix(in srgb, var(--sand) 45%, var(--surface)); }
.p-article header { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; font-size: 13.5px; color: var(--muted); }
.p-article header b { color: var(--text); }
.p-article .p-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.55; }
.p-article img.p-shot { display: block; max-width: 260px; max-height: 200px; margin-top: 10px; border-radius: 8px; border: 1px solid var(--line); }

/* help inside the portal */
.p-help { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; }
.p-help-nav { position: sticky; top: 74px; align-self: start; max-height: calc(100vh - 90px); overflow-y: auto; }
.p-help-nav input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.p-help-nav .wiki-group { margin-top: 16px; }
.p-help-nav .wiki-group h2 { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.p-help-nav .wiki-group a { display: block; padding: 4px 10px; border-radius: 6px; font-size: 14px; color: var(--text) !important; text-decoration: none; }
.p-help-nav .wiki-group a:hover, .p-help-nav .wiki-group a.active { background: var(--surface); }
.p-help-nav .wiki-group a.active { color: var(--accent) !important; font-weight: 600; }
.p-help-body { max-width: 780px; }
.p-help-body section { scroll-margin-top: 70px; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.p-help-body section:last-child { border-bottom: 0; }
.p-help-body h1 { margin-top: 0; }
.p-help-body ol { padding-left: 22px; }
.tag { display: inline-block; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
kbd { display: inline-block; min-width: 20px; padding: 0 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); font: 600 12px/20px ui-monospace, monospace; text-align: center; }

/* download centre */
.os-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.os-btn { display: grid; justify-items: center; gap: 4px; padding: 16px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.os-btn[aria-selected="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.os-btn svg { width: 32px; height: 32px; fill: currentColor; stroke: none; }
.os-btn[aria-selected="true"] svg { color: var(--accent); }
.os-btn small { font-size: 12.5px; color: var(--muted); }
.dl-panel { margin-top: 16px; }
.dl-meta { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.dl-howto { padding-left: 22px; font-size: 15px; line-height: 1.55; }
.dl-howto pre { margin: 6px 0; padding: 10px 12px; border-radius: 8px; background: var(--sand); overflow-x: auto; font-size: 13px; }
.dl-hash { display: flex; align-items: center; gap: 10px; margin: 12px 0; padding: 10px 12px; border-radius: 8px; background: var(--sand); }
.dl-hash span { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--faint); }
.dl-hash code { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 13px/1.5 ui-monospace, monospace; user-select: all; }

/* sign-in dialog */
.p-dialog { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgb(30 24 20 / .55); }
.p-dialog-box { position: relative; width: min(420px, 100%); display: grid; gap: 10px; padding: 24px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.p-dialog-box h2 { margin: 0; font-size: 20px; }
.p-dialog-box p { margin: 0; color: var(--muted); }
.p-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 16px; }

@media (max-width: 860px) {
  .p-layout { grid-template-columns: 1fr; }
  .p-menu { display: inline-grid; place-items: center; }
  .p-nav { display: none; position: fixed; top: 52px; left: 0; right: 0; z-index: 15; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  body.p-nav-open .p-nav { display: grid; }
  .p-main { padding: 20px 16px 80px; }
  .p-help { grid-template-columns: 1fr; }
  .p-help-nav { position: static; max-height: none; }
  .p-studio { display: none; }
}
@media (max-width: 560px) {
  .os-pick { grid-template-columns: 1fr; }
  .p-user span:first-of-type { display: none; }
  .p-table .p-hide-s { display: none; }
}

/* overview */
.ov-hero { padding: 8px 0 6px; }
.ov-hero h1 { font-size: 34px; }
.ov-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.ov-me { margin: 8px 0 4px; }
.ov-me p { margin: 0 0 6px; }
.ov-facts { margin: 0; padding-left: 18px; }
.ov-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.ov-model { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text) !important; text-decoration: none; }
.ov-model:hover { border-color: var(--accent); }
.ov-model img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--sand); }
.ov-model small { color: var(--muted); font-size: 13px; }

/* account */
.ac-card { margin-bottom: 14px; max-width: 820px; }
.ac-card h2 { margin: 0 0 6px; font-size: 16px; }
.ac-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.ac-row:first-of-type { border-top: 0; }
.ac-k { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.ac-v { display: block; overflow-wrap: anywhere; }
.ac-act { display: flex; gap: 8px; flex: none; }
.ac-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.p-btn.danger { background: var(--danger); }

/* tickets */
.tk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.tk-head h1 { margin: 0; }
.tk-back { display: inline-block; margin-bottom: 10px; font-size: 14px; }
.p-form-files { display: grid; gap: 8px; justify-items: start; }
@media (max-width: 560px) { .ac-row { flex-direction: column; align-items: stretch; } }

/* welcome page */
.wl-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; align-items: center; padding: 10px 0 18px; }
.wl-kicker { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.wl-hero h1 { font-size: 40px; line-height: 1.12; margin: 0 0 14px; }
.wl-lead { font-size: 17.5px; line-height: 1.6; color: var(--muted); margin: 0 0 22px; }
.wl-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.p-btn.wl-big { height: 48px; padding: 0 22px; font-size: 16px; }
.wl-hero-pic { min-width: 0; }
.wl-frame { position: relative; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); background: var(--sand); aspect-ratio: 1; touch-action: pan-y; }
.wl-track { display: flex; height: 100%; transition: transform .6s cubic-bezier(.4, 0, .2, 1); }
.wl-slide { position: relative; flex: 0 0 100%; height: 100%; }
.wl-slide img { width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; }
.wl-cap { position: absolute; left: 14px; right: 14px; bottom: 14px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 12px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 4px 18px rgba(0, 0, 0, .12); }
.wl-cap small { grid-column: 1; color: var(--accent); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.wl-cap b { grid-column: 1; font-size: 17px; }
.wl-cap .p-btn { grid-column: 2; grid-row: 1 / span 2; }
.wl-arrow { position: absolute; top: 50%; translate: 0 -50%; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .2s; }
.wl-arrow.prev { left: 10px; }
.wl-arrow.next { right: 10px; }
.wl-frame:hover .wl-arrow, .wl-arrow:focus-visible { opacity: 1; }
.wl-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.wl-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--line); cursor: pointer; transition: width .3s, background .3s; }
.wl-dot.on { width: 22px; background: var(--accent); }
@media (hover: none) { .wl-arrow { display: none; } }
@media (prefers-reduced-motion: reduce) { .wl-track { transition: none; } }
.wl-me { margin: 10px 0; }
.wl-me p { margin: 0 0 6px; }
.wl-facts { margin: 0; padding-left: 18px; }
.wl-h2 { font-size: 24px !important; margin: 44px 0 16px !important; }
.wl-h3 { font-size: 16px; margin: 22px 0 10px; color: var(--muted); }
.wl-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wl-step { position: relative; counter-increment: step; padding: 20px 18px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.wl-step::before { content: counter(step); position: absolute; top: 14px; right: 16px; font-size: 32px; font-weight: 700; color: color-mix(in srgb, var(--accent) 22%, transparent); }
.wl-step b { display: block; font-size: 17px; margin: 10px 0 4px; }
.wl-step p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.wl-step-ico, .wl-feat-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.wl-step-ico svg, .wl-feat-ico svg { width: 22px; height: 22px; }
.wl-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 22px; }
.wl-feat { display: grid; grid-template-columns: 42px 1fr; gap: 2px 14px; }
.wl-feat .wl-feat-ico { grid-row: span 2; }
.wl-feat b { font-size: 16px; align-self: end; }
.wl-feat p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.wl-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.wl-cat { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.wl-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wl-plan-title { font-size: 20px; }
.wl-list { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 7px; }
.wl-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; }
.wl-list li svg { width: 18px; height: 18px; margin-top: 2px; }
.wl-list li.ok svg { color: #2e7d4f; }
.wl-list li.no { color: var(--muted); font-size: 14px; }
.wl-list li.no svg { color: var(--faint); width: 16px; height: 16px; margin-top: 3px; }
.p-tile.wl-tile { grid-template-columns: 1fr; }
@media (max-width: 980px) { .wl-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .wl-hero { grid-template-columns: 1fr; }
  .wl-hero h1 { font-size: 31px; }
  .wl-steps, .wl-feats, .wl-plans { grid-template-columns: 1fr; }
  .wl-hero-pic { max-width: 460px; width: 100%; justify-self: center; }
}
.ov-model { position: relative; }
.ov-early { position: absolute; top: 16px; left: 16px; padding: 2px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; }

/* licence shop */
.sh-cards { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 16px; align-items: stretch; }
.sh-card { display: flex; flex-direction: column; gap: 4px; }
.sh-card .p-btn { margin-top: auto; align-self: flex-start; }
.sh-card.sh-main { border: 2px solid var(--accent); }
.sh-title { font-size: 19px; }
.sh-price { margin: 4px 0 0; font-size: 30px; font-weight: 700; color: var(--accent); }
.sh-list { margin: 8px 0 14px; padding-left: 18px; display: grid; gap: 5px; font-size: 14.5px; }
.sh-calc { max-width: 720px; display: grid; gap: 10px; }
.sh-rows { display: grid; gap: 10px; }
.sh-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15px; }
.sh-line input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.sh-q { display: inline-flex; align-items: center; gap: 8px; }
.sh-q input { width: 70px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.sh-sum { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 16px; }
.sh-sum b { font-size: 24px; color: var(--accent); }
.sh-calc .p-btn { justify-self: start; }
.sh-examples { max-width: 820px; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }
.sh-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
@media (max-width: 900px) { .sh-cards, .sh-facts { grid-template-columns: 1fr; } }

/* start page when signed in */
.hm-head h1 { margin-bottom: 4px; }
.hm-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 6px 0 20px; }
.hm-action { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text) !important; text-decoration: none; font-weight: 600; }
.hm-action:hover { border-color: var(--accent); }
.hm-action svg { color: var(--accent); }
.hm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.hm-card h2 { margin: 0 0 10px !important; font-size: 16px !important; }
.hm-plan { margin: 0 0 6px; font-size: 15px; }
.hm-list { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 6px; font-size: 14.5px; }
.hm-list small { color: var(--muted); }
.hm-more { font-size: 14px; }
.hm-guest { display: inline-block; margin-top: 26px; font-size: 14px; }

/* welcome page: for whom, browser or app, three plans, quick questions */
.wl-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wl-group b { font-size: 17px; }
.wl-group-models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.wl-mini { display: grid; gap: 4px; color: var(--text) !important; text-decoration: none; font-size: 13px; }
.wl-mini img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--sand); }
.wl-mini:hover img { border-color: var(--accent); }
.wl-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wl-plans { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.wl-faq { display: grid; gap: 10px; max-width: 860px; }
.wl-q summary { cursor: pointer; font-weight: 600; font-size: 15.5px; }
.wl-q p { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .wl-groups, .wl-ways, .wl-plans { grid-template-columns: 1fr !important; } }

/* help: found models, model guides */
.hp-found { margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.hp-found ul { margin: 6px 0 0; }
.hp-crumbs { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.hp-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.hp-model { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text) !important; text-decoration: none; }
.hp-model:hover { border-color: var(--accent); }
.hp-model img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--sand); }
.hp-model small { color: var(--muted); font-size: 13px; }
.hp-head { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; margin-bottom: 8px; }
.hp-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); background: var(--sand); }
.hp-body { max-width: 860px; }
.hp-body table td:first-child { width: 38%; }
@media (max-width: 760px) { .hp-head { grid-template-columns: 1fr; } .hp-img { max-width: 260px; } }
.sh-own { max-width: 720px; margin: 0 0 22px; border: 2px solid var(--accent); display: grid; gap: 8px; }
.sh-own p { margin: 0; }
.sh-own .p-btn { justify-self: start; }
.sh-line b { margin-left: auto; }
.sh-legal { margin-top: 22px; max-width: 860px; }

/* dashboard: tiles of one size */
.hm-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hm-action { height: 64px; white-space: nowrap; overflow: hidden; }
.hm-action span { overflow: hidden; text-overflow: ellipsis; }
.hm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; align-items: stretch; }
.hm-card { display: flex; flex-direction: column; min-height: 230px; overflow: hidden; }
.hm-card .hm-more, .hm-card > .p-btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 1100px) { .hm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hm-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .hm-grid, .hm-quick { grid-template-columns: 1fr; } .hm-grid { grid-auto-rows: auto; } }

/* action links are buttons */
.hm-card .hm-more { margin-top: auto; }
.hm-guest { margin-top: 26px; }
.wl-q .wl-more { margin-top: 10px; }
.tk-back { margin-bottom: 14px; }

/* topic pages (server-written) */
.ld-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: center; margin: 6px 0 10px; }
.ld-hero h1 { font-size: 38px; line-height: 1.12; margin: 0 0 12px; }
.ld-hero-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); background: var(--sand); }
.ld-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; padding-left: 20px; font-size: 15.5px; max-width: 980px; }
.ld-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; grid-auto-rows: 1fr; }
.ld-model { display: flex; flex-direction: column; gap: 6px; }
.ld-model img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--sand); }
.ld-model h3 { margin: 6px 0 0; font-size: 17px; }
.ld-model p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.ld-model-acts { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.ld-text { max-width: 860px; }
.ld-text h2 { font-size: 22px !important; margin-top: 36px !important; }
.ld-cta { margin-top: 36px; display: grid; gap: 12px; text-align: center; justify-items: center; padding: 28px; }
.ld-cta b { font-size: 20px; }
.p-foot-topics { display: flex; flex-wrap: wrap; gap: 16px; flex-basis: 100%; }
@media (max-width: 860px) { .ld-hero { grid-template-columns: 1fr; } .ld-hero h1 { font-size: 30px; } .ld-points { grid-template-columns: 1fr; } .ld-hero-img { max-width: 320px; } }

/* model pictures whole, never cropped: the preview fits into its box with some room */
.ld-hero-img { object-fit: contain; padding: 6%; max-width: 420px; justify-self: center; }
.ld-model img { aspect-ratio: 1; object-fit: contain; padding: 8%; }
.ov-model img, .wl-mini img, .hp-model img, .hp-img, .wl-pic img { object-fit: contain; padding: 6%; background: var(--sand); }
.ld-hero-img, .ld-model img { height: auto; }

/* reviews page */
.rv-sum { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: center; max-width: 720px; margin-bottom: 18px; }
.rv-avg { display: grid; justify-items: center; gap: 2px; }
.rv-avg b { font-size: 44px; line-height: 1; }
.rv-stars { color: #e0a526; letter-spacing: 2px; font-size: 18px; }
.rv-dist { display: grid; gap: 6px; }
.rv-row { display: grid; grid-template-columns: 40px 1fr 30px; gap: 10px; align-items: center; font-size: 14px; }
.rv-bar { height: 8px; border-radius: 999px; background: var(--sand); overflow: hidden; }
.rv-bar i { display: block; height: 100%; background: #e0a526; }
.rv-list { display: grid; gap: 12px; max-width: 860px; }
.rv-item header { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.rv-item small { color: var(--muted); }
.rv-item p { margin: 8px 0 0; line-height: 1.55; }
.rv-note { max-width: 860px; margin-top: 22px; }
@media (max-width: 600px) { .rv-sum { grid-template-columns: 1fr; } }
.sh-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; }
.sh-switch { margin-top: 14px; }
@media (max-width: 900px) { .sh-cards-2 { grid-template-columns: 1fr; } }

/* ---------- consent card (consent.js): bottom left, both choices equally prominent ---------- */
.p-consent {
  position: fixed; z-index: 70; left: 16px; bottom: 16px; width: min(440px, calc(100% - 32px));
  display: grid; gap: 12px; padding: 20px 20px 16px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 50px rgb(51 40 32 / 0.25);
}
.p-consent h2 { margin: 0; font-size: 17px; font-weight: 600; }
.p-consent-text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.p-consent-text a { color: var(--accent); }
.p-consent-cat { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.p-consent-cat[hidden] { display: none; }
.p-consent-cat input { margin-top: 2px; accent-color: var(--ink); }
.p-consent-cat b { color: var(--text); font-size: 13px; }
.p-consent-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.p-consent-btns .btn { height: 34px; padding: 0 14px; font-size: 13px; }
.p-consent-btns [hidden] { display: none; }
.p-consent-link { padding: 0; border: 0; background: none; font: inherit; color: var(--muted); cursor: pointer; }
.p-consent-link:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 640px) {
  .p-consent { left: 12px; right: 12px; bottom: 12px; width: auto; }
}
