/* /install: public page, Evdont brand (dental-landing/brand/palette.md and
   the landing site): warm paper, ink, one teal dot; Noto Serif Display for
   the voice, Inter Tight for everything you read. Follows the OS theme unless
   the person picked one inside the app (data-theme). */

:root {
    --bg: #f6f4ef;
    --surface: #ece8df;
    --ink: #14181c;
    --ink-2: #3a4147;
    --muted: #5d666b;
    --line: rgba(20, 24, 28, 0.12);
    --accent: #0e8f86;
    --accent-ink: #0b6f68;
    --accent-soft: rgba(14, 143, 134, 0.16);
    --dot: #0e8f86;
    --btn: #14181c;
    --btn-ink: #f6f4ef;
    --btn-hover: #2a3036;
    --mock: #ffffff;
    --mock-row: #f2f1ee;
    --mock-ink: #1d2226;
    --mock-muted: #8a9296;
    --tile-blank: #e4e1da;
    --shadow-icon: 0 2px 3px rgba(20, 24, 28, 0.10), 0 10px 24px rgba(20, 24, 28, 0.14);
    --serif: "Noto Serif Display", "Noto Serif", Georgia, serif;
    --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
    --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter Tight", sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #141618;
        --surface: #1c1f22;
        --ink: #eef1f4;
        --ink-2: #c9cfd3;
        --muted: #9aa3a8;
        --line: rgba(238, 241, 244, 0.12);
        --accent: #3fc1b5;
        --accent-ink: #5fd0c5;
        --accent-soft: rgba(63, 193, 181, 0.2);
        --dot: #3fc1b5;
        --btn: #eef1f4;
        --btn-ink: #14181c;
        --btn-hover: #ffffff;
        --mock: #25292d;
        --mock-row: #2e3337;
        --mock-ink: #e6eaed;
        --mock-muted: #8d969b;
        --tile-blank: #2b3034;
        --shadow-icon: 0 2px 3px rgba(0, 0, 0, 0.3), 0 10px 24px rgba(0, 0, 0, 0.4);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #141618;
    --surface: #1c1f22;
    --ink: #eef1f4;
    --ink-2: #c9cfd3;
    --muted: #9aa3a8;
    --line: rgba(238, 241, 244, 0.12);
    --accent: #3fc1b5;
    --accent-ink: #5fd0c5;
    --accent-soft: rgba(63, 193, 181, 0.2);
    --dot: #3fc1b5;
    --btn: #eef1f4;
    --btn-ink: #14181c;
    --btn-hover: #ffffff;
    --mock: #25292d;
    --mock-row: #2e3337;
    --mock-ink: #e6eaed;
    --mock-muted: #8d969b;
    --tile-blank: #2b3034;
    --shadow-icon: 0 2px 3px rgba(0, 0, 0, 0.3), 0 10px 24px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.5;
    font-feature-settings: "ss01", "cv11";
    -webkit-font-smoothing: antialiased;
    caret-color: var(--accent);
    scrollbar-color: var(--line) transparent;
}
::selection { background: var(--accent-soft); color: var(--ink); }
a { color: var(--accent-ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.ico {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 max(16px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(16px, env(safe-area-inset-left));
}
@media (min-width: 720px) { .page { padding-left: 40px; padding-right: 40px; } }

/* ── Top bar ─────────────────────────────────────────────────────── */
.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
    padding-top: env(safe-area-inset-top);
}
.top__brand { display: inline-flex; color: var(--ink); border-radius: 6px; }
.brand-logo { display: block; height: 30px; width: auto; }
.langs { display: flex; gap: 2px; font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.04em; }
.langs a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 10px;
    color: var(--muted);
    text-decoration: none;
    border-radius: 8px;
}
.langs a:hover { color: var(--ink); }
.langs a[aria-current] {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

/* ── Main: the lead on the left, this device's steps on the right ── */
.main {
    display: grid;
    gap: 40px;
    padding: 28px 0 0;
}
@media (min-width: 960px) {
    .main {
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
        gap: 72px;
        padding-top: 64px;
        align-items: start;
    }
}

.lead__icon {
    display: block;
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 2px 2px rgba(20, 24, 28, 0.12)) drop-shadow(0 8px 14px rgba(20, 24, 28, 0.14));
}
@media (min-width: 960px) { .lead__icon { width: 80px; height: 80px; } }
/* The ink tile would sink into a dark page: give it a hairline edge. */
:root[data-theme="dark"] .lead__icon,
:root[data-theme="dark"] .app-tile img { filter: drop-shadow(0 0 0.75px rgba(238, 241, 244, 0.55)) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.4)); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .lead__icon,
    :root:not([data-theme="light"]) .app-tile img { filter: drop-shadow(0 0 0.75px rgba(238, 241, 244, 0.55)) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.4)); }
}

h1 {
    margin: 28px 0 16px;
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -0.025em;
    text-wrap: balance;
}
.lead__text {
    margin: 0;
    max-width: 36ch;
    color: var(--ink-2);
    font-size: 1.125rem;
    line-height: 1.55;
    text-wrap: pretty;
}

[data-panel] { display: none; }
[data-panel].is-active { display: block; }

.action { margin-top: 32px; }
.action__say { margin: 0; max-width: 40ch; font-size: 1.0625rem; color: var(--ink); text-wrap: pretty; }
.action__say + .btn, .action__say + .action__row { margin-top: 20px; }
.action__row { display: flex; flex-wrap: wrap; gap: 12px; }
.action__note { margin: 14px 0 0; max-width: 40ch; color: var(--muted); font-size: 0.9375rem; }
.action__status { margin: 10px 0 0; min-height: 1.5em; color: var(--ink-2); font-size: 0.9375rem; }
.action__status:empty { min-height: 0; margin: 0; }
.action__done {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    font-size: 1.125rem;
    font-weight: 600;
}
.action__done .ico { color: var(--accent); width: 1.4em; height: 1.4em; stroke-width: 2.25; }
.action__done + .action__say + .btn { margin-top: 24px; }
.copied { margin: 12px 0 0; color: var(--accent-ink); font-size: 0.9375rem; font-weight: 500; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 12px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.18s var(--ease-out), box-shadow 0.18s ease;
}
.btn--primary {
    background: var(--btn);
    color: var(--btn-ink);
    box-shadow: 0 1px 2px rgba(20, 24, 28, 0.16), 0 6px 16px rgba(20, 24, 28, 0.14);
}
.btn--primary:hover { background: var(--btn-hover); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(20, 24, 28, 0.2); }
.btn--quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--quiet:hover { border-color: var(--ink-2); }
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"] .ico { animation: busy 1.1s ease-in-out infinite; }
@keyframes busy { 50% { transform: translateY(2px); opacity: 0.55; } }
#installBtn { width: 100%; }
@media (min-width: 520px) { #installBtn { width: auto; min-width: 260px; } }

/* ── Illustrated steps ───────────────────────────────────────────── */
.how > .is-active {
    background: var(--surface);
    border-radius: 24px;
    padding: 8px 20px;
}
@media (min-width: 720px) { .how > .is-active { padding: 12px 32px; } }
.how > [data-panel="installed"].is-active { padding: 32px; }

.steps { list-style: none; margin: 0; padding: 0; }
.step {
    display: grid;
    gap: 14px;
    padding: 20px 0;
}
.step + .step { border-top: 1px solid var(--line); }
@media (min-width: 720px) {
    .step { grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: center; padding: 22px 0; }
}
.step__text { display: flex; gap: 14px; align-items: flex-start; }
.step__n {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--ink);
    font-size: 0.8125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-top: 1px;
}
.step__title { margin: 2px 0 0; font-size: 1.0625rem; font-weight: 600; line-height: 1.35; text-wrap: balance; }
.step__body { margin: 4px 0 0; color: var(--muted); font-size: 0.9375rem; max-width: 42ch; text-wrap: pretty; }

.fallback {
    margin: 4px 0 20px;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--mock);
    border: 1px solid var(--line);
    font-size: 0.9375rem;
    color: var(--ink-2);
}
.fallback p { margin: 0; }
.fallback__title { font-weight: 600; color: var(--ink); margin-bottom: 4px !important; }

/* Mocks: small, honest drawings of the real browser and OS controls. They
   use the platform UI font on purpose: the words are the ones the person
   will see on their own screen. */
.mock {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    height: 128px;
    padding: 12px;
    border-radius: 16px;
    background: var(--mock);
    border: 1px solid var(--line);
    color: var(--mock-ink);
    font-family: var(--ui);
    font-size: 0.8125rem;
    line-height: 1.2;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(20, 24, 28, 0.04), 0 8px 20px rgba(20, 24, 28, 0.05);
}
.mock .ico { width: 20px; height: 20px; }
.mock__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 9px;
    background: var(--mock-row);
    white-space: nowrap;
}
.mock__row .ico { width: 17px; height: 17px; color: var(--mock-muted); }
.mock__row.hl .ico { color: var(--accent); }

/* The highlighted control: a teal ring, as if a finger were on it. */
.hl {
    position: relative;
    border-radius: 9px;
    box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px var(--accent-soft);
    color: var(--mock-ink);
}
.hl--text { padding: 3px 8px; border-radius: 6px; background: var(--accent); color: #fff; box-shadow: none; font-weight: 600; }
.hl--fill { padding: 6px 12px; border-radius: 8px; background: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); font-weight: 600; }
.hl--btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: center;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--btn);
    color: var(--btn-ink);
    font-family: var(--sans);
    font-weight: 600;
    white-space: nowrap;
}
.hl--btn .ico { width: 18px; height: 18px; }
.hl--tile { border-radius: 10px; }
:root[data-theme="dark"] .hl--text, :root[data-theme="dark"] .hl--fill { color: #0c1a19; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hl--text, :root:not([data-theme="light"]) .hl--fill { color: #0c1a19; }
}

/* The one authored moment: when this device's steps appear, each
   highlighted control "receives a tap" in turn, in step order. */
@media (prefers-reduced-motion: no-preference) {
    .is-active .hl { animation: tap 1.1s var(--ease-out) both; }
    .is-active .step:nth-child(1) .hl { animation-delay: 0.35s; }
    .is-active .step:nth-child(2) .hl { animation-delay: 0.75s; }
    .is-active .step:nth-child(3) .hl { animation-delay: 1.15s; }
}
@keyframes tap {
    0% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 0 var(--accent-soft); }
    35% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 12px var(--accent-soft); }
    100% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px var(--accent-soft); }
}

.mock--ios-bar { justify-content: space-between; padding: 12px 10px 10px; }
.mock__url {
    align-self: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--mock-row);
    color: var(--mock-muted);
    font-size: 0.75rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mock__bar { display: flex; justify-content: space-around; align-items: center; color: var(--mock-muted); }
.mock__bar .hl { display: inline-flex; padding: 6px; color: var(--accent); border-radius: 10px; }

.mock--sheet, .mock--menu { justify-content: center; }
.mock--confirm { justify-content: flex-start; gap: 12px; }
.mock__head { display: flex; justify-content: space-between; align-items: center; color: var(--mock-muted); }
.mock--confirm .app-tile { align-self: center; }

.mock--button { align-items: center; }
.mock--dialog { align-items: stretch; gap: 10px; }
.mock__title { font-weight: 600; }
.mock__buttons { display: flex; gap: 10px; justify-content: flex-end; align-items: center; color: var(--mock-muted); }
.mock--dialog .app-tile { flex-direction: row; gap: 10px; font-size: 0.875rem; color: var(--mock-ink); }

.mock--dock { justify-content: flex-end; align-items: center; }
.dock {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 14px;
    background: var(--mock-row);
}
.dock i, .home__grid i { display: block; width: 30px; height: 30px; border-radius: 8px; background: var(--tile-blank); }
.dock .hl { display: inline-flex; padding: 0; }

.mock--menubar { justify-content: flex-start; padding: 0; }
.mock__menus {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 34px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    background: var(--mock-row);
    white-space: nowrap;
    overflow: visible;
}
.mock__menus b { font-weight: 700; }
.mock__menus .hl { position: relative; }
.mock__menus .hl::after {
    /* the menu dropping open under the highlighted "File" */
    content: "";
    position: absolute;
    left: -4px;
    top: calc(100% + 7px);
    width: 128px;
    height: 70px;
    border-radius: 8px;
    background: repeating-linear-gradient(var(--mock) 0 10px, var(--mock-row) 10px 22px);
    border: 1px solid var(--line);
    box-shadow: 0 6px 16px rgba(20, 24, 28, 0.08);
}

.mock--address { flex-direction: row; align-items: center; gap: 8px; }
.mock__field {
    flex: 1 1 auto;
    min-width: 0;
    padding: 9px 12px;
    border-radius: 999px;
    background: var(--mock-row);
    color: var(--mock-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mock__field.hl { color: var(--mock-ink); }
.mock--address > .hl { display: inline-flex; padding: 5px; color: var(--accent); }

.app-tile {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: var(--ui);
    font-size: 0.75rem;
    color: var(--mock-ink);
}
.app-tile img { display: block; border-radius: 23%; box-shadow: var(--shadow-icon); }
.app-tile--xs img { width: 30px; height: 30px; border-radius: 8px; box-shadow: none; }
.app-tile--xs span { display: none; }
.app-tile--sm img { width: 40px; height: 40px; }
.app-tile--lg img { width: 64px; height: 64px; }

.home { display: grid; place-items: center; min-height: 260px; }
.home__grid { display: grid; grid-template-columns: repeat(4, 64px); gap: 22px 20px; justify-items: center; align-items: start; }
.home__grid i { width: 64px; height: 64px; border-radius: 15px; }

/* ── Facts, other devices, footer ────────────────────────────────── */
.facts {
    display: grid;
    gap: 28px;
    margin-top: 88px;
    padding-top: 36px;
    border-top: 1px solid var(--line);
}
@media (min-width: 820px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; margin-top: 120px; } }
.fact h2 {
    margin: 0 0 8px;
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.fact p { margin: 0; color: var(--muted); font-size: 0.9875rem; max-width: 38ch; text-wrap: pretty; }

.devices { margin-top: 56px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.devices summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    font-size: 1.0625rem;
}
.devices summary::-webkit-details-marker { display: none; }
.devices summary::after {
    content: "";
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-right: 1.75px solid currentColor;
    border-bottom: 1.75px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
    transition: transform 0.25s var(--ease-out);
}
.devices[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.devices dl { display: grid; gap: 6px 32px; margin: 0 0 20px; }
@media (min-width: 720px) { .devices dl { grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); row-gap: 14px; } }
.devices dt { font-weight: 600; }
.devices dd { margin: 0 0 12px; color: var(--muted); }
@media (min-width: 720px) { .devices dd { margin: 0; } }
.devices__link { margin: 0 0 24px; color: var(--ink-2); font-variant-numeric: tabular-nums; user-select: all; }

.foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 0 40px;
    color: var(--muted);
    font-size: 0.9375rem;
}
.foot__continue {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-weight: 600;
    text-decoration: none;
}
.foot__continue:hover { text-decoration: underline; }
.foot__continue .ico { transition: transform 0.2s var(--ease-out); }
.foot__continue:hover .ico { transform: translateX(3px); }

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