/* =========================================
   MyFly Club - Consolidated Skin Styles
   Author: Warren Pace
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --myfly-green: #36c933;
    --myfly-green-light: #99fe02;
    --myfly-dark: #004d40;
    --background-light: #f9f9fb;
    --text: #222;
    --muted: #666;
    --line: #e6e6e6;
    --card-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    --card-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.07);
    --radius: 12px;
    --radius-lg: 18px;
    --container: 1200px;
}

/* =========================================
   BASE
   ========================================= */

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', Helvetica, Arial, sans-serif;
    background: var(--background-light);
    color: var(--text);
    line-height: 1.6;
}

#myfly-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--myfly-green);
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    color: var(--myfly-green-light);
    text-decoration: underline;
}

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

/* Global buttons, but NOT nav toggle */
button:not(#nav-toggle),
input[type="submit"],
input[type="button"],
.mw-ui-button {
    background: var(--myfly-green);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

button:not(#nav-toggle):hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.mw-ui-button:hover {
    background: var(--myfly-green-light);
}

/* =========================================
   TOP USER BAR
   ========================================= */

.top-user-bar {
    background: #000;
    color: #fff;
    width: 100%;
    font-size: 13px;
}

.top-user-bar-inner {
    max-width: var(--container);
    width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 34px;
}

.top-user-bar .user-menu {
    display: flex;
    align-items: center;
}

.top-user-bar .user-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 18px;
    align-items: center;
}

.top-user-bar .user-menu li,
.top-user-bar .mw-list-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.top-user-bar .user-menu a,
.top-user-bar .user-menu a:visited {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.top-user-bar .user-menu a:hover {
    color: #ccc !important;
}

/* =========================================
   HEADER
   ========================================= */

#myfly-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 0;
    position: relative;
    z-index: 1000;
}

#myfly-header .header-inner {
    max-width: var(--container);
    width: 90%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    height: 72px;
}

#myfly-header .logo img {
    height: 50px;
    width: auto;
    display: block;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.main-nav a,
.main-nav a:visited {
    color: #000;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav li.is-active > a {
    color: var(--myfly-green) !important;
}

.main-nav li.is-active > a {
    text-decoration: none;
}

#myfly-header .header-cta {
    height: 100%;
    display: flex;
    align-items: stretch;
    flex: 0 0 auto;
}

.play-btn {
    background: var(--myfly-green) !important;
    color: #fff !important;
    padding: 0 36px;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 0;
    transition: all 0.25s ease;
    height: 100%;
    margin: 0;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.play-btn:hover {
    background: var(--myfly-green-light) !important;
    color: #fff !important;
    text-decoration: none;
}

/* =========================================
   MOBILE NAV
   ========================================= */

#nav-toggle {
    display: none;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 44px;
    height: 44px;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

#nav-toggle:focus,
#nav-toggle:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

#nav-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    margin: 5px 0;
    background: #0f2c40;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}

#nav-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

#nav-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* =========================================
   LAYOUT
   ========================================= */

.articlepage #myfly-main {
    display: flex;
    max-width: var(--container);
    margin: 2rem auto;
    padding: 0 2rem;
    gap: 2rem;
}

.articlepage #myfly-sidebar {
    flex: 0 0 260px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

.articlepage #myfly-content {
    flex: 1;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 2rem;
    overflow: hidden;
}

.mainpage #myfly-main.mainpage-main {
    max-width: var(--container);
    margin: 2rem auto;
    padding: 0 2rem;
    display: block;
}

.mainpage #myfly-content.mainpage-content {
    width: 100%;
    max-width: 100%;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 2rem;
}

.page-title {
    color: var(--myfly-dark);
    border-bottom: 2px solid var(--myfly-green);
    padding-bottom: 0.5rem;
    margin-top: 0;
}

/* =========================================
   SIDEBAR
   ========================================= */

#myfly-sidebar .kb-sidebar h3 {
    color: #555;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e8e8;
}

#myfly-sidebar .kb-sidebar ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

#myfly-sidebar .kb-sidebar li {
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
}

#myfly-sidebar .kb-sidebar li:last-child {
    border-bottom: none;
}

#myfly-sidebar .kb-sidebar a,
#myfly-sidebar .kb-sidebar a:visited {
    color: #000 !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

#myfly-sidebar .kb-sidebar a:hover,
#myfly-sidebar .kb-sidebar a:focus,
#myfly-sidebar .kb-sidebar a:active {
    color: var(--myfly-green) !important;
    padding-left: 4px;
}

#myfly-sidebar .kb-sidebar .kb-icon {
    width: 18px;
    text-align: center;
    color: #888;
    flex: 0 0 18px;
}

#myfly-sidebar .kb-sidebar li.is-current {
    background: rgba(54, 201, 51, 0.06);
    border-radius: 8px;
    padding: 0 10px;
    margin: 4px 0;
    border-bottom: none;
}

#myfly-sidebar .kb-sidebar li.is-current > a {
    color: var(--myfly-green) !important;
    font-weight: 600;
}

#myfly-sidebar .kb-sidebar li.is-current > a .kb-icon {
    color: var(--myfly-green);
}

/* Sidebar search */
.kb-sidebar-search {
    display: block;
    width: 100%;
    margin: 12px 0 18px;
}

.kb-sidebar-search-wrap {
    position: relative;
    width: 100%;
}

.kb-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    line-height: 1;
    opacity: 0.65;
    pointer-events: none;
}

.kb-sidebar-search input[type="search"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px 10px 36px;
    font-size: 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fff;
    outline: none;
    font-family: 'Poppins', sans-serif;
    transition: all 0.15s ease;
}

.kb-sidebar-search input[type="search"]:focus {
    border-color: var(--myfly-green);
    box-shadow: 0 0 0 3px rgba(54, 201, 51, 0.15);
}

.kb-sidebar-search button {
    display: none;
}

/* =========================================
   BREADCRUMBS + ARTICLE
   ========================================= */

.kb-breadcrumbs {
    border-bottom: 1px solid #ececec;
    padding-bottom: 12px;
    margin-bottom: 24px;
}

.kb-article-topbar {
    display: none;
}

/* TOC card */
.articlepage #myfly-content .mw-parser-output {
    display: flex;
    flex-direction: column;
}

.articlepage #myfly-content .mw-parser-output > h1,
.articlepage #myfly-content .mw-parser-output > .mw-heading1 {
    order: 1;
}

.articlepage #myfly-content .mw-parser-output > #toc {
    order: 2;
}

.articlepage #myfly-content .mw-parser-output > *:not(h1):not(.mw-heading1):not(#toc) {
    order: 3;
}

.articlepage #myfly-content #toc {
    position: static;
    width: 100%;
    max-width: 420px;
    margin: 0 0 32px;
    padding: 18px 22px;
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    float: none !important;
}

.articlepage #myfly-content #toc h2 {
    font-size: 16px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.articlepage #myfly-content #toc ul,
.articlepage #myfly-content #toc ul ul,
.articlepage #myfly-content #toc li {
    list-style: none !important;
    margin: 0;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.articlepage #myfly-content #toc li {
    margin: 8px 0;
}

.articlepage #myfly-content #toc a,
.articlepage #myfly-content #toc a:visited {
    color: #333 !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.articlepage #myfly-content #toc a::before {
    content: "›";
    font-size: 14px;
    color: #bbb;
    transition: all 0.15s ease;
}

.articlepage #myfly-content #toc a:hover,
.articlepage #myfly-content #toc a.is-current-section {
    color: var(--myfly-green) !important;
}

.articlepage #myfly-content #toc a:hover::before,
.articlepage #myfly-content #toc a.is-current-section::before {
    color: var(--myfly-green);
}

.articlepage #myfly-content #toc a.is-current-section {
    font-weight: 600;
}

/* =========================================
   KB HOMEPAGE CONTENT CARDS
   ========================================= */

.kb-home-intro {
    max-width: 900px;
    margin: 0 auto 30px;
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
}

.kb-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.kb-category-grid > *,
.kb-category-grid p {
    margin: 0;
}

.kb-category-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #eaeaea;
    transition: all 0.2s ease;
}

.kb-category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.kb-category-card a {
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}

.kb-category-desc {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

/* =========================================
   SPECIAL PAGES
   ========================================= */

.specialpage #myfly-main.specialpage-main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: block;
}

.specialpage #myfly-content.specialpage-content {
    width: 100%;
    max-width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 2rem;
    overflow: hidden;
}

.specialpage .kb-article-layout,
.specialpage .kb-article-body {
    width: 100%;
    max-width: 100%;
}

.specialpage .mw-first-heading,
.specialpage .firstHeading {
    font-size: 2rem;
    line-height: 1.2;
    margin: 0 0 1.5rem;
    color: #111;
}

/* General special-page elements */
.specialpage table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    background: #fff;
}

.specialpage th,
.specialpage td {
    border: 1px solid #e5e5e5;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.specialpage th {
    background: #f7f7f7;
    font-weight: 600;
}

.specialpage fieldset {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 1.2rem 1.2rem 1rem;
    background: #fff;
    margin: 1.25rem 0;
}

.specialpage legend {
    padding: 0 8px;
    font-weight: 700;
    color: #111;
}

.specialpage .mw-message-box-error,
.specialpage .error {
    background: #fff1f1;
    border: 1px solid #efb4b4;
    color: #8a1f1f;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 1rem;
}

.specialpage .mw-message-box-success,
.specialpage .successbox {
    background: #effaf0;
    border: 1px solid #b8dfbb;
    color: #216a2f;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 1rem;
}

.specialpage .mw-message-box-warning,
.specialpage .warningbox {
    background: #fff8e5;
    border: 1px solid #ecd48a;
    color: #7a5a00;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 1rem;
}

/* Make special page controls green, but DO NOT style wrapper spans */
.specialpage button,
.specialpage input[type="submit"],
.specialpage input[type="button"],
.specialpage .mw-ui-button,
.specialpage .oo-ui-buttonElement-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 18px;
    border: none !important;
    border-radius: 10px !important;
    background: var(--myfly-green) !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none !important;
    box-shadow: none !important;
    transition: background 0.2s ease, transform 0.1s ease;
}

.specialpage button:hover,
.specialpage input[type="submit"]:hover,
.specialpage input[type="button"]:hover,
.specialpage .mw-ui-button:hover,
.specialpage .oo-ui-buttonElement-button:hover {
    background: #2eb52c !important;
}

.specialpage button:active,
.specialpage input[type="submit"]:active,
.specialpage input[type="button"]:active,
.specialpage .mw-ui-button:active,
.specialpage .oo-ui-buttonElement-button:active {
    transform: translateY(1px);
}

/* Search / filters polish */
.specialpage .mw-rcfilters-ui-changesListWrapperWidget,
.specialpage .mw-rcfilters-ui-filterWrapperWidget,
.specialpage .mw-changeslist {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e6e6e6;
    padding: 1rem;
    margin-bottom: 1rem;
}

.specialpage input[type="search"],
.specialpage input[type="text"],
.specialpage input[type="password"],
.specialpage input[type="email"],
.specialpage select,
.specialpage textarea,
.specialpage .oo-ui-inputWidget-input,
.specialpage .oo-ui-textInputWidget input,
.specialpage .oo-ui-textInputWidget textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #cfcfcf !important;
    border-radius: 10px !important;
    background: #fff;
    font-size: 15px;
    line-height: 1.4;
    box-shadow: none !important;
}

.specialpage input[type="search"]:focus,
.specialpage input[type="text"]:focus,
.specialpage input[type="password"]:focus,
.specialpage input[type="email"]:focus,
.specialpage select:focus,
.specialpage textarea:focus,
.specialpage .oo-ui-inputWidget-input:focus,
.specialpage .oo-ui-textInputWidget input:focus,
.specialpage .oo-ui-textInputWidget textarea:focus {
    outline: none;
    border-color: var(--myfly-green) !important;
    box-shadow: 0 0 0 4px rgba(54, 201, 51, 0.12) !important;
}

/* Keep header colours correct on special pages */
.specialpage #myfly-header .main-nav a,
.specialpage #myfly-header .main-nav a:visited {
    color: #000 !important;
    text-decoration: none !important;
}

.specialpage #myfly-header .main-nav a:hover,
.specialpage #myfly-header .main-nav li.is-active > a {
    color: var(--myfly-green) !important;
}

.specialpage #myfly-header .play-btn,
.specialpage #myfly-header .play-btn:visited {
    color: #fff !important;
}

.specialpage #myfly-header .top-user-bar .user-menu a,
.specialpage #myfly-header .top-user-bar .user-menu a:visited {
    color: #fff !important;
}

.specialpage #myfly-header .top-user-bar .user-menu a:hover {
    color: #ccc !important;
}

/* =========================================
   AUTH PAGES
   ========================================= */

.authpage #myfly-main.authpage-main {
    max-width: 820px;
    margin: 2.75rem auto 4rem;
    padding: 0 1.25rem;
    display: block;
}

.authpage #myfly-content.authpage-content {
    width: 100%;
    max-width: 100%;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    overflow: visible;
}

.authpage .kb-article-layout,
.authpage .kb-article-body,
.authpage .mw-body-content,
.authpage .mw-parser-output {
    width: 100%;
    max-width: 100%;
}

.authpage #myfly-content > .mw-first-heading,
.authpage #myfly-content > .firstHeading,
.authpage #myfly-content > h1.page-title {
    display: none;
}

/* Auth card */
.authpage #userlogin,
.authpage #mw-createaccount-join,
.authpage #mw-resetpassword-form,
.authpage .mw-body-content > form:first-child,
.authpage .mw-body-content > .oo-ui-panelLayout,
.authpage .mw-body-content > .mw-htmlform-ooui-wrapper {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow-lg);
    padding: 2rem;
    max-width: 680px;
    margin: 0 auto;
}

/* Auth headings */
.authpage .mw-first-heading,
.authpage .firstHeading {
    text-align: center;
    font-size: 2rem;
    margin: 0 0 1.5rem;
    color: #111;
}

/* Auth copy */
.authpage p,
.authpage .mw-body-content p {
    color: #444;
    line-height: 1.6;
}

.authpage label,
.authpage .mw-label label,
.authpage .oo-ui-labelElement-label,
.authpage .oo-ui-fieldLayout-header label {
    display: inline-block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: #111;
}

/* Auth fields */
.authpage input[type="text"],
.authpage input[type="password"],
.authpage input[type="email"],
.authpage input[type="search"],
.authpage select,
.authpage textarea,
.authpage .oo-ui-inputWidget-input,
.authpage .oo-ui-textInputWidget input,
.authpage .oo-ui-textInputWidget textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    padding: 0.8rem 0.95rem;
    border: 1px solid #d8d8d8 !important;
    border-radius: 10px !important;
    background: #fff;
    box-shadow: none !important;
    font-size: 15px;
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.authpage input[type="text"]:focus,
.authpage input[type="password"]:focus,
.authpage input[type="email"]:focus,
.authpage input[type="search"]:focus,
.authpage select:focus,
.authpage textarea:focus,
.authpage .oo-ui-inputWidget-input:focus,
.authpage .oo-ui-textInputWidget input:focus,
.authpage .oo-ui-textInputWidget textarea:focus {
    outline: none;
    border-color: var(--myfly-green) !important;
    box-shadow: 0 0 0 4px rgba(54, 201, 51, 0.12) !important;
}

.authpage .mw-ui-vform-field,
.authpage .mw-htmlform-field-HTMLTextField,
.authpage .mw-htmlform-field-OOUIEmailInputWidget,
.authpage .mw-htmlform-field-OOUITextInputWidget,
.authpage .mw-htmlform-field-OOUIUsernameInputWidget,
.authpage .mw-htmlform-field-OOUIPasswordInputWidget,
.authpage .oo-ui-fieldLayout {
    margin-bottom: 1rem;
}

.authpage input[type="checkbox"] {
    width: auto;
    min-height: 0;
    margin-right: 0.45rem;
    vertical-align: middle;
}

/* Auth buttons - actual buttons only */
.authpage button,
.authpage input[type="submit"],
.authpage input[type="button"],
.authpage .mw-ui-button,
.authpage .oo-ui-buttonElement-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.85rem 1.2rem;
    border: none !important;
    border-radius: 10px !important;
    background: var(--myfly-green) !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: none !important;
    transition: background 0.2s ease, transform 0.08s ease;
}

.authpage button:hover,
.authpage input[type="submit"]:hover,
.authpage input[type="button"]:hover,
.authpage .mw-ui-button:hover,
.authpage .oo-ui-buttonElement-button:hover {
    background: #2eb52c !important;
    text-decoration: none !important;
}

.authpage button:active,
.authpage input[type="submit"]:active,
.authpage input[type="button"]:active,
.authpage .mw-ui-button:active,
.authpage .oo-ui-buttonElement-button:active {
    transform: translateY(1px);
}

/* Full-width actual submit buttons */
.authpage form input[type="submit"],
.authpage form button[type="submit"],
.authpage form .oo-ui-buttonElement-button {
    width: 100% !important;
}

/* Never style wrapper spans as black or green blocks */
.authpage .mw-htmlform-submit,
.authpage .mw-htmlform-submit-buttons,
.authpage .oo-ui-buttonWidget,
.authpage .oo-ui-buttonInputWidget,
.authpage .oo-ui-buttonElement,
.authpage .oo-ui-widget {
    box-shadow: none !important;
}

.authpage #mw-resetpassword-form .mw-htmlform-submit,
.authpage #mw-resetpassword-form .mw-htmlform-submit-buttons,
.authpage #mw-resetpassword-form .oo-ui-buttonWidget,
.authpage #mw-resetpassword-form .oo-ui-buttonInputWidget,
.authpage #mw-resetpassword-form .oo-ui-buttonElement,
.authpage #mw-resetpassword-form .oo-ui-widget {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.authpage #mw-resetpassword-form .mw-htmlform-submit {
    display: inline-block !important;
    width: auto !important;
}

.authpage #mw-resetpassword-form .oo-ui-buttonElement-button {
    width: auto !important;
    padding: 0.85rem 1.25rem !important;
}

.authpage #mw-resetpassword-form .oo-ui-iconElement-noIcon,
.authpage #mw-resetpassword-form .oo-ui-indicatorElement-noIndicator {
    display: none !important;
}

.authpage #mw-resetpassword-form .oo-ui-labelElement-label {
    color: #fff !important;
    margin: 0 !important;
}

/* Auth links only inside content */
.authpage #myfly-content a,
.authpage #myfly-content a:visited {
    color: #2451d1 !important;
    text-decoration: none;
}

.authpage #myfly-content a:hover {
    text-decoration: underline;
}

/* Login page extras */
.authpage #userlogin .mw-userlogin-signup,
.authpage #userlogin .mw-userlogin-cta,
.authpage #userlogin .mw-userlogin-footer {
    display: none !important;
}

.authpage #userlogin .mw-ui-vform > div:last-child {
    text-align: center;
    margin-top: 1.5rem;
}

.authpage #userlogin a[href*="CreateAccount"] {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 10px 14px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid #dcdcdc;
    color: #333 !important;
    font-weight: 600;
}

.authpage #userlogin a[href*="CreateAccount"]:hover {
    background: #f5f5f5;
    text-decoration: none;
}

/* Create account: single column, hide side panel */
.authpage #mw-createaccount-join,
.authpage #userlogin2,
.authpage .mw-createacct-layout,
.authpage .mw-createacct-container {
    display: block !important;
    width: 100% !important;
    max-width: 680px !important;
    margin: 0 auto !important;
}

.authpage #mw-createaccount-join > div,
.authpage #userlogin2 > div,
.authpage .mw-createacct-layout > div,
.authpage .mw-createacct-container > div {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    flex: none !important;
}

.authpage #mw-createaccount-join > div:last-child,
.authpage #userlogin2 > div:last-child,
.authpage .mw-createacct-layout > div:last-child,
.authpage .mw-createacct-benefits,
.authpage .mw-createacct-right,
.authpage .mw-createacct-side,
.authpage .mw-ui-vform-info,
.authpage .cdx-card__supporting-text,
.authpage [class*="createacct"][class*="benefit"],
.authpage [class*="createacct"][class*="side"],
.authpage [class*="createacct"][class*="right"] {
    display: none !important;
}

.authpage #mw-createaccount-join form,
.authpage #userlogin2 form,
.authpage .mw-createacct-layout form,
.authpage .mw-createacct-container form {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.authpage #mw-createaccount-join .oo-ui-fieldLayout,
.authpage #mw-createaccount-join .mw-htmlform-field-HTMLTextField,
.authpage #mw-createaccount-join .mw-htmlform-field-OOUIEmailInputWidget,
.authpage #mw-createaccount-join .mw-htmlform-field-OOUITextInputWidget,
.authpage #mw-createaccount-join .mw-htmlform-field-OOUIUsernameInputWidget,
.authpage #mw-createaccount-join .mw-htmlform-field-OOUIPasswordInputWidget {
    width: 100% !important;
    max-width: 100% !important;
}

/* =========================================
   FOOTER
   ========================================= */

#myfly-footer {
    background: #f1f1f3;
    color: #666;
    text-align: center;
    padding: 1rem;
    margin-top: auto;
    font-size: 0.9rem;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 900px) {
    #myfly-header .header-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 90%;
        height: 72px;
        padding: 0;
    }

    .articlepage #myfly-main {
        flex-direction: column;
        padding: 0 1rem;
    }

    .mainpage #myfly-main.mainpage-main {
        padding: 0 1rem;
        margin: 1.25rem auto;
    }

    #myfly-sidebar {
        position: static;
        top: auto;
    }

    .top-user-bar-inner {
        width: 90%;
        justify-content: center;
        min-height: 32px;
    }

    .top-user-bar .user-menu ul {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .top-user-bar .user-menu a {
        font-size: 12px;
    }

    .play-btn {
        display: none !important;
    }

    #nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 4000;
    }

    .main-nav {
        display: none !important;
    }

    .main-nav.open {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid #eee;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
        z-index: 3000;
        padding: 1rem 0;
    }

    .main-nav.open ul {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center;
        margin: 0;
        padding: 0;
    }

    .main-nav.open a {
        font-size: 1.1rem;
        color: #000;
    }
}

@media (max-width: 768px) {
    .specialpage #myfly-main.specialpage-main {
        margin: 1.25rem auto 2rem;
        padding: 0 1rem;
    }

    .specialpage #myfly-content.specialpage-content {
        padding: 1.25rem;
    }

    .authpage #myfly-main.authpage-main {
        margin: 1.5rem auto 2.5rem;
        padding: 0 0.9rem;
        max-width: 760px;
    }

    .authpage #myfly-content.authpage-content {
        padding: 0;
    }

    .authpage #userlogin,
    .authpage #mw-createaccount-join,
    .authpage #mw-resetpassword-form,
    .authpage .mw-body-content > form:first-child,
    .authpage .mw-body-content > .oo-ui-panelLayout,
    .authpage .mw-body-content > .mw-htmlform-ooui-wrapper {
        padding: 1.25rem;
        border-radius: 14px;
    }

    .authpage .mw-first-heading,
    .authpage .firstHeading,
    .specialpage .mw-first-heading,
    .specialpage .firstHeading {
        font-size: 1.6rem;
    }
}

/* =========================================
   ARTICLE READABILITY POLISH
   ========================================= */

/* Keep article content readable on large screens */
.articlepage #myfly-content .kb-article-body,
.articlepage #myfly-content .mw-parser-output {
    max-width: 860px;
}

/* But do not constrain the TOC card itself */
.articlepage #myfly-content .mw-parser-output > #toc {
    max-width: 420px;
}

/* Headings */
.articlepage #myfly-content h1,
.articlepage #myfly-content .mw-heading1,
.articlepage #myfly-content h2,
.articlepage #myfly-content .mw-heading2,
.articlepage #myfly-content h3,
.articlepage #myfly-content .mw-heading3,
.articlepage #myfly-content h4,
.articlepage #myfly-content .mw-heading4 {
    line-height: 1.25;
    color: #111;
}

.articlepage #myfly-content h1,
.articlepage #myfly-content .mw-heading1 {
    margin: 0 0 1rem;
}

.articlepage #myfly-content h2,
.articlepage #myfly-content .mw-heading2 {
    margin: 2rem 0 0.9rem;
    padding-top: 0;
    border-top: none;
}

.articlepage #myfly-content h3,
.articlepage #myfly-content .mw-heading3 {
    margin: 1.5rem 0 0.75rem;
}

.articlepage #myfly-content h4,
.articlepage #myfly-content .mw-heading4 {
    margin: 1.2rem 0 0.6rem;
}

/* Paragraphs and lists */
.articlepage #myfly-content p,
.articlepage #myfly-content li {
    font-size: 15.5px;
    line-height: 1.75;
    color: #2a2a2a;
}

.articlepage #myfly-content p {
    margin: 0 0 1rem;
}

.articlepage #myfly-content ul,
.articlepage #myfly-content ol {
    margin: 0 0 1.15rem 1.25rem;
    padding: 0;
}

.articlepage #myfly-content li {
    margin-bottom: 0.45rem;
}

/* Inline code + pre blocks */
.articlepage #myfly-content code {
    background: #f6f7f8;
    border: 1px solid #e8eaed;
    border-radius: 6px;
    padding: 0.12rem 0.35rem;
    font-size: 0.92em;
}

.articlepage #myfly-content pre {
    background: #f6f7f8;
    border: 1px solid #e8eaed;
    border-radius: 10px;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.95rem;
    line-height: 1.55;
}

/* Blockquotes */
.articlepage #myfly-content blockquote {
    margin: 1.25rem 0;
    padding: 0.9rem 1rem;
    border-left: 4px solid var(--myfly-green);
    background: #fafcf9;
    color: #444;
    border-radius: 0 10px 10px 0;
}

/* Tables inside articles */
.articlepage #myfly-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0 1.5rem;
    background: #fff;
    font-size: 0.96rem;
}

.articlepage #myfly-content th,
.articlepage #myfly-content td {
    border: 1px solid #e6e6e6;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.articlepage #myfly-content th {
    background: #f7f7f7;
    font-weight: 600;
}

/* Images */
.articlepage #myfly-content img {
    border-radius: 10px;
    margin: 0.75rem 0 1.2rem;
}

/* Horizontal rules */
.articlepage #myfly-content hr {
    border: 0;
    border-top: 1px solid #ececec;
    margin: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .articlepage #myfly-content .kb-article-body,
    .articlepage #myfly-content .mw-parser-output {
        max-width: 100%;
    }

    .articlepage #myfly-content p,
    .articlepage #myfly-content li {
        font-size: 15px;
        line-height: 1.7;
    }

    .articlepage #myfly-content h2,
    .articlepage #myfly-content .mw-heading2 {
        margin-top: 1.6rem;
    }
}

.kb-page-actions {
    margin: 0 0 1.25rem 0;
    padding: 0 0 1rem 0;
    border-bottom: 1px solid #e6e6e6;
}

.kb-page-actions ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.kb-page-actions li {
    margin: 0;
    padding: 0;
}

.kb-page-actions a {
    display: inline-block;
    padding: 0.55rem 0.9rem;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    background: #fff;
    color: #222;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.kb-page-actions a:hover {
    border-color: #31c92f;
    color: #31c92f;
}

.kb-page-actions li.is-active a,
.kb-page-actions li.is-primary a {
    background: #31c92f;
    border-color: #31c92f;
    color: #fff;
}

/* Remove numbering only */
#toc .tocnumber,
.toc .tocnumber {
    display: none;
}

/* Do NOT add arrows (your skin already has them) */
#toc li::before,
.toc li::before {
    content: none;
}
