/* /desktop/desktop.css: the look shared by /desktop/ (the one page, also served at /desktop/buy/), /desktop/thanks/ and /desktop/vs-cold-turkey/.
   The site's own surfaces, type and white-on-dark buttons (templates/base.css, site/index.html); no accent colour. Each page
   keeps the first-paint guard inline in its <head> and links this file there. */
@font-face { font-family: "Nunito HF"; src: url("/fonts/nunito-latin.8ffb11f3.woff2") format("woff2"); font-weight: 500 800; font-style: normal; font-display: swap; size-adjust: 104%; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito HF"; src: url("/fonts/nunito-latin-ext.9921e972.woff2") format("woff2"); font-weight: 500 800; font-style: normal; font-display: swap; size-adjust: 104%; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  color-scheme: dark;
  --ground: #1F1F23; --raised: #2B2B30; --well: #3A3A40;
  --ink: #F3F4F6; --ink-muted: #A1A3AC; --ink-faint: #71737C;
  --hair: rgba(255, 255, 255, 0.08); --hair-soft: rgba(255, 255, 255, 0.05);
  --error: #F87171;
  --shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.32);
  --display: ui-rounded, "SF Pro Rounded", "Nunito HF", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --page: 68rem;
}
:root[data-theme="light"] {
  color-scheme: light;
  --ground: #F2F2F7; --raised: #FFFFFF; --well: #E4E4E9;
  --ink: #1C1C1E; --ink-muted: #55565E; --ink-faint: #84848B;
  --hair: rgba(0, 0, 0, 0.09); --hair-soft: rgba(0, 0, 0, 0.055);
  --error: #DC2626;
  --shadow-lift: 0 1px 2px rgba(20, 22, 28, 0.08), 0 12px 32px rgba(20, 22, 28, 0.10);
}
[hidden] { display: none !important; }
body {
  background: var(--ground); color: var(--ink); font-family: var(--body);
  font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden;
}
h1, h2, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
.gutter { width: 100%; max-width: var(--page); margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }

/* the mark, as the masthead's */
.top { padding-top: 22px; }
.mark { display: inline-flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; border-radius: 10px; }
.mark-glyph { width: 28px; height: 28px; border-radius: 9px; overflow: hidden; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09); }
.mark-glyph svg { width: 100%; height: 100%; }
.mark-name { font-family: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, monospace; font-weight: 700; font-size: 1rem; letter-spacing: -0.02em; white-space: nowrap; }

main { flex: 1; padding-top: 28px; padding-bottom: 48px; }
@media (min-width: 900px) { main { padding-top: clamp(48px, 9vh, 104px); padding-bottom: 72px; } }
h1 { font-family: var(--display); font-size: clamp(2.3rem, 8vw, 3.4rem); line-height: 1.04; letter-spacing: -0.03em; font-weight: 700; text-wrap: balance; }
h2 { font-family: var(--display); font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; font-weight: 700; }
/* a section's title on the landing pages (bigger than a card's h2), and the Desktop Pro selling line */
.section-title, .pitch { font-family: var(--display); font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; text-wrap: balance; }
.lede { font-size: clamp(1.0625rem, 2vw, 1.1875rem); color: var(--ink-muted); line-height: 1.55; max-width: 34rem; text-wrap: pretty; }
.note { font-size: 0.9375rem; color: var(--ink-muted); line-height: 1.6; }
.fine { font-size: 0.8125rem; color: var(--ink-faint); line-height: 1.6; }
.eyebrow { font-family: var(--body); font-size: 0.6875rem; font-weight: 620; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-faint); line-height: 1.4; }
.stack { display: flex; flex-direction: column; }
.g8 { gap: 8px; } .g12 { gap: 12px; } .g16 { gap: 16px; } .g24 { gap: 24px; }

/* cards, as the home page's pricing cards */
.card { background: var(--raised); border: 1px solid var(--hair); border-radius: 24px; padding: clamp(22px, 5vw, 32px); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card.lift { box-shadow: var(--shadow-lift); border-color: var(--hair); }
.rule { border: 0; border-top: 1px solid var(--hair-soft); margin: 4px 0; }

/* white on dark (dark on light), as the site's buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  flex: 1 0 auto; font: inherit; font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--ground); background: var(--ink);
  border: 1px solid var(--ink); border-radius: 999px; padding: 10px 18px; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn.big { font-size: 1rem; padding: 13px 22px; }
.btn:hover { opacity: 0.88; }
.btn:disabled { opacity: 0.6; cursor: default; }
.link {
  align-self: flex-start; background: none; border: 0; padding: 0; font: inherit; font-size: 0.875rem; color: var(--ink-muted);
  text-decoration: underline; text-decoration-color: var(--ink-faint); text-underline-offset: 3px; cursor: pointer;
}
.link:hover { color: var(--ink); }
.link:disabled { opacity: 0.6; cursor: default; }
a.more { color: var(--ink); font-weight: 600; font-size: 0.9375rem; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; border-radius: 4px; }
a.more::after { content: "\2192"; transition: transform 160ms ease; }
a.more:hover::after { transform: translateX(3px); }
:is(.btn, .link, .mark, a.more, footer a, .help a):focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* forms: the buy page's sign-in and the code gate in front of the desktop pages (lib/desktop-gate-page.js), one step at a time */
.step-box { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.say { font-size: 0.9375rem; overflow-wrap: anywhere; text-wrap: pretty; }
.say.strong { font-weight: 600; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
input {
  flex: 999 1 12rem; min-width: 0; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--ground); border: 1px solid var(--hair); border-radius: 999px; padding: 10px 16px; transition: border-color 200ms ease;
}
input:focus { outline: none; border-color: var(--ink-faint); }
input::placeholder { color: var(--ink-faint); }
input::selection { background: var(--well); color: var(--ink); }
/* the browser's autofill keeps the field's own colours, not its light-blue fill */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink); caret-color: var(--ink); -webkit-box-shadow: 0 0 0 40px var(--ground) inset; transition: background-color 9999s;
}
.err { font-size: 0.9375rem; line-height: 1.5; color: var(--error); }
/* on a phone every step stacks the same way: the field, then the button at full width */
@media (max-width: 480px) { .row > input, .row > .btn { flex: 1 1 100%; } }

/* lists with a tick, in ink (no accent colour) */
.ticks { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; line-height: 1.5; }
.tick { width: 22px; height: 22px; flex: none; border-radius: 999px; background: var(--well); display: grid; place-items: center; margin-top: 0; }
.tick svg { width: 13px; height: 13px; fill: var(--ink); }

/* the platform mark (Apple) */
.os { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--well); display: grid; place-items: center; }
.os svg { width: 22px; height: 22px; fill: var(--ink); }
.os svg.apple { width: 17px; height: 20px; margin-top: -2px; }

footer { padding-bottom: 36px; display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.8125rem; }
footer a { color: var(--ink-muted); text-decoration: none; border-radius: 3px; }
footer a:hover { color: var(--ink); }

/* The Mac app's own look (its Desktop Pro page: colours, glass cards, radii, type and springs from the app's SwiftUI source),
   on <body class="app">: /desktop/ (and /desktop/buy/, the same page), /desktop/thanks/ and the code gate. One app point is
   var(--p): 1.1px on a phone, 1.25px from 900px, so the page keeps the app's proportions a little larger. The app is always
   dark; in the light theme the cards go light and the app's own renders stay dark. /desktop/vs-cold-turkey/ keeps the look above. */
.app {
  --k: 1.1; --p: calc(var(--k) * 1px);
  /* Apple's rounded face where it resolves, else the plain system font (Eric, 11-28: no Nunito here; Chrome and Firefox showed
     the whole page in it). Japanese still leads with "Nunito HF" for its Latin words (the :lang(ja) rule below). */
  --rounded: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: var(--rounded); --body: var(--rounded);
  --chip: #3A3A40; --panel: #1F1F23;
  --unlock: #FF9230; --habits: #22C55E; --insights: #0A84FF; --friends: #0A84FF; --sync: #40C8E0; --blocks: #5E5CE6;
  --spring: cubic-bezier(0.25, 0.9, 0.3, 1); --spring-card: cubic-bezier(0.25, 0.85, 0.35, 1);
  font-family: var(--body);   /* the rounded face; Japanese and Chinese keep their system fonts (the :lang rules below) */
}
@supports (transition-timing-function: linear(0, 1)) {
  .app {
    /* SwiftUI spring(response 0.42, damping 0.82) over 620 ms, and the card's spring(response 0.45, damping 0.9) over 560 ms */
    --spring: linear(0, 0.0604, 0.1951, 0.3545, 0.5096, 0.6455, 0.7563, 0.8417, 0.9044, 0.948, 0.9769, 0.9947, 1.0048, 1.0096, 1.0111, 1.0107, 1.0093, 1.0075, 1.0058, 1.0042, 1.0029, 1.0019, 1.0012, 1.0007, 1);
    --spring-card: linear(0, 0.0437, 0.1441, 0.2681, 0.3954, 0.5143, 0.6191, 0.7077, 0.7803, 0.8382, 0.8832, 0.9176, 0.9433, 0.9621, 0.9756, 0.985, 0.9914, 0.9957, 0.9984, 1.0001, 1.001, 1.0014, 1.0015, 1.0015, 1);
  }
}
@media (min-width: 900px) { .app { --k: 1.25; } }
:root[data-theme="light"] .app { --chip: #E6E6EB; }
/* a card: #2B2B30 with the top shine and a 1px stroke fading from white 0.11 to 0.02 */
.app .glass {
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012) 25%, rgba(255, 255, 255, 0) 55%) padding-box,
    linear-gradient(var(--raised), var(--raised)) padding-box,
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.02)) border-box,
    var(--raised);
}
:root[data-theme="light"] .app .glass {
  background: linear-gradient(var(--raised), var(--raised)) padding-box, linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.1)) border-box, var(--raised);
  box-shadow: 0 1px 2px rgba(20, 22, 28, 0.05), 0 8px 24px rgba(20, 22, 28, 0.06);
}
.app .card { border-radius: calc(24 * var(--p)); }
/* the app's buttons: Buy is white on dark (dark on light), 12 corners, 36 tall; the second kind is the chip grey */
.app .btn { border-radius: calc(12 * var(--p)); min-height: calc(36 * var(--p)); padding: 0 calc(16 * var(--p)); font-size: calc(13 * var(--p)); font-weight: 600; transition: opacity 150ms ease-out; }
.app .btn.big { min-height: calc(40 * var(--p)); font-size: calc(13.5 * var(--p)); padding: 0 calc(18 * var(--p)); }
.app .btn.alt { background: var(--chip); color: var(--ink); border-color: transparent; }
.app input { border-radius: calc(12 * var(--p)); min-height: calc(36 * var(--p)); padding: 0 calc(12 * var(--p)); background: var(--panel); font-size: max(16px, calc(13.5 * var(--p))); }
:root[data-theme="light"] .app input { background: var(--ground); }
.app input:focus { border-color: rgba(255, 146, 48, 0.6); box-shadow: 0 0 0 3px rgba(255, 146, 48, 0.18); }
.app .eyebrow { font-family: var(--body); font-size: calc(12 * var(--p)); font-weight: 800; letter-spacing: 0.067em; color: var(--ink-faint); }
.app .pill { display: inline-flex; align-items: center; flex: none; height: calc(18 * var(--p)); padding: 0 calc(7 * var(--p)); border-radius: 999px; font-size: calc(11 * var(--p)); font-weight: 700; line-height: 1; letter-spacing: 0.01em; }
.app .pill.free { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.app .pill.pro { background: rgba(255, 146, 48, 0.16); color: var(--unlock); }
:root[data-theme="light"] .app .pill.free { background: rgba(0, 0, 0, 0.07); }
:root[data-theme="light"] .app .pill.pro { color: #C2410C; }

/* CJK: system fonts per language, as on the rest of the site. "Nunito HF" (Latin only) leads under :lang(ja) so Latin words in a
   Japanese heading stay bold and rounded instead of taking Hiragino Maru Gothic's thin Latin */
:lang(ja) { --display: "Nunito HF", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
            --body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif; }
:lang(zh-Hant) { --display: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", sans-serif; --body: var(--display); }
:lang(zh-Hans) { --display: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif; --body: var(--display); }
:lang(ja), :lang(zh) { line-break: strict; }
:is(:lang(ja), :lang(zh)) :is(h1, h2, .price) { letter-spacing: normal; }
:is(:lang(ja), :lang(zh)) .eyebrow { letter-spacing: 0.04em; }
