/**
 * Coin Wiki Layouts v1.5.0 — "Got a box of coins?" triage wizard.
 * Self-contained: every selector is prefixed .cwl-tw so it works on plain pages.
 * Mobile-first at 360px, Robinhood-style: dark calm surface, one gold accent,
 * one primary action per step, 44px+ touch targets.
 */

.cwl-tw {
    --cwl-tw-bg: #101214;
    --cwl-tw-surface: #16191c;
    --cwl-tw-border: rgba(255, 255, 255, 0.09);
    --cwl-tw-text: #ece7dc;
    --cwl-tw-muted: #a9a294;
    --cwl-tw-gold: #c9a227;
    --cwl-tw-gold-soft: rgba(201, 162, 39, 0.14);
    background: var(--cwl-tw-bg);
    border: 1px solid var(--cwl-tw-border);
    border-radius: 16px;
    color: var(--cwl-tw-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    margin: 1.5rem 0;
    max-width: 640px;
    padding: 24px 20px;
}

.cwl-tw-progress {
    margin-bottom: 20px;
}

.cwl-tw-progress-meta {
    color: var(--cwl-tw-muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.cwl-tw-progress-bar {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
}

.cwl-tw-progress-fill {
    background: var(--cwl-tw-gold);
    border-radius: 999px;
    height: 100%;
    transition: width 0.3s ease;
}

.cwl-tw-heading {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 6px;
}

.cwl-tw-sub {
    color: var(--cwl-tw-muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px;
}

.cwl-tw-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.cwl-tw-opt {
    -webkit-tap-highlight-color: transparent;
    align-items: center;
    background: var(--cwl-tw-surface);
    border: 1px solid var(--cwl-tw-border);
    border-radius: 12px;
    color: var(--cwl-tw-text);
    cursor: pointer;
    display: flex;
    font-size: 15px;
    font-weight: 600;
    gap: 12px;
    justify-content: flex-start;
    line-height: 1.35;
    min-height: 52px;
    padding: 12px 16px;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease;
    width: 100%;
}

.cwl-tw-opt:hover {
    border-color: rgba(201, 162, 39, 0.45);
}

.cwl-tw-opt:focus-visible {
    outline: 2px solid var(--cwl-tw-gold);
    outline-offset: 2px;
}

.cwl-tw-opt.is-selected {
    background: var(--cwl-tw-gold-soft);
    border-color: var(--cwl-tw-gold);
}

.cwl-tw-check {
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    flex: 0 0 auto;
    height: 22px;
    position: relative;
    width: 22px;
}

.cwl-tw-opt.is-selected .cwl-tw-check {
    background: var(--cwl-tw-gold);
    border-color: var(--cwl-tw-gold);
}

.cwl-tw-opt.is-selected .cwl-tw-check::after {
    border: solid #101214;
    border-width: 0 3px 3px 0;
    content: "";
    height: 10px;
    left: 6px;
    position: absolute;
    top: 2px;
    transform: rotate(45deg);
    width: 5px;
}

.cwl-tw-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cwl-tw-btn {
    align-items: center;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    font-size: 16px;
    font-weight: 800;
    justify-content: center;
    min-height: 52px;
    padding: 14px 24px;
    width: 100%;
}

.cwl-tw-btn:focus-visible {
    outline: 2px solid var(--cwl-tw-gold);
    outline-offset: 2px;
}

.cwl-tw-btn-primary {
    background: var(--cwl-tw-gold);
    color: #101214;
}

.cwl-tw-btn-primary:active {
    transform: scale(0.99);
}

.cwl-tw-btn-ghost {
    background: transparent;
    border: 1px solid var(--cwl-tw-border);
    color: var(--cwl-tw-muted);
    font-weight: 600;
    min-height: 44px;
}

.cwl-tw-back {
    align-self: flex-start;
    background: none;
    border: none;
    color: var(--cwl-tw-muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    min-height: 44px;
    padding: 8px 4px;
    text-align: left;
}

.cwl-tw-back:hover {
    color: var(--cwl-tw-text);
}

/* ---- Results ---- */

.cwl-tw-verdict-label {
    color: var(--cwl-tw-muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.cwl-tw-verdict {
    color: var(--cwl-tw-gold);
    font-size: clamp(30px, 8vw, 44px);
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 12px;
}

.cwl-tw-body {
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 20px;
}

.cwl-tw-next {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.cwl-tw-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.cwl-tw-links a {
    background: var(--cwl-tw-surface);
    border: 1px solid var(--cwl-tw-border);
    border-radius: 12px;
    color: var(--cwl-tw-text);
    display: block;
    font-size: 15px;
    font-weight: 700;
    min-height: 52px;
    padding: 14px 16px;
    text-decoration: none;
}

.cwl-tw-links a:hover {
    border-color: rgba(201, 162, 39, 0.45);
}

.cwl-tw-links a .cwl-tw-go {
    color: var(--cwl-tw-gold);
    margin-left: 4px;
}

/* ---- Email capture ---- */

.cwl-tw-email {
    border-top: 1px solid var(--cwl-tw-border);
    margin-top: 20px;
    padding-top: 20px;
}

.cwl-tw-email h3 {
    font-size: 18px;
    margin: 0 0 6px;
}

.cwl-tw-email p {
    color: var(--cwl-tw-muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 14px;
}

.cwl-tw-email-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cwl-tw-email input[type="email"] {
    background: var(--cwl-tw-surface);
    border: 1px solid var(--cwl-tw-border);
    border-radius: 12px;
    color: var(--cwl-tw-text);
    font-size: 16px;
    min-height: 52px;
    padding: 12px 16px;
    width: 100%;
}

.cwl-tw-email input[type="email"]:focus {
    border-color: var(--cwl-tw-gold);
    outline: none;
}

.cwl-tw-hp {
    height: 0 !important;
    left: -9999px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    width: 0 !important;
}

.cwl-tw-skip {
    background: none;
    border: none;
    color: var(--cwl-tw-muted);
    cursor: pointer;
    font-size: 13px;
    margin-top: 4px;
    min-height: 44px;
    padding: 10px 4px;
    text-align: center;
    text-decoration: underline;
}

.cwl-tw-msg {
    border-radius: 10px;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px 14px;
}

.cwl-tw-msg.is-error {
    background: rgba(200, 60, 60, 0.12);
    color: #e8938c;
}

.cwl-tw-msg.is-ok {
    background: var(--cwl-tw-gold-soft);
    color: var(--cwl-tw-gold);
}

/* ---- Copy summary / restart ---- */

.cwl-tw-foot {
    border-top: 1px solid var(--cwl-tw-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
}

@media (min-width: 480px) {
    .cwl-tw {
        padding: 32px 32px;
    }

    .cwl-tw-email-row {
        flex-direction: row;
    }

    .cwl-tw-email-row .cwl-tw-btn-primary {
        flex: 0 0 auto;
        width: auto;
    }
}
