/* Shared mobile layout. Keep long content inside its card, without hiding it. */
.community-layout > *, .learning-layout > *, .dashboard-bottom > *,
.topic-copy, .discussion-item > div, .notification-item > div { min-width: 0; }
#bbpress-forums fieldset.bbp-form { min-width: 0; width: 100%; margin-inline: 0; }
#bbpress-forums .bbp-the-content-wrapper,
#bbpress-forums .wp-editor-wrap, #bbpress-forums .wp-editor-container { max-width: 100%; min-width: 0; }
.topic-copy, .prose, .certificate-row span, .lesson-list a { overflow-wrap: anywhere; }
.filter-bar .inline-search { flex-direction: row; flex-wrap: nowrap; min-width: 0; }
.inline-search input { min-width: 0; flex: 1; }
.account-table-wrap { scrollbar-width: thin; }
.pagination { flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; }
.pagination .current { background: var(--mint); font-weight: 700; }
.account-plan { flex-wrap: wrap; }
[data-theme="dark"] .mobile-brand { color: var(--ink); }
[data-theme="dark"] .notification-item.unread { background: var(--mint); }
[data-theme="dark"] .notification-item p { color: var(--muted); }
[data-theme="dark"] .course-meta, [data-theme="dark"] .course-bottom,
[data-theme="dark"] .document-row .subtle, [data-theme="dark"] .insights-topics small { color: var(--muted); }
[data-theme="dark"] .course-bottom a { color: var(--teal); }
[data-theme="dark"] #bbpress-forums div.odd,
[data-theme="dark"] #bbpress-forums div.even { background: var(--white); }
[data-theme="dark"] #bbpress-forums div.bbp-template-notice { background: var(--mint); border-color: var(--line); color: var(--ink); }
[data-theme="dark"] #bbpress-forums .bbp-author-role,
[data-theme="dark"] #bbpress-forums .bbp-reply-content p { color: var(--muted); }

@media (max-width: 767px) {
  .content { padding-bottom: 76px; }
  .page-heading h1 { font-size: clamp(27px, 7vw, 32px); line-height: 1.25; }
  .account-card, .account-form, .insights-card, .course-sidebar,
  .prose, .certificate-panel { padding: 22px 20px; }
  .account-card h2, .account-form h2, .section-header h2,
  .dashboard-bottom > .panel h2 { font-size: 21px; line-height: 1.4; }
  .account-form input:not([type=checkbox]):not([type=radio]),
  .account-form select, #bbpress-forums input[type=text],
  #bbpress-forums select, #bbpress-forums textarea,
  .inline-search input, .discussion-form textarea { font-size: 16px; }
  .account-form input[type=file], .tawa-upload input[type=file] {
    width: 100%; min-width: 0; font-size: 12px; padding: 10px 6px;
  }
  .account-form .button { width: 100%; justify-content: center; }
  .account-actions { gap: 12px 18px; }
  .account-actions a, .account-identity .text-link,
  .certificate-row, .course-bottom a, .lesson-list a,
  .filter-tab, .insights-topics a { min-height: 44px; }
  .account-actions a, .account-identity .text-link,
  .course-bottom a, .insights-topics a { display: inline-flex; align-items: center; }
  .field-help, .account-card > p, .account-details > div,
  .course-meta, .course-access-label, .topic-row p,
  .community-layout .topic-row p, .insights-topics li,
  .online-member strong, .document-row p, .news-body > p,
  .event-card > p, .notification-item p { font-size: 13px; line-height: 1.7; }
  .course-card h3 { font-size: 18px; line-height: 1.5; }
  .course-bottom, .course-bottom a { font-size: 13px; }
  .course-body > p, .discussion-item p { font-size: 14px; line-height: 1.75; }
  .topic-row h3, .community-layout .topic-row h3,
  .document-row h3, .notification-item h3 { font-size: 15px; line-height: 1.5; }
  .topic-labels { flex-wrap: wrap; }
  .topic-labels .tag, .community-layout .topic-labels .tag,
  .resolved, .topic-open { font-size: 11px; }
  .topic-row { gap: 12px; }
  .topic-row > .avatar { flex-shrink: 0; }
  .section-header { gap: 12px; flex-wrap: wrap; }
  .section-header > span { font-size: 12px; white-space: nowrap; }
  .filter-bar { gap: 12px; }
  .filter-tabs { gap: 4px; }
  .filter-tab { font-size: 13px; padding: 11px 12px; }
  .filter-bar .inline-search { padding: 6px 12px; gap: 10px; }
  .filter-bar .inline-search input { width: 100%; border: 0; background: transparent; padding: 8px 0; }
  #bbpress-forums fieldset.bbp-form { padding: 16px 12px; }
  #bbpress-forums { font-size: 14px; }
  #bbpress-forums .bbp-reply-content { overflow-wrap: anywhere; }
  #bbpress-forums legend { max-width: 100%; white-space: normal; }
  #bbpress-forums input[type=text], #bbpress-forums select { width: 100%; }
  #bbpress-forums .mce-toolbar .mce-btn { margin-left: 0; }
  .tawa-upload { padding: 14px 12px; }
  .discussion-form > div { align-items: stretch; }
  .discussion-author { flex-wrap: wrap; }
  .lesson-list a { gap: 10px; }
  .attachment-card { gap: 12px; padding: 16px 12px; }
  .attachment-card .text-link { display: inline-flex; align-items: center; min-height: 44px; }
  .document-row { flex-wrap: wrap; }
  .document-row > div:not(.file-icon) { min-width: 0; }
  .page-footer { font-size: 12px; }
  .notification-shortcut { bottom: max(16px, env(safe-area-inset-bottom)); }
  .topbar .menu-toggle, .topbar .logout { min-width: 44px; min-height: 44px; }
}

/* Orders become labelled cards on phones; retain the native table on larger screens. */
@media (max-width: 600px) {
  #bbpress-forums .bbp-body .bbp-reply-author,
  #bbpress-forums .bbp-body .bbp-reply-content { float: none; margin: 0; padding: 14px 12px; width: 100%; }
  #bbpress-forums .bbp-body .bbp-reply-author { min-height: 72px; border-bottom: 1px solid var(--line); }
  #bbpress-forums .attachment-card { display: grid; grid-template-columns: 32px minmax(0, 1fr) 24px; gap: 8px; padding: 12px 8px; }
  #bbpress-forums .attachment-card .file-icon { width: 32px; }
  .account-table, .account-table tbody, .account-table tr, .account-table td { display: block; width: 100%; }
  .account-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .account-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .account-table td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border: 0; white-space: normal; font-size: 13px; }
  .account-table td::before { content: attr(data-label); color: var(--muted); }
  .account-table td .text-link { min-height: 44px; display: inline-flex; align-items: center; text-align: right; }
  .account-table td .status-pill { flex-shrink: 0; }
}
/* Legal links, article tags and registration guard share the campus typography. */
.tawa-registration-trap{position:absolute!important;left:-10000px!important;width:1px;height:1px;overflow:hidden}
.legal-consent{display:flex;gap:10px;align-items:flex-start;line-height:1.65;margin:20px 0}
.legal-consent input{flex:0 0 auto;margin-top:6px;min-width:20px;min-height:20px}
.blog-tags{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0 32px}
.page-footer nav{display:flex;gap:8px;flex-wrap:wrap;font:inherit}
@media(max-width:600px){.page-footer{gap:16px}.page-footer nav{width:100%}.native-content{overflow-wrap:anywhere}}

/* Keep controls readable and avoid focus zoom on mobile browsers. */
[data-theme="dark"] .topbar .menu-toggle,
[data-theme="dark"] .topbar .logout,
[data-theme="dark"] .topbar .topbar-search { color: var(--ink); }
@media (max-width: 1023px) {
  .app-main input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  .app-main select, .app-main textarea { font-size: 16px !important; }
}

/* Sidebar: preserve natural content height at browser zoom 100%.
   On short screens the whole navigation scrolls, never the capsule text. */
.sidebar{height:100vh;height:100dvh;overflow-y:auto;overscroll-behavior:contain;padding-top:24px;padding-bottom:16px}
.sidebar > *{flex-shrink:0}
.sidebar .brand{margin-bottom:24px}
.sidebar .nav-caption{margin-bottom:10px}
.sidebar .nav-link{min-height:40px;padding-top:10px;padding-bottom:10px;margin-top:2px;margin-bottom:2px}
.sidebar .culture-card{margin-top:20px;padding:16px;height:auto;min-height:0;overflow:visible}
.culture-eyebrow{color:#dfba7a;font-size:9px;font-weight:600;letter-spacing:1.6px;line-height:1.5}
.sidebar .culture-card h3{font-size:16px;line-height:1.35;letter-spacing:-.3px;margin:9px 0 7px;overflow-wrap:anywhere}
.sidebar .culture-card p{font-size:12px;line-height:1.6;margin:0;overflow-wrap:anywhere}
.culture-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px}
.sidebar .culture-source{display:inline-flex;margin:0;font-size:10px;min-height:32px;align-items:center}
.culture-next{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:0;background:transparent;color:#dfba7a;font-size:11px;font-weight:600;padding:6px 0 6px 6px;min-height:32px;border-radius:3px}
.culture-next[hidden]{display:none}
.culture-next .icon{width:14px;height:14px}
.sidebar .sidebar-bottom{margin-top:auto;padding:18px 12px 0;flex-shrink:0}
.sidebar .sidebar-version{display:block;line-height:1.6;white-space:normal}
@media(max-height:820px){
 .sidebar{padding-top:18px;padding-bottom:14px}
 .sidebar .brand{margin-top:4px;margin-bottom:18px}
 .sidebar .nav-caption{margin-bottom:6px}
 .sidebar .nav-link{min-height:36px;padding-top:8px;padding-bottom:8px;margin-top:1px;margin-bottom:1px}
 .sidebar .culture-card{margin-top:14px;padding:14px}
 .sidebar .culture-card h3{font-size:15px;margin-top:7px}
 .sidebar .sidebar-bottom{padding-top:14px}
}
@media(max-width:1023px){
 .sidebar .brand{margin-top:16px}
 .culture-next,.sidebar .culture-source{min-height:44px}
}

/* Global search and sidebar contact. Results remain account-specific. */
.sidebar-whatsapp{display:flex;align-items:center;min-height:32px;margin-bottom:8px;font-size:11px;line-height:1.5;color:#dfba7a;overflow-wrap:anywhere}
.global-search-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(160px,220px) auto;gap:18px;align-items:end;margin-bottom:26px;padding:24px}
.global-search-form>div{min-width:0}
.global-search-form label{display:block;font-size:13px;font-weight:600;margin-bottom:8px}
.global-search-form input,.global-search-form select{width:100%;min-width:0;min-height:46px;border:1px solid var(--line);border-radius:6px;padding:10px 12px;color:var(--ink);background:var(--white)}
.global-search-form .button{min-height:46px;justify-content:center}
.search-summary{margin:22px 0;color:var(--muted);overflow-wrap:anywhere}
.global-search-group{margin:30px 0}
.global-search-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.search-result{padding:22px;min-width:0;overflow-wrap:anywhere}
.search-result h3{margin:14px 0 10px;font-size:18px;line-height:1.4}
.search-result p{color:var(--muted);line-height:1.7;font-size:14px}
@media(max-width:1023px){.topbar .topbar-search{display:inline-flex;min-width:40px;min-height:44px}.topbar-right{gap:8px}}
@media(max-width:767px){.global-search-form{grid-template-columns:minmax(0,1fr);padding:20px;gap:16px}.global-search-results{grid-template-columns:minmax(0,1fr)}}
@media(max-width:420px){.topbar{padding-left:14px;padding-right:14px;gap:6px}.topbar-right{gap:5px}.topbar-right>.text-link{display:none}}

@media(max-height:820px){
 .sidebar .brand{margin-bottom:14px}
 .sidebar .nav-link{min-height:34px;padding-top:7px;padding-bottom:7px}
 .sidebar .culture-card{padding:12px;margin-top:12px}
 .sidebar .culture-card p{line-height:1.5}
 .sidebar .culture-actions{margin-top:6px}
 .sidebar .sidebar-bottom{padding-top:10px}
 .sidebar-whatsapp{min-height:28px;margin-bottom:4px}
}

/* PMPro defines its own palette: inherit the campus palette inside content. */
.misha-app .pmpro{--pmpro--color--base:var(--white);--pmpro--color--base-2:var(--paper);--pmpro--color--contrast:var(--ink);--pmpro--color--border:var(--line);--pmpro--color--accent:var(--teal);--pmpro--color--accent--variation:var(--deep);color:var(--ink)}
.misha-app .pmpro .pmpro_card,.misha-app .pmpro .pmpro_card_content{background-color:var(--white);color:var(--ink);border-color:var(--line)}
.misha-app .pmpro .pmpro_card_title,.misha-app .pmpro .pmpro_card h2,.misha-app .pmpro .pmpro_card h3,.misha-app .pmpro .pmpro_card p,.misha-app .pmpro .pmpro_form_label,.misha-app .pmpro .pmpro_form_legend{color:var(--ink)}
.misha-app .pmpro .pmpro_card a:not(.pmpro_btn){color:var(--teal)}
.misha-app .pmpro .pmpro_card_actions{background:var(--paper);border-color:var(--line);color:var(--ink)}
.misha-app .pmpro .pmpro_form_input,.misha-app .pmpro .pmpro_form_select{background-color:var(--paper);border-color:var(--line);color:var(--ink);max-width:100%}
.misha-app .pmpro .pmpro_form_input::placeholder{color:var(--muted);opacity:1}
.misha-app .pmpro .pmpro_btn{border-color:var(--teal)}
.misha-app .pmpro .pmpro_btn:not(.pmpro_btn-plain){color:var(--white);background:var(--teal)}
[data-theme="dark"] .misha-app .pmpro .pmpro_btn:not(.pmpro_btn-plain){color:#fff3dd;background:#873e31;border-color:#873e31}
.misha-app .pmpro .pmpro_card{min-width:0;overflow-wrap:anywhere}

/* Guest cards must retain readable descriptions in dark mode. */
[data-theme="dark"] .guest-feature p { color: var(--muted); }

/* Public benefits and membership comparison: use theme colors in both modes. */
.tawa-benefit-plans{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin:24px 0}
.tawa-benefit-plan{border:1px solid var(--line);border-radius:12px;padding:24px;min-width:0;background:var(--paper);color:var(--ink)}
.tawa-benefit-plan header{border-bottom:1px solid var(--line);padding-bottom:20px;margin-bottom:20px}
.tawa-benefit-plan h3{font-size:28px;line-height:1.25;margin:0 0 12px;color:var(--ink)}
.tawa-benefit-plan header p{margin:6px 0;color:var(--muted)}
.tawa-benefit-plan header .tawa-plan-price{font-size:24px;font-weight:700;color:var(--ink)}
.tawa-benefit-plan ul{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.tawa-benefit-plan li{display:flex;gap:10px;line-height:1.5;color:var(--ink)}
.tawa-benefit-plan li>span{color:var(--accent);flex:none}
.tawa-benefit-note{padding:16px 0;color:var(--ink)}
.guest-features{grid-template-columns:repeat(3,minmax(0,1fr))}
.guest-plan-cta{display:flex;gap:24px;align-items:center;justify-content:space-between;margin-top:28px}
.guest-plan-cta>div{max-width:760px}.guest-plan-cta .button{flex-shrink:0}
.guest-plan-cta p{color:var(--muted)}
@media(max-width:1100px){.tawa-benefit-plans{grid-template-columns:1fr}.guest-features{grid-template-columns:repeat(2,minmax(0,1fr))}.guest-plan-cta{align-items:flex-start;flex-direction:column}}
@media(max-width:600px){.guest-features{grid-template-columns:1fr}.tawa-benefit-plan{padding:20px}.membership-matrix{padding:20px}.guest-plan-cta .button{width:100%}}

/* Notifications belong to the header, beside search, with a readable unread badge. */
.topbar .notification-shortcut{position:relative;inset:auto;display:inline-flex;flex:none;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0;background:transparent;color:var(--muted);border:0;border-radius:8px;box-shadow:none;z-index:auto;text-decoration:none}
.topbar .notification-shortcut:hover{background:var(--paper);color:var(--ink)}
.topbar .notification-shortcut:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
.topbar .notification-shortcut>span{position:absolute;top:0;right:-3px;min-width:17px;height:17px;padding:0 3px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;border-radius:12px;background:var(--teal);color:#fff;font-size:10px;line-height:1;font-weight:700}
@media(max-width:360px){.topbar:has(.notification-shortcut) .mobile-brand .tawa-mark{display:none}.topbar:has(.notification-shortcut){gap:4px}.topbar:has(.notification-shortcut) .topbar-right{gap:3px}}

/* Plan prices and calls to action retain contrast in every state. */
[data-theme="dark"] .plan-card .plan-price{color:var(--ink)}
[data-theme="dark"] .plan-card .plan-price small,[data-theme="dark"] .plan-card>p:not(.plan-price){color:var(--muted)}
.plan-card.plan-c .button,.plan-card.plan-c .button:hover,.plan-card.plan-c .button:focus-visible{color:#422c21!important;background:#f3dcae!important}
