/* =====================================================================
   Priority Ninja — "Clean Studio" theme
   Shared tokens + site shell + base components.
   Page-specific styles live in main.css, cheatsheet.css, Download.css,
   GetApi.css, about.css.
   ===================================================================== */

:root {
    /* Brand palette (Ninja_Brand_Family / Priority_Ninja_Identity) */
    --pn-midnight: #172C40;
    --pn-midnight-deep: #0F2132;
    --pn-teal: #087E80;
    --pn-teal-dark: #06605F;
    --pn-mint: #70D6B3;
    --pn-mint-tint: #E9F7F1;
    --pn-mint-ink: #0B5E55;
    --pn-canvas: #F5F8FA;
    --pn-surface: #FFFFFF;
    --pn-text: #253746;
    --pn-muted: #526473;
    --pn-border: #DDE5EB;
    --pn-border-soft: #E6ECEF;
    --pn-on-dark: #C7DEE1;

    /* Type */
    --pn-font-head: 'Manrope', Arial, sans-serif;
    --pn-font-body: 'Inter', Arial, sans-serif;
    --pn-font-he: 'Heebo', Arial, sans-serif;
    --pn-font-mono: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;

    /* Shape & layout */
    --pn-radius: 12px;
    --pn-radius-sm: 8px;
    --pn-max: 1160px;
    --pn-gutter: 24px;
    --pn-shadow: 0 12px 36px rgba(24, 53, 75, .06);
}

/* ---------- Base reset (replaces Bootstrap reboot) ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: .5rem;
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p, ul, ol, pre {
    margin-top: 0;
    margin-bottom: 1rem;
}

img, svg {
    vertical-align: middle;
}

button, input, textarea, select {
    font: inherit;
    margin: 0;
}

button:not(:disabled) {
    cursor: pointer;
}

hr {
    margin: 1rem 0;
    border: 0;
    border-top: 1px solid var(--pn-border-soft);
}

strong, b {
    font-weight: 700;
}

.text-danger {
    color: #B42318 !important;
}

/* the [hidden] attribute always wins over display rules */
[hidden] {
    display: none !important;
}

/* ---------- Base ---------- */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--pn-font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--pn-text);
    background: var(--pn-surface);
    overflow-x: hidden;
}

[lang="he"], [dir="rtl"] {
    font-family: var(--pn-font-he);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--pn-font-head);
    color: var(--pn-midnight);
    letter-spacing: -0.02em;
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] summary {
    font-family: var(--pn-font-he);
    letter-spacing: 0;
}

a {
    color: var(--pn-teal);
}

    a:hover {
        color: var(--pn-teal-dark);
    }

:focus-visible {
    outline: 2px solid var(--pn-teal);
    outline-offset: 2px;
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: none;
}

code {
    font-family: var(--pn-font-mono);
    font-size: .88em;
    color: var(--pn-midnight);
    background: var(--pn-canvas);
    border: 1px solid var(--pn-border-soft);
    padding: 2px 6px;
    border-radius: 6px;
    direction: ltr;
    unicode-bidi: isolate;
}

pre {
    font-family: var(--pn-font-mono);
    direction: ltr;
    text-align: left;
}

img {
    max-width: 100%;
}

/* ---------- Buttons ---------- */
.pn-btn,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: var(--pn-radius-sm);
    border: 1px solid transparent;
    font-family: var(--pn-font-body);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.pn-btn--primary,
.btn-primary {
    background: var(--pn-teal);
    border-color: var(--pn-teal);
    color: #FFFFFF;
}

    .pn-btn--primary:hover,
    .btn-primary:hover,
    .btn-primary:focus {
        background: var(--pn-teal-dark);
        border-color: var(--pn-teal-dark);
        color: #FFFFFF;
    }

.pn-btn--dark {
    background: var(--pn-midnight);
    color: #FFFFFF;
}

    .pn-btn--dark:hover {
        background: var(--pn-midnight-deep);
        color: #FFFFFF;
    }

.pn-btn--ghost {
    background: var(--pn-surface);
    border-color: #C9D5DE;
    color: var(--pn-midnight);
}

    .pn-btn--ghost:hover {
        border-color: var(--pn-midnight);
        color: var(--pn-midnight);
    }

.pn-btn--mint {
    background: var(--pn-mint);
    color: var(--pn-midnight-deep);
    font-weight: 700;
}

    .pn-btn--mint:hover {
        background: #8FE0C4;
        color: var(--pn-midnight-deep);
    }

.pn-icon {
    width: 20px;
    height: 20px;
    flex: none;
    display: inline-block;
    vertical-align: middle;
}

/* ---------- Header ---------- */
.pn-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--pn-border-soft);
    backdrop-filter: saturate(1.4) blur(6px);
}

.pn-header__inner {
    max-width: var(--pn-max);
    margin: 0 auto;
    padding: 10px var(--pn-gutter);
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* logo | centered links | language */
    align-items: center;
    gap: 8px 24px;
}

.pn-logo {
    justify-self: start;
    display: inline-flex;
    align-items: center;
}

    .pn-logo img {
        height: 46px;
        width: auto;
        display: block;
    }

.pn-nav {
    justify-self: center;
}

.pn-header__end {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pn-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--pn-border);
    border-radius: var(--pn-radius-sm);
    background: var(--pn-surface);
    color: var(--pn-midnight);
    cursor: pointer;
}

.pn-nav__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pn-nav__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--pn-text);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}

    .pn-nav__link:hover {
        color: var(--pn-midnight);
        border-bottom-color: var(--pn-mint);
    }

    .pn-nav__link[aria-current="page"] {
        color: var(--pn-midnight);
        font-weight: 600;
        border-bottom-color: var(--pn-teal);
    }

/* EN / HE segmented switch */
.pn-lang {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--pn-border);
    border-radius: 999px;
    background: var(--pn-canvas);
}

.pn-lang__opt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--pn-muted);
    font-family: var(--pn-font-body);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

    .pn-lang__opt:hover {
        color: var(--pn-midnight);
    }

    .pn-lang__opt[aria-current="true"] {
        background: var(--pn-midnight);
        color: #FFFFFF;
    }

@media (max-width: 860px) {
    .pn-header__inner {
        grid-template-columns: 1fr auto;
    }

    .pn-menu-toggle {
        display: inline-flex;
    }

    .pn-nav {
        display: none;
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: stretch;
        padding: 8px 0 12px;
        border-top: 1px solid var(--pn-border-soft);
    }

        .pn-nav.is-open {
            display: block;
        }

    .pn-nav__list {
        flex-direction: column;
    }

    .pn-nav__link {
        width: 100%;
        border-bottom: 0;
    }

        .pn-nav__link[aria-current="page"] {
            color: var(--pn-teal);
        }
}

/* ---------- Main / page containers ---------- */
.pn-main {
    flex: 1 0 auto;
}

.pn-container {
    max-width: var(--pn-max);
    margin: 0 auto;
    padding: 56px var(--pn-gutter) 88px;
}

    /* Inner page title block */
    .pn-container > h1:first-child,
    .pn-container > .hebrew-version > h1,
    .pn-page-title {
        margin: 0 0 8px;
        font-size: clamp(32px, 4.2vw, 46px);
        font-weight: 800;
        line-height: 1.12;
        letter-spacing: -0.035em;
        color: var(--pn-midnight);
    }

/* Shared page-intro pieces: green tag (PN-H1) + teal subtitle (H4) */
.PN-H1 {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    background: var(--pn-mint-tint);
    color: var(--pn-mint-ink);
    font-size: 15px;
    font-weight: 600;
}

.pn-hero__sub {
    font-family: var(--pn-font-body);
    font-size: 19px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0;
    color: var(--pn-teal);
}

/* Inner page header — same concept as the About page */
.pn-page-head {
    max-width: 780px;
    margin-bottom: 40px;
}

    .pn-page-head .PN-H1 {
        margin: 0 0 20px;
    }

    .pn-page-head h1 {
        margin: 0;
        font-size: clamp(36px, 5vw, 56px);
        font-weight: 800;
        line-height: 1.08;
        letter-spacing: -0.045em;
        color: var(--pn-midnight);
    }

    .pn-page-head .pn-hero__sub {
        margin: 18px 0 0;
    }

.pn-page-head__lead {
    margin: 12px 0 0;
    font-size: 18px;
    color: var(--pn-muted);
}

[dir="rtl"] .pn-page-head h1 {
    letter-spacing: 0;
}

[dir="rtl"] .pn-hero__sub {
    font-family: var(--pn-font-he);
}

/* Readable prose column (Privacy, Terms, Disclaimer, Error) */
.pn-prose {
    max-width: 780px;
}

    .pn-prose h1 {
        margin-bottom: 32px !important;
    }

    .pn-prose h2, .pn-prose h3, .pn-prose h4 {
        margin: 36px 0 12px;
        font-weight: 700;
    }

    .pn-prose h2 {
        font-size: 26px;
    }

    .pn-prose h3 {
        font-size: 21px;
    }

    .pn-prose p, .pn-prose li {
        color: var(--pn-text);
    }

    .pn-prose ul, .pn-prose ol {
        padding-inline-start: 1.3em;
    }

/* "translation for convenience" note on the Hebrew legal pages */
.pn-legal-note {
    padding: 12px 16px;
    border-radius: var(--pn-radius-sm);
    background: var(--pn-canvas);
    border: 1px solid var(--pn-border-soft);
    font-size: 15px;
    color: var(--pn-muted) !important;
}

/* ---------- Footer ---------- */
.pn-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--pn-border-soft);
    background: var(--pn-surface);
    font-size: 14px;
    color: var(--pn-muted);
}

.pn-footer__inner {
    max-width: var(--pn-max);
    margin: 0 auto;
    padding: 48px var(--pn-gutter) 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 32px 48px;
}

.pn-footer__brand {
    flex: 1 1 320px;
    max-width: 580px; /* wide enough that the copyright and trademark lines don't wrap */
}

    .pn-footer__brand img {
        height: 42px;
        width: auto;
        display: block;
        margin-bottom: 12px;
    }

    .pn-footer__brand p {
        margin: 0 0 6px;
    }

.pn-footer__legal {
    color: var(--pn-muted);
}

.pn-footer__cols {
    display: flex;
    flex-wrap: wrap;
    gap: 32px 56px;
}

.pn-footer__col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .pn-footer__col strong {
        color: var(--pn-midnight);
        font-family: var(--pn-font-head);
        font-size: 14px;
        margin-bottom: 4px;
    }

    .pn-footer__col a {
        color: var(--pn-muted);
        text-decoration: none;
    }

        .pn-footer__col a:hover {
            color: var(--pn-teal);
            text-decoration: underline;
        }

/* ---------- Screen-reader-only text ---------- */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Shared form controls ---------- */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input:not([type]), textarea {
    font-family: var(--pn-font-body);
    font-size: 16px;
    color: var(--pn-text);
    background: var(--pn-surface);
    border: 1px solid #C9D5DE;
    border-radius: var(--pn-radius-sm);
    padding: 10px 14px;
    min-height: 44px;
}

    input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="search"]:focus, input:not([type]):focus, textarea:focus {
        outline: 2px solid var(--pn-teal);
        outline-offset: 0;
        border-color: var(--pn-teal);
    }

::placeholder {
    color: #6B7C8A;
    opacity: 1;
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}
