/* ---------------------------------------------------------------------
   CaLab design system, light.

   Load AFTER site.css and blog.css so equal-specificity rules win on order:

     <link rel="stylesheet" href="/assets/css/site.css">
     <link rel="stylesheet" href="/assets/css/blog.css">
     <link rel="stylesheet" href="/assets/css/calab.css">

   Opt in per page. Pages that have not been reviewed keep the old dark
   gradient, so adding this link is a deliberate act, not a site-wide change.
   --------------------------------------------------------------------- */

:root {
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 22px;

    --bg: #f7f4ed;
    --panel: #fffdf8;
    --panel-2: #f1ede3;

    --ink: #14231d;
    --ink-2: rgba(20, 35, 29, 0.74);
    --ink-3: rgba(20, 35, 29, 0.52);

    --line: rgba(20, 35, 29, 0.13);
    --line-2: rgba(20, 35, 29, 0.24);

    --accent: #16744c;
    --accent-hi: #0f5637;
    --accent-wash: rgba(22, 116, 76, 0.055);
    --accent-soft: rgba(22, 116, 76, 0.35);

    --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

    --shadow-sm: 0 1px 2px rgba(20, 35, 29, 0.05), 0 2px 8px rgba(20, 35, 29, 0.05);
    --shadow: 0 1px 2px rgba(20, 35, 29, 0.06), 0 12px 32px rgba(20, 35, 29, 0.10);
}

/* Warm paper. Product screenshots should be the only saturated thing here. */
body {
    display: block;
    background-color: var(--bg);
    background-image:
        radial-gradient(900px 620px at 12% -10%, rgba(22, 116, 76, 0.07), transparent 62%),
        radial-gradient(800px 560px at 94% 2%, rgba(214, 196, 154, 0.24), transparent 60%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--ink);
    font-weight: 400;
    text-align: left;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--bg);
        color: var(--ink);
    }
}

/* ---- Type ---- */
.prose {
    line-height: 1.65;
}

.prose p,
.prose li {
    font-size: clamp(1rem, 0.28vw + 0.95rem, 1.1rem);
    color: var(--ink-2);
}

.prose h1,
.prose h2,
.prose h3,
.hero .title,
.close h2 {
    font-family: var(--font-display);
    color: var(--ink);
    text-wrap: balance;
}

.prose h2 {
    font-size: clamp(1.35rem, 1vw + 1.05rem, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin: 0 0 12px;
}

.prose h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.prose b,
.prose strong {
    color: var(--ink);
    font-weight: 600;
}

.hero .title {
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.06;
    font-size: clamp(1.85rem, 2.3vw + 1.15rem, 3rem);
}

.hero .eyebrow {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
}

/* These carry class="subtitle muted", and .muted below forces 0.86rem with
   !important. Higher specificity wins that fight. */
.hero .subtitle,
.hero .subtitle.muted,
.hero .lead {
    font-size: clamp(1.05rem, 0.45vw + 0.96rem, 1.25rem) !important;
    line-height: 1.5;
    color: var(--ink-2) !important;
    max-width: 82ch;
    margin: 4px auto 0;
    text-align: center;
    text-wrap: balance;
}

/* Stop browsers breaking inside hyphenated prices like $79.99-a-year. */
.nb {
    white-space: nowrap;
}

/* Links read as links, not as buttons. */
.prose a:not(.cta) {
    color: var(--accent);
    background: none;
    border: 0;
    border-bottom: 1px solid var(--accent-soft);
    border-radius: 0;
    padding: 0;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.prose a:not(.cta):visited {
    color: var(--accent);
}

.prose a:not(.cta):hover,
.prose a:not(.cta):active {
    color: var(--accent-hi);
    border-bottom-color: var(--accent-hi);
    background: none;
}

.prose a:not(.cta):focus-visible {
    outline: 2px solid var(--accent-soft);
    outline-offset: 3px;
    background: none;
}

/* blog.css boxes these; here they are quiet text. */
.muted {
    background: none;
    padding: 0;
    border-radius: 0;
    color: var(--ink-3);
    font-size: 0.86rem !important;
}

.note {
    font-size: 0.86rem !important;
    color: var(--ink-3);
    line-height: 1.55;
}

.date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-3);
    opacity: 1;
}

code {
    font-family: var(--font-mono);
    background: rgba(20, 35, 29, 0.06);
    border: 1px solid var(--line);
    padding: 0.12em 0.4em;
    border-radius: 6px;
    font-size: 0.92em;
    color: var(--ink);
}

pre {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 16px 18px;
    overflow-x: auto;
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 18px 0;
    color: var(--ink-2);
}

pre code {
    background: transparent;
    border: 0;
    padding: 0;
    font-size: inherit;
}

/* ---- Sticky glassy bar ---- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(247, 244, 237, 0.7);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(20, 35, 29, 0.08);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 980px;
    margin: 0 auto;
    padding: 12px clamp(12px, 4vw, 28px);
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
}

.nav-brand img {
    border-radius: 7px;
    display: block;
}

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

.nav-links a {
    color: var(--ink-2);
    text-decoration: none;
    border-bottom: 0;
    font-size: 0.92rem;
    padding: 7px 12px;
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover {
    color: var(--ink);
    background: rgba(20, 35, 29, 0.05);
    border-bottom: 0;
}

/* Same pill as the page CTA, sized for the bar. */
.nav-cta {
    background: var(--accent);
    color: #fff !important;
    font-family: var(--font-display);
    font-weight: 600;
    padding: 8px 18px !important;
    box-shadow: 0 1px 2px rgba(20, 35, 29, 0.06), 0 6px 16px rgba(20, 35, 29, 0.12);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.nav-cta:hover {
    background: var(--accent-hi) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.nav-cta:active {
    transform: translateY(0);
}

/* Keep anchors clear of the sticky bar. */
html {
    scroll-padding-top: 76px;
}

/* ---- Buttons ---- */
.cta {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
    padding: 14px 30px;
    border-radius: 999px;
    margin-top: 0;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.cta:hover {
    background: var(--accent-hi);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(20, 35, 29, 0.08), 0 18px 44px rgba(20, 35, 29, 0.16);
}

.cta:active {
    transform: translateY(0);
}

/* Back link, light version of the blog.css chip. */
.back-link {
    background: rgba(255, 253, 248, 0.75);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--line);
    color: var(--ink-2);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.86rem;
}

.back-link:hover {
    background: var(--panel);
    color: var(--ink);
}

/* ---- Surfaces ---- */
.feature,
.benefit {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.feature b {
    display: block;
    margin-bottom: 6px;
}

.feature b a,
.prose .feature b a:not(.cta) {
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.22rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--ink);
    border-bottom: 0;
    background: none;
    padding: 0;
}

.prose .feature b a:not(.cta):visited {
    color: var(--ink);
}

.prose .feature b a:not(.cta):hover {
    color: var(--accent);
    border-bottom: 0;
    background: none;
    text-decoration: none;
}

.feature .muted {
    margin: 6px 0 0;
    padding: 0;
    background: none;
    color: var(--ink-2);
    font-size: 0.97rem !important;
    line-height: 1.55;
}

.shot {
    margin: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 10px;
    box-shadow: var(--shadow-sm);
}

.shot img {
    border-radius: var(--r-sm);
    display: block;
}

.shot figcaption {
    font-size: 0.8rem;
    color: var(--ink-3);
    margin-top: 10px;
    line-height: 1.45;
}

/* ---- Tables: rules, not a grid of boxes ---- */
.table-wrap {
    overflow-x: auto;
    margin: 18px 0 14px;
}

table.compare {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    border-top: 1px solid var(--line-2);
}

table.compare th,
table.compare td {
    background: none;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 15px 18px;
    text-align: left;
    vertical-align: top;
    line-height: 1.5;
}

table.compare thead th {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: var(--ink-3);
    border-bottom-color: var(--line-2);
    white-space: nowrap;
}

table.compare thead th:nth-child(2) {
    color: var(--accent);
}

table.compare tbody td {
    color: var(--ink-2);
}

table.compare tbody td:first-child {
    color: var(--ink-3);
}

table.compare tbody td:nth-child(2) {
    color: var(--ink);
    background: var(--accent-wash);
}

table.compare tbody tr:last-child td {
    border-bottom: 0;
}

/* ---- Footer ---- */
footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--ink-3);
    padding-top: 40px;
}

.prose footer a:not(.cta) {
    color: var(--ink-3);
    border-bottom-color: transparent;
    margin: 0 8px;
}

.prose footer a:not(.cta):hover {
    color: var(--ink);
    border-bottom-color: var(--line-2);
}
