:root {
    color-scheme: dark;
    --bg: #0f0f23;
    --surface: rgba(255,255,255,0.065);
    --surface-strong: rgba(255,255,255,0.1);
    --border: rgba(255,255,255,0.14);
    --text: #f7f3ff;
    --muted: #bdb5d0;
    --accent: #ff6b6b;
    --accent-2: #f59e0b;
    --success: #4ade80;
    --shadow: 0 20px 55px rgba(0,0,0,0.24);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 0%, rgba(231,76,60,0.18), transparent 34rem),
        radial-gradient(circle at 90% 20%, rgba(245,158,11,0.11), transparent 30rem),
        var(--bg);
    line-height: 1.6;
}

a { color: #ffb4b4; }

button, select, a { font: inherit; }

button, select, a[href] { min-height: 44px; }

button:focus-visible, select:focus-visible, a:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: -80px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    color: #15101f;
    background: #fff;
    border-radius: 10px;
}

.skip-link:focus { top: 12px; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.topbar {
    width: min(100% - 32px, 860px);
    margin: 0 auto;
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
}

.language-label select,
.controls select {
    color: var(--text);
    background: #25233a;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 38px 10px 12px;
}

main {
    width: min(100% - 32px, 860px);
    margin: 0 auto;
    padding-bottom: 48px;
}

.hero {
    text-align: center;
    padding: 52px 12px 34px;
}

.eyebrow {
    margin: 0 0 8px;
    color: #ff9a9a;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

h1, h2, p { overflow-wrap: anywhere; }

h1 {
    margin: 0;
    font-size: clamp(2rem, 7vw, 4.1rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

h2 { margin: 0 0 12px; line-height: 1.25; }

.hero-copy {
    max-width: 650px;
    margin: 20px auto 14px;
    color: var(--muted);
    font-size: 1.05rem;
}

.privacy-chip {
    display: inline-flex;
    padding: 8px 12px;
    color: #d7fbe2;
    background: rgba(74,222,128,0.09);
    border: 1px solid rgba(74,222,128,0.25);
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 750;
}

.card {
    margin: 16px 0;
    padding: clamp(18px, 4vw, 28px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.control-grid label { display: grid; gap: 7px; color: var(--muted); font-weight: 750; }

.focus-summary {
    margin: 18px 0 0;
    padding: 14px 16px;
    color: #fff1df;
    background: rgba(245,158,11,0.08);
    border-left: 3px solid var(--accent-2);
    border-radius: 10px;
}

.progress-card > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.progress-label { color: var(--muted); font-weight: 750; }

.progress-track {
    height: 12px;
    margin-top: 12px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
}

.progress-track span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 220ms ease;
}

.section-heading {
    margin: 36px 0 14px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.day-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.day-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    min-height: 180px;
    padding: 20px;
    background: linear-gradient(145deg, rgba(255,255,255,0.085), rgba(255,255,255,0.04));
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.day-card:hover { transform: translateY(-2px); border-color: rgba(255,107,107,0.52); }

.day-card.done { opacity: 0.68; border-color: rgba(74,222,128,0.45); }

.day-card.done h3, .day-card.done p { text-decoration: line-through; text-decoration-thickness: 1px; }

.day-card input {
    width: 24px;
    height: 24px;
    margin: 2px 0 0;
    accent-color: var(--success);
}

.day-number {
    display: block;
    margin-bottom: 4px;
    color: #ff9a9a;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.day-card h3 { margin: 0 0 7px; font-size: 1.08rem; }
.day-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.ad-card {
    min-width: 0;
    margin: 24px 0;
    padding: 12px;
    overflow: hidden;
    text-align: center;
    border-radius: 18px;
    background: rgba(255,255,255,0.025);
}

.ad-label { display: block; margin-bottom: 6px; color: #857d96; font-size: 0.67rem; }

.action-panel { text-align: center; }
.action-panel > p { color: var(--muted); }

.action-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.primary-button, .secondary-button {
    padding: 11px 18px;
    border-radius: 12px;
    font-weight: 850;
    cursor: pointer;
}

.primary-button { color: #fff; background: linear-gradient(135deg, #e74c3c, #ff7675); border: 0; }
.secondary-button { color: var(--text); background: var(--surface-strong); border: 1px solid var(--border); }
.status-message { min-height: 25px; margin-bottom: 0; color: #a7f3d0 !important; }
.tool-next-link { display: inline-flex; align-items: center; margin-top: 18px; font-weight: 850; }

.evidence p, .safety p { color: var(--muted); }
.evidence ul { margin: 14px 0 0; padding-left: 20px; }
.evidence li + li { margin-top: 8px; }
.safety { border-color: rgba(245,158,11,0.35); }

footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 22px 16px 42px;
    color: var(--muted);
    font-size: 0.88rem;
}

@media (max-width: 640px) {
    .topbar { align-items: stretch; }
    .back-link { flex: 1; }
    .language-label select { max-width: 132px; }
    .hero { padding-top: 34px; }
    .control-grid, .day-grid { grid-template-columns: 1fr; }
    .section-heading { align-items: start; flex-direction: column; }
    .section-heading .secondary-button { width: 100%; }
}

@media print {
    :root { color-scheme: light; }
    body { color: #111; background: #fff; }
    .topbar, .privacy-chip, .controls, .ad-card, .action-panel, footer, .skip-link { display: none !important; }
    main { width: 100%; padding: 0; }
    .hero { padding: 0 0 18px; }
    .hero-copy { color: #333; }
    .card, .day-card { color: #111; background: #fff; border: 1px solid #bbb; box-shadow: none; break-inside: avoid; }
    .day-card p, .evidence p, .safety p { color: #333; }
    .day-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}
