/* ============================================================================
   SHARED STYLESHEET — subscribe.html, unsubscribe.html, contact.html, support.html
   ============================================================================ */

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

html { height: 100%; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

img, video { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

/* ── VARIABLES (light theme, standalone default) ─────────────────────────── */
:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

    --bg: #f7f7f5;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --header-bg: #ffffff;
    --input-bg: #ffffff;
    --text: #1a202c;
    --text-muted: #4a5568;
    --border: #cbd5e0;
    --accent: #0a8f5c;
}

/* ── CONTAINER ─────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ============================================================================
   SUBSCRIBE PAGE
   ============================================================================ */
.subscribe-card { background: #fff; border: 1px solid #cbd5e0; border-radius: 14px; padding: 36px 32px; max-width: 420px; width: 100%; margin: 20px auto; box-shadow: 0 4px 24px rgba(0,0,0,.08); text-align: center; }
.subscribe-card h1 { font-size: 22px; color: #0a8f5c; margin-bottom: 6px; }
.subscribe-card .sub { font-size: 14px; color: #4a5568; margin-bottom: 24px; line-height: 1.5; }
.sub-field { text-align: left; margin-bottom: 14px; }
.sub-field label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #4a5568; margin-bottom: 6px; }
.sub-field input { width: 100%; padding: 11px 14px; border: 1px solid #cbd5e0; border-radius: 8px; font-size: 14px; color: #1a202c; background: #fff; transition: border-color .15s; box-sizing: border-box; }
.sub-field input:focus { outline: none; border-color: #0a8f5c; }
.btn-subscribe { width: 100%; padding: .875rem; background: linear-gradient(135deg,#0a8f5c,color-mix(in srgb,#0a8f5c 70%,#000 30%)); color: #fff; font-weight: 700; border: none; border-radius: .875rem; font-size: 1rem; font-family: system-ui,-apple-system,sans-serif; cursor: pointer; transition: all .2s ease; margin-top: .5rem; }
.btn-subscribe:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.btn-subscribe:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; box-shadow: none; }
.sub-msg { margin-top: 16px; font-size: 13px; padding: 10px 14px; border-radius: 8px; display: none; }
.sub-msg.show { display: block; }
.sub-msg.success { background: #e6fffa; color: #276749; }
.sub-msg.error { background: #fff5f5; color: #c53030; }
.success-state { display: none; padding: 12px 0 4px; }
.success-state .check-icon { font-size: 48px; color: #10b981; margin-bottom: 8px; display: block; }
.success-state h2 { font-size: 24px; color: #0a8f5c; margin-bottom: 8px; }
.success-state p { font-size: 14px; color: #4a5568; line-height: 1.6; margin-bottom: 0; }

/* ============================================================================
   UNSUBSCRIBE PAGE
   ============================================================================ */
.unsubscribe-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 36px 32px; max-width: 420px; width: 100%; margin: 20px auto; box-shadow: 0 4px 24px rgba(0,0,0,.08); text-align: center; }
.unsubscribe-card h1 { font-size: 22px; color: var(--accent); margin-bottom: 6px; }
.unsubscribe-card .sub { font-size: 14px; color: var(--text-muted); margin-bottom: 22px; line-height: 1.5; }
.field { text-align: left; margin-bottom: 14px; }
.field label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 6px; }
.field input { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; color: var(--text); background: #fff; transition: border-color .15s; box-sizing: border-box; }
.field input:focus { outline: none; border-color: var(--accent); }
.btn-unsubscribe { width: 100%; padding: .875rem; background: linear-gradient(135deg,#ef4444,color-mix(in srgb,#ef4444 70%,#000 30%)); color: #fff; font-weight: 700; border: none; border-radius: .875rem; font-size: 1rem; font-family: var(--font-sans); cursor: pointer; transition: all .2s ease; margin-top: .5rem; }
.btn-unsubscribe:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.btn-unsubscribe:active { transform: translateY(0); }
.btn-unsubscribe:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; box-shadow: none; }
.msg { margin-top: 16px; font-size: 13px; padding: 10px 14px; border-radius: 8px; display: none; }
.msg.show { display: block; }
.msg.success { background: #e6fffa; color: #276749; }
.msg.error { background: #fff5f5; color: #c53030; }
#tokenSection { display: none; }
#emailSection { display: none; }

/* ============================================================================
   CONTACT PAGE (.cf-*)
   ============================================================================ */
.cf-wrap { max-width: 700px; margin: 0 auto; background: var(--header-bg); border: 1px solid var(--border); border-radius: 16px; padding: 30px 32px; }
.cf-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.cf-header i { font-size: 2rem; color: var(--accent); }
.cf-progress-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: .85rem; color: var(--text-muted); }
.cf-progress-step { color: var(--accent); font-weight: 500; }
.cf-progress-track { width: 100%; height: 4px; background: var(--border); border-radius: 4px; margin-bottom: 24px; overflow: hidden; }
.cf-progress-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s ease; }
.cf-cat-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; margin-bottom: 16px; }
.cf-btn { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--input-bg,#1a2230); border: 2px solid var(--border); border-radius: 12px; color: var(--text); font-size: .95rem; cursor: pointer; transition: all .2s ease; text-align: left; font-family: var(--font-sans); width: 100%; }
.cf-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.cf-btn i { font-size: 1.2rem; color: var(--accent); width: 24px; text-align: center; }
.cf-note { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }
.cf-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .cf-grid2 { grid-template-columns: 1fr; } .cf-cat-grid { grid-template-columns: 1fr 1fr; } }
.cf-field { margin-bottom: 16px; }
.cf-label { display: block; font-size: .85rem; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.cf-input { width: 100%; padding: 10px 14px; background: var(--input-bg,#1a2230); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: .95rem; font-family: var(--font-sans); box-sizing: border-box; }
.cf-input:focus { outline: none; border-color: var(--accent); }
.cf-input::placeholder { color: var(--text-muted); opacity: .6; }
.cf-input-error { border-color: #ef4444 !important; }
.cf-field-error { font-size: .75rem; color: #ef4444; margin-top: 4px; display: block; }
.cf-char-counter { font-size: .7rem; text-align: right; margin-top: 4px; color: var(--text-muted); }
.cf-turnstile-wrap { margin: 18px 0 12px; min-height: 65px; }
.cf-turnstile-error { font-size: .75rem; color: #ef4444; margin-top: 4px; display: block; }
.cf-submit { width: 100%; padding: 14px; background: var(--accent); color: var(--bg); font-weight: 700; font-size: 1rem; border: none; border-radius: 12px; cursor: pointer; transition: all .2s ease; display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--font-sans); }
.cf-submit:hover { transform: translateY(-2px); filter: brightness(1.05); }
.cf-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.cf-toast { position: fixed; bottom: 24px; right: 24px; padding: 12px 20px; border-radius: 40px; font-size: .88rem; font-weight: 500; background: var(--header-bg); color: var(--text); border: 1px solid var(--border); opacity: 0; transition: opacity .3s ease; z-index: 9999; max-width: 90%; }
.cf-hidden { display: none !important; }

/* ============================================================================
   SUPPORT PAGE (.sf-*)  — structural rules from layout.css §12 SUPPORT FORM,
   plus support.html's own supplementary rules
   ============================================================================ */
.sf-wrap { font-family: var(--font-sans); color: var(--text); }

.sf-header {
    background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, #000 45%) 100%);
    padding: 2rem;
    border-radius: 1.25rem 1.25rem 0 0;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.sf-header i { font-size: 2.25rem; }

.sf-body {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 1.25rem 1.25rem;
    padding: 2rem;
}

.sf-progress-track { height: .5rem; background: color-mix(in srgb, var(--border) 50%, transparent 50%); border-radius: 9999px; overflow: hidden; margin-bottom: 2rem; }
.sf-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #ea580c 40%)); transition: width .3s; }
.sf-progress-row { display: flex; justify-content: space-between; margin-bottom: .5rem; font-size: .85rem; }
.sf-progress-step { color: var(--accent); font-weight: 600; }
.sf-progress-note { color: var(--text-muted); }

.sf-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: .85rem; }

.sf-btn {
    width: 100%; text-align: left; padding: 1rem 1.25rem; border: 1px solid var(--border);
    border-radius: .875rem; background: transparent; color: var(--text); cursor: pointer;
    display: flex; align-items: center; gap: .75rem; font-weight: 500; font-size: .95rem;
    transition: border-color .15s, background .15s;
}
.sf-btn:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent 92%); }
.sf-btn i { color: var(--accent); flex-shrink: 0; }

.sf-opt {
    width: 100%; text-align: left; padding: .9rem 1.2rem; border: 1px solid var(--border);
    border-radius: .875rem; background: transparent; color: var(--text); cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; font-size: .95rem;
    transition: border-color .15s, background .15s; margin-bottom: .6rem;
}
.sf-opt:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent 92%); }
.sf-opt i { color: var(--accent); flex-shrink: 0; }

.sf-q-label { font-size: .8rem; color: var(--accent); margin-bottom: .5rem; }
.sf-q-text  { font-size: 1.1rem; font-weight: 600; color: var(--text); margin-bottom: 1.25rem; }

.sf-input {
    width: 100%; padding: .8rem 1.1rem; border: 1px solid var(--border); border-radius: .875rem;
    background: color-mix(in srgb, var(--bg) 70%, transparent 30%); color: var(--text); font-size: .95rem;
    outline: none; transition: border-color .15s, box-shadow .15s; box-sizing: border-box;
}
.sf-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent 80%); }
.sf-input.sf-input-error, .sf-input-error { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.18); }

.sf-label { display: block; font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: .25rem; }
.sf-field-error { font-size: .78rem; color: #ef4444; margin-top: .3rem; min-height: 1rem; display: block; }

.sf-hidden { display: none !important; }
.sf-grid2  { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.sf-field  { display: flex; flex-direction: column; gap: .25rem; margin-bottom: 1.25rem; }
.sf-note   { font-size: .82rem; color: var(--text-muted); text-align: center; margin-top: 1.5rem; }
.sf-loading{ text-align: center; padding: 2.5rem; color: var(--text-muted); }

.sf-toast {
    position: fixed; bottom: 20px; right: 20px; z-index: 9999; background: var(--bg-header);
    color: var(--text); border: 1px solid var(--border); padding: 10px 18px; border-radius: 40px;
    font-size: .88rem; opacity: 0; transition: opacity .2s; pointer-events: none;
}

.sf-turnstile-wrap { margin-bottom: 1.25rem; }
.sf-turnstile-error { font-size: .78rem; color: #ef4444; margin-top: .3rem; display: block; }

.sf-success-box  { text-align: center; padding: 2rem; }
.sf-success-box i { font-size: 4rem; color: #10b981; margin-bottom: 1rem; }
.sf-success-box h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--text); }
.sf-success-box p { color: var(--text-muted); margin-bottom: .75rem; line-height: 1.6; }
.sf-ref-number { font-size: 1.2rem; font-weight: 700; color: var(--accent); margin: 1rem 0; letter-spacing: 1px; }

.sf-char-counter { font-size: .7rem; text-align: right; margin-top: 4px; color: var(--text-muted); }
.sf-char-counter.warning { color: #eab308; }
.sf-char-counter.danger { color: #ef4444; }

.sf-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000000 30%));
    color: var(--bg);
    font-weight: 700;
    padding: .875rem;
    border-radius: .875rem;
    border: none;
    font-size: 1rem;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
}
.sf-submit:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.sf-submit:active { transform: translateY(0); }
.sf-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.sf-submit-loading { opacity: .7; cursor: wait; }

.summary-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.summary-table td { padding: 10px 12px; border: 1px solid var(--border); color: var(--text); }
.summary-table .step-number { width: 50px; text-align: center; font-weight: 600; background: color-mix(in srgb, var(--accent) 10%, transparent); }

@media (max-width: 520px) {
    .sf-grid2 { grid-template-columns: 1fr; }
    .sf-cat-grid { grid-template-columns: 1fr; }
}
