/* styles.css: shared by index.html, about.html and privacy.html */
:root {
    --bg: #f6f8f7;
    --surface: #ffffff;
    --surface-2: #f1f5f3;
    --surface-hover: #fafcfb;
    --border: #e3e9e6;
    --border-strong: #cfd8d4;
    --text: #33423c;
    --text-strong: #0c1612;
    --text-title: #1d2a25;
    --text-muted: #63716b;
    --accent: #10b981;
    --accent-strong: #059669;
    --accent-text: #047857;
    --accent-soft: #e7f8f0;
    --accent-ring: rgba(16, 185, 129, 0.28);
    --warning-bg: #fff8e6;
    --warning-border: #f6d58a;
    --warning-text: #8a4b0b;
    --shadow-sm: 0 1px 2px rgba(16, 24, 20, 0.05);
    --shadow-md: 0 6px 20px -6px rgba(16, 24, 20, 0.12);
    --shadow-lg: 0 24px 48px -16px rgba(16, 24, 20, 0.18);
    --shadow-button: 0 8px 20px -6px rgba(5, 150, 105, 0.55);
    --glow: rgba(16, 185, 129, 0.16);
    --radius: 14px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1311;
        --surface: #141e1b;
        --surface-2: #1b2623;
        --surface-hover: #18231f;
        --border: #24322e;
        --border-strong: #34443f;
        --text: #c5d3cd;
        --text-strong: #f4f8f6;
        --text-title: #e3ebe7;
        --text-muted: #8fa19a;
        --accent-text: #3ddba4;
        --accent-soft: #123228;
        --warning-bg: #2e2208;
        --warning-border: #6b4f12;
        --warning-text: #f8d887;
        --shadow-sm: none;
        --shadow-md: none;
        --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.6);
        --shadow-button: 0 8px 20px -8px rgba(16, 185, 129, 0.5);
        --glow: rgba(16, 185, 129, 0.12);
        color-scheme: dark;
    }
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    color: var(--text);
    line-height: 1.55;
    background:
        radial-gradient(900px 420px at 50% -120px, var(--glow), transparent 70%),
        var(--bg);
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-text);
}

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

.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

kbd {
    display: inline-block;
    padding: 1px 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8em;
    color: var(--text-title);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: 5px;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.88em;
    padding: 1px 5px;
    background: var(--surface-2);
    border-radius: 5px;
}

/* ---------- Top bar ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 14px 20px;
}
.topbar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    mask-image: linear-gradient(to bottom, #000 70%, transparent);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-strong);
    text-decoration: none;
}
.wordmark img {
    width: 28px;
    height: 28px;
}

/* ---------- Layout ---------- */

.page {
    flex: 1;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 12px 20px 40px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* ---------- Buttons ---------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-title);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.button:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
}
.button svg {
    flex-shrink: 0;
}
.button.primary {
    color: #ffffff;
    background: linear-gradient(180deg, #14c48a, var(--accent-strong));
    border-color: transparent;
    box-shadow: var(--shadow-button);
}
.button.primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}
.button.small {
    padding: 7px 12px;
    font-size: 13px;
}
.button.large {
    padding: 13px 22px;
    font-size: 16px;
    border-radius: 12px;
}

/* ---------- Leaf view ---------- */

.leaf-hero {
    padding: 20px 0 8px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-text);
    background: var(--accent-soft);
    border-radius: 999px;
}

h1 {
    margin: 0;
    font-size: 34px;
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text-strong);
    overflow-wrap: anywhere;
}

.meta {
    margin: 10px 0 0;
    font-size: 15px;
    color: var(--text-muted);
}

.note {
    position: relative;
    margin: 20px 0 0;
    padding: 14px 18px 14px 44px;
    font-size: 15px;
    color: var(--text-title);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.note::before {
    content: "“";
    position: absolute;
    left: 14px;
    top: 4px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 38px;
    line-height: 1;
    color: var(--accent);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 20px;
}

.status {
    margin: 0 0 16px;
    padding: 11px 14px;
    font-size: 14px;
    color: var(--text-title);
    background: var(--accent-soft);
    border-radius: 10px;
    animation: fade-in 0.2s ease-out;
}
.status.warning {
    color: var(--warning-text);
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
}

.qr-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    animation: fade-in 0.2s ease-out;
}
.qr-panel img {
    width: 200px;
    height: 200px;
    image-rendering: pixelated;
    background: #ffffff;
    border-radius: 10px;
    padding: 6px;
    border: 1px solid var(--border);
}

.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    color: var(--text-muted);
}
.search-wrap svg {
    position: absolute;
    left: 14px;
    pointer-events: none;
}
.search {
    width: 100%;
    padding: 11px 14px 11px 40px;
    font: inherit;
    font-size: 15px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}
.search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring);
}

.link-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin: 0;
    counter-reset: link;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
a.link-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    box-shadow: var(--shadow-md);
}
.link-card.blocked {
    border-style: dashed;
    box-shadow: none;
    background: transparent;
}

.favicon-tile {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 11px;
}
.favicon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
}
.favicon-letter {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-text);
}
.blocked .favicon-letter {
    color: var(--warning-text);
}

.link-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex-grow: 1;
}
.link-content .title {
    font-weight: 600;
    color: var(--text-title);
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.link-content .url {
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.link-content .domain {
    color: var(--text);
    font-weight: 500;
}

.link-arrow {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: var(--text-muted);
    border-radius: 9px;
    transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
a.link-card:hover .link-arrow {
    color: var(--accent-text);
    background: var(--accent-soft);
    transform: translate(1px, -1px);
}

.empty-search {
    color: var(--text-muted);
    text-align: center;
    padding: 24px;
}

/* ---------- Landing ---------- */

.hero {
    text-align: center;
    padding: 36px 0 12px;
}
.hero h1 {
    font-size: clamp(34px, 6vw, 52px);
    margin: 14px 0 16px;
}
.highlight {
    background: linear-gradient(90deg, #10b981, #0ea5a4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-lead {
    max-width: 540px;
    margin: 0 auto 26px;
    font-size: 18px;
    color: var(--text-muted);
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.hero-note {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* Static illustration of a leaf */
.mock {
    position: relative;
    max-width: 460px;
    margin: 44px auto 8px;
    padding: 18px;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    transform: rotate(-1.2deg);
}
.mock-title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-strong);
}
.mock-meta {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--text-muted);
}
.mock-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 11px;
}
.mock-row + .mock-row {
    margin-top: 8px;
}
.mock-tile {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    border-radius: 9px;
}
.mock-tile.t1 { background: #6366f1; }
.mock-tile.t2 { background: #f59e0b; }
.mock-tile.t3 { background: #10b981; }
.mock-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.mock-line {
    height: 8px;
    border-radius: 4px;
    background: var(--border-strong);
}
.mock-line.short {
    width: 45%;
    background: var(--border);
}
.mock-line.w80 { width: 80%; }
.mock-line.w65 { width: 65%; }
.mock-line.w72 { width: 72%; }
.mock-badge {
    position: absolute;
    right: -14px;
    top: -14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    background: var(--accent-strong);
    border-radius: 999px;
    box-shadow: var(--shadow-button);
    transform: rotate(3deg);
}

.section {
    margin-top: 56px;
}
.section-title {
    margin: 0 0 18px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--text-strong);
    text-align: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.feature {
    padding: 18px;
}
.feature h3 {
    margin: 12px 0 6px;
    font-size: 16px;
    color: var(--text-strong);
}
.feature p {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}
.feature-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--accent-text);
    background: var(--accent-soft);
    border-radius: 11px;
    font-weight: 700;
}

.paste-card {
    padding: 20px;
}
.paste-card h2 {
    margin: 0 0 4px;
    font-size: 17px;
    color: var(--text-strong);
}
.paste-card p {
    margin: 0 0 14px;
    font-size: 14px;
    color: var(--text-muted);
}
.paste-form {
    display: flex;
    gap: 8px;
}
.paste-form .search {
    padding-left: 14px;
}

/* ---------- Content pages ---------- */

.prose {
    padding: 32px;
}
.prose h1 {
    font-size: 32px;
    margin-bottom: 8px;
}
.prose .lead {
    margin: 0 0 8px;
    color: var(--text-muted);
}
.prose h2 {
    margin: 32px 0 8px;
    font-size: 19px;
    letter-spacing: -0.01em;
    color: var(--text-strong);
}
.prose p,
.prose li {
    font-size: 15.5px;
}
.prose li + li {
    margin-top: 6px;
}

/* ---------- Footer ---------- */

.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 20px 32px;
    font-size: 14px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}
.site-footer p {
    margin: 0;
}
.footer-links {
    display: flex;
    gap: 18px;
}
.footer-links a {
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
}
.footer-links a:hover {
    color: var(--accent-text);
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
    .topbar {
        padding: 12px 16px;
    }
    .page {
        padding: 8px 16px 32px;
    }
    h1 {
        font-size: 27px;
    }
    .toolbar .button {
        flex: 1 1 auto;
    }
    .toolbar .button.primary {
        flex-basis: 100%;
    }
    .link-card {
        padding: 12px;
        gap: 12px;
    }
    .favicon-tile {
        width: 36px;
        height: 36px;
    }
    .link-arrow {
        display: none;
    }
    .grid-3 {
        grid-template-columns: 1fr;
    }
    .mock {
        transform: none;
    }
    .mock-badge {
        right: 8px;
    }
    .paste-form {
        flex-direction: column;
    }
    .prose {
        padding: 20px;
    }
    .site-footer {
        flex-direction: column-reverse;
        padding: 20px 16px 28px;
    }
}
