/*
 * Annotyze.com — Stylesheet
 *
 * Mirrors the Annotyze iOS app's visual system (SRS v3.8–v3.19):
 *   - Monochrome. The accent is the theme's text colour (white in Dark,
 *     black in Light); red is used only for destructive actions.
 *   - Liquid Glass for floating chrome (navbar, panels, dock, tab bar):
 *     frosted, smooth-edged, no drawn rim — the glass's own edge
 *     highlight defines it.
 *   - Rimmed glass (B&W double hairline) only for surfaces that sit on a
 *     photo: the Peek callout and the data badges.
 *   - Plain round icon buttons; one solid primary per state; outline
 *     icons mirroring the app's SF Symbols.
 *   - Dark by default (as the app), with a Light theme toggle.
 */

/* ============================================================
   Tokens
   ============================================================ */

:root,
[data-theme="dark"] {
    color-scheme: dark;

    --bg: #000000;
    --bg-raised: #0b0b0d;
    --bg-card: rgba(255, 255, 255, 0.035);
    --text: #ffffff;
    --text-2: rgba(235, 235, 245, 0.64);
    /* iOS tertiary is 0.30 — raised so small site text meets WCAG AA (4.5:1) */
    --text-3: rgba(235, 235, 245, 0.50);
    --hairline: rgba(255, 255, 255, 0.10);
    --hairline-strong: rgba(255, 255, 255, 0.18);

    --accent: #ffffff;
    --on-accent: #000000;
    --soft: rgba(255, 255, 255, 0.10);
    --soft-hover: rgba(255, 255, 255, 0.16);
    --danger: #ff453a;

    /* Liquid Glass */
    --glass-bg: rgba(44, 44, 50, 0.42);
    --glass-bg-dense: rgb(30, 30, 34);
    --glass-sheen: rgba(255, 255, 255, 0.10);
    --glass-highlight: rgba(255, 255, 255, 0.26);
    --glass-edge: rgba(255, 255, 255, 0.10);
    --glass-shade: rgba(0, 0, 0, 0.35);
    --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);

    --glow: radial-gradient(60% 60% at 50% 0%, rgba(255, 255, 255, 0.09), transparent 70%);
}

[data-theme="light"] {
    color-scheme: light;

    --bg: #ffffff;
    --bg-raised: #f5f5f7;
    --bg-card: rgba(0, 0, 0, 0.025);
    --text: #000000;
    /* Raised from iOS label alphas so text meets WCAG AA on white */
    --text-2: rgba(60, 60, 67, 0.82);
    --text-3: rgba(60, 60, 67, 0.72);
    --hairline: rgba(0, 0, 0, 0.08);
    --hairline-strong: rgba(0, 0, 0, 0.14);

    --accent: #000000;
    --on-accent: #ffffff;
    --soft: rgba(0, 0, 0, 0.06);
    --soft-hover: rgba(0, 0, 0, 0.10);
    --danger: #ff3b30;

    --glass-bg: rgba(255, 255, 255, 0.58);
    --glass-bg-dense: rgb(250, 250, 252);
    --glass-sheen: rgba(255, 255, 255, 0.55);
    --glass-highlight: rgba(255, 255, 255, 0.95);
    --glass-edge: rgba(0, 0, 0, 0.06);
    --glass-shade: rgba(0, 0, 0, 0.06);
    --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);

    --glow: radial-gradient(60% 60% at 50% 0%, rgba(0, 0, 0, 0.05), transparent 70%);
}

:root {
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;

    --container: 1180px;
    --narrow: 760px;
    --gutter: 24px;
    --nav-h: 64px;

    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-xl: 32px;

    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --fast: 0.15s var(--ease);
    --normal: 0.35s var(--ease);
}

/* ============================================================
   Base
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 32px);
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

p a,
.prose a,
li a {
    text-decoration: underline;
    text-decoration-color: var(--hairline-strong);
    text-underline-offset: 3px;
    transition: text-decoration-color var(--fast);
}

p a:hover,
.prose a:hover,
li a:hover {
    text-decoration-color: currentColor;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.08;
}

p {
    margin: 0;
}

button {
    font: inherit;
    color: inherit;
}

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

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    transition: top var(--fast);
}

.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;
}

/* Icons (SVG sprite, outline style like the app's SF Symbols) */
.i {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mark {
    flex: none;
    color: var(--text);
}

/* ============================================================
   Layout
   ============================================================ */

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

.narrow {
    max-width: var(--narrow);
}

.section {
    padding: 112px 0;
    position: relative;
}

.section-tight {
    padding: 72px 0;
}

.section + .section {
    border-top: 1px solid var(--hairline);
}

.main {
    padding-top: var(--nav-h);
    min-height: 70vh;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-2);
    margin-bottom: 18px;
}

.eyebrow .i {
    width: 15px;
    height: 15px;
}

.display {
    font-size: clamp(44px, 7vw, 84px);
    letter-spacing: -0.035em;
    line-height: 1.02;
}

.h1 {
    font-size: clamp(36px, 5vw, 60px);
    letter-spacing: -0.03em;
}

.h2 {
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -0.028em;
}

.h3 {
    font-size: 22px;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.lead {
    font-size: clamp(18px, 2vw, 21px);
    line-height: 1.5;
    color: var(--text-2);
    max-width: 640px;
}

.muted {
    color: var(--text-2);
}

.faint {
    color: var(--text-3);
}

.center {
    text-align: center;
}

.center .lead {
    margin-left: auto;
    margin-right: auto;
}

.section-head {
    margin-bottom: 56px;
}

.section-head .lead {
    margin-top: 18px;
}

.stack-sm > * + * {
    margin-top: 10px;
}

.stack > * + * {
    margin-top: 18px;
}

/* ============================================================
   Liquid Glass & rimmed glass
   ============================================================ */

.glass {
    background:
        linear-gradient(180deg, var(--glass-sheen), transparent 46%),
        var(--glass-bg);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    box-shadow:
        inset 0 1px 0 0 var(--glass-highlight),
        inset 0 0 0 0.5px var(--glass-edge),
        inset 0 -1px 1px 0 var(--glass-shade),
        var(--glass-shadow);
}

/* Always-dark Liquid Glass (the app's workspace dock is pinned dark) */
.glass-dark {
    color: #ffffff;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), transparent 46%),
        rgba(30, 30, 34, 0.48);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.26),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.10),
        inset 0 -1px 1px 0 rgba(0, 0, 0, 0.35),
        0 10px 30px rgba(0, 0, 0, 0.45);
}

/* On-photo glass: B&W double hairline rim (Peek callout, data badges) */
.rim-glass {
    color: #ffffff;
    background: rgba(28, 28, 30, 0.55);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    box-shadow:
        0 0 0 1.5px #000000,
        inset 0 0 0 1px #ffffff,
        0 3px 8px rgba(0, 0, 0, 0.35);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
    --h: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: var(--h);
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: transform var(--fast), background var(--fast), opacity var(--fast);
}

.btn:active {
    transform: scale(0.96);
}

.btn-lg {
    --h: 54px;
    padding: 0 28px;
    font-size: 17px;
}

.btn-sm {
    --h: 36px;
    padding: 0 16px;
    font-size: 14px;
}

/* The one solid primary per state */
.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
}

.btn-primary:hover {
    opacity: 0.88;
}

.btn-glass {
    color: var(--text);
}

.btn-glass:hover {
    background:
        linear-gradient(180deg, var(--glass-sheen), transparent 46%),
        var(--soft-hover);
}

.btn-soft {
    background: var(--soft);
    color: var(--text);
}

.btn-soft:hover {
    background: var(--soft-hover);
}

.btn-disabled,
.btn[aria-disabled="true"] {
    cursor: default;
    opacity: 0.7;
}

.btn-disabled:active,
.btn[aria-disabled="true"]:active {
    transform: none;
}

/* Plain round icon button (the app's dock / header style) */
.icon-btn {
    width: 40px;
    height: 40px;
    flex: none;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background var(--fast), transform var(--fast), opacity var(--fast);
}

.icon-btn .i {
    width: 20px;
    height: 20px;
}

.icon-btn:hover {
    background: var(--soft);
}

.icon-btn:active {
    transform: scale(0.92);
}

.icon-btn.is-primary {
    background: var(--accent);
    color: var(--on-accent);
}

.icon-btn.is-danger {
    color: var(--danger);
}

/* A glass group of icon buttons (merges like the system toolbar) */
.glass-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
}

/* ============================================================
   Navbar — floating Liquid Glass capsule
   ============================================================ */

.nav {
    position: fixed;
    top: 12px;
    left: 0;
    right: 0;
    z-index: 100;
    pointer-events: none;
}

.nav-inner {
    pointer-events: auto;
    max-width: calc(var(--container) - 2 * var(--gutter) + 16px);
    margin: 0 auto;
    width: calc(100% - 24px);
    height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 0 18px;
    border-radius: 999px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand sup {
    font-size: 10px;
    font-weight: 600;
    margin-left: 1px;
    color: var(--text-2);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-2);
    transition: color var(--fast), background var(--fast);
}

.nav-link:hover {
    color: var(--text);
    background: var(--soft);
}

/* Selected = solid, as everywhere in the app */
.nav-link.is-active {
    color: var(--on-accent);
    background: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-menu-btn {
    display: none;
}

.nav-sheet {
    display: none;
}

@media (max-width: 980px) {
    .nav-links,
    .nav-cta {
        display: none;
    }

    .nav-menu-btn {
        display: inline-grid;
    }

    .nav-inner {
        justify-content: space-between;
    }

    .nav-sheet {
        pointer-events: auto;
        display: block;
        position: absolute;
        top: 64px;
        left: 12px;
        right: 12px;
        padding: 10px;
        border-radius: var(--r-lg);
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
        visibility: hidden;
        transition: opacity var(--fast), transform var(--fast), visibility var(--fast);
        /* The sheet sits inside the navbar's own backdrop blur, so its blur
           can't reach the page; a dense fill keeps the menu legible */
        background:
            linear-gradient(180deg, var(--glass-sheen), transparent 46%),
            var(--glass-bg-dense);
    }

    .nav-sheet.is-open {
        opacity: 1;
        transform: none;
        visibility: visible;
    }

    .nav-sheet a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 13px 14px;
        border-radius: var(--r-md);
        font-weight: 600;
    }

    .nav-sheet a:hover {
        background: var(--soft);
    }

    .nav-sheet a.is-active {
        background: var(--accent);
        color: var(--on-accent);
    }

    .nav-sheet .btn {
        width: 100%;
        margin-top: 8px;
    }
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
    position: relative;
    padding: 72px 0 96px;
    /* clip, not hidden: hidden still allows programmatic scrolling, so
       focusing the demo's callout used to scroll the hero sideways */
    overflow: hidden;
    overflow: clip;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -20% 0 auto;
    height: 720px;
    background: var(--glow);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
}

.hero .lead {
    margin-top: 24px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 36px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 28px;
    font-size: 14px;
    color: var(--text-3);
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.hero-meta .i {
    width: 16px;
    height: 16px;
}

.hero-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

@media (min-width: 921px) {
    .hero-demo .phone {
        --w: 340px;
    }
}

@media (max-width: 920px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero-copy {
        text-align: center;
    }

    .hero-copy .lead {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-copy .hero-actions,
    .hero-copy .hero-meta {
        justify-content: center;
    }
}

/* ============================================================
   Guided steps (beside the live demo)
   ============================================================ */

.guide {
    width: 100%;
    max-width: 380px;
    padding: 6px;
    border-radius: var(--r-lg);
}

.guide-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: var(--r-md);
    font-size: 14.5px;
    color: var(--text-3);
    transition: color var(--fast), background var(--fast);
}

.guide-step .dot {
    width: 24px;
    height: 24px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    background: var(--soft);
    color: var(--text-2);
}

.guide-step .dot .i {
    width: 14px;
    height: 14px;
    stroke-width: 2.4;
}

.guide-step.is-current {
    color: var(--text);
    background: var(--soft);
}

.guide-step.is-current .dot {
    background: var(--accent);
    color: var(--on-accent);
}

.guide-step.is-done {
    color: var(--text-2);
}

.guide-step.is-done .dot {
    background: transparent;
    color: var(--text);
    box-shadow: inset 0 0 0 1.5px var(--hairline-strong);
}

.guide-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px 6px;
    font-size: 13px;
    color: var(--text-3);
}

.guide-foot button {
    border: 0;
    background: none;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px;
}

.guide-foot button:hover {
    color: var(--text);
}

/* ============================================================
   Phone + app replica (the live demo)
   ============================================================ */

.phone {
    --w: 300px;
    width: var(--w);
    aspect-ratio: 9 / 19.5;
    flex: none;
    padding: calc(var(--w) * 0.034);
    border-radius: calc(var(--w) * 0.155);
    background: #050506;
    box-shadow:
        0 0 0 1.5px rgba(255, 255, 255, 0.16),
        0 0 0 6px rgba(120, 120, 128, 0.12),
        0 40px 90px -20px rgba(0, 0, 0, 0.75);
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

[data-theme="light"] .phone {
    box-shadow:
        0 0 0 1.5px rgba(0, 0, 0, 0.55),
        0 0 0 6px rgba(0, 0, 0, 0.06),
        0 40px 90px -24px rgba(0, 0, 0, 0.35);
}

.phone-sm {
    --w: 236px;
}

.phone-xs {
    --w: 200px;
}

@media (max-width: 420px) {
    .phone {
        --w: min(300px, 82vw);
    }
}

.screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: calc(var(--w) * 0.125);
    overflow: hidden;
    overflow: clip;
    background: #000;
    color: #fff;
    font-size: calc(var(--w) * 0.044);
    line-height: 1.3;
    container-type: inline-size;
}

.screen.is-light-ui {
    background: #fff;
    color: #000;
}

.island {
    position: absolute;
    top: 2.2%;
    left: 50%;
    width: 32%;
    height: 3.6%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #000;
    z-index: 30;
}

.statusbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 7.2%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1% 9% 0;
    font-size: 0.9em;
    font-weight: 600;
    z-index: 25;
}

.statusbar .sb-icons {
    display: flex;
    gap: 4px;
    align-items: center;
}

.statusbar .sb-icons span {
    display: block;
    width: 1.2em;
    height: 0.62em;
    border-radius: 3px;
    background: currentColor;
    opacity: 0.9;
}

.statusbar .sb-icons span:first-child {
    width: 0.95em;
    border-radius: 2px;
    opacity: 0.6;
}

/* Workspace navigation bar */
.ws-nav {
    position: absolute;
    top: 7.2%;
    left: 0;
    right: 0;
    height: 8.4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4%;
    z-index: 20;
    background: #000;
}

.ws-title {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-weight: 600;
    font-size: 0.98em;
    pointer-events: none;
}

.ws-btn {
    width: 2.6em;
    height: 2.6em;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.ws-btn .i {
    width: 1.25em;
    height: 1.25em;
}

.ws-group {
    display: flex;
    gap: 0;
    padding: 0.15em;
    border-radius: 999px;
    position: relative;
    z-index: 1;
}

.ws-group .ws-btn {
    width: 2.3em;
    height: 2.3em;
}

/* Canvas: the photo + overlays, fitted under the nav bar */
.canvas {
    position: absolute;
    top: 15.6%;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    overflow: hidden;
    overflow: clip;
    touch-action: none;
}

.canvas-fit {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    aspect-ratio: 4 / 5;
    width: 100%;
}

.canvas-fit > svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.overlay-html {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.demo-interactive .canvas-fit .hit {
    cursor: pointer;
}

.demo-interactive .canvas-fit .shape-hit {
    cursor: grab;
}

.demo-interactive .canvas-fit .shape-hit:active {
    cursor: grabbing;
}

.demo-interactive .canvas-fit .handle-hit {
    cursor: pointer;
}

/* Data badges (on-photo rimmed glass) */
.badge {
    position: absolute;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 0.18em;
    padding: 0.14em 0.42em;
    min-width: 2em;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.68em;
    font-weight: 700;
    white-space: nowrap;
    animation: fade-in 0.25s 0.2s both;
}

.badge .i {
    width: 0.95em;
    height: 0.95em;
    stroke-width: 2.2;
}

/* Peek callout: 200pt wide, centred on its layout rect (AnnoteCalloutView) */
.callout {
    position: absolute;
    width: 50.9%;
    translate: 0 -50%;
    padding: 0.55em 0.65em 0.5em;
    border-radius: 0.8em;
    pointer-events: auto;
    cursor: pointer;
    animation: pop-in 0.22s var(--ease) both;
}

/* Cluster Peek (app SRS v3.39): one bubble, a row per annote */
.callout.cl-bubble {
    padding: 0.2em 0;
    cursor: default;
}

.cl-row {
    display: flex;
    align-items: center;
    gap: 0.4em;
    width: 100%;
    min-height: 2.05em;
    padding: 0 0.65em;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.cl-row + .cl-row {
    border-top: 0.5px solid rgba(255, 255, 255, 0.18);
}

.cl-row > .i {
    flex: none;
    width: 0.85em;
    height: 0.85em;
}

.cl-row > .callout-chev {
    margin-left: auto;
    width: 0.75em;
    height: 0.75em;
    stroke-width: 2.6;
    opacity: 0.6;
}

.cl-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.76em;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cl-dot {
    flex: none;
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    background: currentColor;
}

/* Multi-select previews are display-only */
.callout.is-display {
    pointer-events: none;
    cursor: default;
}

/* PeekBubbleContent: entry row (icon · text · chevron), then counts */
.callout-entry {
    display: flex;
    align-items: flex-start;
    gap: 0.35em;
}

.callout-entry > .i {
    flex: none;
    width: 0.9em;
    height: 0.9em;
    margin-top: 0.12em;
}

.callout-entry > .callout-chev {
    width: 0.75em;
    height: 0.75em;
    margin-left: auto;
    margin-top: 0.2em;
    stroke-width: 2.6;
    opacity: 0.6;
}


.callout-text {
    flex: 1 1 auto;
    font-size: 0.78em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.callout-counts {
    display: flex;
    gap: 0.6em;
    margin-top: 0.35em;
    font-size: 0.7em;
    font-weight: 600;
    opacity: 0.8;
}

.callout-counts span {
    display: inline-flex;
    align-items: center;
    gap: 0.2em;
}

.callout-counts .i {
    width: 1em;
    height: 1em;
}


/* Workspace dock — Liquid Glass, pinned dark (as in the app) */
.dock {
    position: absolute;
    left: 3.4%;
    right: 3.4%;
    bottom: 2.6%;
    z-index: 15;
    padding: 0.6em;
    border-radius: 1.45em;
    min-height: 6.4em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.45em;
}

.dock-row {
    display: flex;
    align-items: center;
    gap: 0.3em;
}

.dock-row.is-between {
    justify-content: space-between;
}

.dock-row.is-center {
    justify-content: center;
}

.dock-tools {
    display: flex;
    justify-content: space-between;
    padding: 0 0.15em;
}

.d-btn {
    width: 2.25em;
    height: 2.25em;
    flex: none;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 1em;
    font-weight: 700;
    transition: background var(--fast), transform var(--fast);
}

.d-btn .i {
    width: 1.15em;
    height: 1.15em;
}

.d-btn.is-primary {
    background: #fff;
    color: #000;
}

.d-btn.is-danger {
    color: #ff453a;
}

.d-btn:active {
    transform: scale(0.9);
}

.d-btn .ad {
    font-size: 0.78em;
    letter-spacing: 0.02em;
}

.d-pill {
    height: 2.25em;
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0 0.85em;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    font-size: 0.86em;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.d-pill.is-primary {
    background: #fff;
    color: #000;
}

.d-pill .i {
    width: 1.1em;
    height: 1.1em;
    stroke-width: 2.2;
}

.d-chip {
    height: 1.9em;
    display: inline-flex;
    align-items: center;
    gap: 0.28em;
    padding: 0 0.7em;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    font-size: 0.82em;
    font-weight: 600;
    cursor: pointer;
}

.d-chip.is-empty {
    opacity: 0.55;
}

.d-chip .i {
    width: 1.05em;
    height: 1.05em;
}

.dock-caption {
    text-align: center;
    font-size: 0.66em;
    font-weight: 600;
    color: rgba(235, 235, 245, 0.6);
}

.dock-hint {
    text-align: center;
    font-size: 0.78em;
    color: rgba(235, 235, 245, 0.7);
}

.dock-spacer {
    flex: 1;
}

/* In-phone sheet (Add Data, data lists) */
.sheet-backdrop {
    position: absolute;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.25);
    animation: fade-in 0.2s both;
}

/* iOS 26 partial-height sheet: inset from the edges, glass, deep corners */
.sheet {
    position: absolute;
    left: calc(var(--w) * 0.022);
    right: calc(var(--w) * 0.022);
    bottom: calc(var(--w) * 0.022);
    z-index: 41;
    display: flex;
    flex-direction: column;
    padding: 0.5em 0.9em 1.1em;
    border-radius: calc(var(--w) * 0.12);
    /* Device: translucent glass tinted by the photo behind it */
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03) 40%),
        rgba(104, 104, 112, 0.46);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    backdrop-filter: blur(22px) saturate(150%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 0.5px rgba(255, 255, 255, 0.14), 0 -8px 30px rgba(0, 0, 0, 0.3);
    color: #fff;
    animation: sheet-up 0.3s var(--ease) both;
}

/* Add Data and Timeline open at the medium detent — about half the screen */
.sheet--add,
.sheet--timeline,
.sheet--list {
    height: 52%;
}

/* Copy Annotes opens full height (app SRS v3.32) */
.sheet--copy {
    top: calc(var(--w) * 0.13);
}

.copy-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6em;
}

.copy-msg,
.copy-foot {
    margin: 0;
    font-size: 0.74em;
    line-height: 1.35;
    color: rgba(235, 235, 245, 0.6);
}

.copy-srcs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45em;
}

/* The bordered (gray capsule) buttons of a SwiftUI .bordered style */
.copy-src {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35em;
    padding: 0.6em 0.3em;
    border-radius: 0.75em;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.72em;
    font-weight: 600;
    white-space: nowrap;
}

.copy-src .i {
    width: 1.15em;
    height: 1.15em;
    flex: none;
}

.copy-h {
    margin-top: 0.3em;
    font-size: 0.86em;
}

.copy-thumb {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.copy-preview {
    border-radius: 0.9em;
    overflow: hidden;
    background: #000;
}

.copy-preview > svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 13em;
    margin: 0 auto;
}

/* Form section header (uppercase, small) */
.copy-sec {
    margin: 0.3em 0 0;
    font-size: 0.66em;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(235, 235, 245, 0.6);
}

.segmented.is-two {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 0;
}

.sheet-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 0.1em;
}

.sheet-nav-back .i {
    width: 1.1em;
    height: 1.1em;
}

/* A header button: the clock opens the Timeline */
button.ws-btn {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

/* Nav bar: Cancel · title · Save (prominent in the app's white accent) */
.sheet-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.4em;
    margin-bottom: 0.75em;
}

.sheet-nav strong {
    font-size: 0.92em;
    white-space: nowrap;
}

.sheet-nav-btn {
    justify-self: start;
    height: 2.55em;
    padding: 0 1em;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 0.5px rgba(255, 255, 255, 0.16), 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #fff;
    font: inherit;
    font-size: 0.8em;
    font-weight: 400;
    white-space: nowrap;
    cursor: pointer;
}

.sheet-nav-btn.is-primary {
    justify-self: end;
    background: #fff;
    color: #000;
}

/* Delete All renders white on the device; red is kept for the confirm */
.sheet-nav-btn.is-destructive {
    justify-self: end;
}

.sheet-nav-btn.is-primary:disabled {
    background: rgba(255, 255, 255, 0.14);
    color: rgba(235, 235, 245, 0.35);
    cursor: default;
}

.sheet-editor {
    display: block;
    width: 100%;
    /* TextEditor is capped at 200pt on a 393pt screen; the rest is spacer */
    flex: 0 1 auto;
    height: calc(var(--w) * 0.47);
    min-height: 4.5em;
    resize: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.5em;
    padding: 0.55em 0.6em;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font: inherit;
    font-size: 0.86em;
    line-height: 1.35;
    outline: none;
}

.sheet-editor::placeholder {
    color: rgba(235, 235, 245, 0.3);
}

.sheet-editor.is-over {
    border-color: #ff453a;
}

.sheet-multi {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-top: 0.6em;
    padding: 0.6em 0.75em;
    border-radius: 0.55em;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(235, 235, 245, 0.7);
    font-size: 0.78em;
}

.sheet-multi .i {
    width: 1.1em;
    height: 1.1em;
    color: #fff;
}

.sheet-grabber {
    width: 2.6em;
    height: 0.28em;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 auto 0.7em;
}





.segmented {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    margin-bottom: 0.7em;
}

.segmented button {
    border: 0;
    border-radius: 999px;
    padding: 0.38em 0;
    background: transparent;
    color: #fff;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
}

.segmented button.is-active {
    background: rgba(255, 255, 255, 0.26);
    color: #fff;
}



.sheet-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.45em;
    font-size: 0.68em;
    color: rgba(235, 235, 245, 0.3);
}

.sheet-meta > span:last-child:not(:first-child) {
    color: rgba(235, 235, 245, 0.6);
}

.sheet-count.is-near {
    color: #fff;
}

.sheet-count.is-over {
    color: #ff453a;
}







/* Dashboard / tabs screens (light-or-dark app chrome) */
.app-screen {
    position: absolute;
    inset: 0;
    padding-top: 7.2%;
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6em 5% 0.5em;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    font-weight: 800;
    font-size: 1.12em;
    letter-spacing: -0.02em;
}

.app-brand svg {
    width: 1.45em;
    height: 1.35em;
}

.app-title {
    font-weight: 800;
    font-size: 1.12em;
    letter-spacing: -0.02em;
}

.app-hbtn {
    width: 2.1em;
    height: 2.1em;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.app-hbtn .i {
    width: 1.1em;
    height: 1.1em;
}

.app-hgroup {
    display: flex;
    padding: 0.1em;
    border-radius: 999px;
}

.app-body {
    flex: 1;
    overflow: hidden;
    padding: 0 1.2%;
}

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.thumb {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 0.35em;
    background: #222;
}

.thumb svg {
    width: 100%;
    height: 100%;
}

.thumb-count {
    position: absolute;
    right: 0.3em;
    bottom: 0.3em;
    display: inline-flex;
    align-items: center;
    gap: 0.15em;
    padding: 0.08em 0.35em;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.6em;
    font-weight: 700;
}

.thumb-count i {
    width: 0.55em;
    height: 0.55em;
    border-radius: 50%;
    border: 1.5px solid #fff;
    box-shadow: inset 0 0 0 1.5px #000;
    display: block;
}

.thumb-check {
    position: absolute;
    left: 0.35em;
    top: 0.35em;
    width: 1.3em;
    height: 1.3em;
    border-radius: 50%;
    border: 1.5px solid #fff;
    background: rgba(0, 0, 0, 0.2);
}

.thumb-check.is-on {
    background: #fff;
    display: grid;
    place-items: center;
    color: #000;
}

.thumb-check.is-on .i {
    width: 0.8em;
    height: 0.8em;
    stroke-width: 3;
}

.thumb.is-selected svg {
    transform: scale(0.85);
    border-radius: 0.3em;
}

.search-field {
    display: flex;
    align-items: center;
    gap: 0.4em;
    margin: 0 3% 0.45em;
    padding: 0.45em 0.6em;
    border-radius: 0.7em;
    font-size: 0.85em;
}

.search-field .i {
    width: 1em;
    height: 1em;
    opacity: 0.6;
}

.scope {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    margin: 0 3% 0.6em;
    padding: 2px;
    border-radius: 0.55em;
    font-size: 0.68em;
    font-weight: 600;
    text-align: center;
}

.scope span {
    padding: 0.32em 0;
    border-radius: 0.45em;
}

.scope span.is-active {
    background: #fff;
    color: #000;
}

.is-light-ui .scope span.is-active {
    background: #000;
    color: #fff;
}

.tag-row {
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.55em 4%;
    border-bottom: 1px solid rgba(128, 128, 128, 0.18);
}

.tag-well {
    width: 2em;
    height: 2em;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.is-light-ui .tag-well {
    background: rgba(0, 0, 0, 0.04);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.tag-well.is-open {
    background: #fff;
    color: #000;
    box-shadow: none;
}

.is-light-ui .tag-well.is-open {
    background: #000;
    color: #fff;
}

.tag-well .i {
    width: 1em;
    height: 1em;
}

.tag-name {
    font-weight: 600;
    font-size: 0.9em;
}

.tag-sub {
    font-size: 0.66em;
    opacity: 0.55;
}

.tag-chev {
    margin-left: auto;
    opacity: 0.4;
}

.tag-chev .i {
    width: 0.9em;
    height: 0.9em;
}

.tag-chev.is-open {
    transform: rotate(90deg);
}

.tag-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 0 4% 0.5em;
}

/* App tab bar — Liquid Glass capsule, theme-following */
.app-tabbar {
    position: absolute;
    left: 5%;
    right: 5%;
    bottom: 2.6%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.32em;
    border-radius: 999px;
    z-index: 10;
}

.app-tab {
    width: 2.2em;
    height: 2.2em;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

.app-tab .i {
    width: 1.12em;
    height: 1.12em;
}

.app-tab.is-active {
    background: #fff;
    color: #000;
}

.is-light-ui .app-tab.is-active {
    background: #000;
    color: #fff;
}

.app-tab.is-add {
    width: 2.6em;
    height: 2.6em;
}

.app-tab.is-add .i {
    width: 1.3em;
    height: 1.3em;
    stroke-width: 2.3;
}

/* Light-UI glass inside phone screens */
.is-light-ui .glass-in {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.6), transparent 46%),
        rgba(255, 255, 255, 0.62);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 0 0 0.5px rgba(0, 0, 0, 0.06),
        0 6px 18px rgba(0, 0, 0, 0.12);
}

.glass-in {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), transparent 46%),
        rgba(44, 44, 50, 0.5);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.10),
        0 6px 18px rgba(0, 0, 0, 0.4);
}

.soft-in {
    background: rgba(118, 118, 128, 0.2);
}

/* ============================================================
   Feature grid & cards
   ============================================================ */

.grid {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 980px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* An odd card out spans the row rather than sitting alone in a column */
    .grid-3 > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

.card {
    position: relative;
    padding: 28px;
    border-radius: var(--r-lg);
    background: var(--bg-card);
    box-shadow: inset 0 0 0 1px var(--hairline);
    transition: transform var(--normal), box-shadow var(--normal), background var(--normal);
}

a.card:hover {
    transform: translateY(-3px);
    box-shadow: inset 0 0 0 1px var(--hairline-strong);
}

.card h3,
.card h2 {
    font-size: 19px;
    letter-spacing: -0.015em;
    margin: 18px 0 8px;
}

.card p {
    color: var(--text-2);
    font-size: 15.5px;
    line-height: 1.55;
}

.card .tagline {
    display: inline-block;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-3);
}

.icon-well {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--soft);
    box-shadow: inset 0 0 0 1px var(--hairline-strong);
}

.icon-well .i {
    width: 22px;
    height: 22px;
}

.icon-well.is-solid {
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: none;
}

/* ============================================================
   Flow strip (How it works / Tour)
   ============================================================ */

.flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    counter-reset: flow;
}

@media (max-width: 980px) {
    .flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .flow {
        grid-template-columns: 1fr;
    }
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.flow-step .num {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 14px;
    font-weight: 700;
}

.flow-step h3 {
    font-size: 19px;
    margin-top: 6px;
}

.flow-step p {
    color: var(--text-2);
    font-size: 15px;
    max-width: 280px;
    margin: 8px auto 0;
}

/* Feature deep-dive rows */
.feature-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: center;
    padding: 72px 0;
}

.feature-row + .feature-row {
    border-top: 1px solid var(--hairline);
}

.feature-row.is-flipped .feature-visual {
    order: -1;
}

.feature-visual {
    display: flex;
    justify-content: center;
}

.feature-copy .lead {
    margin-top: 16px;
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 26px 0 0;
}

.checklist li {
    display: flex;
    gap: 12px;
    padding: 9px 0;
    color: var(--text-2);
    font-size: 16px;
}

.checklist li strong {
    color: var(--text);
    font-weight: 600;
}

.checklist .i {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: var(--text);
}

@media (max-width: 900px) {
    .feature-row {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 56px 0;
    }

    .feature-row.is-flipped .feature-visual {
        order: 0;
    }
}

/* Spec pills */
.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    background: var(--soft);
}

.pill .i {
    width: 16px;
    height: 16px;
}

/* Stats */
.stat {
    padding: 28px;
    border-radius: var(--r-lg);
    background: var(--bg-card);
    box-shadow: inset 0 0 0 1px var(--hairline);
}

.stat strong {
    display: block;
    font-size: 40px;
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat span {
    display: block;
    margin-top: 10px;
    font-size: 15px;
    color: var(--text-2);
}

/* ============================================================
   Tour (flows of static phone screens)
   ============================================================ */

.tour-flow {
    padding: 72px 0;
}

.tour-flow + .tour-flow {
    border-top: 1px solid var(--hairline);
}

.tour-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 40px;
}

.tour-head .lead {
    margin-top: 12px;
}

.tour-steps {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    padding: 12px 4px 28px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.tour-step {
    flex: none;
    width: 236px;
    scroll-snap-align: start;
}

.tour-step figcaption {
    margin-top: 20px;
}

.tour-step figcaption strong {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 16px;
}

.tour-step figcaption strong span {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 12px;
}

.tour-step figcaption p {
    margin-top: 6px;
    color: var(--text-2);
    font-size: 14.5px;
}

.tour-step figure,
figure.tour-step {
    margin: 0;
}

/* ============================================================
   Page header & prose (legal / support pages)
   ============================================================ */

.page-head {
    padding: 72px 0 40px;
    position: relative;
}

.page-head::before {
    content: "";
    position: absolute;
    inset: -40% 0 auto;
    height: 520px;
    background: var(--glow);
    pointer-events: none;
}

.page-head .lead {
    margin-top: 18px;
}

/* Legacy class names kept so the legal pages restyle cleanly */
.page-header {
    padding: 72px 0 32px;
}

.page-title {
    font-size: clamp(36px, 5vw, 56px);
    letter-spacing: -0.03em;
}

.page-subtitle {
    margin-top: 14px;
    color: var(--text-2);
    font-size: 17px;
}

.content-narrow {
    max-width: var(--narrow);
}

.toc {
    padding: 22px 26px;
    border-radius: var(--r-lg);
    background: var(--bg-card);
    box-shadow: inset 0 0 0 1px var(--hairline);
    margin-bottom: 40px;
}

.toc h2 {
    font-size: 15px;
    letter-spacing: 0;
    color: var(--text-2);
    margin-bottom: 10px;
}

.toc ol {
    margin: 0;
    padding-left: 20px;
    columns: 2;
    column-gap: 32px;
}

.toc li {
    padding: 3px 0;
    font-size: 15px;
}

@media (max-width: 600px) {
    .toc ol {
        columns: 1;
    }
}

.privacy-section,
.terms-section {
    padding: 8px 0 112px;
}

.privacy-section hr,
.terms-section hr {
    display: none;
}

.prose,
.privacy-content,
.terms-content {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-2);
}

.prose h2,
.privacy-content h2,
.terms-content h2 {
    color: var(--text);
    font-size: 26px;
    margin: 48px 0 14px;
}

.prose h3,
.privacy-content h3,
.terms-content h3 {
    color: var(--text);
    font-size: 19px;
    margin: 28px 0 10px;
}

.prose p,
.privacy-content p,
.terms-content p {
    margin: 0 0 16px;
}

.prose ul,
.prose ol,
.privacy-content ul,
.terms-content ul,
.terms-content ol {
    margin: 0 0 16px;
    padding-left: 22px;
}

.prose li,
.privacy-content li,
.terms-content li {
    margin: 6px 0;
}

.prose strong,
.privacy-content strong,
.terms-content strong {
    color: var(--text);
}

/* ============================================================
   FAQ (details/summary accordion)
   ============================================================ */

.faq {
    display: grid;
    gap: 10px;
}

.faq details {
    border-radius: var(--r-md);
    background: var(--bg-card);
    box-shadow: inset 0 0 0 1px var(--hairline);
    transition: background var(--fast);
}

.faq details[open] {
    background: var(--soft);
}

.faq summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    font-size: 17.5px;
    font-weight: 600;
    cursor: pointer;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary .i {
    width: 18px;
    height: 18px;
    color: var(--text-2);
    transition: transform var(--normal);
}

.faq details[open] summary .i {
    transform: rotate(45deg);
}

.faq .answer {
    padding: 0 22px 22px;
    color: var(--text-2);
    line-height: 1.65;
}

.faq .answer p + p,
.faq .answer p + ul,
.faq .answer ul + p {
    margin-top: 12px;
}

.faq .answer ul {
    margin: 0;
    padding-left: 20px;
}

.faq-group + .faq-group {
    margin-top: 48px;
}

.faq-group h2 {
    font-size: 22px;
    margin-bottom: 16px;
}

/* ============================================================
   Releases timeline (newest first, as the app's timeline)
   ============================================================ */

.timeline {
    position: relative;
    padding-left: 34px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--hairline-strong);
}

.tl-item {
    position: relative;
    padding-bottom: 56px;
}

.tl-item:last-child {
    padding-bottom: 0;
}

.tl-dot {
    position: absolute;
    left: -34px;
    top: 2px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
}

.tl-dot .i {
    width: 13px;
    height: 13px;
    stroke-width: 2.4;
}

.tl-item.is-older .tl-dot {
    background: var(--bg);
    color: var(--text);
    box-shadow: inset 0 0 0 2px var(--hairline-strong);
}

.tl-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-3);
    letter-spacing: 0.02em;
}

.tl-item h2 {
    font-size: 28px;
    margin: 6px 0 10px;
}

.tl-item > p {
    color: var(--text-2);
}

.tl-list {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    display: grid;
    gap: 10px;
}

.tl-list li {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--r-md);
    background: var(--bg-card);
    box-shadow: inset 0 0 0 1px var(--hairline);
}

.tl-list li .i {
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.tl-list li strong {
    display: block;
    font-weight: 600;
}

.tl-list li span {
    display: block;
    margin-top: 2px;
    color: var(--text-2);
    font-size: 15px;
}

/* ============================================================
   Forms (support / about)
   ============================================================ */

.form {
    display: grid;
    gap: 16px;
}

.field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 14px 16px;
    border: 0;
    border-radius: var(--r-md);
    background: var(--soft);
    color: var(--text);
    font: inherit;
    font-size: 16px;
    box-shadow: inset 0 0 0 1px var(--hairline);
    transition: box-shadow var(--fast);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    box-shadow: inset 0 0 0 1.5px var(--accent);
}

.field textarea {
    resize: vertical;
    min-height: 140px;
}

.form-note {
    font-size: 14px;
    color: var(--text-3);
}

/* ============================================================
   CTA band
   ============================================================ */

.cta-band {
    position: relative;
    overflow: hidden;
    overflow: clip;
    padding: 72px 40px;
    border-radius: var(--r-xl);
    text-align: center;
}

.cta-band .lead {
    margin: 16px auto 0;
}

.cta-band .hero-actions {
    justify-content: center;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
    border-top: 1px solid var(--hairline);
    padding: 64px 0 40px;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.footer-brand p {
    margin-top: 16px;
    color: var(--text-2);
    font-size: 15px;
    max-width: 300px;
}

/* Column headings, not links: full-strength text over a thin rule (the
   same hairline as the footer's bottom divider), so they read as labels
   above the grey links. The brand label gets the same rule. Both boxes
   share one height so the four rules line up across the columns. */
.footer .footer-h,
.footer-brand .brand {
    display: flex;
    align-items: center;
    box-sizing: content-box;
    height: 28px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hairline);
}

.footer .footer-h {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
}

.footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer li {
    padding: 5px 0;
}

.footer li a {
    text-decoration: none;
    color: var(--text-2);
    font-size: 15px;
    transition: color var(--fast);
}

.footer li a:hover {
    color: var(--text);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--hairline);
    font-size: 13px;
    color: var(--text-3);
}

@media (max-width: 800px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

/* ============================================================
   Motion
   ============================================================ */

/* Hidden only when JS runs (html.js), so content never stays invisible */
.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Already on screen at load: show at once, no fade */
.js .reveal.no-anim {
    transition: none;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pop-in {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes sheet-up {
    from {
        transform: translateY(100%);
    }

    to {
        transform: none;
    }
}

@keyframes grow {
    from {
        transform: scale(0.05);
        opacity: 0;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

@keyframes flash {
    0% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes glow-pulse {
    0%,
    100% {
        opacity: 0.75;
    }

    50% {
        opacity: 1;
    }
}

.grow {
    transform-box: fill-box;
    transform-origin: center;
    animation: grow 0.35s var(--ease) both;
}

.flash {
    animation: flash 0.7s ease-out both;
}

.glow-pulse {
    animation: glow-pulse 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ------------------------------------------------------------
   In-phone data lists, timeline and confirmation dialog
   (TagsListModalView, AnnoteTimelineModalView)
   ------------------------------------------------------------ */

.ig-group {
    flex: 0 1 auto;
    min-height: 0;
    overflow: auto;
    border-radius: 1.1em;
    background: rgba(255, 255, 255, 0.13);
}

.ig-row {
    display: flex;
    align-items: center;
    gap: 0.65em;
    padding: 0.75em 0.9em;
    font-size: 0.88em;
}

.ig-row {
    position: relative;
}

/* Inset separator, starting after the icon like a SwiftUI List */
.ig-row + .ig-row::before {
    content: "";
    position: absolute;
    top: 0;
    left: 2.65em;
    right: 0;
    height: 1px;
    background: rgba(84, 84, 88, 0.6);
}

.ig-row > .i {
    flex: none;
    width: 1.05em;
    height: 1.05em;
    color: rgba(235, 235, 245, 0.6);
}

.ig-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1em;
}

.ig-text span {
    font-weight: 500;
    overflow-wrap: anywhere;
}

.ig-text small,
.ig-row time {
    font-size: 0.82em;
    color: rgba(235, 235, 245, 0.6);
}

.ig-row time {
    flex: none;
    color: rgba(235, 235, 245, 0.3);
}

.sheet-empty {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    padding: 1em;
    text-align: center;
    color: rgba(235, 235, 245, 0.6);
    font-size: 0.78em;
}

.sheet-empty .i {
    width: 2.4em;
    height: 2.4em;
}

.sheet-empty strong {
    color: #fff;
    font-size: 1.25em;
}

/* Timeline: a spine of nodes, newest first */
.tl {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-left: 0.2em;
}

.tl-row {
    display: flex;
    gap: 0.75em;
    min-height: 3.4em;
}

.tl-spine {
    position: relative;
    flex: none;
    width: 0.8em;
}

.tl-spine::before {
    content: "";
    position: absolute;
    left: calc(50% - 1px);
    width: 2px;
    top: 0;
    bottom: 0;
    background: rgba(142, 142, 147, 0.4);
}

.tl-row:first-child .tl-spine::before {
    top: 1.05em;
}

.tl-row:last-child .tl-spine::before {
    bottom: auto;
    height: 1.05em;
}

.tl-node {
    position: absolute;
    top: 1.05em;
    left: 0;
    width: 0.8em;
    height: 0.8em;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(235, 235, 245, 0.6);
    color: #000;
}

.tl-row.is-created .tl-node {
    background: #fff;
}

/* A copy's history (app SRS v3.33): "N entries copied with it" — bold,
   full-strength (v3.34) — opens an indented group of grey rows */
.tl-carried {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    margin-top: 0.3em;
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    font: inherit;
    font-size: 0.78em;
    font-weight: 700;
    cursor: pointer;
}

.tl-carried .i {
    width: 0.9em;
    height: 0.9em;
    stroke-width: 3;
    transition: transform 0.2s var(--ease);
}

.tl-carried.is-open .i {
    transform: rotate(90deg);
}

.tl-group {
    margin: 0.2em 0 0 0.6em;
}

.tl-row.is-carried .tl-body strong {
    color: rgba(235, 235, 245, 0.6);
}

/* Album timeline (app SRS v3.41): the photo's thumbnail beside its row */
.tl-thumb {
    flex: none;
    margin: 0.55em 0 0 auto;
    width: 2.3em;
    height: 2.3em;
    border-radius: 0.35em;
    overflow: hidden;
    background: #222;
}

.tl-thumb svg {
    display: block;
    width: 100%;
    height: 100%;
}

.app-title.is-small {
    flex: 1;
    text-align: center;
    font-size: 0.95em;
}

.tl-node .i {
    width: 0.5em;
    height: 0.5em;
    stroke-width: 3;
}

.tl-body {
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    padding: 0.55em 0;
    min-width: 0;
}

.tl-body strong {
    font-size: 0.9em;
}

.tl-body span {
    font-size: 0.78em;
    color: rgba(235, 235, 245, 0.6);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tl-body time {
    font-size: 0.7em;
    color: rgba(235, 235, 245, 0.3);
}

/* Delete All confirmation: an action sheet over the list */
.dialog-scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    background: rgba(0, 0, 0, 0.4);
    animation: fade-in 0.2s both;
}

.dialog {
    position: absolute;
    left: 0.5em;
    right: 0.5em;
    bottom: 0.9em;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 0.45em;
    animation: sheet-up 0.25s var(--ease) both;
}

.dialog-group {
    overflow: hidden;
    border-radius: 1.1em;
    background: rgba(44, 44, 46, 0.94);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.dialog-head {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
    padding: 0.85em 1em;
    text-align: center;
    font-size: 0.7em;
    color: rgba(235, 235, 245, 0.6);
    box-shadow: inset 0 -1px 0 rgba(84, 84, 88, 0.6);
}

.dialog-head strong {
    font-size: 1.05em;
}

.dialog-btn {
    display: block;
    width: 100%;
    height: 2.7em;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.9em;
    cursor: pointer;
}

.dialog-btn.is-destructive {
    color: #ff453a;
}

.dialog-btn.is-cancel {
    color: #fff;
    font-weight: 600;
}

/* iOS scroll views show no persistent scrollbar */
.screen * {
    scrollbar-width: none;
}

.screen *::-webkit-scrollbar {
    display: none;
}

/* Search clear button, Tags count line, Albums grid (HomeTabView,
   TagsTabView, AlbumTileView) */
.search-clear {
    margin-left: auto;
    width: 1.2em;
    height: 1.2em;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(235, 235, 245, 0.3);
    color: #1c1c1e;
}

.search-clear .i {
    width: 0.7em;
    height: 0.7em;
    stroke-width: 3;
}

.tag-count {
    margin: 0 4% 0.3em;
    font-size: 0.66em;
    color: rgba(235, 235, 245, 0.3);
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 2px;
}

.album-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2em;
    min-width: 0;
    margin-bottom: 0.5em;
}

.album-icon {
    width: 100%;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 0.35em;
    background: #1c1c1e;
    color: rgba(235, 235, 245, 0.6);
}

.album-icon .i {
    width: 2.2em;
    height: 2.2em;
    fill: currentColor;
}

.album-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72em;
    font-weight: 500;
}

.album-count {
    font-size: 0.6em;
    color: rgba(235, 235, 245, 0.6);
}

/* 404 / 500: the page head, given room so the footer sits low */
.error-page {
    min-height: 62vh;
    display: flex;
    align-items: center;
}

/* Elements that only work with JavaScript (the contact form) */
html:not(.js) .js-only {
    display: none;
}

.field textarea[aria-invalid="true"] {
    box-shadow: inset 0 0 0 1.5px var(--danger);
}

/* Replica screens are drawn by script; without it, say so */
.screen-noscript {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 12%;
    text-align: center;
    color: rgba(235, 235, 245, 0.6);
    font-size: 0.8em;
}

/* Metadata and note rows: the text, then the date on its own line */
.ig-row.ig-stack {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25em;
}

.ig-stack + .ig-row::before,
.ig-row + .ig-stack::before {
    left: 0.9em;
}

.ig-main {
    overflow-wrap: anywhere;
}

.ig-sub {
    display: flex;
    align-items: baseline;
    gap: 0.5em;
    font-size: 0.82em;
}

.ig-sub small {
    color: rgba(235, 235, 245, 0.6);
    font-weight: 500;
}

.ig-sub time {
    margin-left: auto;
    color: rgba(235, 235, 245, 0.3);
}

/* The workspace back button: its own glass circle */
.ws-back {
    border-radius: 50%;
}

/* Combine review (app SRS v3.38): text buttons Cancel · Finish, and a
   glass banner over the top of the photo */
.ws-pill {
    position: relative;
    z-index: 1;
    padding: 0.55em 0.95em;
    border-radius: 999px;
    font-size: 0.86em;
}

.ws-pill-strong {
    font-weight: 700;
}

.review-banner {
    position: absolute;
    z-index: 6;
    left: 3%;
    right: 3%;
    top: calc(var(--w) * 0.355);
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.55em 0.7em;
    border-radius: 1.1em;
    color: #fff;
    font-size: 0.72em;
    line-height: 1.3;
}

.review-banner > .i {
    flex: none;
    width: 1.1em;
    height: 1.1em;
}

.review-eye {
    flex: none;
    margin-left: auto;
    display: grid;
    place-items: center;
    width: 2.2em;
    height: 2.2em;
}

.review-eye .i {
    width: 1.2em;
    height: 1.2em;
}

/* Combine sheet (app SRS v3.37): the two photo cards */
.cb-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8em;
}

.cb-card {
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    font-size: 0.8em;
}

.cb-card strong {
    margin-top: 0.3em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cb-card span {
    color: rgba(235, 235, 245, 0.6);
    font-size: 0.9em;
}

.cb-card em {
    font-style: normal;
    font-size: 0.9em;
    color: rgba(235, 235, 245, 0.35);
}

.cb-card em.is-kept {
    color: #fff;
    font-weight: 700;
}



/* SRS v3.22: the open-annote dock is one compact row */
.dock.dock-compact {
    min-height: 0;
}

.dock-compact .d-chip {
    padding: 0 0.5em;
}

/* List sheets: Delete All and + share the trailing corner */
.sheet-nav-end {
    justify-self: end;
    display: inline-flex;
    gap: 0.35em;
}

.sheet-nav-end .sheet-nav-btn {
    justify-self: auto;
}

.sheet-nav-btn.sheet-nav-icon {
    width: 2.55em;
    padding: 0;
    display: inline-grid;
    place-items: center;
}

.sheet-nav-icon .i {
    width: 1.05em;
    height: 1.05em;
    stroke-width: 2.2;
}

/* Tab bar +: solid, like the dock's + Data (app SRS v3.24) */
.app-tab.is-add {
    background: #fff;
    color: #000;
}

.is-light-ui .app-tab.is-add {
    background: #000;
    color: #fff;
}

/* App SRS v3.28: controls that can't be used while a shape edit awaits
   ✓ / ✕ (dock chips and +, the workspace's back / timeline / menu) */
.is-locked {
    opacity: 0.35;
    pointer-events: none;
}

.d-chips {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
}

/* Features: try the Selection Color on the replicas (app SRS v3.28) */
.sel-swatches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.sel-swatch {
    display: inline-block;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--hairline);
    cursor: pointer;
    padding: 0;
    position: relative;
}

.sel-swatch[aria-pressed="true"]::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid var(--text);
}

.sel-swatch.is-custom {
    background: conic-gradient(#ff453a, #ffd60a, #30d158, #64d2ff, #0a84ff, #bf5af2, #ff453a);
    overflow: hidden;
}

.sel-swatch.is-custom input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* ------------------------------------------------------------------
   Workspace menu, alerts and precise placement (app ImageAnalysis-
   ContainerView). 1pt = 100/393 cqw of the phone screen
   ------------------------------------------------------------------ */
.menu-scrim {
    position: absolute;
    inset: 0;
    z-index: 34;
}

.menu {
    position: absolute;
    top: 14.6%;
    right: 3%;
    z-index: 35;
    width: 62%;
    padding: 0.35em 0;
    border-radius: 1.3em;
    transform-origin: top right;
    animation: pop-in 0.18s var(--ease) both;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.62em 1.05em;
    border: 0;
    background: none;
    color: #fff;
    font: inherit;
    font-size: 0.86em;
    text-align: left;
    cursor: pointer;
}

.menu-item .i {
    width: 1.15em;
    height: 1.15em;
}

.menu-item.is-destructive {
    color: #ff453a;
}

.alert-scrim {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.35);
    animation: fade-in 0.2s both;
}

.alert {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 51;
    width: 76%;
    translate: -50% -50%;
    padding: 1.1em 1em 0.9em;
    border-radius: 1.6em;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03) 40%),
        rgba(44, 44, 48, 0.82);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 40px rgba(0, 0, 0, 0.45);
    color: #fff;
    animation: pop-in 0.2s var(--ease) both;
}

.alert-head {
    display: flex;
    flex-direction: column;
    gap: 0.35em;
    text-align: center;
    font-size: 0.74em;
    color: rgba(235, 235, 245, 0.75);
}

.alert-head strong {
    color: #fff;
    font-size: 1.2em;
}

.alert-field {
    display: block;
    width: 100%;
    margin-top: 0.8em;
    padding: 0.5em 0.65em;
    border: 0;
    border-radius: 0.6em;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font: inherit;
    font-size: 0.8em;
    outline: none;
}

.alert-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5em;
    margin-top: 1em;
}

.alert-btn {
    height: 2.45em;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font: inherit;
    font-size: 0.82em;
    font-weight: 600;
    cursor: pointer;
}

.alert-btn.is-destructive {
    color: #ff453a;
}

.alert-btn.is-default {
    background: #fff;
    color: #000;
}

.alert-btns.is-single {
    grid-template-columns: 1fr;
}

/* Crosshair: 44pt ring, 64pt cross, 1.5pt white lines, 5pt black dot */
.canvas.is-reticle {
    cursor: grab;
}

.reticle {
    position: absolute;
    left: 50%;
    width: 16.3cqw;
    height: 16.3cqw;
    translate: -50% -50%;
    z-index: 12;
    pointer-events: none;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.6));
}

.reticle i {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
}

.reticle-ring {
    width: 11.2cqw;
    height: 11.2cqw;
    border: max(1px, 0.38cqw) solid #fff;
    border-radius: 50%;
}

.reticle-h {
    width: 100%;
    height: max(1px, 0.38cqw);
    background: #fff;
}

.reticle-v {
    width: max(1px, 0.38cqw);
    height: 100%;
    background: #fff;
}

.reticle-dot {
    width: 1.27cqw;
    height: 1.27cqw;
    border-radius: 50%;
    background: #000;
}

/* Profile tab (ProfileTabView): 24pt margins, hand-rolled segmented rows */
.app-body.prof {
    padding: 0 6.1cqw;
    overflow: hidden;
}

.prof-scroll {
    padding-bottom: 30cqw;
}

.prof-h {
    margin: 7.1cqw 0 3cqw;
    font-size: 5.1cqw;
    font-weight: 700;
}

.prof-row {
    display: flex;
    flex-direction: column;
    gap: 2.5cqw;
    margin-bottom: 4cqw;
}

.prof-label {
    font-size: 3.8cqw;
    font-weight: 600;
}

.prof-desc {
    margin: 0;
    font-size: 3.3cqw;
    line-height: 1.3;
    color: rgba(235, 235, 245, 0.6);
}

.prof-seg {
    display: flex;
    border-radius: 2cqw;
    box-shadow: inset 0 0 0 1px rgba(84, 84, 88, 0.65);
}

.prof-seg span {
    flex: 1;
    padding: 2.5cqw 0;
    border-radius: 2cqw;
    text-align: center;
    font-size: 3.8cqw;
    font-weight: 500;
}

.prof-seg span.is-on {
    background: #fff;
    color: #000;
}

.prof-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prof-switch {
    position: relative;
    width: 13cqw;
    height: 7.9cqw;
    flex: none;
    border-radius: 999px;
    background: rgba(120, 120, 128, 0.32);
}

.prof-switch.is-on {
    background: #8e8e93;
}

.prof-switch i {
    position: absolute;
    top: 0.5cqw;
    left: 0.5cqw;
    width: 6.9cqw;
    height: 6.9cqw;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.prof-switch.is-on i {
    left: auto;
    right: 0.5cqw;
}

.prof-preview {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 345 / 120;
    border-radius: 3cqw;
}

.prof-swatches {
    display: flex;
    gap: 2cqw;
}

.prof-swatch {
    position: relative;
    width: 7.1cqw;
    height: 7.1cqw;
    flex: none;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(84, 84, 88, 0.65);
}

.prof-swatch.is-on::after {
    content: "";
    position: absolute;
    inset: -1cqw;
    border-radius: 50%;
    border: 2px solid #fff;
}

.prof-swatch.is-custom {
    background: conic-gradient(#ff453a, #ffd60a, #30d158, #64d2ff, #0a84ff, #bf5af2, #ff453a);
}

.prof-glass {
    position: relative;
    height: 30.5cqw;
    margin-bottom: 1.5cqw;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 3cqw;
    background: linear-gradient(135deg, #e6e6e6, #8c8c8c 33%, #333 67%, #737373);
}

.prof-glass i {
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 50%;
}

.pg-a {
    width: 17.8cqw;
    height: 17.8cqw;
    translate: calc(-50% - 22.9cqw) calc(-50% + 7.1cqw);
    background: rgba(255, 255, 255, 0.75);
}

.pg-b {
    width: 24.4cqw;
    height: 24.4cqw;
    translate: calc(-50% + 22.4cqw) calc(-50% - 8.7cqw);
    background: rgba(0, 0, 0, 0.55);
}

.prof-glass .callout {
    position: relative;
    width: 50.9cqw;
    translate: none;
    animation: none;
}

.prof-value {
    font-size: 3.8cqw;
    color: rgba(235, 235, 245, 0.6);
}

/* Glass Haze: a four-step slider (Ultra-thin, Thin, Regular, Thick) */
.prof-slider {
    position: relative;
    height: 1.1cqw;
    margin: 3cqw 0;
    border-radius: 999px;
    background: rgba(120, 120, 128, 0.32);
}

.prof-slider i {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: #8e8e93;
}

.prof-slider b {
    position: absolute;
    top: 50%;
    width: 7cqw;
    height: 7cqw;
    translate: -50% -50%;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.prof-divider {
    margin: 5cqw 0;
    border: 0;
    border-top: 1px solid rgba(84, 84, 88, 0.65);
}

.prof-data {
    display: flex;
    align-items: center;
    gap: 2cqw;
    margin-top: 4cqw;
    padding: 3cqw;
    border-radius: 2cqw;
    box-shadow: inset 0 0 0 1px rgba(84, 84, 88, 0.65);
    font-size: 3.8cqw;
    font-weight: 500;
}

.prof-data .i {
    width: 4.6cqw;
    height: 4.6cqw;
}

/* Rows that leave the app: a trailing ↗ (app SRS v3.44) */
.prof-data .prof-ext {
    width: 3.3cqw;
    height: 3.3cqw;
    margin-left: auto;
    opacity: 0.6;
}

/* aboutRow: label (secondary) left, value right — Email, Version, Build, Built */
.prof-about {
    display: flex;
    justify-content: space-between;
    gap: 3cqw;
    padding: 1.5cqw 0;
    font-size: 3.8cqw;
}

.prof-data + .prof-about {
    margin-top: 4cqw;
}

.prof-about span:first-child {
    color: rgba(235, 235, 245, 0.6);
}

/* PrivacyPolicyView (app SRS v3.43): full height, the policy as text */
.sheet--policy {
    top: calc(var(--w) * 0.13);
}

.pp-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0 0.4em;
}

.pp-date {
    margin: 0 0 0.6em;
    font-size: 0.66em;
    color: rgba(235, 235, 245, 0.6);
}

.pp-h {
    margin: 1em 0 0.35em;
    font-size: 0.8em;
    font-weight: 600;
}

.pp-p,
.pp-li,
.pp-link {
    margin: 0 0 0.45em;
    font-size: 0.72em;
    line-height: 1.35;
}

.pp-li {
    display: flex;
    gap: 0.5em;
}

.pp-link {
    font-weight: 600;
}

/* ------------------------------------------------------------------
   Onboarding (OnboardingView) and empty states (EmptyStateView, the
   Tags / Albums empty views). 1pt = 100/393 cqw of the phone screen
   ------------------------------------------------------------------ */
.ob {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 7.2% 0 calc(10.2cqw + 8.6cqw);
}

.ob-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6.1cqw;
    padding: 0 4.1cqw;
    text-align: center;
}

.ob-logo {
    width: 30.5cqw;
    height: 30.5cqw;
    border-radius: 6.6cqw;
    box-shadow: 0 1cqw 2cqw rgba(0, 0, 0, 0.12);
}

.ob-icon .i {
    width: 20.4cqw;
    height: 20.4cqw;
    stroke-width: 1.3;
}

.ob-title {
    margin: 0;
    font-size: 8.65cqw;
    font-weight: 700;
    line-height: 1.15;
}

.ob-title.is-small {
    font-size: 7.1cqw;
}

.ob-text {
    margin: 0;
    padding: 0 8.1cqw;
    font-size: 4.3cqw;
    line-height: 1.3;
    color: rgba(235, 235, 245, 0.6);
}

.ob-btn {
    display: grid;
    place-items: center;
    height: 12.7cqw;
    margin: 0 12.2cqw;
    border-radius: 3cqw;
    background: #fff;
    color: #000;
    font-size: 4.3cqw;
    font-weight: 600;
}

/* Page dots on their capsule (indexViewStyle .page, background always) */
.ob-dots {
    position: absolute;
    left: 50%;
    bottom: 7.5cqw;
    translate: -50% 0;
    display: flex;
    gap: 2.3cqw;
    padding: 1.6cqw 2.6cqw;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.ob-dots i {
    width: 1.8cqw;
    height: 1.8cqw;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.ob-dots i.is-on {
    background: #fff;
}

.app-body.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6.1cqw;
    padding: 0 0 20cqw;
    text-align: center;
}

.empty-logo {
    width: 25.4cqw;
    height: 25.4cqw;
    border-radius: 5.6cqw;
    opacity: 0.5;
}

.empty-icon {
    color: rgba(235, 235, 245, 0.6);
}

.empty-icon.is-faint {
    color: rgba(235, 235, 245, 0.3);
}

.empty-icon .i {
    width: 14.2cqw;
    height: 14.2cqw;
    stroke-width: 1.4;
}

.empty-title {
    font-size: 5.6cqw;
    font-weight: 600;
}

.empty.is-tags .empty-title {
    font-weight: 700;
}

.empty-text {
    padding: 0 8.1cqw;
    font-size: 4.3cqw;
    line-height: 1.3;
    color: rgba(235, 235, 245, 0.6);
}

.empty.is-tags .empty-text {
    font-size: 3.8cqw;
}

.empty-btn {
    margin-top: 4.1cqw;
    padding: 4.1cqw 8.1cqw;
    border-radius: 3cqw;
    background: #fff;
    color: #000;
    font-size: 4.3cqw;
    font-weight: 600;
}

/* Search with no matches (HomeTabView.searchEmptyState): 44pt glass,
   subheadline message, centred in the space under the scope picker */
.app-body.is-none {
    display: flex;
    flex-direction: column;
}

.search-none {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4.1cqw;
    padding: 0 8.1cqw 10cqw;
    text-align: center;
    font-size: 3.8cqw;
    color: rgba(235, 235, 245, 0.6);
}

.search-none .empty-icon .i {
    width: 11.2cqw;
    height: 11.2cqw;
}

/* The + menu (SRS v3.30): pops up above the tab bar's centre + */
.menu.is-up {
    top: auto;
    right: auto;
    left: 50%;
    bottom: calc(2.6% + 16cqw);
    width: 66%;
    translate: -50% 0;
    transform-origin: bottom center;
}
