/*
 * FPC Members Portal
 *
 * Brand tokens are taken from the live thefpclub.com stylesheet (ST-1) and
 * defined once here. No other colours or typefaces are introduced; tints are
 * black at reduced opacity, as on the main site.
 */

@font-face {
    font-family: Montserrat;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/montserrat-400.woff2") format("woff2");
}

@font-face {
    font-family: Montserrat;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/montserrat-600.woff2") format("woff2");
}

@font-face {
    font-family: Poppins;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/poppins-600.woff2") format("woff2");
}

:root {
    /* Colour */
    --portal-yellow: #fffc0e;
    --portal-yellow-dark: #d5d208;
    --portal-black: #000;
    --portal-white: #fff;
    --portal-grey: #ececf0;
    --portal-grey-dark: #979797;

    /* Roles */
    --portal-primary: var(--portal-yellow);
    --portal-on-primary: var(--portal-black);
    --portal-ink: var(--portal-black);
    --portal-muted: rgb(0 0 0 / 0.64);
    --portal-surface: var(--portal-white);
    --portal-tint: rgb(0 0 0 / 0.04);
    --portal-line: rgb(0 0 0 / 0.12);
    --portal-focus: var(--portal-black);

    /* Type */
    --portal-font-body: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
    --portal-font-heading: itc-avant-garde-gothic-pro, Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
    --portal-tracking-button: 0.1em;
    --portal-tracking-label: 0.2em;
    --portal-tracking-date: 0.12em;

    /* Shape */
    --portal-radius: 4px;
    --portal-radius-tag: 3px;

    /* Layout */
    --portal-sidebar-width: 264px;
    --portal-topbar-height: 72px;
    --portal-gutter: clamp(16px, 4vw, 40px);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.portal {
    margin: 0;
    background: var(--portal-surface);
    color: var(--portal-ink);
    font-family: var(--portal-font-body);
    font-size: 16px;
    line-height: 1.5;
}

.portal h1,
.portal h2,
.portal h3 {
    margin: 0 0 0.5em;
    font-family: var(--portal-font-heading);
    font-weight: 600;
    line-height: 1.1;
}

.portal p {
    margin: 0 0 1em;
}

.portal a {
    color: inherit;
    text-underline-offset: 3px;
}

.portal a:hover {
    text-decoration-thickness: 2px;
}

.portal :focus-visible {
    outline: 2px solid var(--portal-focus);
    outline-offset: 2px;
}

.portal img {
    max-width: 100%;
    height: auto;
}

.portal-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.portal-icon {
    flex: none;
}

.portal-skip {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 100;
    padding: 12px 20px;
    background: var(--portal-black);
    color: var(--portal-yellow) !important;
    border-radius: var(--portal-radius);
    transform: translateY(-200%);
}

.portal-skip:focus {
    transform: none;
}

/* Layout ------------------------------------------------------------- */

.portal-layout {
    display: flex;
    min-height: 100vh;
}

.portal-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: var(--portal-sidebar-width);
    background: var(--portal-surface);
    border-right: 1px solid var(--portal-line);
    overflow-y: auto;
}

.portal-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: var(--portal-topbar-height);
    padding: 12px 20px;
    background: var(--portal-primary);
    color: var(--portal-on-primary);
}

.portal-iconbtn.portal-sidebar__close {
    display: none;
}

.portal-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.portal-logo__image {
    display: block;
    width: auto;
    max-width: 180px;
    max-height: 48px;
}

.portal-logo__text {
    font-family: var(--portal-font-heading);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.15;
    text-transform: uppercase;
}

.portal-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    margin-left: var(--portal-sidebar-width);
}

.portal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgb(0 0 0 / 0.5);
}

/* Sidebar navigation ------------------------------------------------- */

.portal-nav {
    padding: 16px 12px 24px;
}

.portal-nav__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.portal-nav__list--sub {
    margin-bottom: 4px;
}

.portal-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: var(--portal-radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.portal-nav__link:hover {
    background: var(--portal-tint);
}

.portal-nav__link.is-current {
    background: var(--portal-primary);
    color: var(--portal-on-primary);
}

.portal-nav__link .portal-icon {
    opacity: 0.64;
}

.portal-nav__list--sub .portal-nav__link {
    padding-left: 24px;
    font-weight: 400;
}

.portal-nav__list--sub .portal-nav__link.is-current {
    font-weight: 600;
}

.portal-nav__group {
    display: block;
    padding: 20px 12px 6px;
    color: var(--portal-muted);
    font-size: 11px;
    letter-spacing: var(--portal-tracking-label);
    text-transform: uppercase;
}

/* Top bar ------------------------------------------------------------ */

.portal-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--portal-topbar-height);
    padding: 12px var(--portal-gutter);
    background: var(--portal-surface);
    border-bottom: 1px solid var(--portal-line);
}

.portal-iconbtn.portal-topbar__menu {
    display: none;
}

.portal-topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.portal-iconbtn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: var(--portal-radius);
    color: inherit;
    cursor: pointer;
}

.portal-iconbtn:hover {
    background: var(--portal-tint);
}

.portal-sidebar__head .portal-iconbtn:hover {
    background: rgb(0 0 0 / 0.12);
}

.portal-badge {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--portal-black);
    color: var(--portal-yellow);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

.portal-search {
    position: relative;
    display: flex;
    flex: 1;
    align-items: center;
    max-width: 420px;
    margin-left: auto;
}

.portal-search .portal-icon {
    position: absolute;
    left: 14px;
    pointer-events: none;
    opacity: 0.64;
}

.portal-search input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 42px;
    background: var(--portal-tint);
    border: 1px solid transparent;
    border-radius: var(--portal-radius);
    color: inherit;
    font: inherit;
    font-size: 14px;
}

.portal-search input:focus {
    background: var(--portal-surface);
    border-color: var(--portal-black);
}

.portal-search + .portal-topbar__actions {
    margin-left: 0;
}

.portal-account {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 4px 10px;
    background: none;
    border: 0;
    border-radius: var(--portal-radius);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.portal-account:hover {
    background: var(--portal-tint);
}

.portal-account__text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.portal-account__name {
    max-width: 180px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-account__tier {
    color: var(--portal-muted);
    font-size: 11px;
    letter-spacing: var(--portal-tracking-date);
    text-transform: uppercase;
}

/* Popovers ----------------------------------------------------------- */

.portal-pop {
    position: relative;
}

.portal-pop__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    width: 240px;
    max-width: calc(100vw - 32px);
    background: var(--portal-surface);
    border: 1px solid var(--portal-black);
    border-radius: var(--portal-radius);
}

.portal-pop__panel--wide {
    width: 360px;
}

.portal-pop__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--portal-line);
}

.portal-pop__head form {
    margin: 0;
}

.portal .portal-pop__title {
    margin: 0;
    font-size: 16px;
}

.portal-pop__foot {
    display: block;
    padding: 12px 16px;
    border-top: 1px solid var(--portal-line);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.portal-menu {
    margin: 0;
    padding: 6px;
    list-style: none;
}

.portal-menu form {
    margin: 0;
}

.portal-menu a,
.portal-menu button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    background: none;
    border: 0;
    border-radius: var(--portal-radius);
    color: inherit;
    font: inherit;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.portal-menu a:hover,
.portal-menu button:hover {
    background: var(--portal-tint);
}

.portal-link {
    padding: 0;
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* Notifications ------------------------------------------------------ */

.portal-notes {
    max-height: 420px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.portal-card .portal-notes {
    max-height: none;
}

.portal-notes__item + .portal-notes__item {
    border-top: 1px solid var(--portal-line);
}

.portal-notes__item a {
    position: relative;
    display: block;
    padding: 12px 16px 12px 30px;
    text-decoration: none;
}

.portal-notes__item a:hover {
    background: var(--portal-tint);
}

.portal-notes__item.is-unread a::before {
    content: "";
    position: absolute;
    top: 19px;
    left: 14px;
    width: 8px;
    height: 8px;
    background: var(--portal-black);
    border-radius: 50%;
}

.portal-notes__item.is-unread .portal-notes__message {
    font-weight: 600;
}

.portal-notes__message {
    display: block;
    font-size: 14px;
}

.portal-notes__time {
    display: block;
    margin-top: 2px;
    color: var(--portal-muted);
    font-size: 12px;
}

/* Content ------------------------------------------------------------ */

.portal-content {
    flex: 1;
    width: 100%;
    max-width: 1120px;
    padding: 32px var(--portal-gutter) 64px;
}

.portal-content:focus {
    outline: none;
}

.portal .portal-title {
    margin-bottom: 24px;
    font-size: clamp(28px, 4vw, 40px);
}

.portal-eyebrow {
    margin: 0 0 8px;
    color: var(--portal-muted);
    font-size: 11px;
    letter-spacing: var(--portal-tracking-label);
    text-transform: uppercase;
}

.portal-lead {
    max-width: 62ch;
    color: var(--portal-muted);
}

.portal-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
}

.portal-section + .portal-section {
    margin-top: 40px;
}

.portal .portal-section__title {
    font-size: 22px;
}

/* Buttons ------------------------------------------------------------ */

.portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 0 24px;
    background: var(--portal-black);
    border: 1px solid var(--portal-black);
    border-radius: var(--portal-radius);
    color: var(--portal-yellow);
    font-family: var(--portal-font-body);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: var(--portal-tracking-button);
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.portal a.portal-btn {
    color: var(--portal-yellow);
}

.portal-btn:hover,
.portal a.portal-btn:hover {
    background: var(--portal-yellow-dark);
    border-color: var(--portal-yellow-dark);
    color: var(--portal-black);
}

.portal-btn--secondary,
.portal a.portal-btn--secondary {
    background: transparent;
    color: var(--portal-black);
}

.portal-btn--secondary:hover,
.portal a.portal-btn--secondary:hover {
    background: var(--portal-black);
    border-color: var(--portal-black);
    color: var(--portal-white);
}

.portal-btn--sm {
    height: 44px;
    padding: 0 20px;
    font-size: 12px;
}

.portal-btn--block {
    width: 100%;
}

.portal-btn[disabled],
.portal-btn[aria-disabled="true"] {
    opacity: 0.4;
    pointer-events: none;
}

/* Cards and grids ---------------------------------------------------- */

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.portal-card {
    display: flex;
    flex-direction: column;
    background: var(--portal-tint);
    border-radius: var(--portal-radius);
    overflow: hidden;
}

.portal-card--flush {
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
}

.portal-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--portal-grey);
}

.portal-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-card__play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--portal-yellow);
    color: var(--portal-black);
    border-radius: 50%;
}

.portal-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
}

.portal-card__meta {
    margin: 0;
    color: var(--portal-muted);
    font-size: 11px;
    letter-spacing: var(--portal-tracking-date);
    text-transform: uppercase;
}

.portal .portal-card__title {
    margin: 0;
    font-size: 20px;
}

.portal-card__title a {
    text-decoration: none;
}

.portal-card__title a:hover {
    text-decoration: underline;
}

.portal-card__text {
    margin: 0;
    font-size: 14px;
}

.portal-card__action {
    margin-top: auto;
    padding-top: 12px;
}

.portal-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--portal-grey);
    border-radius: var(--portal-radius-tag);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: var(--portal-tracking-date);
    text-transform: uppercase;
}

.portal-tag--primary {
    background: var(--portal-primary);
    color: var(--portal-on-primary);
}

.portal-tag--dark {
    background: var(--portal-black);
    color: var(--portal-white);
}

.portal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.portal-filters a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.portal-filters a:hover {
    border-color: var(--portal-black);
}

.portal-filters a.is-current {
    background: var(--portal-black);
    border-color: var(--portal-black);
    color: var(--portal-white);
}

/* Lists, panels, timeline -------------------------------------------- */

.portal-panel {
    padding: 24px;
    background: var(--portal-tint);
    border-radius: var(--portal-radius);
}

.portal-panel + .portal-panel {
    margin-top: 16px;
}

.portal-panel > :last-child {
    margin-bottom: 0;
}

.portal-rows {
    margin: 0;
    padding: 0;
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius);
    list-style: none;
}

.portal-rows__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 16px 20px;
}

.portal-rows__item + .portal-rows__item {
    border-top: 1px solid var(--portal-line);
}

.portal-rows__main {
    flex: 1 1 240px;
    min-width: 0;
}

.portal-rows__title {
    display: block;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.portal-rows__meta {
    display: block;
    color: var(--portal-muted);
    font-size: 13px;
}

.portal-rows__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.portal-dl {
    display: grid;
    grid-template-columns: minmax(120px, max-content) 1fr;
    gap: 8px 24px;
    margin: 0 0 20px;
}

.portal-dl dt {
    color: var(--portal-muted);
    font-size: 14px;
}

.portal-dl dd {
    margin: 0;
    font-weight: 600;
}

.portal-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.portal-timeline__item {
    position: relative;
    padding: 0 0 28px 28px;
    border-left: 1px solid var(--portal-line);
}

.portal-timeline__item:last-child {
    padding-bottom: 0;
    border-left-color: transparent;
}

.portal-timeline__item::before {
    content: "";
    position: absolute;
    top: 4px;
    left: -6px;
    width: 11px;
    height: 11px;
    background: var(--portal-black);
    border-radius: 50%;
}

.portal-timeline__item--system::before {
    background: var(--portal-surface);
    border: 2px solid var(--portal-black);
}

.portal-timeline__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-bottom: 6px;
    color: var(--portal-muted);
    font-size: 13px;
}

.portal-timeline__body {
    max-width: 68ch;
    overflow-wrap: anywhere;
}

.portal-timeline__body p:last-child {
    margin-bottom: 0;
}

.portal-empty {
    padding: 40px 24px;
    background: var(--portal-tint);
    border-radius: var(--portal-radius);
    text-align: center;
}

.portal-empty > :last-child {
    margin-bottom: 0;
}

.portal p.portal-empty--compact {
    margin: 0;
    padding: 24px 16px;
    background: none;
    color: var(--portal-muted);
    font-size: 14px;
}

/* Notices ------------------------------------------------------------ */

.portal-notice {
    margin: 0 0 20px;
    padding: 14px 16px;
    background: var(--portal-grey);
    border-left: 4px solid var(--portal-black);
    border-radius: var(--portal-radius);
    font-size: 14px;
}

.portal-notice > :last-child {
    margin-bottom: 0;
}

.portal-notice ul {
    margin: 0;
    padding-left: 18px;
}

.portal-notice--success {
    background: var(--portal-primary);
    color: var(--portal-on-primary);
}

.portal-notice--error {
    background: var(--portal-black);
    border-left-color: var(--portal-yellow);
    color: var(--portal-white);
}

/* Forms -------------------------------------------------------------- */

.portal-form {
    display: grid;
    gap: 18px;
    max-width: 460px;
    margin: 0;
}

.portal-form--wide {
    max-width: 640px;
}

.portal-form__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.portal-field {
    display: grid;
    gap: 6px;
}

.portal-field label,
.portal-fieldset legend {
    font-size: 13px;
    font-weight: 600;
}

.portal-field input[type="text"],
.portal-field input[type="email"],
.portal-field input[type="password"],
.portal-field input[type="search"],
.portal-field select,
.portal-field textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    background: var(--portal-surface);
    border: 1px solid var(--portal-grey-dark);
    border-radius: var(--portal-radius);
    color: inherit;
    font: inherit;
}

.portal-field input:focus,
.portal-field select:focus,
.portal-field textarea:focus {
    border-color: var(--portal-black);
}

.portal-field__hint {
    color: var(--portal-muted);
    font-size: 13px;
}

.portal-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-size: 14px;
}

.portal-check input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--portal-black);
}

/* Honeypot: off-screen for people, present for bots. */
.portal-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.portal-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.portal-form__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    font-size: 14px;
}

/* Guest layout ------------------------------------------------------- */

.portal--guest {
    background: var(--portal-primary);
}

.portal-guest {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    min-height: 100vh;
    padding: 40px 16px;
}

.portal-guest__brand {
    color: var(--portal-on-primary);
}

.portal-guest__brand .portal-logo__text {
    font-size: 20px;
}

.portal-guest__card {
    width: 100%;
    max-width: 480px;
    padding: clamp(24px, 6vw, 40px);
    background: var(--portal-surface);
    border-radius: var(--portal-radius);
}

.portal-guest__card .portal-title {
    font-size: 28px;
}

.portal-guest__card .portal-form {
    max-width: none;
}

.portal-guest__alt {
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--portal-line);
    font-size: 14px;
}

/* Upgrade prompt ----------------------------------------------------- */

.portal-upgrade {
    max-width: 560px;
    margin: 6vh auto 0;
    padding: clamp(28px, 6vw, 48px);
    background: var(--portal-tint);
    border-radius: var(--portal-radius);
    text-align: center;
}

.portal-upgrade__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    background: var(--portal-primary);
    color: var(--portal-on-primary);
    border-radius: 50%;
}

.portal-upgrade .portal-title {
    margin-bottom: 12px;
}

.portal-upgrade .portal-btn {
    margin-top: 8px;
}

/* Video -------------------------------------------------------------- */

.portal-video {
    position: relative;
    aspect-ratio: 16 / 9;
    margin: 0 0 24px;
    background: var(--portal-black);
    border-radius: var(--portal-radius);
    overflow: hidden;
}

.portal-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.portal-back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
}

/* Page content written in the WordPress editor ------------------------ */

.portal-prose {
    max-width: 72ch;
}

.portal-prose > * + * {
    margin-top: 1em;
}

.portal-prose h2 {
    margin-top: 1.6em;
    font-size: 26px;
}

.portal-prose h3 {
    margin-top: 1.4em;
    font-size: 20px;
}

.portal-prose .alignwide,
.portal-prose .alignfull {
    max-width: none;
}

.portal-prose .wp-block-button__link {
    background: var(--portal-black);
    border-radius: var(--portal-radius);
    color: var(--portal-yellow);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: var(--portal-tracking-button);
    text-transform: uppercase;
}

.portal-prose .wp-block-button__link:hover {
    background: var(--portal-yellow-dark);
    color: var(--portal-black);
}

/* Small screens: the sidebar collapses behind a menu button (SH-4) ---- */

@media (max-width: 1023.98px) {
    .portal-sidebar {
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.2s, visibility 0.2s;
    }

    .portal-sidebar.is-open {
        transform: none;
        visibility: visible;
    }

    .portal-iconbtn.portal-sidebar__close,
    .portal-iconbtn.portal-topbar__menu {
        display: inline-flex;
    }

    .portal-main {
        margin-left: 0;
    }

    .portal-search {
        margin-left: 0;
    }
}

@media (max-width: 599.98px) {
    :root {
        --portal-topbar-height: 64px;
    }

    .portal-topbar {
        gap: 4px;
    }

    .portal-topbar__actions {
        gap: 0;
    }

    .portal-account__text {
        display: none;
    }

    .portal-account {
        padding: 4px 12px;
    }

    .portal-account::before {
        content: "";
        width: 20px;
        height: 20px;
        background: var(--portal-black);
        border-radius: 50%;
        /* A plain account glyph so the control stays recognisable without the name. */
        mask: radial-gradient(circle at 50% 36%, #000 28%, transparent 30%), radial-gradient(ellipse at 50% 110%, #000 52%, transparent 54%);
        mask-composite: add;
    }

    .portal-pop {
        position: static;
    }

    .portal-topbar {
        position: sticky;
    }

    .portal-pop__panel,
    .portal-pop__panel--wide {
        top: calc(var(--portal-topbar-height) + 4px);
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }

    .portal-dl {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .portal-dl dd {
        margin-bottom: 10px;
    }

    .portal-rows__actions,
    .portal-rows__actions .portal-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portal *,
    .portal *::before,
    .portal *::after {
        transition: none !important;
    }
}

/* Text-style buttons still get a comfortable touch target. */
.portal-pop__head .portal-link,
.portal-notice .portal-link {
    min-height: 44px;
}
