:root {
    --green:       #152240;
    --green-light: #4a7ab5;
    --green-bg:    #eef3fa;
    --text:        #1b1b1b;
    --border:      #d0d8e4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    color: var(--text);
    background: #f3f4f6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ── */
header {
    background: var(--green);
    color: white;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 3px solid var(--green-light);
}
.header-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.header-logo-img {
    height: 48px;
    width: auto;
    /* logo has a white/transparent bg — add a subtle white bg pill */
    background: white;
    border-radius: 6px;
    padding: 4px 8px;
}
.header-tagline {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* ── Layout ── */
main { flex: 1; }

.container {
    max-width: 720px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

h2 { font-size: 1.35rem; margin-bottom: 1.5rem; color: var(--green); }

/* ── Progress steps ── */
.steps {
    display: flex;
    gap: 6px;
    margin-bottom: 1.75rem;
}
.step {
    flex: 1;
    text-align: center;
    padding: 0.45rem 0.25rem;
    border-radius: 4px;
    font-size: 0.8rem;
    background: #e5e7eb;
    color: #888;
}
.step.active { background: var(--green); color: white; font-weight: 600; }
.step.done   { background: var(--green-bg); color: var(--green); }

/* ── Forms ── */
.form-group { margin-bottom: 1.15rem; }

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}
.required { color: #c0392b; }

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px rgba(64,145,108,.15);
}
textarea { resize: vertical; min-height: 110px; }

/* ── Button ── */
.btn {
    display: inline-block;
    padding: 0.65rem 2rem;
    background: var(--green);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}
.btn:hover:not(:disabled) { background: var(--green-light); }
.btn:disabled              { background: #aaa; cursor: not-allowed; }

/* ── Alerts ── */
.alert {
    padding: 0.9rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}
.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}
.alert-error ul { margin-left: 1.25rem; }
.alert-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #86efac;
}

/* ── Video page ── */
.video-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #111;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.video-wrapper video,
.video-wrapper iframe,
.video-wrapper > div { width: 100%; height: 100%; border: none; }

.video-status {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1.25rem;
    background: #fefce8;
    color: #854d0e;
    border: 1px solid #fde68a;
    font-size: 0.9rem;
}
.video-status.done {
    background: #f0fdf4;
    color: #15803d;
    border-color: #86efac;
}

/* ── Questions ── */
.question { margin-bottom: 1.75rem; }
.question p { font-weight: 500; margin-bottom: 0.65rem; line-height: 1.5; }

/* ── Certificate (web preview) ── */
.certificate-box {
    border: 4px double var(--green);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    text-align: center;
    background: var(--green-bg);
    margin-bottom: 1.5rem;
}
.cert-org {
    color: var(--green);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.certificate-box h3 { font-size: 1.75rem; color: var(--text); margin-bottom: 0.25rem; }
.cert-subtitle  { font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; color: #666; margin-bottom: 1.75rem; }
.cert-certifies { font-size: 0.9rem; color: #666; margin-bottom: 0.5rem; }
.cert-name      { font-size: 1.6rem; font-weight: 700; color: var(--green);
                  border-bottom: 2px solid var(--green); display: inline-block;
                  padding: 0 1.5rem 0.4rem; margin-bottom: 1rem; }
.cert-detail    { font-size: 0.9rem; color: #444; margin-bottom: 0.3rem; }
.cert-description { font-size: 0.85rem; color: #555; margin: 1rem auto; max-width: 420px; line-height: 1.6; }
.cert-footer {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #b7dfc9;
    padding-top: 0.9rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #555;
}
.cert-id { font-family: monospace; color: #888; }

/* ── Responsive ── */
@media (max-width: 520px) {
    .steps { flex-direction: column; }
    .card  { padding: 1.25rem; }
    .certificate-box { padding: 1.5rem 1rem; }
    .cert-footer { flex-direction: column; gap: 0.5rem; text-align: left; }
}

/* ── Admin panel ── */
.admin-container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.admin-nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    margin-left: auto;
}
.admin-nav a {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    font-size: 0.9rem;
}
.admin-nav a:hover { color: white; }
.admin-nav a.active { color: white; font-weight: 600; }

/* Logout as a subtle link-style button */
.btn-link {
    background: none;
    border: none;
    color: rgba(255,255,255,.8);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
.btn-link:hover { color: white; }

/* Summary stat cards */
.stat-grid {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.stat-card {
    flex: 1;
    min-width: 120px;
    background: white;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.stat-num   { font-size: 2rem; font-weight: 700; color: var(--green); line-height: 1; }
.stat-label { font-size: 0.8rem; color: #666; margin-top: 0.3rem; }

/* Data tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.data-table th {
    background: var(--green);
    color: white;
    padding: 0.6rem 0.8rem;
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
}
.data-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td     { background: var(--green-bg); }
.data-table .nowrap         { white-space: nowrap; }

/* Status badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 3px;
    font-size: 0.73rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-yes { background: #d1fae5; color: #065f46; }
.badge-no  { background: #fee2e2; color: #991b1b; }
.badge-na  { background: #f3f4f6; color: #6b7280; }

/* Small action links */
.link-btn {
    display: inline-block;
    padding: 0.28rem 0.7rem;
    background: var(--green);
    color: white;
    border-radius: 3px;
    font-size: 0.8rem;
    text-decoration: none;
    white-space: nowrap;
}
.link-btn:hover            { background: var(--green-light); }
.link-btn.secondary        { background: #6b7280; }
.link-btn.secondary:hover  { background: #4b5563; }

/* Detail page layout */
.detail-section { margin-bottom: 1.5rem; }
.detail-section h3 {
    font-size: 1rem;
    color: var(--green);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.4rem;
    margin-bottom: 0.9rem;
}
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem 1.5rem;
}
.detail-field label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    font-weight: 600;
    display: block;
    margin-bottom: 0.15rem;
}
.detail-field p { margin: 0; font-size: 0.95rem; word-break: break-word; }

/* Answer blocks */
.answer-block {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}
.answer-block p.question-text {
    font-weight: 500;
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 0.4rem;
}
.answer-block p.answer-text {
    font-size: 0.92rem;
    color: var(--text);
    white-space: pre-wrap;
}

/* ── Quiz (multiple choice) ── */
.quiz-question {
    margin-bottom: 1.75rem;
}
.quiz-question-text {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.quiz-option {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fafafa;
    transition: border-color 0.15s, background 0.15s;
    font-size: 0.92rem;
    line-height: 1.4;
}
.quiz-option:hover {
    border-color: var(--green-light);
    background: var(--green-bg);
}
.quiz-option input[type="radio"] {
    margin-top: 0.15rem;
    accent-color: var(--green);
    flex-shrink: 0;
}
.quiz-option input[type="radio"]:checked + span {
    font-weight: 500;
}

/* Quiz feedback states */
.quiz-question-correct { opacity: 0.85; }
.quiz-question-wrong   { }

.quiz-option-correct {
    border-color: #16a34a;
    background: #f0fdf4;
}
.quiz-option-wrong {
    border-color: #dc2626;
    background: #fef2f2;
}
.quiz-option-correct input[type="radio"] { accent-color: #16a34a; }
.quiz-option-wrong   input[type="radio"] { accent-color: #dc2626; }

.quiz-badge-correct {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #16a34a;
}
.quiz-badge-wrong {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #dc2626;
}

@media (max-width: 768px) {
    .stat-grid { gap: 0.5rem; }
    .data-table { font-size: 0.8rem; }
    .data-table th,
    .data-table td { padding: 0.45rem 0.5rem; }
}

/* ── Welcome image ── */
/* ── Foreman link ── */
/* ── Sign-off page ── */
.signoff-declaration {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #444;
}
.signoff-details {
    background: var(--green-bg);
    border: 1px solid #c0d0e8;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    font-size: 0.95rem;
}
.signoff-details p { margin: 0.2rem 0; }
.signoff-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
}
.signoff-checkbox input[type="checkbox"] {
    margin-top: 0.2rem;
    accent-color: var(--green);
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* ── Sign-Off Sheet ── */
.signoff-card { max-width: 680px; }

.signoff-card .form-group { margin-bottom: 1.4rem; }
.signoff-card .form-group.has-error input,
.signoff-card .form-group.has-error select { border-color: #dc2626; }
.field-error {
    font-size: 0.82rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.4rem;
}
.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.92rem;
    line-height: 1.4;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fafafa;
    transition: border-color 0.15s, background 0.15s;
}
.checkbox-option:hover { border-color: var(--green-light); background: var(--green-bg); }
.checkbox-option input[type="checkbox"] {
    margin-top: 0.15rem;
    accent-color: var(--green);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.signoff-agreements { margin-top: 1.5rem; }
.signoff-agreements.has-error .signoff-agreement-block {
    border-left-color: #dc2626;
}
.signoff-agreement-block {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    border-radius: 6px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}
.agreement-body {
    font-size: 0.88rem;
    color: #444;
    line-height: 1.65;
    margin-bottom: 0.75rem;
}
.agreement-check {
    border: none;
    padding: 0;
    background: transparent;
    font-weight: 600;
}
.agreement-check:hover { background: transparent; border-color: transparent; }

/* ── Foreman tip box ── */
.foreman-tip-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1rem 1.2rem;
    background: #fffbea;
    border: 1px solid #f0c030;
    border-left: 4px solid #e6a800;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #5a4000;
    line-height: 1.6;
}
.foreman-tip-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
    color: #e6a800;
}
.foreman-tip-content a {
    color: #8b5e00;
    font-weight: 600;
    text-decoration: underline;
}
.foreman-tip-content a:hover { color: #5a3d00; }

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}
.page-btn {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--green);
    text-decoration: none;
    background: #fff;
    line-height: 1.4;
}
.page-btn:hover { background: #f3f4f6; }
.page-btn.active {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
    font-weight: 600;
}

/* ── Foreman next-step card (certificate page) ── */
.foreman-next-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fffbeb;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem auto 0;
    max-width: 720px;
}
.foreman-next-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}
.foreman-next-body strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #92400e;
}
.foreman-next-body p {
    margin: 0;
    color: #78350f;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ── Certificate verify URL (on cert page) ── */
.cert-verify-url {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}
.cert-verify-url a { color: #374151; text-decoration: underline; word-break: break-all; }

/* ── Landing page cert lookup ── */
.cert-lookup-box {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
}
.cert-lookup-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.3rem;
}
.cert-lookup-desc {
    font-size: 0.82rem;
    color: #6b7280;
    margin: 0 0 0.75rem;
}
.cert-lookup-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.cert-lookup-input {
    flex: 1;
    min-width: 200px;
    padding: 0.45rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.9rem;
}
.cert-lookup-result {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}
.cert-lookup-found {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}
.cert-lookup-none {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}
.cert-lookup-check {
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   LANDING PAGE
   ══════════════════════════════════════════════════ */

/* Language bar */
.lang-bar {
    background: #152240;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.4rem 1.5rem;
}
.lang-opt {
    background: none;
    border: none;
    color: rgba(255,255,255,0.55);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0.15rem 0.3rem;
    border-radius: 3px;
    font-family: inherit;
    transition: color 0.15s;
}
.lang-opt.active, .lang-opt:hover { color: #fff; font-weight: 600; }
.lang-sep { color: rgba(255,255,255,0.3); font-size: 0.8rem; }

/* Hero */
.gw-hero {
    background: #e7edf4;
    color: #111827;
    padding: 32px 20px 40px;
}
.gw-hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}
.gw-hero-logo {
    height: 60px;
    width: auto;
    margin-bottom: 24px;
    background: #fff;
    border-radius: 6px;
    padding: 6px 12px;
}
.gw-hero h2 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #071a2f;
    text-transform: uppercase;
}
.gw-hero p {
    margin: 4px 0;
    font-size: 15px;
    line-height: 1.5;
    color: #1f2937;
}
.gw-values { margin-bottom: 24px; }
.gw-dei    { margin-bottom: 24px; }
.gw-body-text {
    text-align: left;
    margin-top: 20px;
    border-top: 1px solid #c9d5e4;
    padding-top: 20px;
}
.gw-body-text p { margin-bottom: 16px; font-size: 15px; line-height: 1.6; color: #374151; }
.gw-body-text p:last-child { margin-bottom: 0; }

/* Landing card */
.landing-card { max-width: 720px; margin: 1.5rem auto; }
.landing-card h2 { margin-bottom: 1.25rem; }

.landing-steps-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.75rem;
}
.landing-steps-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.landing-step-num {
    flex-shrink: 0;
    width: 32px; height: 32px;
    background: #152240;
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem;
}
.landing-steps-list li div strong { display: block; margin-bottom: 2px; color: #152240; }
.landing-steps-list li div p { font-size: 0.88rem; color: #6b7280; margin: 0; }

/* Single start button */
.landing-start { text-align: center; margin-bottom: 1.5rem; }
.landing-btn-start {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 6px;
    min-width: 200px;
}

/* ══════════════════════════════════════════════════
   MOBILE-FIRST RESPONSIVE
   ══════════════════════════════════════════════════ */
@media (max-width: 640px) {

    /* Header */
    header {
        padding: 0.6rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    header h1 { font-size: 0.9rem; }
    header img { height: 34px; }
    .admin-nav { gap: 0.5rem; font-size: 0.85rem; }

    /* Hero */
    .gw-hero { padding: 22px 14px 28px; }
    .gw-hero h2 { font-size: 13px; }
    .gw-hero p, .gw-body-text p { font-size: 14px; }
    .gw-hero-logo { height: 48px; }

    /* Card */
    .card { padding: 1.25rem; border-radius: 6px; }
    .landing-card { margin: 0.75rem; border-radius: 6px; }

    /* Steps */
    .landing-step-num { width: 28px; height: 28px; font-size: 0.8rem; }

    /* Button */
    .landing-btn-start { width: 100%; text-align: center; padding: 0.85rem 1rem; }

    /* Progress bar */
    .steps { gap: 0.2rem; flex-wrap: wrap; }
    .step { font-size: 0.72rem; padding: 0.35rem 0.4rem; flex: 1; min-width: 60px; text-align: center; }

    /* Forms */
    .cert-lookup-form { flex-direction: column; }
    .cert-lookup-input { width: 100%; }
    .cert-lookup-form .btn { width: 100%; }

    /* Stat grid */
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .stat-num { font-size: 1.8rem; }

    /* Admin table — allow horizontal scroll */
    .card { overflow-x: auto; }

    /* Pagination */
    .pagination { justify-content: center; }

    /* Video */
    .video-wrapper { border-radius: 4px; }

    /* Signoff */
    .signoff-card { padding: 1.25rem; }
    .checkbox-group { gap: 0.4rem; }
}

@media (max-width: 400px) {
    .lang-bar { padding: 0.35rem 1rem; }
    .gw-hero h2 { font-size: 12px; letter-spacing: 0; }
}

/* ── Certificate Verify Page ── */
.verify-wrap { max-width: 640px; margin: 2rem auto; padding: 0 1rem; }
.verify-card {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    text-align: center;
}
.verify-notfound h2 { color: #dc2626; margin-bottom: 0.5rem; }
.verify-notfound .verify-icon { font-size: 3rem; color: #dc2626; margin-bottom: 1rem; }
.verify-ok .verify-badge {
    display: inline-block;
    background: #16a34a;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    letter-spacing: 0.04em;
}

/* Certificate preview box with colored border */
.verify-cert-preview { margin: 0 auto 1.25rem; max-width: 520px; }
.vcp-outer {
    border: 5px solid var(--cert-border);
    padding: 5px;
    border-radius: 2px;
}
.vcp-mid {
    border: 1.5px solid var(--cert-border);
    padding: 4px;
}
.vcp-inner {
    border: 3px double var(--cert-border);
    padding: 1.25rem 1.5rem;
    text-align: center;
}
.vcp-org { font-size: 0.75rem; color: #6b7280; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.vcp-title { font-size: 1.2rem; font-weight: 800; color: #152240; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }
.vcp-subtitle { font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase; color: #6b7280; margin-bottom: 12px; }
.vcp-certifies { font-size: 0.8rem; color: #888; font-style: italic; margin-bottom: 4px; }
.vcp-name { font-size: 1.5rem; font-weight: 700; color: #152240; border-bottom: 2px solid var(--cert-border); display: inline-block; padding-bottom: 3px; margin-bottom: 10px; min-width: 260px; }
.vcp-details { font-size: 0.82rem; color: #444; margin-bottom: 4px; display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.vcp-footer { font-size: 0.78rem; color: #555; margin-top: 12px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.vcp-id { font-family: monospace; color: #888; }

.verify-note { font-size: 0.85rem; color: #555; margin-bottom: 1.5rem; line-height: 1.5; }
.verify-dl-btn { display: inline-block; padding: 0.75rem 2rem; font-size: 0.95rem; }

@media (max-width: 640px) {
    .verify-wrap { margin: 1rem auto; }
    .vcp-name { font-size: 1.1rem; min-width: 0; }
    .vcp-title { font-size: 1rem; }
    .verify-dl-btn { width: 100%; text-align: center; }
}

.vcp-project {
    font-size: 1rem;
    font-weight: 700;
    color: #152240;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.vcp-footer-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 12px;
    gap: 0.5rem;
}
.vcp-footer-left { font-size: 0.78rem; color: #555; text-align: left; }
.vcp-id { font-family: monospace; color: #888; margin-top: 2px; }
.vcp-seal { width: 80px; height: 80px; flex-shrink: 0; }
@media (max-width: 400px) { .vcp-seal { width: 60px; height: 60px; } }

.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.card-header-row h2 { margin-bottom: 0; }
.card-lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: #152240;
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
}
.card-lang-toggle .lang-opt { font-size: 0.8rem; padding: 0.1rem 0.25rem; }

/* ── Settings tabs ── */
.settings-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    flex-wrap: wrap;
}
.settings-tab {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s;
}
.settings-tab:hover { color: #152240; }
.settings-tab.active { color: #152240; border-bottom-color: #152240; font-weight: 600; }

/* ── Docs tab ── */
.docs-card { max-width: 860px; }
.docs-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}
.docs-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.docs-section h3 { font-size: 1.05rem; color: #152240; margin-bottom: 0.75rem; }
.docs-section p { font-size: 0.9rem; color: #374151; line-height: 1.6; margin-bottom: 0.5rem; }
.docs-list { padding-left: 1.25rem; font-size: 0.9rem; color: #374151; line-height: 1.8; }
.docs-list li { margin-bottom: 0.25rem; }
.docs-code {
    background: #1e293b;
    color: #e2e8f0;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-family: monospace;
    white-space: pre-wrap;
    margin: 0.5rem 0;
    line-height: 1.6;
}
