/* Main-site refresh. Agent product interfaces are intentionally untouched. */
:root {
  --portal-content-width: 1520px;
  --portal-accent: #a84608;
  --portal-accent-soft: #fff1e7;
  --portal-page: #f7f7f6;
  --portal-surface: #ffffff;
  --portal-surface-soft: #f0f1f0;
  --portal-line: #dfe2df;
  --portal-ink: #232827;
  --portal-muted: #565f5c;
  --portal-dim: #606b66;
  --portal-success: #28684c;
  --portal-warning: #886020;
  --portal-danger: #a9362c;
  --portal-shadow: 0 12px 36px rgba(23, 30, 27, .07);
  --portal-focus: 0 0 0 3px rgba(168, 70, 8, .19);
  --portal-card-radius: 14px;
  --portal-control-radius: 9px;
  --portal-body-leading: 1.65;
  --bg: var(--portal-page);
  --panel: var(--portal-surface);
  --panel-line: var(--portal-line);
  --text: var(--portal-ink);
  --text-soft: var(--portal-muted);
  --text-dim: var(--portal-dim);
  --cyan: var(--portal-accent);
  --ice: #705744;
  --blue: var(--portal-accent);
  --green: var(--portal-success);
  --amber: var(--portal-warning);
  --rose: var(--portal-danger);
  --red: var(--portal-danger);
  --slate-400: var(--portal-dim);
}

body, .portal-shell { background: var(--portal-page); color: var(--portal-ink); }
.portal-main { margin-left: 0; min-height: calc(100vh - 51px); }
.portal-topbar { min-height: 74px; background: rgba(247, 247, 246, .96); backdrop-filter: blur(14px); }
.portal-topbar__inner { max-width: var(--portal-content-width); min-height: 74px; gap: clamp(18px, 4vw, 68px); padding: 0 clamp(22px, 3vw, 44px); }
.portal-brand { width: auto; min-width: 174px; min-height: 58px; padding: 0; gap: 10px; border: 0; background: transparent; white-space: nowrap; }
.portal-brand:hover { background: transparent; }
.portal-brand__mark { position: relative; flex: 0 0 46px; width: 46px; height: 46px; overflow: hidden; border: 0; border-radius: 50%; background: #fff; }
.portal-brand__mark img { position: absolute; left: -7px; top: 0; width: 61px; height: 46px; max-width: none; object-fit: fill; }
.portal-brand__copy strong { font-size: 15px; font-weight: 650; }
.portal-brand__copy small { font-size: 10px; letter-spacing: .035em; }
.portal-topnav { display: flex; align-self: stretch; align-items: center; gap: clamp(8px, 2vw, 25px); }
.portal-topnav .portal-nav-item { display: inline-flex; width: auto; min-height: 70px; margin: 0; padding: 0 6px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--portal-muted); font-size: 14px; white-space: nowrap; }
.portal-topnav .portal-nav-item:hover { color: var(--portal-ink); background: transparent; }
.portal-topnav .portal-nav-item.active { border-bottom-color: var(--portal-accent); color: var(--portal-ink); background: transparent; font-weight: 650; }
.portal-nav-mobile-actions { display: none; }
.portal-topbar__actions { gap: 2px; }
.portal-topbar__button { color: var(--portal-muted); }
.portal-topbar__account { gap: 8px; max-width: 160px; white-space: nowrap; }
.portal-topbar__account span { overflow: hidden; text-overflow: ellipsis; }
.portal-topbar__mobile-menu { display: none; }
.portal-content { max-width: var(--portal-content-width); padding: 0 clamp(22px, 3vw, 44px); }
.portal-button--primary { background: var(--portal-accent); border-color: var(--portal-accent); }
.portal-button--primary:hover { background: #873805; border-color: #873805; }
.portal-legal-footer { background: var(--portal-page); border-color: var(--portal-line); }

/* Editorial one-viewport landing, with a live but compact Skill preview. */
.landing { padding: clamp(12px, 2vw, 24px) 0 28px; }
.landing__announcement { display: flex; gap: 8px; align-items: center; padding: 7px 0; color: var(--portal-accent); font-size: 12px; }
.landing__hero { padding: clamp(28px, 4.4vw, 60px) 0 clamp(34px, 4vw, 54px); border-bottom: 1px solid var(--portal-line); }
.landing__eyebrow { color: var(--portal-accent); font-size: 12px; font-weight: 650; letter-spacing: .09em; }
.landing__title { margin: 18px 0 20px; font-family: var(--font-display); font-size: clamp(42px, 5.25vw, 76px); font-weight: 700; letter-spacing: -.065em; line-height: 1.14; white-space: nowrap; }
.landing__typed { color: var(--portal-accent); }
.landing__cursor { display: inline-block; margin-left: 2px; font-weight: 300; animation: cursor-blink .75s step-end infinite; }
.landing__hero-copy > p { max-width: 590px; color: var(--portal-muted); font-size: 16px; line-height: 1.75; }
.landing__destinations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--portal-line); }
.landing-destination { display: flex; flex-direction: column; min-height: clamp(270px, 25vw, 320px); padding: 25px 24px 23px; }
.landing-destination:first-child { padding-left: 0; }
.landing-destination:last-child { padding-right: 0; }
.landing-destination + .landing-destination { border-left: 1px solid var(--portal-line); }
.landing-destination__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--portal-accent); }
.landing-destination__top span { font-size: 11px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.landing-destination h2 { margin: 28px 0 8px; font-size: clamp(18px, 1.85vw, 25px); font-weight: 650; letter-spacing: -.04em; line-height: 1.35; }
.landing-destination p { max-width: 350px; color: var(--portal-muted); font-size: 14px; line-height: 1.7; }
.landing-destination button { display: inline-flex; align-items: center; gap: 8px; width: fit-content; min-height: 44px; margin-top: auto; color: var(--portal-ink); font-size: 13px; font-weight: 600; }
.landing-destination button:hover { color: var(--portal-accent); }
.landing-preview { display: grid; grid-template-columns: 190px minmax(0, 1fr) 44px; gap: 20px; align-items: center; min-height: 218px; margin-top: 10px; padding: 16px 20px; border: 1px solid var(--portal-line); border-radius: var(--portal-card-radius); color: var(--portal-ink); background: #f2f1ee; }
.landing-preview__label { display: flex; flex-direction: column; gap: 6px; font-weight: 650; font-size: 17px; }
.landing-preview__label small { color: var(--portal-muted); font-size: 12px; font-weight: 400; }
.landing-preview__label em { margin-top: 12px; color: var(--portal-accent); font-size: 12px; font-style: normal; font-weight: 500; }
.landing-preview__window { overflow: hidden; min-width: 0; mask-image: linear-gradient(to right, #000 0%, #000 95%, transparent 100%); }
.landing-preview__track { display: flex; width: max-content; animation: portal-ticker 180s linear infinite; }
.landing-preview__track.is-paused, .landing-preview__window:hover .landing-preview__track, .landing-preview__window:focus-within .landing-preview__track { animation-play-state: paused; }
.landing-preview__group { display: flex; flex: 0 0 auto; gap: 10px; padding-right: 10px; }
.landing-preview__tile { display: flex; flex-direction: column; flex: 0 0 280px; width: 280px; min-height: 184px; padding: 16px 18px; border: 1px solid #e1dfd9; border-radius: 11px; color: var(--portal-ink); background: #fff; text-align: left; transition: border-color .2s ease, box-shadow .2s ease; }
.landing-preview__tile:hover { border-color: #c9aa94; box-shadow: 0 6px 18px rgba(31,38,36,.08); }
.landing-preview__tile:focus-visible { outline: 2px solid var(--portal-accent); outline-offset: 2px; }
.landing-preview__tile-top { display: flex; align-items: center; gap: 7px; color: var(--portal-muted); font-size: 12px; }
.landing-preview__category-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; color: var(--portal-accent); background: var(--portal-accent-soft); }
.landing-preview__tile-name { display: -webkit-box; overflow: hidden; margin-top: 11px; font-size: 16px; font-weight: 650; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.landing-preview__tile-description { display: -webkit-box; overflow: hidden; margin-top: 5px; color: var(--portal-muted); font-size: 13px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.landing-preview__tile-author { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--portal-line); color: var(--portal-dim); font-size: 12px; }
.landing-preview__empty { color: var(--portal-dim); font-size: 12px; }
.landing-preview__controls { display: flex; flex-direction: column; gap: 5px; }
.landing-preview__pause, .landing-preview__all { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid #c3c8c4; border-radius: 50%; color: var(--portal-ink); background: #fff; }
.landing-preview__pause:hover, .landing-preview__all:hover { border-color: var(--portal-accent); color: var(--portal-accent); }
.landing-preview__dialog-backdrop { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 20px; background: rgba(20,27,28,.48); }
.landing-preview__dialog { position: relative; width: min(100%, 460px); padding: 34px; border: 1px solid var(--portal-line); border-radius: 16px; background: var(--portal-surface); box-shadow: 0 28px 72px rgba(12,22,17,.2); }
.landing-preview__dialog h2 { margin: 14px 0 8px; font-size: 26px; letter-spacing: -.04em; }
.landing-preview__dialog p { margin-bottom: 22px; color: var(--portal-muted); font-size: 14px; line-height: 1.7; }
.landing-preview__dialog-close { position: absolute; top: 13px; right: 13px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; }
.landing-preview__dialog-close:hover { background: var(--portal-surface-soft); }
@keyframes portal-ticker { to { transform: translateX(-50%); } }

/* Full Skill catalogue is separate from the landing page. */
.catalog { padding: 50px 0 84px; }
.catalog__header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 32px; border-bottom: 1px solid var(--portal-line); }
.catalog__header h1 { margin: 10px 0 6px; font-size: clamp(38px, 4vw, 56px); line-height: 1.2; letter-spacing: -.05em; }
.catalog__header p { max-width: 620px; color: var(--portal-muted); font-size: 14px; line-height: 1.7; }
.catalog__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.catalog__toolbar { display: flex; align-items: center; gap: 18px; padding: 20px 0 10px; }
.catalog__search { display: flex; align-items: center; gap: 9px; flex: 0 0 min(310px, 40%); min-height: 44px; padding: 0 13px; border: 1px solid var(--portal-line); border-radius: var(--portal-control-radius); background: var(--portal-surface); color: var(--portal-dim); }
.catalog__category-rail { display: flex; align-items: center; min-width: 0; flex: 1; }
.catalog__search:focus-within { border-color: #8eb09d; box-shadow: var(--portal-focus); }
.catalog__search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--portal-ink); font-size: 13px; }
.catalog__categories { display: flex; flex: 1; gap: 2px; min-width: 0; overflow-x: auto; }
.catalog__categories button { flex: 0 0 auto; min-height: 44px; padding: 0 9px; border-bottom: 2px solid transparent; color: var(--portal-muted); font-size: 12px; white-space: nowrap; }
.catalog__category-arrow { display: none; }
.catalog__categories button:hover, .catalog__categories button.is-active { color: var(--portal-accent); }
.catalog__categories button.is-active { border-bottom-color: var(--portal-accent); font-weight: 650; }
.catalog__count { padding: 12px 0; color: var(--portal-dim); font-size: 12px; }
.catalog__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.catalog__grid .portal-skill-card { min-height: 232px; padding: 24px; border: 1px solid var(--portal-line); border-radius: var(--portal-card-radius); background: var(--portal-surface); box-shadow: 0 2px 12px rgba(23, 30, 27, .025); }
.catalog__grid .portal-skill-card:hover { border-color: #c8b3a5; box-shadow: 0 8px 24px rgba(23, 30, 27, .065); }
.catalog__grid .portal-skill-card__title { font-size: 16px; line-height: 1.45; }
.catalog__grid .portal-skill-card__desc { flex: none; margin: 16px 0 0; font-size: 14px; line-height: 1.6; }
.catalog__grid .portal-skill-card__footer { padding-top: 20px; }
.catalog__grid .portal-icon-action { min-height: 44px; }
.catalog__empty { padding: 70px 0; color: var(--portal-dim); text-align: center; }

/* Agent / Wiki directory stays visible regardless of access. */
.portal-page { padding: 52px 0 80px; }
.portal-page__intro { max-width: 800px; }
.portal-page__title { margin-top: 9px; font-size: clamp(34px, 4vw, 54px); letter-spacing: -.055em; }
.portal-page__note { display: flex; align-items: baseline; gap: 24px; margin: 30px 0 22px; padding: 17px 0; border-top: 1px solid var(--portal-line); color: var(--portal-muted); font-size: 13px; }
.portal-page__note span { flex: 0 0 auto; color: var(--portal-accent); font-weight: 700; }
.portal-page__note p { margin: 0; }
.portal-access-list { display: grid; gap: 18px; border: 0; }
.portal-access-item { display: grid; grid-template-columns: minmax(0, 1fr) 156px; gap: 30px; padding: 28px 30px; border: 1px solid var(--portal-line); border-radius: var(--portal-card-radius); background: var(--portal-surface); box-shadow: 0 4px 18px rgba(22,31,41,.035); }
.portal-access-item__main { min-width: 0; }
.portal-access-item--deferred { background: #fbfbfa; }
.portal-access-item__heading { display: flex; align-items: center; gap: 16px; }
.portal-access-item__icon { display: grid; flex: 0 0 56px; place-items: center; width: 56px; height: 56px; border-color: #eac9ae; border-radius: 14px; color: var(--portal-accent); background: var(--portal-accent-soft); }
.portal-access-item__index { display: block; margin-bottom: 3px; color: var(--portal-accent); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.portal-access-item__name { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.portal-access-item__lead { max-width: 850px; margin: 18px 0 22px; color: var(--portal-ink); font-size: 15px; font-weight: 530; line-height: var(--portal-body-leading); }
.portal-access-item__details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 52px); margin: 22px 0; }
.portal-access-item__details h3 { margin-bottom: 12px; color: var(--portal-dim); font-size: 11px; font-weight: 650; letter-spacing: .08em; }
.portal-access-item__capabilities, .portal-access-item__steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.portal-access-item__capabilities li, .portal-access-item__steps li { display: flex; align-items: center; gap: 10px; color: var(--portal-ink); font-size: 13px; line-height: 1.5; }
.portal-access-item__capabilities li svg { color: var(--portal-success); }
.portal-access-item__steps li span { display: grid; flex: 0 0 19px; place-items: center; width: 19px; height: 19px; border-radius: 50%; color: var(--portal-accent); background: var(--portal-accent-soft); font-size: 10px; font-weight: 700; }
.portal-access-item__process { margin: 0; padding-top: 18px; border-top: 1px solid var(--portal-line); color: var(--portal-dim); font-size: 12px; line-height: 1.6; }
.portal-access-item__side { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; align-self: stretch; padding: 8px 0 8px 22px; border-left: 1px solid var(--portal-line); }
.portal-access-item__status { margin: 0; font-size: 13px; font-weight: 520; line-height: 1.45; }
.portal-access-item__action { justify-content: flex-start; width: auto; min-width: 0; min-height: 44px; padding: 0; border: 0; border-radius: 0; color: var(--portal-muted); background: transparent; font-size: 13px; font-weight: 620; }
.portal-access-item__action:hover { border: 0; color: var(--portal-accent); background: transparent; }
.portal-access-item__action--primary { gap: 5px; color: var(--portal-accent); background: transparent; }
.portal-access-item__action--primary svg { transition: transform .16s ease; }
.portal-access-item__action--primary:hover { border: 0; color: #873805; background: transparent; }
.portal-access-item__action--primary:hover svg { transform: translate(2px, -2px); }
.portal-access-item__action:disabled { color: var(--portal-dim); background: transparent; opacity: .72; }

/* Authentication is a true split surface: institutional story left, focused action right. */
.portal-auth { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) clamp(420px, 35vw, 600px); width: 100%; min-height: 100vh; min-height: 100dvh; margin: 0; padding: 0; overflow: hidden; color: var(--portal-ink); background: #f5f5f3; isolation: isolate; }
.portal-auth--register { grid-template-columns: minmax(0, 1fr) clamp(560px, 42vw, 720px); }
.portal-auth__visual { position: relative; display: grid; grid-template-rows: auto 1fr auto; min-width: 0; min-height: 100dvh; padding: clamp(36px, 5vh, 64px) clamp(38px, 4.5vw, 88px) clamp(28px, 4vh, 48px); overflow: hidden; background: linear-gradient(145deg, #fafaf8 0%, #f4f3ef 100%); isolation: isolate; }
.portal-auth__visual::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 70% 48%, rgba(177,72,8,.07), transparent 35%), linear-gradient(90deg, rgba(250,250,248,.24), rgba(250,250,248,.72) 86%); pointer-events: none; }
.portal-auth__brand { position: relative; z-index: 3; display: flex; align-items: center; gap: 14px; width: fit-content; min-width: 0; min-height: 64px; font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", var(--font-ui); }
.portal-auth__seal { position: relative; display: block; flex: 0 0 56px; width: 56px; height: 56px; overflow: hidden; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(35,40,39,.08); }
.portal-auth__seal img { display: block; width: 100%; height: 100%; object-fit: cover; }
.portal-auth__brand strong, .portal-auth__brand span { display: block; }
.portal-auth__brand strong { color: var(--portal-ink); font-size: 15px; font-weight: 650; letter-spacing: -.012em; white-space: nowrap; }
.portal-auth__brand span { margin-top: 2px; color: var(--portal-muted); font-size: 13px; font-weight: 600; letter-spacing: .005em; }
.portal-auth__intro { position: relative; z-index: 2; align-self: center; width: min(100%, 700px); margin: 0 0 0 clamp(72px, 10vw, 200px); padding: 36px 0 72px; }
.portal-auth__title { max-width: 650px; margin: 0 0 28px; color: var(--portal-ink); font-family: var(--font-display); font-size: clamp(50px, 5.4vw, 78px); font-weight: 700; letter-spacing: -.02em; line-height: 1.06; text-wrap: balance; }
.portal-auth__title em { color: var(--portal-accent); font-style: normal; }
.portal-auth__typed { display: inline-block; min-width: 2.2em; color: var(--portal-accent); }
.portal-auth__cursor { display: inline-block; margin-left: .04em; color: var(--portal-accent); font-style: normal; font-weight: 300; animation: cursor-blink .75s step-end infinite; }
.portal-auth__copy { max-width: 520px; margin: 0; color: var(--portal-muted); font-size: 16px; line-height: 1.7; text-wrap: balance; }
.portal-auth__side { position: relative; z-index: 4; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; width: 100%; min-width: 0; min-height: 100dvh; padding: clamp(28px, 5vw, 72px); border-left: 1px solid rgba(35,40,39,.08); background: rgba(247,247,245,.9); box-shadow: -24px 0 60px rgba(35,40,39,.035); }
.portal-auth__panel { width: min(100%, 420px); min-width: 0; overflow: hidden; border: 1px solid rgba(35,40,39,.1); border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: 0 20px 54px rgba(27,31,29,.09); backdrop-filter: blur(18px); }
.portal-auth__panel.is-wide { width: 100%; }
.portal-auth__panel input, .portal-auth__panel select { background: #fff !important; }
.portal-model-wall { position: absolute; top: 1%; right: -2%; bottom: -1%; left: -14%; z-index: 0; display: grid; align-content: center; gap: 20px; overflow: hidden; opacity: .145; filter: blur(.4px) saturate(.3); transform: rotate(-11deg); transform-origin: center; mask-image: linear-gradient(100deg, transparent 0%, rgba(0,0,0,.12) 8%, rgba(0,0,0,.5) 25%, #000 64%, rgba(0,0,0,.28) 92%, transparent 100%); pointer-events: none; }
.portal-model-wall__row { display: flex; gap: 18px; width: max-content; animation: portal-model-drift 38s linear infinite; will-change: transform; }
.portal-model-wall__group { display: flex; flex: 0 0 auto; gap: 18px; }
.portal-model-wall__row:nth-child(2) { margin-left: 72px; animation-duration: 43s; animation-delay: -11s; }
.portal-model-wall__row:nth-child(3) { margin-left: -44px; animation-duration: 40s; animation-delay: -21s; }
.portal-model-wall__row:nth-child(4) { margin-left: 118px; animation-duration: 46s; animation-delay: -29s; }
.portal-model-wall__mark { display: grid; flex: 0 0 106px; place-items: center; gap: 7px; width: 106px; height: 94px; border: 1px solid rgba(35,40,39,.2); border-radius: 22px; color: #4f5552; background: rgba(255,255,255,.52); box-shadow: 0 10px 26px rgba(35,40,39,.045); }
.portal-model-wall__mark img { display: block; width: 36px; height: 36px; object-fit: contain; }
.portal-model-wall__mark > span { font-size: 11px; font-weight: 650; letter-spacing: .02em; }
@keyframes portal-model-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(calc(-50% - 9px), 0, 0); } }
.portal-auth-form { padding: 32px; }
.portal-auth-form__header { margin-bottom: 28px; }
.portal-auth-form__header h2 { margin: 0 0 5px; color: var(--portal-ink); font-size: 24px; font-weight: 680; letter-spacing: -.035em; line-height: 1.25; }
.portal-auth-form__header p { margin: 0; color: var(--portal-muted); font-size: 13px; }
.portal-auth-field { display: block; margin-bottom: 17px; }
.portal-auth-field__label { display: block; margin-bottom: 7px; color: var(--portal-muted); font-size: 13px; font-weight: 600; }
.portal-auth-field__control { position: relative; display: block; border-radius: 10px; }
.portal-auth-field__icon { position: absolute; top: 50%; left: 14px; z-index: 1; display: grid; place-items: center; transform: translateY(-50%); pointer-events: none; }
.portal-auth-field input { width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--portal-line); border-radius: 10px; color: var(--portal-ink); background: #fff; font: inherit; font-size: 15px; outline: 0; transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease; }
.portal-auth-field input.has-icon { padding-left: 42px; }
.portal-auth-field input:hover { border-color: #c8ccc8; }
.portal-auth-field__control.is-focused input { border-color: var(--portal-accent); box-shadow: var(--portal-focus); }
.portal-auth-form__error { display: flex; align-items: flex-start; gap: 8px; margin: -1px 0 17px; padding: 10px 12px; border: 1px solid rgba(169,54,44,.22); border-radius: 9px; color: var(--portal-danger); background: #fff3f0; font-size: 13px; line-height: 1.45; }
.portal-auth-form__error svg { flex: 0 0 auto; margin-top: 2px; }
.portal-auth-form__submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 0 18px; border: 1px solid var(--portal-accent); border-radius: 10px; color: #fff; background: var(--portal-accent); font-size: 15px; font-weight: 650; letter-spacing: -.01em; transition: background-color .14s ease, border-color .14s ease, transform .1s ease, box-shadow .14s ease; }
.portal-auth-form__submit:hover:not(:disabled) { border-color: #8f3905; background: #8f3905; }
.portal-auth-form__submit:active:not(:disabled) { transform: scale(.992); }
.portal-auth-form__submit:focus-visible, .portal-auth-form__links button:focus-visible { outline: 0; box-shadow: var(--portal-focus); }
.portal-auth-form__submit:disabled { border-color: #c9cbc8; background: #c9cbc8; cursor: wait; }
.portal-auth-form__spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.portal-auth-form__links { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.portal-auth-form__links button { min-width: 0; min-height: 44px; padding: 0 2px; color: var(--portal-muted); font-size: 13px; text-align: left; transition: color .16s ease; }
.portal-auth-form__links button:hover { color: var(--portal-accent); }
.portal-auth-form__links .portal-auth-form__apply { font-weight: 580; }
.portal-auth-state { padding: 42px 32px 36px; text-align: center; }
.portal-auth-state__icon { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 18px; border-radius: 50%; color: var(--portal-accent); background: var(--portal-accent-soft); }
.portal-auth-state h2 { margin: 0 0 10px; color: var(--portal-ink); font-size: 22px; font-weight: 680; letter-spacing: -.035em; }
.portal-auth-state p { max-width: 300px; margin: 0 auto 24px; color: var(--portal-muted); font-size: 14px; line-height: 1.7; }
.portal-auth-state > button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 6px; color: var(--portal-accent); font-size: 14px; font-weight: 620; }
.portal-auth-state > button:focus-visible { outline: 0; box-shadow: var(--portal-focus); }
.portal-auth-secondary-form > div:first-child > div:first-child { color: var(--portal-ink) !important; font-size: 22px !important; font-weight: 680 !important; }
.portal-auth-secondary-form button[type="submit"] { min-height: 48px; border-radius: 10px !important; }
.portal-auth__security { position: relative; z-index: 2; align-self: end; color: var(--portal-dim); font-size: 11px; letter-spacing: .025em; }

@media (min-width: 861px) {
  body:has(.portal-auth) .portal-legal-footer { position: fixed; right: 0; bottom: 10px; left: 0; z-index: 6; width: max-content; margin: 0 auto; padding: 0; border: 0; background: transparent; font-size: 10px; }
}

@media (min-width: 861px) and (max-width: 1199px) {
  .portal-auth__intro { margin-left: 40px; }
}

/* Utility pages keep the same quiet palette as the public sections. */
.cli-guide, .profile-page { margin: 0 auto; padding: 48px 0 88px; }
.cli-guide { max-width: 860px; }
.cli-guide__back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 28px; color: var(--portal-muted); font-size: 13px; }
.cli-guide__back:hover { color: var(--portal-accent); }
.cli-guide header, .profile-page__header { padding-bottom: 28px; border-bottom: 1px solid var(--portal-line); }
.cli-guide h1, .profile-page__header h1 { margin: 10px 0 8px; color: var(--portal-ink); font-size: clamp(35px, 4vw, 52px); letter-spacing: -.05em; line-height: 1.2; }
.cli-guide p, .profile-page__header p { color: var(--portal-muted); font-size: 14px; line-height: 1.7; }
.cli-guide section { padding: 28px 0; border-bottom: 1px solid var(--portal-line); }
.cli-guide h2, .profile-page h2 { margin: 0 0 8px; color: var(--portal-ink); font-size: 17px; font-weight: 600; }
.cli-guide__command { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding: 15px 18px; border: 1px solid var(--portal-line); border-radius: 10px; background: var(--portal-surface); }
.cli-guide__command h3 { font-size: 13px; font-weight: 600; }
.cli-guide code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.cli-guide__command code { display: block; color: var(--portal-ink); font-size: 13px; }
.profile-page__identity { display: flex; align-items: center; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--portal-line); }
.profile-page__avatar { display: grid; flex: 0 0 58px; place-items: center; width: 58px; height: 58px; border-radius: 50%; color: var(--portal-accent); background: var(--portal-accent-soft); font-size: 24px; font-weight: 600; }
.profile-page__identity-copy { flex: 1; min-width: 0; }
.profile-page__identity-copy p { margin-top: 4px; color: var(--portal-muted); font-size: 13px; }
.profile-page__form, .profile-page__security, .profile-page__activity { padding: 28px 0; border-bottom: 1px solid var(--portal-line); }
.profile-page__security > div > p { color: var(--portal-muted); font-size: 13px; }
.profile-page__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.profile-page__security .profile-page__fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-page__fields label { display: flex; flex-direction: column; gap: 7px; color: var(--portal-muted); font-size: 13px; }
.profile-page__fields .profile-page__wide { grid-column: 1 / -1; }
.profile-page__fields input, .profile-page__fields select, .profile-page__fields textarea { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--portal-line); border-radius: 8px; color: var(--portal-ink); background: var(--portal-surface); font: inherit; }
.profile-page__fields textarea { resize: vertical; }
.profile-page__fields :is(input, select, textarea):focus-visible { outline: 0; border-color: var(--portal-accent); box-shadow: var(--portal-focus); }
.profile-page__tabs { display: flex; gap: 20px; overflow-x: auto; border-bottom: 1px solid var(--portal-line); }
.profile-page__tabs button { flex: 0 0 auto; min-height: 48px; border-bottom: 2px solid transparent; color: var(--portal-muted); font-size: 13px; }
.profile-page__tabs button.is-active { border-bottom-color: var(--portal-accent); color: var(--portal-ink); font-weight: 600; }
.profile-page__row { display: flex; justify-content: space-between; gap: 18px; padding: 17px 0; border-bottom: 1px solid var(--portal-line); font-size: 13px; }
.profile-page__row strong { color: var(--portal-ink); font-weight: 600; }
.profile-page__row span { color: var(--portal-muted); }
.profile-page__empty { padding: 44px 0; color: var(--portal-muted); font-size: 13px; }
.profile-page__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 28px 0; }
.profile-page__stats > div { display: flex; flex-direction: column; gap: 4px; }
.profile-page__stats strong { color: var(--portal-ink); font-size: 24px; font-weight: 600; }
.profile-page__stats span { color: var(--portal-muted); font-size: 13px; }
/* Account activity is the main task; sensitive controls stay available but secondary. */
.profile-page { display: flex; flex-direction: column; max-width: 1180px; }
.profile-page__header p { max-width: 680px; }
.profile-page__header { order: 0; }
.profile-page__identity { order: 1; margin-top: 24px; padding: 26px; border: 1px solid var(--portal-line); border-radius: 16px; background: var(--portal-surface); }
.profile-page__avatar { flex-basis: 68px; width: 68px; height: 68px; color: #fff; background: #153a77; }
.profile-page__identity-copy > span { color: var(--portal-accent); font-size: 11px; font-weight: 650; }
.profile-page__identity-copy h2 { margin: 4px 0; font-size: 24px; }
.profile-page__overview { order: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0 32px; }
.profile-page__overview > div { display: flex; align-items: center; gap: 9px; min-height: 84px; padding: 16px 20px; border: 1px solid var(--portal-line); border-radius: 12px; background: var(--portal-surface); }
.profile-page__overview svg { color: var(--portal-accent); }
.profile-page__overview strong { margin-left: auto; font-size: 26px; font-weight: 650; }
.profile-page__overview span { color: var(--portal-muted); font-size: 12px; }
.profile-page__form { order: 2; margin-bottom: 18px; padding: 22px; border: 1px solid var(--portal-line); border-radius: 12px; background: var(--portal-surface); }
.profile-page__activity { order: 3; padding-top: 0; }
.profile-page__tabs { gap: 6px; }
.profile-page__tabs button { padding: 0 16px; border-bottom-width: 3px; }
.profile-page__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 230px; padding: 36px; color: var(--portal-muted); text-align: center; }
.profile-page__empty > svg { color: var(--portal-accent); }
.profile-page__empty h3 { margin: 15px 0 5px; color: var(--portal-ink); font-size: 17px; }
.profile-page__empty p { margin: 0; }
.profile-page__empty button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin-top: 10px; color: var(--portal-accent); font-weight: 650; }
.profile-page__security { order: 4; padding: 22px 0; }
.profile-page__security summary { display: flex; align-items: center; justify-content: space-between; min-height: 60px; cursor: pointer; list-style: none; }
.profile-page__security summary::-webkit-details-marker { display: none; }
.profile-page__security summary > span { display: flex; align-items: center; gap: 10px; }
.profile-page__security summary svg { color: var(--portal-accent); }
.profile-page__security summary strong { color: var(--portal-ink); font-size: 15px; }
.profile-page__security summary small { color: var(--portal-dim); font-size: 12px; }
.profile-page__security details[open] summary > svg { transform: rotate(180deg); }
.profile-page__security details > p { color: var(--portal-muted); font-size: 13px; }
/* Leaderboard replaces the legacy blue pills and dark empty panel. */
.leaderboard-page { padding: 48px 0 88px; }
.leaderboard-page__header { padding-bottom: 27px; border-bottom: 1px solid var(--portal-line); }
.leaderboard-page__header h1 { margin: 10px 0 8px; font-size: clamp(36px, 4vw, 52px); letter-spacing: -.05em; }
.leaderboard-page__header p { color: var(--portal-muted); font-size: 14px; }
.leaderboard-page__layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 44px; padding-top: 28px; }
.leaderboard-page__tabs { display: flex; flex-wrap: wrap; gap: 5px; padding: 5px; border: 1px solid var(--portal-line); border-radius: 11px; background: var(--portal-surface); }
.leaderboard-page__tabs button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 13px; border-radius: 7px; color: var(--portal-muted); font-size: 12px; }
.leaderboard-page__tabs button.is-active { color: var(--portal-ink); background: var(--portal-surface-soft); font-weight: 650; }
.leaderboard-page__tabs button.is-active svg { color: var(--portal-accent); }
.leaderboard-page__caption { display: flex; align-items: baseline; gap: 18px; margin: 34px 0 16px; }
.leaderboard-page__caption h2 { font-size: 21px; letter-spacing: -.03em; }
.leaderboard-page__caption p { color: var(--portal-dim); font-size: 12px; }
.leaderboard-page__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--portal-line); }
.leaderboard-page__row { display: flex; align-items: center; gap: 20px; min-height: 83px; border-bottom: 1px solid var(--portal-line); }
.leaderboard-page__rank { width: 38px; color: var(--portal-accent); font-size: 18px; font-weight: 700; }
.leaderboard-page__person { display: flex; flex: 1; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; min-width: 0; }
.leaderboard-page__person strong { font-size: 14px; }
.leaderboard-page__person small { color: var(--portal-muted); font-size: 11px; }
.leaderboard-page__bar { flex-basis: 100%; height: 4px; border-radius: 4px; background: var(--portal-surface-soft); }
.leaderboard-page__bar i { display: block; height: 4px; border-radius: 4px; background: var(--portal-accent); }
.leaderboard-page__count { display: flex; flex-direction: column; align-items: flex-end; min-width: 68px; }
.leaderboard-page__count strong { font-size: 21px; }
.leaderboard-page__count small { color: var(--portal-dim); font-size: 11px; }
.leaderboard-page__message { padding: 54px 18px; border: 1px solid var(--portal-line); border-radius: 12px; color: var(--portal-muted); background: var(--portal-surface); text-align: center; font-size: 13px; }
.leaderboard-page__empty { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(190px, .7fr); min-height: 320px; padding: 0; border: 1px solid var(--portal-line); border-radius: 13px; background: var(--portal-surface); text-align: left; overflow: hidden; }
.leaderboard-page__empty-main { padding: 30px; }
.leaderboard-page__empty-index { color: #e1d1c4; font-size: 54px; font-weight: 700; letter-spacing: -.08em; line-height: 1; }
.leaderboard-page__empty h3 { margin: 18px 0 8px; font-size: 19px; letter-spacing: -.03em; }
.leaderboard-page__empty p { max-width: 390px; color: var(--portal-muted); font-size: 13px; line-height: 1.7; }
.leaderboard-page__empty button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 14px; color: var(--portal-accent); font-size: 13px; font-weight: 650; }
.leaderboard-page__empty-path { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 25px; border-left: 1px solid var(--portal-line); background: #f6f4f1; }
.leaderboard-page__empty-path > span { color: var(--portal-accent); font-size: 11px; font-weight: 700; letter-spacing: .07em; }
.leaderboard-page__empty-path div { display: flex; align-items: baseline; gap: 10px; color: var(--portal-ink); font-size: 12px; }
.leaderboard-page__empty-path strong { color: var(--portal-accent); font-size: 11px; }
.leaderboard-page__aside { align-self: start; padding: 7px 0 0 22px; border-left: 2px solid var(--portal-accent); color: var(--portal-ink); }
.leaderboard-page__aside > span { color: var(--portal-accent); font-size: 11px; }
.leaderboard-page__aside h2 { margin: 22px 0 12px; font-size: 21px; line-height: 1.35; }
.leaderboard-page__aside p { color: var(--portal-muted); font-size: 12px; line-height: 1.7; }
.leaderboard-page__aside div { display: flex; align-items: center; gap: 8px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--portal-line); color: var(--portal-dim); font-size: 11px; }
/* Personal Skill library uses the same roomy editorial structure. */
.portal-skills-page { max-width: none; margin: 0 auto; padding: 48px 0 88px; }
.portal-skills-page__header { align-items: end; margin-bottom: 0; padding-bottom: 28px; border-bottom: 1px solid var(--portal-line); }
.portal-skills-page__title { margin: 10px 0 8px; font-size: clamp(36px, 4vw, 52px); letter-spacing: -.05em; }
.portal-skills-page__copy { max-width: 610px; font-size: 14px; line-height: 1.65; }
.portal-skills-page__upload { min-height: 46px; padding: 0 20px; }
.portal-skills-page__layout { padding-top: 28px; }
.portal-skills-page__primary { min-width: 0; }
.portal-skills-tabs { width: 100%; gap: 0; min-height: 52px; margin-bottom: 26px; padding: 0; border: 0; border-bottom: 1px solid var(--portal-line); border-radius: 0; background: transparent; }
.portal-skills-tab { min-height: 51px; padding: 0 15px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; font-size: 13px; }
.portal-skills-tab:hover { background: transparent; }
.portal-skills-tab.is-active { border: 0; border-bottom: 2px solid var(--portal-accent); color: var(--portal-ink); background: transparent; }
.portal-skills-tab__badge { border-radius: 5px; background: var(--portal-surface-soft); }
.portal-skills-tab.is-active .portal-skills-tab__badge { color: var(--portal-accent); background: var(--portal-accent-soft); }
.portal-skills-list { gap: 12px; }
.portal-skills-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 315px; padding: 40px 28px; border: 1px solid var(--portal-line); border-radius: 14px; background: var(--portal-surface); text-align: center; }
.portal-skills-empty__icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; color: var(--portal-accent); background: var(--portal-accent-soft); }
.portal-skills-empty svg { color: inherit; }
.portal-skills-empty h2 { margin: 18px 0 5px; font-size: 19px; letter-spacing: -.03em; }
.portal-skills-empty p { max-width: 360px; margin: 0; color: var(--portal-muted); font-size: 13px; line-height: 1.65; }
.portal-skills-empty button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin-top: 12px; color: var(--portal-accent); font-size: 13px; font-weight: 650; }
.portal-skill-row { min-height: 82px; padding: 17px 20px; border-radius: 11px; }
.portal-skill-row__icon { border-color: var(--portal-line); background: var(--portal-accent-soft); }
.portal-skill-row__action { min-height: 38px; font-size: 12px; }
/* One calm feedback language across the public site and admin. */
.portal-toast-stack { position: fixed; z-index: 10000; top: 88px; right: 24px; display: flex; flex-direction: column; gap: 9px; width: min(370px, calc(100vw - 32px)); pointer-events: none; }
.portal-toast { display: flex; align-items: center; gap: 11px; min-height: 58px; padding: 10px 11px 10px 15px; border: 1px solid var(--portal-line); border-left: 3px solid var(--portal-success); border-radius: 11px; color: var(--portal-ink); background: var(--portal-surface); box-shadow: 0 12px 32px rgba(24,39,39,.12); pointer-events: auto; animation: toastIn .25s ease-out; }
.portal-toast--error { border-left-color: #b84232; }
.portal-toast--warning { border-left-color: var(--portal-warning); }
.portal-toast--info { border-left-color: #345d94; }
.portal-toast__icon { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; color: var(--portal-success); background: #eaf4ee; }
.portal-toast--error .portal-toast__icon { color: #b84232; background: #fff0ec; }
.portal-toast--warning .portal-toast__icon { color: var(--portal-warning); background: #fff5e4; }
.portal-toast--info .portal-toast__icon { color: #345d94; background: #eaf0f9; }
.portal-toast__message { flex: 1; font-size: 13px; font-weight: 550; line-height: 1.45; }
.portal-toast__close { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; border-radius: 7px; color: var(--portal-dim); }
.portal-toast__close:hover { color: var(--portal-ink); background: var(--portal-surface-soft); }
.portal-feedback-trigger { position: fixed; right: 26px; bottom: 26px; z-index: 1000; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--portal-line); border-radius: 50%; color: var(--portal-ink); background: var(--portal-surface); box-shadow: var(--portal-shadow); }
.portal-feedback-trigger:hover { color: var(--portal-accent); border-color: var(--portal-accent); }
.portal-feedback-overlay { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 20px; background: rgba(20, 26, 23, .42); }
.portal-feedback-dialog { width: min(100%, 480px); border: 1px solid var(--portal-line); border-radius: 16px; background: var(--portal-surface); box-shadow: 0 25px 70px rgba(12, 22, 17, .2); }
.portal-feedback-dialog__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--portal-line); }
.portal-feedback-dialog__heading { display: flex; align-items: center; gap: 10px; color: var(--portal-ink); font-size: 16px; font-weight: 600; }
.portal-feedback-dialog__close { display: grid; place-items: center; width: 44px; height: 44px; color: var(--portal-muted); }
.portal-feedback-dialog__body { padding: 22px; }
.portal-feedback-dialog__body p { margin-bottom: 14px; color: var(--portal-muted); font-size: 13px; line-height: 1.65; }
.portal-feedback-dialog__body textarea { width: 100%; min-height: 130px; padding: 12px; border: 1px solid var(--portal-line); border-radius: 9px; color: var(--portal-ink); background: var(--portal-surface); font: inherit; resize: vertical; }
.portal-feedback-dialog__body textarea:focus-visible { outline: 0; border-color: var(--portal-accent); box-shadow: var(--portal-focus); }
.portal-feedback-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.portal-feedback-dialog__actions .portal-button { min-height: 44px; }

/* The management shell is deliberately separate from Agent product layouts. */
.admin-shell { --portal-content-width: 100%; --cyan: var(--portal-accent); --blue: var(--portal-accent); --ice: var(--portal-muted); --green: var(--portal-success); --amber: var(--portal-warning); --rose: var(--portal-danger); --red: var(--portal-danger); --panel-line: var(--portal-line); --text: var(--portal-ink); --text-soft: var(--portal-muted); --text-dim: var(--portal-dim); min-height: 100vh; color: var(--portal-ink); background: var(--portal-page); }
.admin-shell__sidebar { position: fixed; inset: 0 auto 0 0; z-index: 200; display: flex; flex-direction: column; width: 236px; border-right: 1px solid var(--portal-line); background: var(--portal-surface); }
.admin-shell__brand { display: flex; align-items: center; gap: 10px; min-height: 84px; padding: 0 20px; border-bottom: 1px solid var(--portal-line); }
.admin-shell__brand strong, .admin-shell__brand small { display: block; }
.admin-shell__brand strong { font-size: 15px; }
.admin-shell__brand small { color: var(--portal-muted); font-size: 12px; }
.admin-shell__nav { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 10px; }
.admin-shell__nav button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 13px; border-radius: 8px; color: var(--portal-muted); text-align: left; font-size: 13px; }
.admin-shell__nav button:hover { color: var(--portal-ink); background: var(--portal-surface-soft); }
.admin-shell__nav button.is-active { color: var(--portal-accent); background: var(--portal-accent-soft); font-weight: 600; }
.admin-shell__footer { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--portal-line); color: var(--portal-muted); font-size: 13px; }
.admin-shell__footer button { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--portal-ink); text-align: left; font-size: 13px; }
.admin-shell__footer button:hover { color: var(--portal-accent); }
.admin-shell__main { min-width: 0; margin-left: 236px; }
.admin-shell__topbar { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: 8px; min-height: 72px; padding: 0 36px; border-bottom: 1px solid var(--portal-line); background: rgba(247, 247, 246, .96); color: var(--portal-muted); font-size: 13px; backdrop-filter: blur(14px); }
.admin-shell__topbar strong { color: var(--portal-ink); font-weight: 600; }
.admin-shell__content { max-width: 1560px; margin: 0 auto; padding: 44px 36px 80px; }
.admin-shell__content > div[style*="padding: 28px"] { padding: 0 !important; }
.admin-shell__content h1 { color: var(--portal-ink) !important; font-size: clamp(29px, 3vw, 38px) !important; font-weight: 700 !important; letter-spacing: -.045em !important; }
.admin-shell__content h2 { color: var(--portal-ink); letter-spacing: -.025em; }
.admin-shell__content table { width: 100%; border-collapse: separate; border-spacing: 0; color: var(--portal-ink); }
.admin-shell__content th { color: var(--portal-muted) !important; background: #f2f3f1 !important; font-size: 12px; font-weight: 600; }
.admin-shell__content td { border-color: var(--portal-line) !important; }
.admin-shell__content tr:hover td { background: #fbfaf8; }
.admin-shell__content button { font-family: inherit; }
.admin-shell__content button:focus-visible, .admin-shell__nav button:focus-visible { outline: 0; box-shadow: var(--portal-focus); }
.admin-shell__scrim { position: fixed; inset: 0; z-index: 250; background: rgba(20, 26, 23, .4); }
.admin-shell__sidebar--drawer { z-index: 251; }
.admin-shell__menu { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -12px; }
/* Legacy admin children still carry inline dark-surface values. Keep their
   data/controls intact while replacing only the old presentation layer. */
.admin-shell__content :is([style*="rgba(6, 14, 28"], [style*="rgba(6,14,28"], [style*="rgba(7, 17, 34"], [style*="rgba(7,17,34"], [style*="rgba(8, 16, 31"], [style*="rgba(8,16,31"]) { background: var(--portal-surface) !important; border-color: var(--portal-line) !important; backdrop-filter: none !important; box-shadow: none !important; }
.admin-shell__content :is([style*="rgba(149, 196, 255"], [style*="rgba(149,196,255"], [style*="rgba(102, 231, 255"], [style*="rgba(102,231,255"]) { border-color: var(--portal-line) !important; }
.admin-shell__content :is(button, div)[style*="linear-gradient(135deg"] { background: var(--portal-accent-soft) !important; color: var(--portal-accent) !important; border-color: #e9cab2 !important; }
.admin-shell__content :is([style*="rgba(255, 255, 255, 0.06)"], [style*="rgba(255,255,255,.06)"]) { background: var(--portal-surface-soft) !important; }
.admin-shell__content :is(input, select, textarea) { color: var(--portal-ink) !important; background: var(--portal-surface) !important; border-color: var(--portal-line) !important; }
.admin-shell__content :is(input, select, textarea):focus-visible { outline: 0; border-color: var(--portal-accent) !important; box-shadow: var(--portal-focus); }
.admin-shell__content button[style*="rgba(255, 255, 255, 0.04)"],
.admin-shell__content button[style*="rgba(255, 255, 255, 0.03)"] { background: var(--portal-surface-soft) !important; border-color: var(--portal-line) !important; }
.admin-page { max-width: none; margin: 0 auto; }
.admin-page > :first-child { padding-bottom: 24px; border-bottom: 1px solid var(--portal-line); margin-bottom: 26px !important; }
.admin-page > :first-child p { max-width: 680px; margin-top: 7px; color: var(--portal-muted) !important; line-height: 1.65; }
.admin-page .admin-metric, .admin-page .admin-data-panel, .admin-page .admin-list-card { border: 1px solid var(--portal-line) !important; border-radius: var(--portal-card-radius) !important; background: var(--portal-surface) !important; box-shadow: 0 3px 14px rgba(22,31,41,.035); backdrop-filter: none !important; }
.admin-table-panel { overflow-x: auto; border: 1px solid var(--portal-line); border-radius: 12px; background: var(--portal-surface); }
.admin-skill-metric { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1px solid var(--portal-line); border-radius: 12px; background: var(--portal-surface); }
.admin-feedback-card { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; }
.admin-empty-panel { display: grid; place-items: center; gap: 10px; min-height: 200px; padding: 40px 20px; border: 1px solid var(--portal-line); border-radius: 12px; color: var(--portal-muted); background: var(--portal-surface); text-align: center; }
.admin-page .admin-metric { min-height: 114px; }
.admin-page .admin-data-panel > :first-child { background: #fbfaf8; border-bottom: 1px solid var(--portal-line) !important; }
.admin-page :is([style*="rgba(255, 255, 255, 0.03)"], [style*="rgba(255,255,255,0.03)"], [style*="rgba(255,255,255,.03)"], [style*="rgba(255,255,255,0.02)"], [style*="rgba(255,255,255,.02)"]) { background-color: #f7f7f5 !important; }
.admin-page :is([style*="rgba(159, 184, 255"], [style*="rgba(159,184,255"], [style*="rgba(102, 231, 255"], [style*="rgba(102,231,255"]) { border-color: var(--portal-line) !important; }
.admin-page--review > :nth-child(2) { padding-bottom: 16px; border-bottom: 1px solid var(--portal-line); }
.admin-page--review > :nth-child(2) button { min-height: 46px; border-color: var(--portal-line) !important; background: var(--portal-surface) !important; }
.admin-page--review > :nth-child(2) button:focus-visible { box-shadow: var(--portal-focus); }
.admin-page--feedback > :nth-child(2) > div, .admin-page--skill-stats > :nth-child(2) > div { border: 1px solid var(--portal-line) !important; background: var(--portal-surface) !important; }
.admin-page--users .scale-in { border: 1px solid var(--portal-line) !important; color: var(--portal-ink); background: var(--portal-surface) !important; box-shadow: 0 28px 72px rgba(12,22,17,.2) !important; backdrop-filter: none !important; }
.admin-page--announcements :is(input, textarea) { min-height: 44px; }
.admin-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 17px; border: 1px solid var(--portal-line); border-radius: 9px; color: var(--portal-ink); background: var(--portal-surface); font-size: 13px; font-weight: 600; cursor: pointer; }
.admin-action:hover { border-color: #c9aa94; }
.admin-action--primary { border-color: var(--portal-accent); color: #fff; background: var(--portal-accent); }
.admin-action--primary:hover { border-color: #873805; background: #873805; }
.admin-editor { max-width: 760px; margin-bottom: 28px; padding: 26px 30px; border: 1px solid var(--portal-line); border-radius: 14px; background: var(--portal-surface); }
.admin-editor h2 { margin: 0; font-size: 19px; }
.admin-editor > p { margin: 5px 0 23px; color: var(--portal-muted); font-size: 13px; }
.admin-editor__field { margin-bottom: 17px; }
.admin-editor__field label { display: block; margin-bottom: 7px; color: var(--portal-ink); font-size: 13px; font-weight: 600; }
.admin-editor__field :is(input, textarea) { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--portal-line); border-radius: 9px; color: var(--portal-ink); background: var(--portal-surface); font: inherit; font-size: 14px; }
.admin-editor__field textarea { min-height: 90px; resize: vertical; }
.admin-editor__actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 14px; border-top: 1px solid var(--portal-line); }
.admin-editor__error { margin-bottom: 15px; color: #b84232; font-size: 13px; }
.admin-announcement-card { display: flex; align-items: flex-start; gap: 16px; padding: 18px 20px; border: 1px solid var(--portal-line); border-radius: 12px; background: var(--portal-surface); }
.admin-announcement-card__icon { display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border-radius: 9px; color: var(--portal-accent); background: var(--portal-accent-soft); }
.portal-shared-modal { color: var(--portal-ink); }
.portal-shared-modal__close { display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 9px; color: var(--portal-muted); background: transparent; cursor: pointer; }
.portal-shared-modal__close:hover { color: var(--portal-ink); background: var(--portal-surface-soft); }
.portal-shared-modal :is(input, select, textarea) { color: var(--portal-ink) !important; background: var(--portal-surface) !important; border-color: var(--portal-line) !important; }
.portal-shared-modal :is(input, select, textarea):focus-visible { outline: 0; border-color: var(--portal-accent) !important; box-shadow: var(--portal-focus); }

/* Skill detail sheet — the modal stays familiar while the content follows the refreshed portal language. */
.skill-detail {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: rgba(24, 27, 26, .44);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.skill-detail__dialog {
  display: flex;
  flex-direction: column;
  width: min(100%, 760px);
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  border: 1px solid rgba(223, 226, 223, .92);
  border-radius: 20px;
  color: var(--portal-ink);
  background: var(--portal-surface);
  box-shadow: 0 28px 80px rgba(18, 23, 21, .24);
  animation: scaleIn .18s cubic-bezier(.22, 1, .36, 1) both;
}
.skill-detail__header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 28px 21px;
  border-bottom: 1px solid var(--portal-line);
  background: rgba(255, 255, 255, .94);
}
.skill-detail__icon {
  display: grid;
  flex: 0 0 52px;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  color: var(--portal-accent);
  background: var(--portal-accent-soft);
}
.skill-detail__heading { min-width: 0; padding-top: 1px; }
.skill-detail__heading h2 {
  margin: 0;
  color: var(--portal-ink);
  font-size: clamp(19px, 2.3vw, 23px);
  font-weight: 680;
  letter-spacing: -.035em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.skill-detail__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 7px; color: var(--portal-dim); font-size: 12px; line-height: 1.5; }
.skill-detail__category { padding: 2px 8px; border-radius: 6px; color: var(--portal-accent); background: var(--portal-accent-soft); font-weight: 600; }
.skill-detail__close {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -5px -8px 0 auto;
  border-radius: 10px;
  color: var(--portal-muted);
  background: transparent;
}
.skill-detail__close:hover { color: var(--portal-ink); background: var(--portal-surface-soft); }
.skill-detail__close:focus-visible,
.skill-detail__copy:focus-visible,
.skill-detail__stars button:focus-visible,
.skill-detail__composer button:focus-visible,
.skill-detail__footer button:focus-visible { outline: 0; box-shadow: var(--portal-focus); }
.skill-detail__body { flex: 1; min-height: 0; padding: 0 32px; overflow-y: auto; overscroll-behavior: contain; }
.skill-detail__description { margin: 0; padding: 26px 0 24px; color: var(--portal-ink); font-size: 16px; line-height: 1.75; white-space: pre-line; }
.skill-detail__section { padding: 24px 0; border-top: 1px solid var(--portal-line); }
.skill-detail__section-heading { display: flex; align-items: flex-start; gap: 12px; }
.skill-detail__section-icon { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--portal-accent); background: var(--portal-accent-soft); }
.skill-detail__section-heading h3,
.skill-detail__rating h3,
.skill-detail__comments h3 { margin: 0; color: var(--portal-ink); font-size: 15px; font-weight: 650; letter-spacing: -.015em; line-height: 1.4; }
.skill-detail__section-heading p { margin: 4px 0 0; color: var(--portal-muted); font-size: 13px; line-height: 1.6; }
.skill-detail__command-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 16px; padding: 8px; border-radius: 13px; background: var(--portal-surface-soft); }
.skill-detail__command { align-self: center; padding: 8px 10px; color: var(--portal-ink); font: 12px/1.65 "SFMono-Regular", Consolas, "Liberation Mono", monospace; overflow-wrap: anywhere; user-select: all; }
.skill-detail__copy { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 108px; min-height: 44px; padding: 0 14px; border: 1px solid var(--portal-line); border-radius: 10px; color: var(--portal-accent); background: var(--portal-surface); font-size: 13px; font-weight: 620; white-space: nowrap; }
.skill-detail__copy:hover { border-color: #d2b49f; background: #fffaf6; }
.skill-detail__rating { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 28px; }
.skill-detail__rating-summary { display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: 10px; }
.skill-detail__rating-summary h3 { grid-column: 1 / -1; margin-bottom: 10px; }
.skill-detail__rating-summary strong { color: var(--portal-ink); font-size: 38px; font-weight: 680; letter-spacing: -.05em; line-height: 1; }
.skill-detail__rating-summary span { padding-bottom: 3px; color: var(--portal-dim); font-size: 12px; }
.skill-detail__rating-control { padding-left: 28px; border-left: 1px solid var(--portal-line); }
.skill-detail__rating-control > p { margin: 0 0 4px; color: var(--portal-muted); font-size: 13px; }
.skill-detail__stars { display: flex; gap: 0; }
.skill-detail__stars button { width: 44px; height: 44px; color: #d8dbd9; font-size: 27px; line-height: 1; transition: color .14s ease, transform .14s ease; }
.skill-detail__stars button:hover { transform: scale(1.06); }
.skill-detail__stars button.is-active { color: var(--portal-warning); }
.skill-detail__my-rating { display: block; margin-top: 2px; color: var(--portal-warning); font-size: 12px; }
.skill-detail__comments { padding: 24px 0 30px; border-top: 1px solid var(--portal-line); }
.skill-detail__comments-title { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.skill-detail__comments-title span { display: grid; place-items: center; min-width: 23px; height: 23px; padding: 0 7px; border-radius: 12px; color: var(--portal-muted); background: var(--portal-surface-soft); font-size: 11px; }
.skill-detail__empty { padding: 24px 0 28px; color: var(--portal-dim); font-size: 13px; text-align: center; }
.skill-detail__comment-list { margin-bottom: 16px; }
.skill-detail__comment { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-top: 1px solid var(--portal-line); }
.skill-detail__comment:first-child { border-top: 0; }
.skill-detail__comment-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; }
.skill-detail__comment-meta strong { color: var(--portal-ink); font-size: 13px; font-weight: 620; }
.skill-detail__comment-meta time { color: var(--portal-dim); font-size: 11px; }
.skill-detail__comment p { margin: 4px 0 0; color: var(--portal-muted); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.skill-detail__composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.skill-detail__composer textarea { width: 100%; min-height: 88px; padding: 12px 14px; border: 1px solid var(--portal-line); border-radius: 11px; outline: 0; color: var(--portal-ink); background: var(--portal-surface); font: 13px/1.6 var(--font-ui); resize: vertical; }
.skill-detail__composer textarea:focus-visible { border-color: var(--portal-accent); box-shadow: var(--portal-focus); }
.skill-detail__composer button { min-width: 96px; min-height: 44px; padding: 0 16px; border: 1px solid var(--portal-line); border-radius: 10px; color: var(--portal-ink); background: var(--portal-surface); font-size: 13px; font-weight: 620; }
.skill-detail__composer button:hover { background: var(--portal-surface-soft); }
.skill-detail__composer button:disabled { color: var(--portal-dim); cursor: wait; }
.skill-detail__footer { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; padding: 15px 28px; border-top: 1px solid var(--portal-line); background: rgba(255, 255, 255, .94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.skill-detail__footer > span { color: var(--portal-dim); font-size: 12px; }
.skill-detail__footer button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 132px; min-height: 44px; padding: 0 18px; border-radius: 10px; color: #fff; background: var(--portal-accent); font-size: 13px; font-weight: 650; }
.skill-detail__footer button:hover { background: #873805; }
.skill-detail__footer button:disabled { opacity: .55; cursor: wait; }
.admin-page--review .admin-list-card { padding: 22px !important; }
.admin-review-card { padding: 21px 23px; border: 1px solid var(--portal-line); border-radius: 12px; background: var(--portal-surface); transition: opacity .2s; }
.admin-review-card--row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.admin-review-card__decision { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--portal-line); border-radius: 10px; background: #faf9f7; }
.admin-review-card :is(button, label)[style*="rgba(102,231,255"] { border-color: var(--portal-line) !important; background: var(--portal-surface) !important; }
.admin-page--review textarea { min-height: 90px; padding: 12px 14px !important; border-radius: 9px; }
.admin-page--review button { min-height: 40px; }
.admin-page--access :is(input, select, textarea), .admin-page--users :is(input, select, textarea) { padding: 10px 12px; border-radius: 9px; }
.admin-page--access select, .admin-page--access input { min-height: 44px; }
.admin-access-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; min-height: 76px; padding: 16px 20px; border: 1px solid var(--portal-line); border-radius: 11px; background: var(--portal-surface); }
.admin-access-grant { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; padding: 20px; border: 1px solid var(--portal-line); border-radius: 11px; background: var(--portal-surface); }
.admin-access-mapping { display: grid; gap: 13px; max-width: 760px; padding: 24px; border: 1px solid var(--portal-line); border-radius: 11px; background: var(--portal-surface); }
.admin-page--access > :nth-child(3) { min-width: 0; }
@media (max-width: 850px) {
  .admin-page--feedback > :nth-child(2), .admin-page--skill-stats > :nth-child(2) { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .admin-page--review > :nth-child(2) { flex-wrap: wrap; }
  .admin-page--review > :nth-child(2) button { flex: 1 1 180px !important; }
}
@media (max-width: 540px) {
  .admin-page--feedback > :nth-child(2), .admin-page--skill-stats > :nth-child(2) { grid-template-columns: 1fr !important; }
  .admin-page > :first-child { flex-wrap: wrap; gap: 12px; }
  .admin-page--access > :nth-child(2) { flex-wrap: wrap; }
}

@media (max-width: 1100px) {
  .portal-topbar__inner { gap: 20px; padding: 0 24px; }
  .portal-topnav { gap: 7px; }
  .portal-topbar__account span { display: none; }
  .landing__title { font-size: clamp(36px, 5vw, 60px); }
}
@media (max-width: 920px) {
  .portal-auth, .portal-auth--register { grid-template-columns: 1fr; overflow-y: auto; }
  .portal-auth__visual { min-height: auto; padding: 28px 24px 36px; }
  .portal-auth__brand { min-height: 56px; }
  .portal-auth__intro { width: min(100%, 640px); margin: 52px 0 0; padding: 0; }
  .portal-auth__title { font-size: clamp(42px, 8.5vw, 58px); }
  .portal-auth__copy { max-width: 460px; }
  .portal-auth__security { display: none; }
  .portal-auth__side { min-height: auto; padding: 44px 24px 64px; border-top: 1px solid rgba(35,40,39,.08); border-left: 0; box-shadow: none; }
  .portal-auth__panel { width: min(100%, 480px); }
  .portal-model-wall { top: 10%; right: -18%; bottom: -8%; left: -8%; opacity: .115; }
}
@media (max-width: 760px) {
  .portal-auth__visual { padding: 22px 18px 32px; }
  .portal-auth__brand { min-height: 52px; gap: 12px; }
  .portal-auth__seal { flex-basis: 48px; width: 48px; height: 48px; }
  .portal-auth__brand strong { font-size: 14px; }
  .portal-auth__brand span { font-size: 11px; }
  .portal-auth__intro { margin-top: 44px; }
  .portal-auth__title { margin-bottom: 17px; font-size: clamp(38px, 12vw, 50px); }
  .portal-auth__copy { font-size: 14px; line-height: 1.65; }
  .portal-auth__side { padding: 32px 18px 48px; }
  .portal-auth__panel { width: 100%; border-radius: 14px; }
  .portal-auth-form { padding: 26px 22px 22px; }
  .portal-auth-form__header { margin-bottom: 24px; }
  .portal-auth-form__links { align-items: flex-start; }
  .portal-auth-form__links button { font-size: 12px; }
  .portal-model-wall { right: -48%; left: -20%; opacity: .085; transform: rotate(-9deg) scale(.82); }
  .skill-detail { align-items: end; padding: 8px 8px max(8px, env(safe-area-inset-bottom)); }
  .skill-detail__dialog { max-height: calc(100dvh - 16px); border-radius: 18px; }
  .skill-detail__header { padding: 20px 20px 17px; }
  .skill-detail__icon { flex-basis: 44px; width: 44px; height: 44px; border-radius: 12px; }
  .skill-detail__close { margin-right: -10px; }
  .skill-detail__body { padding: 0 20px; }
  .skill-detail__description { padding: 22px 0; font-size: 15px; }
  .skill-detail__command-row, .skill-detail__composer { grid-template-columns: 1fr; }
  .skill-detail__copy, .skill-detail__composer button { width: 100%; }
  .skill-detail__rating { grid-template-columns: 1fr; gap: 18px; }
  .skill-detail__rating-control { padding: 18px 0 0; border-top: 1px solid var(--portal-line); border-left: 0; }
  .skill-detail__footer { min-height: 68px; padding: 12px 20px; }
  .skill-detail__footer > span { display: none; }
  .skill-detail__footer button { width: 100%; }
  .portal-topbar, .portal-topbar__inner { min-height: 64px; }
  .portal-topbar__inner { padding: 0 16px; }
  .portal-brand { min-width: 0; }
  .portal-brand__copy small { display: none; }
  .portal-topbar__logout, .portal-topbar__admin, .portal-topbar__account { display: none; }
  .portal-topbar__mobile-menu { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 7px; color: var(--portal-ink); }
  .portal-topnav { position: absolute; top: 63px; right: 0; left: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; border-bottom: 1px solid var(--portal-line); background: var(--portal-page); box-shadow: var(--portal-shadow); }
  .portal-topnav.is-open { display: flex; }
  .portal-nav-mobile-actions { display: flex; flex-direction: column; margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--portal-line); }
  .portal-topnav .portal-nav-item { min-height: 44px; padding: 0 12px; border-bottom: 0; border-left: 2px solid transparent; }
  .portal-topnav .portal-nav-item.active { border-left-color: var(--portal-accent); }
  .portal-content { padding: 0 18px; }
  .landing { padding-top: 12px; }
  .landing__hero { display: block; padding: 36px 0; }
  .landing__title { font-size: clamp(34px, 8vw, 56px); white-space: normal; }
  .landing__hero-copy > p { font-size: 14px; }
  .landing__destinations { grid-template-columns: 1fr; }
  .landing-destination, .landing-destination:first-child, .landing-destination:last-child { min-height: 210px; padding: 22px 0; }
  .landing-destination + .landing-destination { border-left: 0; border-top: 1px solid var(--portal-line); }
  .landing-destination h2 { margin-top: 18px; }
  .landing-preview { grid-template-columns: 1fr 42px; gap: 12px; padding: 20px 14px; }
  .landing-preview__label { grid-column: 1 / -1; }
  .landing-preview__label em { margin-top: 0; }
  .catalog { padding-top: 32px; }
  .catalog__header { display: block; }
  .catalog__actions { margin-top: 20px; }
  .catalog__toolbar { display: block; }
  .catalog__search { min-height: 44px; margin-bottom: 6px; }
  .catalog__category-arrow { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 44px; color: var(--portal-accent); background: var(--portal-page); }
  .catalog__category-arrow:focus-visible { outline: 2px solid var(--portal-accent); outline-offset: -2px; }
  .catalog__grid { grid-template-columns: 1fr; }
  .catalog__grid .portal-skill-card { min-height: 0; padding: 20px; }
  .portal-page__note { display: block; }
  .portal-page__note p { margin-top: 6px; }
  .portal-access-item { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
  .portal-access-item__lead { max-width: none; margin: 16px 0 20px; font-size: 14px; font-weight: 500; }
  .portal-access-item__details { grid-template-columns: 1fr; gap: 20px; }
  .portal-access-item__side { flex-direction: row; align-items: center; justify-content: space-between; align-self: auto; padding: 16px 0 0; border-top: 1px solid var(--portal-line); border-left: 0; }
  .portal-access-item__action { grid-column: auto; }
  .profile-page__identity { flex-wrap: wrap; }
  .profile-page__identity .portal-button { margin-left: 0; }
  .profile-page__overview { grid-template-columns: 1fr; gap: 8px; }
  .profile-page__security summary small { display: none; }
  .profile-page__fields, .profile-page__security .profile-page__fields { grid-template-columns: 1fr; }
  .profile-page__stats { grid-template-columns: repeat(2, 1fr); }
  .profile-page__row { display: block; }
  .profile-page__row span { display: block; margin-top: 4px; }
  .leaderboard-page__layout { grid-template-columns: 1fr; gap: 20px; }
  .leaderboard-page__tabs button { flex: 1 1 45%; }
  .leaderboard-page__caption { display: block; }
  .leaderboard-page__empty { grid-template-columns: 1fr; }
  .leaderboard-page__empty-path { border-top: 1px solid var(--portal-line); border-left: 0; }
  .leaderboard-page__aside { order: 2; }
  .portal-skills-page__layout { grid-template-columns: 1fr; gap: 22px; }
  .portal-skills-page__header { align-items: start; }
  .portal-skills-tabs { overflow-x: auto; }
  .portal-toast-stack { top: 72px; right: 16px; }
  .admin-shell__main { margin-left: 0; }
  .admin-shell__content { padding: 22px 16px; }
  .admin-shell__topbar { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .landing-preview__track, .landing__cursor, .portal-auth__cursor, .portal-model-wall__row { animation: none; }
  .landing-preview__pause { display: none; }
}
