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

::selection {
    color: #1a1a1a;
    background: #eaf6ff;
}

::-moz-selection {
    color: #1a1a1a;
    background: #eaf6ff;
}

html {
    scroll-behavior: smooth;
}

body {
    max-width: 760px;
    margin: 0 auto;
    padding: 80px 40px;
    color: #37352f;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.header {
    display: flex;
    width: 100%;
    max-width: 640px;
    align-items: baseline;
    justify-content: space-between;
    gap: 60px;
    margin: 0 auto 80px;
    flex-wrap: nowrap;
}

.name {
    color: #37352f;
    font-size: 1.15rem;
    font-weight: 500;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 28px;
}

.nav a {
    color: #888;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav a:hover {
    color: #37352f;
}

.content {
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
}

h1 {
    margin-bottom: 6px;
    color: #37352f;
    font-size: 2.1rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.25;
}

h2,
h3 {
    color: #37352f;
    font-weight: 400;
    letter-spacing: 0;
    text-decoration: underline;
    text-decoration-color: #37352f;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    scroll-margin-top: 40px;
}

h2 {
    margin-top: 56px;
    margin-bottom: 16px;
    font-size: 1.25rem;
}

h3 {
    margin-top: 36px;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

h4 {
    margin-top: 30px;
    margin-bottom: 9px;
    color: #37352f;
    font-size: 0.96rem;
    font-weight: 600;
    letter-spacing: 0;
}

p {
    margin-bottom: 14px;
    color: #37352f;
    font-size: 1rem;
    line-height: 1.7;
}

ul {
    margin: 0 0 16px 22px;
    padding: 0;
}

li {
    margin-bottom: 5px;
    color: #37352f;
    font-size: 1rem;
    line-height: 1.7;
}

li::marker {
    color: #9a9a95;
}

a {
    color: #37352f;
    text-decoration: underline;
    text-decoration-color: rgba(55, 53, 47, 0.35);
    text-underline-offset: 2px;
}

a:hover {
    text-decoration-color: #37352f;
}

strong {
    color: #37352f;
    font-weight: 600;
}

.meta {
    margin-bottom: 40px;
    color: #9a9a95;
    font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, monospace;
    font-size: 0.85rem;
    letter-spacing: 0;
}

.category-note,
.company-factline,
.chart-note,
.comparison-label,
.image-kicker {
    font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, monospace;
    letter-spacing: 0;
}

.category-note {
    margin: -4px 0 22px;
    color: #8c8c87;
    font-size: 0.76rem;
    line-height: 1.65;
}

.company-entry {
    margin-top: 30px;
    scroll-margin-top: 32px;
}

.company-entry strong {
    font-weight: 600;
}

.company-factline {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
    margin: -3px 0 10px;
    color: #9a9a95;
    font-size: 0.7rem;
    line-height: 1.55;
}

.company-factline span + span::before {
    margin-right: 14px;
    color: #cececa;
    content: "/";
}

.text-highlight {
    padding: 2px 5px;
    border-radius: 2px;
    color: #37352f;
    background: #eaf6ff;
}

.closing-question {
    margin: 30px 0;
    padding: 18px 0 18px 18px;
    border-left: 2px solid #37352f;
}

.closing-question p:last-child {
    margin-bottom: 0;
}

.hardware-map {
    position: relative;
    width: 100%;
    margin: 30px 0 12px;
}

.market-map-title {
    margin-bottom: 2px;
    color: #a8a8a2;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    font-size: 9.5px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hardware-map-frame {
    width: 100%;
    overflow: visible;
}

.hardware-map svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.axis-label,
.axis-note,
.dot-label,
.lane-label {
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    letter-spacing: 0;
}

.axis-label {
    fill: #9a9a95;
    font-size: 10px;
}

.axis-note,
.lane-label {
    fill: #b8b8b2;
    font-size: 8.5px;
}

.grid-line {
    stroke: #ecece8;
    stroke-width: 1;
}

.axis-line {
    stroke: #c9c9c3;
    stroke-width: 1.2;
}

.lane-line {
    stroke: #d8d8d3;
    stroke-width: 1;
    stroke-dasharray: 3 4;
}

.hardware-dot {
    cursor: pointer;
    transition: r 0.15s ease, opacity 0.15s ease;
}

.hardware-dot:hover,
.hardware-dot:focus {
    opacity: 1;
    outline: none;
    r: 7.5;
}

.hardware-dot.active {
    stroke: #7d7d77;
    stroke-width: 1.5;
}

.hardware-dot.is-undisclosed {
    fill: #fff;
    stroke-width: 2;
}

.dot-label {
    fill: #5a5852;
    font-size: 9px;
    pointer-events: none;
}

.market-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 12px;
    color: #8c8c87;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    font-size: 10px;
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 5px;
    border-radius: 50%;
    vertical-align: -1px;
}

.legend-dot.consumer { background: #4c78a8; }
.legend-dot.prosumer { background: #59a14f; }
.legend-dot.frontier { background: #e15759; }
.legend-dot.undisclosed { border: 1.5px solid #8c8c87; background: #fff; }

.chart-note {
    margin: 12px 0 26px;
    color: #9a9a95;
    font-size: 0.69rem;
    line-height: 1.65;
}

.hardware-tooltip {
    position: absolute;
    z-index: 5;
    width: min(340px, calc(100vw - 32px));
    max-height: min(520px, calc(100vh - 32px));
    padding: 14px 16px;
    overflow-y: auto;
    border: 1px solid #deded9;
    border-radius: 4px;
    color: #37352f;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    font-size: 0.86rem;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity 0.12s ease;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.hardware-tooltip.visible {
    opacity: 1;
}

.hardware-tooltip.pinned {
    pointer-events: auto;
}

.tooltip-company {
    display: block;
    margin-bottom: 4px;
    padding-right: 26px;
}

.tooltip-summary {
    display: block;
    margin-bottom: 8px;
    color: #6e6e68;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    font-size: 11px;
    line-height: 1.5;
}

.hardware-tooltip .tooltip-note,
.hardware-tooltip .funding-note,
.hardware-tooltip .funding-empty {
    margin: 0;
    color: #5a5852;
    font-size: 0.79rem;
    line-height: 1.5;
}

.funding-history-label {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #ecece8;
    color: #9a9a95;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    font-size: 9px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.funding-rounds {
    margin: 3px 0 0;
    padding: 0;
    list-style: none;
}

.funding-rounds li {
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0ed;
    color: #5a5852;
    font-size: 0.75rem;
    line-height: 1.45;
}

.funding-round-line {
    display: block;
}

.funding-round-date,
.funding-round-stage {
    color: #777771;
}

.funding-round-amount {
    color: #37352f;
    font-weight: 600;
}

.funding-round-link {
    display: inline-block;
    margin-top: 2px;
    font-size: 0.72rem;
}

.hardware-tooltip .funding-note,
.hardware-tooltip .funding-empty {
    margin-top: 8px;
    color: #85857f;
    font-size: 0.72rem;
}

.tooltip-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    color: #9a9a95;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.tooltip-close:hover {
    color: #37352f;
}

.link-preview-card {
    position: fixed;
    z-index: 1100;
    width: 320px;
    height: 220px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0;
    background: #fff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.link-preview-card.show {
    opacity: 1;
    pointer-events: auto;
}

.link-preview-card iframe {
    width: 960px;
    height: 660px;
    border: 0;
    transform: scale(0.333);
    transform-origin: top left;
    pointer-events: none;
}

.link-preview-card img {
    display: block;
    width: 100%;
    height: calc(100% - 28px);
    object-fit: cover;
    object-position: top left;
}

.link-preview-fallback {
    display: flex;
    height: calc(100% - 28px);
    padding: 22px;
    flex-direction: column;
    justify-content: flex-end;
    gap: 7px;
    color: #37352f;
    background: #f5f5f1;
}

.link-preview-fallback strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    font-weight: 500;
}

.link-preview-fallback span {
    display: -webkit-box;
    overflow: hidden;
    color: #777771;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    font-size: 10px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.link-preview-url {
    display: block;
    padding: 6px 10px;
    overflow: hidden;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    color: #aaa;
    background: #f8f8f8;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    font-size: 9px;
    line-height: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.device-comparison,
.product-gallery {
    display: grid;
    gap: 10px;
    margin: 24px 0 8px;
}

.device-comparison,
.product-gallery--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.product-gallery--single {
    grid-template-columns: minmax(0, 1fr);
}

.device-comparison figure,
.product-gallery figure {
    min-width: 0;
}

.device-comparison img,
.product-gallery img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border: 1px solid #eee;
    border-radius: 3px;
    object-fit: cover;
    background: #f7f7f5;
}

.product-gallery--single img {
    aspect-ratio: 16 / 9;
}

.device-comparison .friend-image {
    object-position: center;
}

.device-comparison .snap-image {
    object-position: center 40%;
}

.product-gallery .syncere-image,
.product-gallery .halobraid-image {
    object-position: 68% center;
}

.product-gallery .roomba-image {
    object-position: center 58%;
}

.product-gallery .physical-phone-image {
    object-position: center 55%;
}

.product-gallery .minimal-phone-image {
    object-fit: contain;
    object-position: center;
    background: #fff;
}

.device-comparison figcaption,
.product-gallery figcaption {
    margin-top: 7px;
    color: #9a9a95;
    font-family: "Iowan Old Style", Georgia, serif;
    font-size: 0.77rem;
    font-style: italic;
    line-height: 1.45;
}

.image-kicker {
    display: block;
    margin-bottom: 2px;
    color: #73736e;
    font-size: 0.61rem;
    font-style: normal;
    text-transform: uppercase;
}

.image-source-note {
    margin-bottom: 24px;
    color: #9a9a95;
    font-family: "Iowan Old Style", Georgia, serif;
    font-size: 0.78rem;
    font-style: italic;
    line-height: 1.55;
}

.camera-comparison {
    margin: 24px 0 14px;
    overflow-x: auto;
    border-top: 1px solid #e8e8e5;
    border-bottom: 1px solid #e8e8e5;
}

.camera-comparison table {
    width: 100%;
    min-width: 590px;
    border-collapse: collapse;
}

.camera-comparison th,
.camera-comparison td {
    padding: 12px 10px;
    border-bottom: 1px solid #eeeeeb;
    color: #37352f;
    font-size: 0.84rem;
    line-height: 1.45;
    text-align: left;
    vertical-align: top;
}

.camera-comparison tr:last-child td {
    border-bottom: 0;
}

.camera-comparison th {
    color: #6e6e68;
    background: #fbfbfa;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: uppercase;
}

.camera-comparison td:not(:first-child) {
    white-space: nowrap;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    font-size: 0.72rem;
}

.camera-comparison .average-row td {
    color: #5a5852;
    background: #fbfbfa;
    font-weight: 600;
}

.toc {
    position: fixed;
    top: 100px;
    left: 40px;
    width: 200px;
    max-height: calc(100vh - 140px);
    padding-right: 12px;
    overflow-y: auto;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    letter-spacing: 0;
    line-height: 1.7;
}

.toc-label {
    margin-bottom: 12px;
    color: #c4c4c0;
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

.toc ul ul {
    margin-top: 4px;
    margin-bottom: 4px;
    padding-left: 12px;
}

.toc li {
    margin-bottom: 5px;
    font-size: 12px;
    line-height: 1.55;
}

.toc ul ul li {
    margin-bottom: 3px;
    font-size: 11px;
}

.toc a {
    position: relative;
    display: block;
    padding-left: 12px;
    color: #9a9a95;
    text-decoration: none;
    transition: color 0.15s ease;
}

.toc a::before {
    position: absolute;
    left: 0;
    color: #37352f;
    font-family: inherit;
    content: "›";
    opacity: 0;
    transition: opacity 0.15s ease;
}

.toc a:hover,
.toc li.active > a {
    color: #37352f;
}

.toc li.active > a::before {
    opacity: 1;
}

.toc ul ul a {
    color: #b8b8b2;
}

.audio-toggle {
    position: fixed;
    top: 28px;
    right: max(8px, calc((100vw - 760px) / 2 - 48px));
    z-index: 20;
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #9a9a95;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    opacity: 0.82;
}

.audio-toggle:hover {
    color: #37352f;
    opacity: 1;
}

.audio-toggle svg {
    display: block;
    width: 22px;
    height: 22px;
}

.audio-toggle .mute-slash {
    display: none;
}

.audio-toggle.is-muted .sound-wave {
    display: none;
}

.audio-toggle.is-muted .mute-slash {
    display: block;
}

@media (max-width: 1100px) {
    .toc {
        display: none;
    }
}

@media (max-width: 600px) {
    body {
        padding: 40px 20px;
    }

    .header {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        gap: 20px;
        margin-bottom: 50px;
    }

    .nav {
        justify-content: flex-end;
        gap: 18px;
        flex-wrap: nowrap;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        margin-top: 44px;
        font-size: 1.1rem;
    }

    h3 {
        margin-top: 30px;
        font-size: 1rem;
    }

    p,
    li {
        font-size: 0.96rem;
    }

    .company-factline {
        display: block;
    }

    .company-factline span {
        display: block;
    }

    .company-factline span + span::before {
        margin-right: 7px;
    }

    .link-preview-card {
        display: none !important;
    }

    .hardware-map-frame {
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }

    .hardware-map svg {
        width: 560px;
        max-width: none;
        touch-action: pan-x pan-y;
    }

    .hardware-dot {
        stroke-width: 20px;
        touch-action: manipulation;
    }

    .hardware-dot.active {
        stroke-width: 1.5px;
    }

    .hardware-tooltip {
        position: fixed;
        top: auto !important;
        right: 16px;
        bottom: max(16px, env(safe-area-inset-bottom));
        left: 16px !important;
        width: auto;
        min-width: 0;
        max-width: none;
        max-height: min(70vh, 480px);
        overflow-y: auto;
        transform: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .tooltip-company {
        padding-right: 32px;
    }

    .tooltip-close {
        top: 0;
        right: 0;
        width: 44px;
        height: 44px;
    }

    .device-comparison,
    .product-gallery {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .device-comparison img,
    .product-gallery img,
    .product-gallery--single img {
        aspect-ratio: 16 / 10;
    }

    .audio-toggle {
        top: auto;
        right: 16px;
        bottom: 16px;
    }
}

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

    .hardware-dot,
    .hardware-tooltip,
    .link-preview-card,
    .toc a {
        transition: none;
    }
}
