/* =====================================================
   php2shell Checker — scoped page styles
   Built on WebCareSG's "Technical, but human" design
   tokens (see css/webcare-design-system.css), but fully
   namespaced under .p2s so nothing leaks into the shared
   header / nav / footer chrome.
   ===================================================== */

.p2s {
    --p2s-dark:      #09090B;
    --p2s-dark-2:    #15151a;
    --p2s-bg:        #F7F7F5;
    --p2s-surface:   #FFFFFF;
    --p2s-text:      #111113;
    --p2s-text-2:    #6B6B6B;
    --p2s-muted:     #8A8A8A;
    --p2s-border:    #E4E4E0;
    --p2s-accent:    #B7FF4A;
    --p2s-accent-dk: #8FD600;
    --p2s-healthy:   #A3E635;
    --p2s-attention: #FACC15;
    --p2s-critical:  #FF5A5F;
    --p2s-neutral:   #A1A1AA;
    --p2s-radius:    14px;
    --p2s-radius-lg: 20px;
    --p2s-font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --p2s-mono:      'IBM Plex Mono', 'Courier New', monospace;

    font-family: var(--p2s-font);
    color: var(--p2s-text);
    max-width: 880px;
    margin: 0 auto;
    padding: 48px 20px 80px;
    line-height: 1.65;
}

.p2s a { color: inherit; }
.p2s code {
    font-family: var(--p2s-mono);
    background: rgba(17,17,19,0.06);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.9em;
}

/* ===== HERO ===== */
.p2s-hero {
    background: var(--p2s-dark);
    border-radius: var(--p2s-radius-lg);
    padding: 64px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}
.p2s-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(183,255,74,0.14) 0%, transparent 55%);
    pointer-events: none;
}
.p2s-hero-inner { position: relative; z-index: 1; max-width: 620px; margin: 0 auto; }
.p2s-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--p2s-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--p2s-accent);
    background: rgba(183,255,74,0.1);
    border: 1px solid rgba(183,255,74,0.3);
    border-radius: 100px;
    padding: 6px 14px;
    margin-bottom: 24px;
}
.p2s-eyebrow::before { content: '●'; font-size: 8px; }
.p2s-hero h1 {
    font-size: clamp(2em, 5vw, 2.6em);
    font-weight: 800;
    color: #fff;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.p2s-hero-sub {
    font-size: 1.08em;
    color: rgba(255,255,255,0.62);
    margin: 0 0 34px;
}

.p2s-form { max-width: 480px; margin: 0 auto; }
.p2s-input-row {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.16);
    border-radius: 12px;
    padding: 5px 5px 5px 16px;
    gap: 8px;
    transition: border-color 0.2s, background 0.2s;
}
.p2s-input-row:focus-within {
    border-color: rgba(183,255,74,0.6);
    background: rgba(255,255,255,0.1);
}
.p2s-input-row svg { color: rgba(255,255,255,0.4); flex-shrink: 0; }
.p2s-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 1em;
    padding: 11px 0;
    min-width: 0;
    font-family: var(--p2s-font);
}
.p2s-input::placeholder { color: rgba(255,255,255,0.3); }
.p2s-scan-btn {
    background: var(--p2s-accent);
    color: var(--p2s-dark);
    border: none;
    border-radius: 9px;
    padding: 11px 22px;
    font-size: 1em;
    font-weight: 700;
    font-family: var(--p2s-font);
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
}
.p2s-scan-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(183,255,74,0.3); }
.p2s-hero-note { margin-top: 18px; font-size: 12px; color: rgba(255,255,255,0.35); letter-spacing: 0.02em; }

/* ===== CONSENT CHECKBOX ===== */
.p2s-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 14px;
    text-align: left;
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    cursor: pointer;
    user-select: none;
}
.p2s-consent input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--p2s-accent);
    cursor: pointer;
}
.p2s-consent a {
    color: rgba(255,255,255,0.85);
    text-decoration: underline;
    text-decoration-color: rgba(183,255,74,0.5);
}
.p2s-consent a:hover { color: var(--p2s-accent); }

/* ===== TERMS MODAL ===== */
.p2s-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(9,9,11,0.6);
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}
.p2s-modal-backdrop.is-open { display: flex; }
.p2s-modal {
    background: var(--p2s-surface);
    border-radius: var(--p2s-radius-lg);
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3);
}
.p2s-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px;
    border-bottom: 1px solid var(--p2s-border);
    position: sticky;
    top: 0;
    background: var(--p2s-surface);
}
.p2s-modal-head h3 { margin: 0; font-size: 1.15em; font-weight: 700; color: var(--p2s-text); }
.p2s-modal-close {
    background: var(--p2s-bg);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 20px;
    line-height: 1;
    color: var(--p2s-text-2);
    cursor: pointer;
    flex-shrink: 0;
}
.p2s-modal-close:hover { background: var(--p2s-border); color: var(--p2s-text); }
.p2s-modal-body { padding: 22px 26px 26px; font-size: 0.95em; color: var(--p2s-text-2); line-height: 1.6; }
.p2s-modal-body p { margin: 0 0 14px; }
.p2s-modal-body ul { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.p2s-modal-body li { color: var(--p2s-text-2); }
.p2s-modal-body strong { color: var(--p2s-text); }
.p2s-modal-body a { color: var(--p2s-text); text-decoration: underline; }
.p2s-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 26px;
    border-top: 1px solid var(--p2s-border);
    position: sticky;
    bottom: 0;
    background: var(--p2s-surface);
}
.p2s-modal-decline {
    background: transparent;
    border: 1.5px solid var(--p2s-border);
    color: var(--p2s-text-2);
    font-weight: 600;
    font-size: 0.95em;
    padding: 10px 18px;
    border-radius: 9px;
    cursor: pointer;
    font-family: var(--p2s-font);
}
.p2s-modal-decline:hover { border-color: var(--p2s-text-2); color: var(--p2s-text); }
.p2s-modal-accept {
    background: var(--p2s-accent);
    border: none;
    color: var(--p2s-dark);
    font-weight: 700;
    font-size: 0.95em;
    padding: 10px 20px;
    border-radius: 9px;
    cursor: pointer;
    font-family: var(--p2s-font);
    transition: transform 0.15s, box-shadow 0.15s;
}
.p2s-modal-accept:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(183,255,74,0.3); }

/* ===== GENERIC CARD / SECTION ===== */
.p2s-card {
    background: var(--p2s-surface);
    border: 1px solid var(--p2s-border);
    border-radius: var(--p2s-radius-lg);
    padding: 36px 40px;
    margin-bottom: 20px;
}
.p2s-card h2 {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--p2s-text);
    margin: 0 0 14px;
}
.p2s-card > p.p2s-lead {
    color: var(--p2s-text-2);
    font-size: 1.04em;
    margin: 0 0 28px;
}

/* ===== ERROR NOTE ===== */
.p2s-notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: rgba(250,204,21,0.1);
    border: 1px solid rgba(250,204,21,0.35);
    color: #78350f;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.97em;
}
.p2s-notice svg { flex-shrink: 0; margin-top: 2px; color: var(--p2s-attention); }

/* ===== RESULT PANEL ===== */
.p2s-result-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.p2s-result-domain { font-size: 0.85em; color: var(--p2s-muted); font-family: var(--p2s-mono); word-break: break-all; }
.p2s-result-title { font-size: 1.3em; font-weight: 700; margin: 2px 0 0; }

.p2s-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-family: var(--p2s-mono);
    white-space: nowrap;
}
.p2s-badge::before { content: '●'; font-size: 8px; }
.p2s-badge-healthy   { background: rgba(163,230,53,0.12); color: #5a7f1a; border: 1px solid rgba(163,230,53,0.4); }
.p2s-badge-healthy::before   { color: var(--p2s-healthy); }
.p2s-badge-attention { background: rgba(250,204,21,0.12); color: #854d0e; border: 1px solid rgba(250,204,21,0.4); }
.p2s-badge-attention::before { color: var(--p2s-attention); }
.p2s-badge-critical  { background: rgba(255,90,95,0.12); color: #7f1d1d; border: 1px solid rgba(255,90,95,0.4); }
.p2s-badge-critical::before  { color: var(--p2s-critical); }
.p2s-badge-neutral   { background: rgba(161,161,170,0.12); color: #52525b; border: 1px solid rgba(161,161,170,0.4); }
.p2s-badge-neutral::before   { color: var(--p2s-neutral); }

.p2s-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.p2s-chip {
    background: var(--p2s-bg);
    border: 1px solid var(--p2s-border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.9em;
}
.p2s-chip b { display: block; font-family: var(--p2s-mono); font-size: 0.95em; color: var(--p2s-text); margin-top: 2px; }
.p2s-chip span { color: var(--p2s-muted); font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.05em; }

.p2s-notes { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.p2s-notes li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.95em;
    color: var(--p2s-text-2);
    padding: 10px 14px;
    background: var(--p2s-bg);
    border-radius: 10px;
}
.p2s-notes li svg { flex-shrink: 0; margin-top: 2px; color: var(--p2s-text-2); }

.p2s-callout {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--p2s-dark);
    color: rgba(255,255,255,0.82);
    border-radius: 14px;
    padding: 20px 22px;
    font-size: 0.97em;
}
.p2s-callout svg { flex-shrink: 0; margin-top: 2px; color: var(--p2s-accent); }
.p2s-callout strong { color: #fff; }
.p2s-callout a {
    display: inline-block;
    margin-top: 10px;
    color: var(--p2s-accent);
    font-weight: 700;
    text-decoration: none;
}
.p2s-callout a:hover { text-decoration: underline; }

/* ===== PROCESS STEPS ===== */
.p2s-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 8px;
}
.p2s-step {
    text-align: center;
    padding: 20px 14px;
    background: var(--p2s-bg);
    border: 1px solid var(--p2s-border);
    border-radius: var(--p2s-radius);
}
.p2s-step-num {
    font-family: var(--p2s-mono);
    font-size: 1.8em;
    font-weight: 800;
    color: var(--p2s-accent-dk);
    line-height: 1;
    margin-bottom: 8px;
}
.p2s-step h4 { font-size: 0.98em; font-weight: 700; margin: 0 0 4px; color: var(--p2s-text); }
.p2s-step p { font-size: 0.86em; color: var(--p2s-text-2); margin: 0; line-height: 1.5; }

/* ===== AFFECTED ROW ===== */
.p2s-affected { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }

/* ===== FIX LIST ===== */
.p2s-fix-list { list-style: none; margin: 0; padding: 0; counter-reset: p2sfix; }
.p2s-fix-list li {
    counter-increment: p2sfix;
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--p2s-border);
}
.p2s-fix-list li:last-child { border-bottom: none; padding-bottom: 0; }
.p2s-fix-list li::before {
    content: counter(p2sfix, decimal-leading-zero);
    font-family: var(--p2s-mono);
    font-weight: 800;
    color: var(--p2s-accent-dk);
    font-size: 1.1em;
    flex-shrink: 0;
    width: 32px;
}
.p2s-fix-list strong { display: block; color: var(--p2s-text); margin-bottom: 3px; }
.p2s-fix-list small { color: var(--p2s-text-2); font-size: 0.93em; line-height: 1.5; }

/* ===== CLOSING CTA (dark bookend) ===== */
.p2s-cta {
    background: var(--p2s-dark);
    border-radius: var(--p2s-radius-lg);
    padding: 56px 40px;
    text-align: center;
    margin-bottom: 20px;
}
.p2s-cta h2 { color: #fff; font-size: 1.6em; font-weight: 700; margin: 0 0 12px; }
.p2s-cta p { color: rgba(255,255,255,0.62); max-width: 480px; margin: 0 auto 26px; }
.p2s-btn-accent {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--p2s-accent);
    color: var(--p2s-dark);
    font-weight: 700;
    font-size: 1em;
    padding: 13px 26px;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}
.p2s-btn-accent:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(183,255,74,0.3); }

.p2s-credit { text-align: center; font-size: 0.85em; color: var(--p2s-muted); margin: 8px 0 0; }
.p2s-credit a { text-decoration: underline; }

/* ===== SUCCESS NOTE ===== */
.p2s-success {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: rgba(163,230,53,0.1);
    border: 1px solid rgba(163,230,53,0.35);
    color: #365314;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.97em;
}
.p2s-success svg { flex-shrink: 0; margin-top: 2px; color: var(--p2s-healthy); }

/* ===== DEEP SCAN: TABS ===== */
.p2s-deep-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1.5px solid var(--p2s-border);
    margin-bottom: 22px;
}
.p2s-deep-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1.5px;
    padding: 10px 4px;
    margin-right: 22px;
    font-family: var(--p2s-font);
    font-size: 0.97em;
    font-weight: 600;
    color: var(--p2s-text-2);
    cursor: pointer;
}
.p2s-deep-tab:hover { color: var(--p2s-text); }
.p2s-deep-tab.active { color: var(--p2s-text); border-bottom-color: var(--p2s-accent-dk); }
.p2s-deep-panel { display: none; }
.p2s-deep-panel.active { display: block; }
.p2s-card-note-sm { color: var(--p2s-text-2); font-size: 0.95em; margin: 0 0 18px; }

/* ===== DEEP SCAN: FORMS ===== */
.p2s-contact-form { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.p2s-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.p2s-field {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--p2s-border);
    border-radius: 10px;
    font-family: var(--p2s-font);
    font-size: 0.95em;
    color: var(--p2s-text);
    background: var(--p2s-bg);
}
.p2s-field:focus { outline: none; border-color: var(--p2s-accent-dk); background: var(--p2s-surface); }
.p2s-scan-btn-light {
    align-self: flex-start;
    background: var(--p2s-dark);
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 12px 22px;
    font-size: 0.97em;
    font-weight: 700;
    font-family: var(--p2s-font);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.p2s-scan-btn-light:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(9,9,11,0.25); }

/* ===== DEEP SCAN: VERIFY BOX ===== */
.p2s-verify-box {
    background: var(--p2s-dark);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.p2s-verify-row span {
    display: block;
    font-size: 0.78em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.45);
    margin-bottom: 5px;
}
.p2s-verify-row code {
    display: block;
    background: rgba(255,255,255,0.08);
    color: var(--p2s-accent);
    padding: 9px 12px;
    border-radius: 8px;
    font-family: var(--p2s-mono);
    font-size: 0.92em;
    word-break: break-all;
}
.p2s-verify-row code a { color: inherit; text-decoration: underline; }
.p2s-verify-steps {
    margin: 0 0 16px;
    padding-left: 20px;
    color: var(--p2s-text-2);
    font-size: 0.95em;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.p2s-download-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: flex-start;
    color: #FFFFFF;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    background: rgba(183,255,74,0.1);
    border: 1px solid rgba(183,255,74,0.3);
    border-radius: 8px;
    padding: 8px 14px;
}
.p2s-download-link:hover {
    color: #FFFFFF;
    background: rgba(183,255,74,0.18);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 760px) {
    .p2s { padding: 36px 16px 60px; }
    .p2s-hero { padding: 44px 22px; }
    .p2s-card { padding: 28px 22px; }
    .p2s-input-row { flex-direction: column; align-items: stretch; padding: 12px; }
    .p2s-scan-btn { width: 100%; margin-top: 4px; }
    .p2s-steps { grid-template-columns: repeat(2, 1fr); }
    .p2s-result-top { flex-direction: column; }
    .p2s-cta { padding: 40px 22px; }
    .p2s-field-row { grid-template-columns: 1fr; }
    .p2s-deep-tabs { flex-direction: column; gap: 10px; border-bottom: none; }
    .p2s-deep-tab { margin-right: 0; border: 1.5px solid var(--p2s-border); border-radius: 8px; padding: 10px 14px; }
    .p2s-deep-tab.active { border-color: var(--p2s-accent-dk); }
}
@media (max-width: 480px) {
    .p2s-steps { grid-template-columns: 1fr; }
}
