/* NewsHub shared tokens, reset and components. Colours and font can be overridden from /theme.css */
:root {
    --nh-red: #e11d2a;
    --nh-purple: #6d28d9;
    --nh-purple-bright: #8b5cf6;
    --nh-topbar: #0b1530;
    --nh-sidebar: #1a1145;
    --nh-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --nh-ink: #111827;
    --nh-ink-2: #4b5563;
    --nh-ink-3: #6b7280;
    --nh-line: #e5e7eb;
    --nh-surface: #fff;
    --nh-soft: #f7f8fb;
    --nh-lilac: #f4f1fe;
    --nh-radius-s: 8px;
    --nh-radius: 14px;
    --nh-radius-l: 20px;
    --nh-shadow: 0 4px 18px rgb(26 17 69 / 7%);
    --nh-shadow-up: 0 8px 26px rgb(26 17 69 / 14%);
    --nh-chart-1: #1d4ed8;
    --nh-chart-2: #b779f5;
    --nh-chart-3: #d97706;
    --nh-chart-4: #16a34a;
    --nh-chart-5: #db2777;

    /* Fixed palette: every colour the stylesheets use. Change a value here to restyle it everywhere. */
    --nh-amber-20: #1f1500;
    --nh-amber-38: #5b3b00;
    --nh-amber-77: #f59e0b;
    --nh-amber-84: #fbbf24;
    --nh-amber-93: #fde2c7;
    --nh-amber-97: #fef3d6;
    --nh-amber-98: #fff6e8;
    --nh-black: #000000;
    --nh-blue-15: #040a1e;
    --nh-blue-21: #111827;
    --nh-blue-45: #475569;
    --nh-blue-53: #1d5fe0;
    --nh-blue-55: #2563eb;
    --nh-blue-59: #2f7be6;
    --nh-blue-59-2: #1877f2;
    --nh-blue-67: #8e96a8;
    --nh-blue-79: #b4b9c4;
    --nh-blue-83: #c2c7d0;
    --nh-blue-86: #cdd2dc;
    --nh-blue-94: #e4edff;
    --nh-gray-89: #d7dae2;
    --nh-gray-93: #e5e7eb;
    --nh-gray-93-2: #e4e6ec;
    --nh-gray-95: #eceef4;
    --nh-gray-96: #f2f3f7;
    --nh-gray-96-2: #eef1f5;
    --nh-gray-98: #f9fafc;
    --nh-green-45: #166534;
    --nh-green-53: #15803d;
    --nh-green-63: #16a34a;
    --nh-green-72: #22c55e;
    --nh-green-95: #dcf7e5;
    --nh-green-97: #ecf9f0;
    --nh-indigo-16: #080c1e;
    --nh-indigo-23: #101a3a;
    --nh-indigo-25: #1b1058;
    --nh-indigo-26: #1e1e46;
    --nh-indigo-46: #4338ca;
    --nh-indigo-50: #3b4fd8;
    --nh-indigo-51: #4f46e5;
    --nh-indigo-96: #eff2fe;
    --nh-orange-48: #854d0e;
    --nh-orange-56: #b45309;
    --nh-orange-65: #ea580c;
    --nh-orange-96: #fff0e6;
    --nh-pink-59: #e11d6a;
    --nh-pink-59-2: #db2777;
    --nh-pink-95: #fde7f2;
    --nh-pink-97: #fdf2f8;
    --nh-purple-95: #f3e8fc;
    --nh-purple-96: #fbeef8;
    --nh-red-51: #b91c1c;
    --nh-red-58: #dc2626;
    --nh-red-59: #e11d48;
    --nh-red-63: #ef4423;
    --nh-red-67: #ff4d59;
    --nh-red-94: #fee2e2;
    --nh-red-95: #fee9e9;
    --nh-red-97: #fff1f0;
    --nh-teal-51: #0f766e;
    --nh-teal-60: #0d9488;
    --nh-teal-95: #d7f5f0;
    --nh-teal-97: #ebf9f6;
    --nh-violet-29: #281e5a;
    --nh-violet-35: #3b1a8f;
    --nh-violet-37: #3f3a55;
    --nh-violet-38: #4a1d96;
    --nh-violet-43: #5b21b6;
    --nh-violet-49: #6d28d9;
    --nh-violet-50: #7e22ce;
    --nh-violet-54: #7c3aed;
    --nh-violet-61: #8b5cf6;
    --nh-violet-81: #c4b5fd;
    --nh-violet-89: #dcd8ef;
    --nh-violet-89-2: #dfd2fa;
    --nh-violet-92: #e6e3f2;
    --nh-violet-92-2: #e7e0fb;
    --nh-violet-94: #efe8ff;
    --nh-violet-95: #f0eef7;
    --nh-violet-97: #f6f3ff;
    --nh-white: #ffffff;
    --nh-yellow-88: #fcd34d;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--nh-font); color: var(--nh-ink); font-size: 15px; line-height: 1.5; background: var(--nh-surface); }
h1, h2, h3, h4, p, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
:focus-visible { outline: 2px solid var(--nh-purple-bright); outline-offset: 2px; }
[hidden] { display: none !important; }
.nh-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.nh-icon { width: 20px; height: 20px; flex: 0 0 auto; }
.nh-icon-fill { fill: currentColor; stroke: none; }

/* Tones: a single class gives tinted or solid colour without inline styles. */
.nh-tone--red { --tone: var(--nh-red-58); --tone-bg: var(--nh-red-95); }
.nh-tone--orange { --tone: var(--nh-orange-65); --tone-bg: var(--nh-orange-96); }
.nh-tone--amber { --tone: var(--nh-orange-56); --tone-bg: var(--nh-amber-97); }
.nh-tone--green { --tone: var(--nh-green-53); --tone-bg: var(--nh-green-95); }
.nh-tone--teal { --tone: var(--nh-teal-51); --tone-bg: var(--nh-teal-95); }
.nh-tone--blue { --tone: var(--nh-blue-55); --tone-bg: var(--nh-blue-94); }
.nh-tone--indigo { --tone: var(--nh-indigo-46); --tone-bg: var(--nh-violet-94); }
.nh-tone--purple { --tone: var(--nh-violet-54); --tone-bg: var(--nh-violet-94); }
.nh-tone--pink { --tone: var(--nh-pink-59-2); --tone-bg: var(--nh-pink-95); }
.nh-tone--slate { --tone: var(--nh-blue-45); --tone-bg: var(--nh-gray-96-2); }

.nh-tone-solid--red { background: var(--nh-red-58); color: var(--nh-white); }
.nh-tone-solid--orange { background: var(--nh-orange-65); color: var(--nh-white); }
.nh-tone-solid--amber { background: var(--nh-amber-77); color: var(--nh-amber-20); }
.nh-tone-solid--green { background: var(--nh-green-63); color: var(--nh-white); }
.nh-tone-solid--teal { background: var(--nh-teal-60); color: var(--nh-white); }
.nh-tone-solid--blue { background: var(--nh-blue-53); color: var(--nh-white); }
.nh-tone-solid--indigo { background: var(--nh-indigo-51); color: var(--nh-white); }
.nh-tone-solid--purple { background: var(--nh-violet-54); color: var(--nh-white); }
.nh-tone-solid--pink { background: var(--nh-pink-59-2); color: var(--nh-white); }
.nh-tone-solid--slate { background: var(--nh-blue-45); color: var(--nh-white); }

.nh-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--tone); background: var(--tone-bg); white-space: nowrap; }
.nh-badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }

.nh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; white-space: nowrap; border: 1px solid transparent; cursor: pointer; }
.nh-btn .nh-icon { width: 18px; height: 18px; }
.nh-btn--red { background: var(--nh-red); color: var(--nh-white); }
.nh-btn--red:hover { filter: brightness(.93); }
.nh-btn--outline { background: var(--nh-white); border-color: var(--nh-gray-89); color: var(--nh-ink); }
.nh-btn--outline:hover { border-color: var(--nh-ink-3); }
.nh-btn--purple { background: linear-gradient(90deg, var(--nh-purple), var(--nh-purple-bright)); color: var(--nh-white); }
.nh-btn--purple:hover { filter: brightness(1.05); }
.nh-btn--ghost { background: var(--nh-lilac); color: var(--nh-purple); }
.nh-btn--danger { background: var(--nh-red-94); color: var(--nh-red-51); }
.nh-btn--sm { min-height: 32px; padding: 4px 11px; font-size: 13px; border-radius: 8px; }
.nh-btn--block { width: 100%; }

.nh-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.nh-avatar--initial { display: inline-flex; align-items: center; justify-content: center; background: var(--nh-purple); color: var(--nh-white); font-weight: 700; font-size: 14px; }

.nh-logo { display: inline-flex; align-items: center; gap: 8px; }
.nh-logo__mark { width: 40px; height: 40px; }
.nh-logo__image { max-height: 48px; width: auto; }
.nh-logo__text { display: flex; flex-direction: column; line-height: 1; }
.nh-logo__name { font-size: 25px; font-weight: 800; letter-spacing: -.04em; color: var(--nh-ink); }
.nh-logo__accent { color: var(--nh-red); }
.nh-logo__tagline { margin-top: 3px; font-size: 13px; font-weight: 500; color: var(--nh-ink); }
.nh-logo--light .nh-logo__name, .nh-logo--light .nh-logo__tagline { color: var(--nh-white); }

.nh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--nh-ink-2); }
.nh-meta span { display: inline-flex; align-items: center; gap: 5px; }
.nh-meta .nh-icon { width: 14px; height: 14px; }
.nh-meta__sep::before { content: '|'; color: var(--nh-blue-83); margin-right: 8px; }

.nh-flash { display: flex; align-items: center; gap: 10px; margin: 14px 0; padding: 11px 14px; border-radius: 10px; font-weight: 500; font-size: 14px; }
.nh-flash--ok { background: var(--nh-green-95); color: var(--nh-green-45); }
.nh-flash--error { background: var(--nh-red-94); color: var(--nh-red-51); }

.nh-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 42px 16px; text-align: center; color: var(--nh-ink-2); }
.nh-empty__icon { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 50%; background: var(--nh-lilac); color: var(--nh-purple); }
.nh-empty__icon .nh-icon { width: 26px; height: 26px; }
.nh-empty__title { font-size: 16px; font-weight: 700; color: var(--nh-ink); }

.nh-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 22px 0 6px; }
.nh-pager__item { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--nh-line); background: var(--nh-white); font-weight: 600; font-size: 14px; }
.nh-pager__item.is-active { background: var(--nh-purple); border-color: var(--nh-purple); color: var(--nh-white); }
.nh-pager__item.is-disabled { color: var(--nh-blue-79); }

.nh-dropdown { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 200px; padding: 6px; background: var(--nh-white); border: 1px solid var(--nh-line); border-radius: 12px; box-shadow: var(--nh-shadow-up); }
.nh-dropdown a, .nh-dropdown button { display: block; width: 100%; padding: 8px 12px; border-radius: 8px; text-align: left; font-size: 14px; font-weight: 500; color: var(--nh-ink); }
.nh-dropdown a:hover, .nh-dropdown button:hover { background: var(--nh-lilac); }

/* Forms shared by panels and auth */
.nh-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nh-field > label, .nh-label { font-size: 14px; font-weight: 600; }
.nh-field small { color: var(--nh-ink-3); font-size: 12.5px; }
.nh-input, .nh-field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]), .nh-field select, .nh-field textarea {
    width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--nh-gray-89); border-radius: 10px; background: var(--nh-white); font-size: 14px;
}
.nh-field textarea { min-height: 110px; resize: vertical; }
.nh-field input:focus, .nh-field select:focus, .nh-field textarea:focus { outline: 2px solid var(--nh-purple-bright); outline-offset: 0; border-color: transparent; }
.nh-field__error { color: var(--nh-red-51); font-size: 13px; }
.nh-field input[type=color] { width: 58px; height: 42px; padding: 3px; border: 1px solid var(--nh-gray-89); border-radius: 10px; background: var(--nh-white); }
.nh-preview { width: 150px; max-height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--nh-line); }

.nh-switch { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 500; }
.nh-switch input { position: absolute; opacity: 0; width: 42px; height: 24px; margin: 0; cursor: pointer; }
.nh-switch__track { position: relative; flex: 0 0 auto; width: 42px; height: 24px; border-radius: 999px; background: var(--nh-blue-86); transition: background .15s; }
.nh-switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--nh-white); transition: transform .15s; }
.nh-switch input:checked + .nh-switch__track { background: var(--nh-purple); }
.nh-switch input:checked + .nh-switch__track::after { transform: translateX(18px); }
.nh-switch input:focus-visible + .nh-switch__track { outline: 2px solid var(--nh-purple-bright); outline-offset: 2px; }
.nh-switch__text { display: flex; flex-direction: column; }
.nh-switch__text small { color: var(--nh-ink-3); font-weight: 400; }

.nh-prose { font-size: 17px; line-height: 1.75; overflow-wrap: anywhere; }
.nh-prose > * + * { margin-top: 1em; }
.nh-prose h2 { font-size: 23px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; margin-top: 1.5em; }
.nh-prose h3 { font-size: 19px; font-weight: 700; margin-top: 1.3em; }
.nh-prose ul { list-style: disc; padding-left: 1.3em; }
.nh-prose ol { list-style: decimal; padding-left: 1.3em; }
.nh-prose a { color: var(--nh-red); text-decoration: underline; }
.nh-prose img { border-radius: 10px; height: auto; }
.nh-prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 16px; border-left: 4px solid var(--nh-red); font-weight: 500; }

.nh-ad { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 16px 0; }
.nh-ad__label { font-size: 11px; color: var(--nh-ink-3); text-transform: uppercase; letter-spacing: .08em; }
.nh-ad img { border-radius: 10px; }

.nh-grid-gap { display: grid; gap: 16px; }
.nh-grid-gap > *, .nh-columns > * { min-width: 0; }

/* Cards, forms and plan tiles shared by the site and both panels */
.nh-card { background: var(--nh-white); border-radius: 16px; box-shadow: var(--nh-shadow); padding: 14px; border: 1px solid var(--nh-violet-95); }
.nh-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.nh-card__head h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.nh-card__head a { display: inline-flex; align-items: center; gap: 7px; color: var(--nh-purple); font-size: 14.5px; font-weight: 600; }
.nh-card__head .nh-icon { width: 18px; height: 18px; }
.nh-form { display: flex; flex-direction: column; gap: 14px; }
.nh-form__row { display: grid; gap: 14px; }
.nh-form__row > * { min-width: 0; }
.nh-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.nh-editor { border: 1px solid var(--nh-gray-89); border-radius: 10px; overflow: hidden; background: var(--nh-white); }
.nh-editor__bar { display: flex; flex-wrap: wrap; gap: 3px; padding: 6px; border-bottom: 1px solid var(--nh-gray-95); background: var(--nh-white); }
.nh-editor__bar button { min-width: 32px; height: 30px; padding: 0 7px; border-radius: 6px; font-weight: 700; font-size: 13px; }
.nh-editor__bar button:hover { background: var(--nh-lilac); color: var(--nh-purple); }
.nh-editor__area { min-height: 260px; padding: 12px 14px; outline: 0; font-size: 16px; line-height: 1.7; }
.nh-editor__area > * + * { margin-top: .8em; }
.nh-plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.nh-plan { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 16px; background: var(--nh-white); border: 1.5px solid var(--nh-violet-95); box-shadow: var(--nh-shadow); }
.nh-plan.is-popular { border-color: var(--nh-purple); }
.nh-plan__tag { position: absolute; top: -11px; left: 16px; padding: 2px 11px; border-radius: 999px; background: var(--nh-purple); color: var(--nh-white); font-size: 12px; font-weight: 600; }
.nh-plan h2 { font-size: 18px; font-weight: 800; }
.nh-plan__price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.nh-plan__price small { font-size: 14px; font-weight: 500; color: var(--nh-ink-2); }
.nh-plan ul { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.nh-plan li { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.nh-plan li .nh-icon { width: 17px; height: 17px; color: var(--nh-green-63); }

@media (min-width: 768px) {
    .nh-form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Installer and update screens */
.nh-notice { padding: 11px 14px; border-radius: 10px; background: var(--nh-amber-97); color: var(--nh-orange-48); font-size: 14px; }
.nh-install__list, .nh-install__checks { display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; }
.nh-install__list li { display: flex; align-items: center; gap: 10px; }
.nh-install__list .nh-icon { color: var(--nh-red); }
.nh-install__checks li { display: flex; align-items: flex-start; gap: 9px; }
.nh-install__checks li span { display: flex; flex-direction: column; min-width: 0; }
.nh-install__checks small { color: var(--nh-ink-2); }
.nh-install__checks li.is-ok .nh-icon { color: var(--nh-green-53); }
.nh-install__checks li.is-bad .nh-icon { color: var(--nh-red-58); }
.nh-install__cron { display: block; margin-top: 7px; padding: 9px 11px; border-radius: 8px; background: var(--nh-blue-21); color: var(--nh-gray-93); font-size: 12.5px; overflow-wrap: anywhere; }
@media (min-width: 768px) { .nh-install__checks--grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
