/* The Help Center (Views/help). Colours and sizes come from ottengine-dark.css. */
:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--oe-font-family, system-ui, -apple-system, sans-serif);
    background: var(--oe-bg-base);
    color: var(--oe-text-primary);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--oe-brand-primary); }

/* Header and search */
.help-header {
    background: linear-gradient(180deg, var(--oe-bg-surface) 0%, var(--oe-bg-base) 100%);
    border-bottom: 1px solid var(--oe-border-default);
    padding: 20px 24px;
}
.help-header--hero { padding: 32px 24px 40px; }
.help-header__inner { max-width: 1100px; margin: 0 auto; }
.help-header__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.help-header--hero .help-header__top { margin-bottom: 28px; }
.help-header__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--oe-text-primary); }
.help-header__logo img { height: 32px; width: auto; border-radius: var(--oe-radius-sm); }
.help-header__logo-text { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.help-header__back { color: var(--oe-text-secondary); text-decoration: none; font-size: 0.86rem; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.help-header__back:hover { color: var(--oe-text-primary); }
.help-hero { text-align: center; max-width: 640px; margin: 0 auto 24px; }
.help-hero__title { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 10px; }
.help-hero__subtitle { color: var(--oe-text-secondary); font-size: 0.96rem; margin: 0; line-height: 1.55; }
.help-search { position: relative; max-width: 620px; margin: 0 auto; }
.help-search input {
    width: 100%;
    background: var(--oe-bg-elevated);
    border: 1px solid var(--oe-border-default);
    border-radius: var(--oe-radius-lg);
    padding: 13px 16px 13px 46px;
    color: var(--oe-text-primary);
    font-size: 0.96rem;
    outline: none;
    transition: border-color var(--oe-transition-fast);
}
.help-search input:focus { border-color: var(--oe-brand-primary); box-shadow: 0 0 0 3px var(--oe-brand-primary-muted); }
.help-search__icon { position: absolute; top: 25px; left: 15px; transform: translateY(-50%); color: var(--oe-text-muted); }
.help-search__results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: min(70vh, 460px);
    overflow-y: auto;
    background: var(--oe-bg-elevated);
    border: 1px solid var(--oe-border-default);
    border-radius: var(--oe-radius-lg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.help-search__hit { display: block; padding: 11px 14px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--oe-border-default); }
.help-search__hit:last-child { border-bottom: 0; }
.help-search__hit:hover, .help-search__hit:focus { background: var(--oe-bg-surface); outline: none; }
.help-search__hit-title { display: block; font-size: 0.9rem; font-weight: 600; }
.help-search__hit-page { display: block; font-size: 0.72rem; color: var(--oe-text-muted); margin-top: 2px; }
.help-search__hit-text { display: block; font-size: 0.8rem; color: var(--oe-text-secondary); margin-top: 4px; line-height: 1.45; }
.help-search__none { padding: 14px; font-size: 0.86rem; color: var(--oe-text-muted); }
mark { background: var(--oe-brand-primary-muted); color: var(--oe-text-primary); padding: 0 2px; border-radius: 2px; }

/* Landing page */
.help-landing { max-width: 1100px; margin: 0 auto; padding: 24px 24px 16px; }
.help-landing__heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.help-group { font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--oe-text-muted); margin: 24px 0 10px; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 10px; }
.help-card {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--oe-border-default);
    border-radius: var(--oe-radius-lg);
    background: var(--oe-bg-surface);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--oe-transition-fast);
}
.help-card:hover, .help-card:focus { border-color: var(--oe-brand-primary); outline: none; }
.help-card__icon { width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--oe-radius-md); display: inline-flex; align-items: center; justify-content: center; background: var(--oe-brand-primary-muted); color: var(--oe-brand-primary); }
.help-card__text { min-width: 0; }
.help-card__title { display: block; font-weight: 600; font-size: 0.94rem; }
.help-card__desc { display: block; font-size: 0.82rem; color: var(--oe-text-secondary); margin-top: 3px; line-height: 1.45; }
.help-popular { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 4px 24px; }
.help-popular a { display: block; padding: 7px 0; font-size: 0.9rem; text-decoration: none; }
.help-popular a:hover { text-decoration: underline; }

/* A topic's page */
.help-main { max-width: 1100px; margin: 0 auto; padding: 28px 24px 16px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 36px; }
.help-toc { position: sticky; top: 16px; align-self: start; max-height: calc(100vh - 32px); overflow-y: auto; }
.help-toc__toggle { display: none; }
.help-toc__title { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--oe-text-muted); margin: 14px 0 6px; padding: 0 10px; }
.help-toc__box > .help-toc__title:first-of-type { margin-top: 0; }
.help-toc__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; }
.help-toc__link { display: block; padding: 6px 10px; border-radius: var(--oe-radius-md); text-decoration: none; color: var(--oe-text-secondary); font-size: 0.84rem; line-height: 1.35; }
.help-toc__link:hover, .help-toc__link.is-active { background: var(--oe-bg-surface); color: var(--oe-text-primary); }
.help-page { min-width: 0; }
.help-crumbs { font-size: 0.78rem; color: var(--oe-text-muted); margin-bottom: 10px; }
.help-crumbs a { color: var(--oe-text-secondary); text-decoration: none; }
.help-crumbs a:hover { text-decoration: underline; }
.help-page__title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; }
.help-lead { color: var(--oe-text-secondary); font-size: 0.96rem; line-height: 1.6; margin: 0 0 18px; }
.help-section { font-size: 1.1rem; font-weight: 700; margin: 28px 0 12px; scroll-margin-top: 16px; }

/* A question */
.help-qa { border: 1px solid var(--oe-border-default); border-radius: var(--oe-radius-lg); background: var(--oe-bg-surface); margin-bottom: 8px; overflow: hidden; scroll-margin-top: 16px; }
.help-qa[open] { border-color: var(--oe-brand-primary-muted); }
.help-qa summary { list-style: none; padding: 13px 16px; cursor: pointer; display: flex; align-items: center; gap: 12px; }
.help-qa summary::-webkit-details-marker { display: none; }
.help-qa__title { font-size: 0.94rem; font-weight: 500; margin: 0; }
.help-qa__chevron { width: 16px; height: 16px; color: var(--oe-text-muted); transition: transform var(--oe-transition-fast); flex-shrink: 0; }
.help-qa[open] .help-qa__chevron { transform: rotate(90deg); color: var(--oe-brand-primary); }
.help-qa__body { padding: 0 16px 15px 44px; color: var(--oe-text-secondary); font-size: 0.9rem; line-height: 1.65; }
.help-qa__body p { margin: 0 0 10px; }
.help-qa__body p:last-child { margin-bottom: 0; }
.help-qa__body ul, .help-qa__body ol { margin: 4px 0 10px; padding-left: 20px; }
.help-qa__body li { margin-bottom: 4px; }
.help-qa__body strong { color: var(--oe-text-primary); font-weight: 600; }
.help-qa__body code { background: var(--oe-bg-elevated); padding: 1px 6px; border-radius: 4px; font-size: 0.85em; overflow-wrap: anywhere; }

/* Field lists: label on one side, what it does on the other */
.help-fields { margin: 6px 0 12px; }
.help-fields dt { color: var(--oe-text-primary); font-weight: 600; margin-top: 10px; }
.help-fields dt:first-child { margin-top: 0; }
.help-fields dd { margin: 2px 0 0; }

.help-note { background: var(--oe-bg-elevated); border-left: 3px solid var(--oe-brand-primary); border-radius: var(--oe-radius-sm); padding: 9px 12px; margin: 10px 0; font-size: 0.86rem; }

/* Plan cards, one per plan: no sideways scrolling on a phone */
.help-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 10px; margin: 8px 0 12px; }
.help-plan { border: 1px solid var(--oe-border-default); border-radius: var(--oe-radius-lg); background: var(--oe-bg-elevated); padding: 12px 14px; }
.help-plan__name { font-weight: 700; color: var(--oe-text-primary); }
.help-plan__price { font-size: 0.82rem; color: var(--oe-text-muted); margin-bottom: 8px; }
.help-plan ul { list-style: none; padding: 0; margin: 0; font-size: 0.82rem; }
.help-plan li { margin-bottom: 3px; }
.help-plan li.is-off { color: var(--oe-text-muted); opacity: 0.75; }

/* Next and previous */
.help-pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }
.help-pager__link { flex: 1; max-width: 50%; padding: 10px 14px; border: 1px solid var(--oe-border-default); border-radius: var(--oe-radius-lg); text-decoration: none; font-size: 0.86rem; color: var(--oe-text-primary); }
.help-pager__link:hover { border-color: var(--oe-brand-primary); }
.help-pager__link--next { text-align: right; margin-left: auto; }
.help-pager__dir { display: block; font-size: 0.72rem; color: var(--oe-text-muted); }

/* More help, and the footer */
.help-cta { max-width: 1052px; margin: 32px auto 40px; padding: 24px; border-radius: var(--oe-radius-lg); background: var(--oe-bg-surface); border: 1px solid var(--oe-border-default); text-align: center; }
.help-cta__title { font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.help-cta__desc { color: var(--oe-text-secondary); font-size: 0.88rem; margin: 0 auto 16px; max-width: 60ch; line-height: 1.5; }
.help-cta__btn { display: inline-block; background: var(--oe-brand-primary); color: #fff; text-decoration: none; padding: 10px 20px; border-radius: var(--oe-radius-md); font-size: 0.88rem; font-weight: 600; }
.help-cta__btn:hover { background: var(--oe-brand-primary-hover); }
.help-cta__account { color: var(--oe-text-secondary); font-size: 0.84rem; margin: 14px auto 0; }

/* The contact form */
.help-form { max-width: 560px; margin-top: 8px; }
.help-form__field { margin-bottom: 16px; }
.help-form__label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; }
.help-form input[type="text"], .help-form input[type="email"], .help-form select, .help-form textarea {
    width: 100%;
    background: var(--oe-bg-elevated);
    border: 1px solid var(--oe-border-default);
    border-radius: var(--oe-radius-md);
    padding: 10px 12px;
    color: var(--oe-text-primary);
    font: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color var(--oe-transition-fast);
}
.help-form textarea { resize: vertical; min-height: 130px; }
.help-form input:focus, .help-form select:focus, .help-form textarea:focus { border-color: var(--oe-brand-primary); box-shadow: 0 0 0 3px var(--oe-brand-primary-muted); }
.help-form [aria-invalid="true"] { border-color: var(--oe-accent-red); }
.help-form__hint { color: var(--oe-text-muted); font-size: 0.8rem; margin-top: 5px; line-height: 1.45; }
.help-form__error { color: var(--oe-accent-red); font-size: 0.82rem; margin-top: 5px; }
.help-form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.help-form__submit { border: 0; cursor: pointer; }
.help-form__alert, .help-form__done { border-radius: var(--oe-radius-sm); padding: 10px 12px; margin: 0 0 16px; max-width: 560px; font-size: 0.9rem; line-height: 1.5; }
.help-form__alert { background: var(--oe-accent-red-muted); border-left: 3px solid var(--oe-accent-red); }
.help-form__done { background: var(--oe-accent-green-muted); border-left: 3px solid var(--oe-accent-green); }

.help-footer { border-top: 1px solid var(--oe-border-default); padding: 24px; text-align: center; color: var(--oe-text-muted); font-size: 0.78rem; }
.help-footer a { color: inherit; }

/* Phones and small tablets */
@media (max-width: 820px) {
    .help-header, .help-header--hero { padding-left: 16px; padding-right: 16px; }
    .help-main { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px 16px 8px; }
    .help-landing { padding: 16px 16px 8px; }
    .help-toc { position: static; max-height: none; overflow: visible; }
    .help-toc__box { border: 1px solid var(--oe-border-default); border-radius: var(--oe-radius-lg); background: var(--oe-bg-surface); padding: 2px 8px; }
    .help-toc__box[open] { padding-bottom: 8px; }
    .help-toc__toggle { display: block; padding: 9px 4px; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
    .help-qa summary { padding: 12px; }
    .help-qa__body { padding: 0 12px 13px; }
    .help-cta { margin: 20px 16px 28px; }
    /* Under 16px, iOS zooms the page when a field is tapped. */
    .help-form input[type="text"], .help-form input[type="email"], .help-form select, .help-form textarea { font-size: 16px; }
}
