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

:root {
    --bg: #0a0a0b;
    --surface: #141416;
    --surface-2: #1e1e22;
    --border: #2a2a2e;
    --text: #f0f0f2;
    --text-dim: #8a8a94;
    --accent: #6366f1;
    --accent-h: #818cf8;
    --accent-bg: rgba(99, 102, 241, 0.1);
    --accent-bg-h: rgba(99, 102, 241, 0.18);
    --success: #22c55e;
    --danger: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.app {
    max-width: 560px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1.75rem;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.header-text h1 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.tagline {
    color: var(--text-dim);
    font-size: 0.8125rem;
}

/* Progress */
.progress-section {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
    padding: 1.25rem;
    background: var(--surface);
    border-radius: var(--radius);
}

.progress-ring {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.progress-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.progress-bg {
    fill: none;
    stroke: var(--surface-2);
    stroke-width: 6;
}

.progress-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 163;
    stroke-dashoffset: 163;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-percent {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.progress-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.progress-count {
    font-size: 0.875rem;
    font-weight: 500;
}

.progress-label {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--surface);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    flex: 1;
    min-width: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.625rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: 0.625rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    scroll-snap-align: start;
    white-space: nowrap;
}

.tab:hover {
    color: var(--text);
    background: var(--surface-2);
}

.tab.active {
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.tab-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: grayscale(1) opacity(0.5);
    transition: filter 0.15s ease;
}

.tab.active .tab-icon,
.tab:hover .tab-icon {
    filter: none;
}

.tab-emoji {
    font-size: 1.125rem;
    line-height: 1;
}

/* Content card */
.content {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    min-height: 360px;
}

/* Breach check */
.breach-check {
    text-align: center;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.breach-check h2 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.breach-desc {
    color: var(--text-dim);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

.breach-form {
    display: flex;
    gap: 0.5rem;
    max-width: 360px;
    margin: 0 auto;
}

.breach-input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.8125rem;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.breach-input:focus {
    outline: none;
    border-color: var(--accent);
}

.breach-input::placeholder {
    color: var(--text-dim);
}

.attribution {
    margin-top: 0.75rem;
    font-size: 0.6875rem;
    color: var(--text-dim);
}

.attribution a {
    color: var(--accent);
    text-decoration: none;
}

.attribution a:hover {
    text-decoration: underline;
}

/* Checklist */
.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.checklist-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
}

.checklist-count {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 500;
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease;
}

.check-item:hover {
    background: var(--surface-2);
}

.check-item.checked {
    opacity: 0.45;
}

.check-item.checked .item-title {
    text-decoration: line-through;
}

.check-item input {
    display: none;
}

.check-box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    transition: all 0.15s ease;
}

.check-item:hover .check-box {
    border-color: var(--accent);
}

.check-item.checked .check-box {
    background: var(--success);
    border-color: var(--success);
}

.check-box svg {
    width: 12px;
    height: 12px;
    stroke: white;
    stroke-width: 3;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.check-item.checked .check-box svg {
    opacity: 1;
}

.item-content {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.125rem;
}

.item-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.4;
}

.item-action {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    background: var(--accent-bg);
    border-radius: 4px;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
    margin-top: 1px;
    transition: background 0.15s ease;
}

.item-action:hover {
    background: var(--accent-bg-h);
}

/* Nav buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.btn-nav {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.btn-prev {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-prev:hover:not(:disabled) {
    background: var(--surface-2);
    border-color: var(--text-dim);
}

.btn-next {
    background: var(--accent);
    border: none;
    color: white;
}

.btn-next:hover:not(:disabled) {
    background: var(--accent-h);
}

.btn-nav:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 2rem;
}

.btn-reset {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.8125rem;
    cursor: pointer;
    padding: 0.5rem;
    font-family: inherit;
    transition: color 0.15s ease;
}

.btn-reset:hover {
    color: var(--danger);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s ease;
}

.modal-close:hover {
    color: var(--text);
}

.modal-content h3 {
    font-size: 1rem;
    font-weight: 600;
    padding-right: 2rem;
    margin-bottom: 1rem;
}

.modal-content ol {
    margin-left: 1.25rem;
    color: var(--text-dim);
    line-height: 1.7;
    font-size: 0.8125rem;
}

.modal-content li {
    margin-bottom: 0.375rem;
}

.modal-content a {
    color: var(--accent);
    text-decoration: none;
}

.modal-content a:hover {
    text-decoration: underline;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Responsive */
@media (max-width: 480px) {
    .app {
        padding: 1.25rem 1rem 3rem;
    }

    .progress-section {
        padding: 1rem;
    }

    .tab {
        min-width: 48px;
        padding: 0.5rem 0.375rem;
        font-size: 0;
        gap: 0;
    }

    .tab-icon {
        width: 20px;
        height: 20px;
    }

    .tab-emoji {
        font-size: 1.25rem;
    }

    .content {
        padding: 1rem;
    }

    .breach-form {
        flex-direction: column;
    }

    .check-item {
        flex-wrap: wrap;
    }

    .item-action {
        margin-left: 2rem;
        margin-top: 0.375rem;
    }
}
