/* ==========================================================================
   AppAndTools.com — Design System
   A modern, responsive stylesheet for the Apps & Tools site.
   Works on mobile and desktop. Light + dark (prefers-color-scheme).
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
    --c-bg:          #f7f8fb;
    --c-surface:     #ffffff;
    --c-surface-2:   #f1f3f9;
    --c-border:      #e6e8f0;
    --c-text:        #0f172a;
    --c-text-muted:  #5b6478;
    --c-text-soft:   #8a93a6;

    /* Brand */
    --c-primary:     #6366f1;
    --c-primary-700: #4f46e5;
    --c-violet:      #8b5cf6;

    /* Category accents */
    --c-apps:        #6366f1;   /* indigo  */
    --c-apps-2:      #8b5cf6;   /* violet  */
    --c-tools:       #0ea5b7;   /* teal    */
    --c-tools-2:     #06b6d4;   /* cyan    */

    --grad-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --grad-apps:  linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --grad-tools: linear-gradient(135deg, #0ea5b7 0%, #06b6d4 100%);

    --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
    --shadow-md: 0 4px 14px rgba(15,23,42,.08);
    --shadow-lg: 0 18px 40px -12px rgba(15,23,42,.22);

    --radius:    14px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --maxw: 1180px;
    --header-h: 66px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --c-bg:         #0b0f1a;
        --c-surface:    #131826;
        --c-surface-2:  #1b2233;
        --c-border:     #262e42;
        --c-text:       #eef1f8;
        --c-text-muted: #a8b1c6;
        --c-text-soft:  #79839b;
        --shadow-lg: 0 18px 40px -12px rgba(0,0,0,.6);
    }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
header {
    position: sticky; top: 0; z-index: 50;
    height: var(--header-h);
    background: color-mix(in srgb, var(--c-surface) 82%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--c-border);
}
.header-content {
    max-width: var(--maxw); margin: 0 auto; padding: 0 20px; height: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.16rem; letter-spacing: -.03em; }
.logo .logo-mark {
    width: 34px; height: 34px; border-radius: 10px; flex: none;
    background: var(--grad-brand); color: #fff;
    display: grid; place-items: center; font-size: 1rem;
    box-shadow: var(--shadow-sm);
}
.logo b { color: var(--c-primary); }
@media (prefers-color-scheme: dark){ .logo b { color: #a5b4fc; } }

nav ul { display: flex; align-items: center; gap: 6px; }
nav a {
    display: block; padding: 9px 14px; border-radius: var(--radius-pill);
    color: var(--c-text-muted); font-weight: 600; font-size: .94rem;
    transition: background .18s, color .18s;
}
nav a:hover { background: var(--c-surface-2); color: var(--c-text); }
nav a.active { color: var(--c-primary); background: color-mix(in srgb, var(--c-primary) 12%, transparent); }

.nav-toggle {
    display: none; border: 0; background: var(--c-surface-2); color: var(--c-text);
    width: 42px; height: 42px; border-radius: 12px; font-size: 1.2rem; cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 12px 22px; border-radius: var(--radius-pill);
    font-weight: 700; font-size: .96rem; cursor: pointer; border: 1px solid transparent;
    transition: transform .15s ease, box-shadow .2s ease, background .2s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.btn-ghost { background: var(--c-surface); color: var(--c-text); border-color: var(--c-border); }
.btn-ghost:hover { background: var(--c-surface-2); }
.btn-lg { padding: 14px 28px; font-size: 1.02rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 72px; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(60% 90% at 15% 0%, rgba(99,102,241,.16), transparent 60%),
        radial-gradient(50% 80% at 90% 10%, rgba(6,182,212,.16), transparent 60%);
}
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: var(--radius-pill);
    background: var(--c-surface); border: 1px solid var(--c-border);
    color: var(--c-text-muted); font-weight: 600; font-size: .82rem; margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); max-width: 760px; }
.hero h1 .grad { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--c-text-muted); max-width: 600px; margin-top: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 38px; margin-top: 52px; }
.hero-stats .stat b { display: block; font-size: 2rem; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-stats .stat span { color: var(--c-text-soft); font-size: .9rem; font-weight: 600; }

/* page hero (sub pages) */
.page-hero { padding: 56px 0 28px; position: relative; }
.page-hero .breadcrumb { font-size: .86rem; color: var(--c-text-soft); margin-bottom: 14px; font-weight: 600; }
.page-hero .breadcrumb a:hover { color: var(--c-primary); }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); display: flex; align-items: center; gap: 14px; }
.page-hero p { color: var(--c-text-muted); max-width: 620px; margin-top: 12px; font-size: 1.05rem; }
.page-hero .hero-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 1.4rem; flex: none; }
.hero-icon.apps { background: var(--grad-apps); }
.hero-icon.tools { background: var(--grad-tools); }

/* ---------- Sections ---------- */
section.block { padding: 46px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.section-head p { color: var(--c-text-muted); margin-top: 6px; }
.section-head a.see-all { color: var(--c-primary); font-weight: 700; font-size: .92rem; display: inline-flex; gap: 6px; align-items: center; }
.section-head a.see-all:hover { gap: 10px; }

/* ---------- Split category cards (home) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.cat-panel {
    position: relative; overflow: hidden; border-radius: var(--radius-lg);
    padding: 34px; color: #fff; min-height: 240px;
    display: flex; flex-direction: column; justify-content: space-between;
    box-shadow: var(--shadow-md); transition: transform .2s, box-shadow .2s;
}
.cat-panel:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-panel.apps  { background: var(--grad-apps); }
.cat-panel.tools { background: var(--grad-tools); }
.cat-panel .cat-ic { font-size: 1.8rem; width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.18); display: grid; place-items: center; backdrop-filter: blur(4px); }
.cat-panel h3 { font-size: 1.7rem; margin-top: 18px; }
.cat-panel p { color: rgba(255,255,255,.86); margin-top: 8px; max-width: 90%; }
.cat-panel .cat-go { margin-top: 20px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.cat-panel .cat-go i { transition: transform .2s; }
.cat-panel:hover .cat-go i { transform: translateX(5px); }
.cat-panel .cat-bg { position: absolute; right: -30px; bottom: -40px; font-size: 12rem; opacity: .12; transform: rotate(-12deg); }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 20px; }
.grid.apps-grid  { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid.tools-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

.card {
    background: var(--c-surface); border: 1px solid var(--c-border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    transition: transform .18s, box-shadow .2s, border-color .2s;
    overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c-primary) 35%, var(--c-border)); }

/* App card */
.app-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; height: 100%; }
.app-card .app-top { display: flex; gap: 14px; align-items: center; }
.app-icon {
    width: 60px; height: 60px; border-radius: 16px; flex: none;
    display: grid; place-items: center; color: #fff; font-size: 1.6rem;
    box-shadow: var(--shadow-sm);
}
img.app-icon { object-fit: cover; background: var(--c-surface-2); }
img.detail-icon { object-fit: cover; background: var(--c-surface-2); }
.app-card h3 { font-size: 1.12rem; }
.app-card .app-cat { color: var(--c-text-soft); font-size: .82rem; font-weight: 600; }
.app-card p.desc { color: var(--c-text-muted); font-size: .92rem; flex: 1; }
.app-card .app-foot { display: flex; align-items: center; justify-content: space-between; }
.platforms { display: flex; gap: 7px; }
.platform {
    width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
    background: var(--c-surface-2); color: var(--c-text-muted); font-size: .9rem;
}
.rating { font-size: .86rem; color: var(--c-text-muted); font-weight: 600; }
.rating i { color: #f59e0b; }

/* Tool card */
.tool-card { padding: 22px; display: flex; flex-direction: column; gap: 12px; height: 100%; }
.tool-ic {
    width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
    color: #fff; font-size: 1.25rem; background: var(--grad-tools);
}
.tool-card h3 { font-size: 1.08rem; }
.tool-card p { color: var(--c-text-muted); font-size: .92rem; flex: 1; }
.tool-card .tool-go { color: var(--c-tools); font-weight: 700; font-size: .9rem; display: inline-flex; gap: 6px; align-items: center; }
.tool-card:hover .tool-go { gap: 10px; }

/* chips / filters */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip {
    padding: 8px 16px; border-radius: var(--radius-pill); font-weight: 600; font-size: .88rem;
    background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-text-muted); cursor: pointer;
    transition: all .15s;
}
.chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.chip.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--radius-pill); font-size: .78rem; font-weight: 700; }
.badge.android { background: rgba(61,220,132,.14); color: #16a34a; }
.badge.ios     { background: rgba(100,116,139,.16); color: var(--c-text-muted); }
.badge.lang    { background: color-mix(in srgb, var(--c-primary) 12%, transparent); color: var(--c-primary); }

/* ==========================================================================
   App detail page
   ========================================================================== */
.detail-hero { padding: 40px 0 18px; }
.detail-head { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.detail-icon { width: 110px; height: 110px; border-radius: 28px; display: grid; place-items: center; color: #fff; font-size: 3rem; flex: none; box-shadow: var(--shadow-lg); }
.detail-meta { flex: 1; min-width: 260px; }
.detail-meta h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.detail-meta .tagline { color: var(--c-text-muted); font-size: 1.08rem; margin-top: 8px; }
.detail-facts { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 18px; }
.detail-facts .fact b { display: block; font-size: 1.05rem; }
.detail-facts .fact span { color: var(--c-text-soft); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.store-btn {
    display: inline-flex; align-items: center; gap: 12px; padding: 11px 20px;
    border-radius: 14px; background: #0f172a; color: #fff; transition: transform .15s, box-shadow .2s;
    box-shadow: var(--shadow-sm);
}
.store-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.store-btn i { font-size: 1.7rem; }
.store-btn small { display: block; font-size: .68rem; opacity: .8; line-height: 1; }
.store-btn b { display: block; font-size: 1rem; line-height: 1.2; }
@media (prefers-color-scheme: dark){ .store-btn { background: #fff; color: #0f172a; } }

.layout { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; padding: 30px 0 60px; }
.prose h2 { font-size: 1.4rem; margin: 28px 0 12px; }
.prose p { color: var(--c-text-muted); margin-bottom: 14px; }
/* Markdown bullet lists (Lib\BodyParser custom markup) */
.prose ul { list-style: none; padding-left: 2px; margin: 0 0 18px; }
.prose ul li { display: flex; gap: 12px; align-items: flex-start; color: var(--c-text-muted); margin-bottom: 10px; }
.prose ul li > div:first-child { flex: none; position: relative; width: 8px; align-self: stretch; }
.prose ul li > div:first-child .bullet.icon { position: absolute; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--c-primary); }
.prose ul li > div:first-child .bullet.line { display: none; }
.prose ul li > div:last-child { flex: 1; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px; padding: 14px; }
.feature-list i { color: var(--c-primary); margin-top: 3px; }
.feature-list b { display: block; font-size: .96rem; }
.feature-list span { color: var(--c-text-muted); font-size: .86rem; }

/* screenshots gallery */
.shots { display: flex; gap: 16px; overflow-x: auto; padding: 10px 2px 20px; scroll-snap-type: x mandatory; scroll-padding: 2px; }
.shots::-webkit-scrollbar { height: 8px; }
.shots::-webkit-scrollbar-track { background: transparent; }
.shots::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: var(--radius-pill); }
.shots::-webkit-scrollbar-thumb:hover { background: var(--c-text-soft); }
.shots .shot { flex: none; width: 200px; aspect-ratio: 9/19; border-radius: 22px; scroll-snap-align: start;
    background: var(--grad-apps); box-shadow: var(--shadow-md); display: grid; place-items: center; color: rgba(255,255,255,.7); font-size: 2rem; border: 5px solid var(--c-surface); }
.shots img.shot-img { flex: none; height: 400px; width: auto; border-radius: 18px; scroll-snap-align: start;
    box-shadow: var(--shadow-md); border: 1px solid var(--c-border); background: var(--c-surface-2);
    cursor: zoom-in; transition: transform .2s ease, box-shadow .2s ease; }
.shots img.shot-img:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
@media (max-width: 760px) { .shots img.shot-img { height: 320px; } }

/* screenshot lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center;
    background: rgba(8,12,22,.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 16px; box-shadow: var(--shadow-lg); }
.lightbox button { position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 0; cursor: pointer;
    width: 48px; height: 48px; border-radius: 50%; font-size: 1.3rem; display: grid; place-items: center; transition: background .15s; }
.lightbox button:hover { background: rgba(255,255,255,.28); }
.lightbox .lb-close { top: 20px; right: 20px; }
.lightbox .lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,.85); font-size: .9rem; font-weight: 600; letter-spacing: .03em; }
@media (max-width: 600px) { .lightbox button { width: 42px; height: 42px; } .lightbox .lb-prev { left: 10px; } .lightbox .lb-next { right: 10px; } }

/* sidebar */
.side-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.side-card h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--c-text-soft); margin-bottom: 14px; }
.side-card .info-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--c-border); font-size: .92rem; }
.side-card .info-row:last-child { border-bottom: 0; }
.side-card .info-row span { color: var(--c-text-muted); }
.variant-list li { margin-bottom: 9px; }
.variant-list a, .variant-list .lang-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; background: var(--c-surface-2); font-weight: 600; font-size: .92rem; transition: background .15s; }
.variant-list a:hover { background: color-mix(in srgb, var(--c-primary) 12%, var(--c-surface-2)); }
.variant-list .flag { font-size: 1.1rem; }

/* ==========================================================================
   Tool detail page (interactive)
   ========================================================================== */
.tool-stage { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; }
.tool-stage .stage-body { padding: 26px; }
.wc-area {
    width: 100%; min-height: 220px; resize: vertical; border: 1px solid var(--c-border); border-radius: 14px;
    background: var(--c-bg); color: var(--c-text); padding: 16px 18px; font-size: 1.02rem; font-family: var(--font); line-height: 1.7;
}
.wc-area:focus { outline: 2px solid var(--c-primary); border-color: transparent; }
.wc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.wc-stat { background: var(--c-surface-2); border-radius: 14px; padding: 18px; text-align: center; }
.wc-stat b { display: block; font-size: 1.9rem; background: var(--grad-tools); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.wc-stat span { color: var(--c-text-soft); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.wc-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Water Reminder widget */
.wr-group { margin-bottom: 16px; }
.wr-group > label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 7px; }
.wr-select, .wr-input { width: 100%; padding: 11px 14px; border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-bg); color: var(--c-text); font-family: var(--font); font-size: .98rem; }
.wr-select:focus, .wr-input:focus { outline: 2px solid var(--c-primary); border-color: transparent; }
.wr-check { display: flex; align-items: center; gap: 10px; }
.wr-check input { width: 18px; height: 18px; accent-color: var(--c-primary); flex: none; }
.wr-check > label { margin: 0; font-weight: 500; font-size: .94rem; }
.wr-status { padding: 14px 16px; border-radius: 12px; font-weight: 600; font-size: .92rem; margin: 18px 0; }
.wr-status.warning { background: rgba(245,158,11,.12); color: #b45309; }
.wr-status.success { background: rgba(34,197,94,.14); color: #16a34a; }
.wr-status.error   { background: rgba(239,68,68,.12); color: #dc2626; }
.wr-actions { display: flex; gap: 12px; }
.wr-actions .btn { flex: 1; justify-content: center; }
.wr-next { text-align: center; font-weight: 700; color: var(--c-tools); margin-top: 16px; font-size: 1.05rem; }
.wr-settings { margin-top: 16px; padding: 16px 18px; background: var(--c-surface-2); border-radius: 12px; font-size: .9rem; }
.wr-settings strong { display: block; margin-bottom: 8px; }
.wr-settings #settingsDisplay div { padding: 3px 0; color: var(--c-text-muted); }
.wr-hint { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--c-tools) 10%, transparent); color: var(--c-text-muted); font-size: .88rem; line-height: 1.5; }
.wr-hint i { color: var(--c-tools); }
.wr-hint strong { color: var(--c-text); }

/* QR Code Generator widget */
.qr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qr-preview { display: flex; justify-content: center; align-items: center; padding: 26px; margin: 18px 0; background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 16px; min-height: 180px; overflow: auto; }
.qr-preview canvas, .qr-preview img { display: block; max-width: 100%; height: auto; border-radius: 8px; box-shadow: var(--shadow-sm); }
.qr-color-field { display: flex; gap: 8px; align-items: center; }
.qr-swatch { width: 48px; height: 44px; flex: none; padding: 4px; border: 1px solid var(--c-border); border-radius: 10px; background: var(--c-bg); cursor: pointer; }
.qr-hex { flex: 1; min-width: 0; text-transform: uppercase; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.qr-rgb { display: block; margin-top: 6px; color: var(--c-text-soft); font-size: .8rem; }
.qr-dl { align-items: end; }
.qr-dl .wr-group { margin-bottom: 0; }
.qr-dl .btn { justify-content: center; height: 44px; }
.qr-warn { margin: 0 0 4px; padding: 11px 14px; border-radius: 12px; background: rgba(245,158,11,.12); color: #b45309; font-size: .88rem; line-height: 1.5; }
.qr-preview-label { margin: 6px 0 0; font-size: .9rem; color: var(--c-text-muted); word-break: break-all; }
.qr-preview-label strong { color: var(--c-text); font-weight: 600; }
/* Make the main QR text field read clearly as an input */
.qr-input { background: var(--c-surface-2); border: 1.5px solid var(--c-border); font-size: 1rem; }
.qr-input::placeholder { color: var(--c-text-soft); }
.qr-input:hover { border-color: var(--c-text-soft); }
.qr-input:focus { background: var(--c-surface); outline: 2px solid var(--c-primary); outline-offset: 0; border-color: transparent; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-primary) 16%, transparent); }
@media (max-width: 600px) { .qr-row { grid-template-columns: 1fr; } }

/* ---------- Legal / document pages ---------- */
.doc { max-width: 820px; margin: 0 auto; padding: 6px 0 60px; }
.doc-meta { color: var(--c-text-soft); font-size: .9rem; margin: 0 0 26px; padding-bottom: 18px; border-bottom: 1px solid var(--c-border); }
.doc .prose h2 { font-size: 1.3rem; margin-top: 30px; }
.doc .prose p { color: var(--c-text); }
.doc .prose a { color: var(--c-primary); font-weight: 600; }
.doc .prose a:hover { text-decoration: underline; }
.code-inline { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--c-surface-2); padding: 2px 6px; border-radius: 6px; font-size: .88em; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--c-border); background: var(--c-surface); margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding: 52px 0 34px; }
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { color: var(--c-text-muted); font-size: .92rem; max-width: 280px; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--c-text-soft); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--c-text-muted); padding: 5px 0; font-size: .93rem; transition: color .15s; }
.footer-col a:hover { color: var(--c-primary); }
.footer-bottom { border-top: 1px solid var(--c-border); padding: 20px 0; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--c-text-soft); font-size: .88rem; }
.footer-bottom .socials { display: flex; gap: 10px; }
.footer-bottom .socials a { width: 36px; height: 36px; border-radius: 10px; background: var(--c-surface-2); display: grid; place-items: center; color: var(--c-text-muted); transition: all .15s; }
.footer-bottom .socials a:hover { background: var(--c-primary); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
    .layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .nav-toggle { display: grid; }
    nav {
        position: fixed; inset: var(--header-h) 0 auto 0;
        background: var(--c-surface); border-bottom: 1px solid var(--c-border);
        transform: translateY(-130%); transition: transform .28s ease; box-shadow: var(--shadow-lg);
    }
    nav.open { transform: translateY(0); }
    nav ul { flex-direction: column; align-items: stretch; gap: 2px; padding: 14px; }
    nav a { padding: 14px 16px; border-radius: 12px; }
    .split { grid-template-columns: 1fr; }
    .feature-list { grid-template-columns: 1fr; }
    .wc-stats { grid-template-columns: 1fr 1fr; }
    .hero { padding: 56px 0 48px; }
    .hero-stats { gap: 26px; }
    /* full-width store buttons, stacked, on mobile */
    .store-buttons { flex-direction: column; gap: 10px; }
    .store-buttons .store-btn { width: 100%; justify-content: center; }
}
@media (max-width: 460px) {
    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
    .detail-icon { width: 84px; height: 84px; border-radius: 22px; font-size: 2.2rem; }
    .hero-actions .btn { flex: 1; justify-content: center; }
}
