/*
 * New-brand tokens and shared primitives: the one source for the landing (landing.css) and the
 * signed-in app (app.css). Static file (no build step): production ships the committed public/build
 * and never rebuilds CSS, so nothing here depends on Tailwind. Every class is `nb-` prefixed.
 *
 * Art direction "unread dot" (manychat-rea-analysis/design/landing-v2-art-direction.md)
 *  - Type: Wanted Sans Variable 800–950 for display text and numbers, Pretendard Variable for UI text.
 *  - Colour: white + ink + mist, and one neon: Acid Lime (#CCFF3A), on the landing, the public pages, login
 *    and the signed-in app alike. Lime is a fill with ink on it (16.1:1), never text or a thin line on white
 *    (1.17:1). It marks the primary action, unread, keywords (as a highlighter) and the active place; where
 *    a mark must read on white it pairs with an ink edge (dot = lime + ink ring, focus = lime + ink outline).
 *    On ink, lime may be text or an icon (16.1:1). Red is only for errors and destructive acts (--nb-danger).
 *    No second accent: the 11-23 yellow/violet/pink landing palette was rolled back on 11-26 (Steve: back
 *    to the neon base).
 *  - Shape: panels 32, cards 24, tiles 20, controls 14, pill buttons. Cards sit on mist or a hairline,
 *    never on a shadow; only floating layers (menus, sheets, dialogs, toasts) and phones cast one.
 *  - Motion: 150 focus · 200 hover/dialog · 240 reveal · 300 sheet/scene/progress · 400 switch knob.
 *    One curve, no springs, no blur or scale entrances.
 */

/* A single file per face and script. Hangul outside the UI subset uses the
 * metric-matched system fallback, including user-supplied text.
 */
@font-face {
    font-family: "DMDM Text";
    src: url("./fonts/text-latin-v1.woff2") format("woff2");
    font-weight: 45 930;
    font-display: swap;
    unicode-range: U+0020-024F, U+2000-206F, U+20A9, U+20AC, U+2122, U+2190, U+2192, U+2212, U+2215, U+3000, U+FFFD;
}
@font-face {
    font-family: "DMDM Text";
    src: url("./fonts/text-ko-v1.woff2") format("woff2");
    font-weight: 45 930;
    font-display: swap;
    unicode-range: U+1100-11FF, U+3130-318F, U+AC00-D7A3;
}
@font-face {
    font-family: "DMDM Display";
    src: url("./fonts/display-latin-v1.woff2") format("woff2");
    font-weight: 400 1000;
    font-display: swap;
    unicode-range: U+0020-024F, U+2000-206F, U+20A9, U+20AC, U+2122, U+2190, U+2192, U+2212, U+2215, U+3000, U+FFFD;
}
@font-face {
    font-family: "DMDM Display";
    src: url("./fonts/display-ko-v1.woff2") format("woff2");
    font-weight: 400 1000;
    font-display: swap;
    unicode-range: U+1100-11FF, U+3130-318F, U+AC00-D7A3;
}

/*
 * Metric-matched fallbacks for the two web fonts (font-display: swap): text laid out in the local
 * font before the web font arrives takes the same room, so the swap moves nothing (it was CLS
 * 0.01-0.12 on a cold load, worst where a date or count sat at the end of a line). One face per weight
 * band and glyph group (Hangul, letters, digits, punctuation and spaces), since each group differs
 * from the web font by a different amount: Hangul from Apple SD Gothic Neo, the rest from Helvetica
 * Neue (Apple) or Arial (Windows). size-adjust = the web font's rendered width over the local
 * font's on Korean / English UI copy, dates and counts at that weight (Chrome, kerning on); ascent,
 * descent and line gap are the web fonts' (both 0.952 / 0.241 / 0), divided by size-adjust because
 * the browser scales the overrides too. A face whose local font is missing is skipped and the next
 * family in the stack takes over. Generated by tests/e2e/newbrand-font-fallbacks.mjs.
 */
@font-face { font-family: "NB Text Fallback"; src: local("AppleSDGothicNeo-Regular"); font-weight: 1 449; unicode-range: U+1100-11FF, U+3000-303F, U+3130-318F, U+A960-A97F, U+AC00-D7AF, U+D7B0-D7FF, U+FF00-FFEF; size-adjust: 99.91%; ascent-override: 95.30%; descent-override: 24.14%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("AppleSDGothicNeo-Medium"); font-weight: 450 574; unicode-range: U+1100-11FF, U+3000-303F, U+3130-318F, U+A960-A97F, U+AC00-D7AF, U+D7B0-D7FF, U+FF00-FFEF; size-adjust: 99.91%; ascent-override: 95.30%; descent-override: 24.14%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("AppleSDGothicNeo-Bold"); font-weight: 575 774; unicode-range: U+1100-11FF, U+3000-303F, U+3130-318F, U+A960-A97F, U+AC00-D7AF, U+D7B0-D7FF, U+FF00-FFEF; size-adjust: 99.91%; ascent-override: 95.30%; descent-override: 24.14%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("AppleSDGothicNeo-ExtraBold"); font-weight: 775 1000; unicode-range: U+1100-11FF, U+3000-303F, U+3130-318F, U+A960-A97F, U+AC00-D7AF, U+D7B0-D7FF, U+FF00-FFEF; size-adjust: 99.91%; ascent-override: 95.30%; descent-override: 24.14%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("HelveticaNeue"); font-weight: 1 449; unicode-range: U+0041-005A, U+0061-007A, U+00C0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; size-adjust: 99.78%; ascent-override: 95.42%; descent-override: 24.17%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("HelveticaNeue-Medium"); font-weight: 450 574; unicode-range: U+0041-005A, U+0061-007A, U+00C0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; size-adjust: 98.82%; ascent-override: 96.35%; descent-override: 24.41%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 575 674; unicode-range: U+0041-005A, U+0061-007A, U+00C0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; size-adjust: 97.41%; ascent-override: 97.74%; descent-override: 24.76%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 675 774; unicode-range: U+0041-005A, U+0061-007A, U+00C0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; size-adjust: 99.13%; ascent-override: 96.05%; descent-override: 24.33%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 775 1000; unicode-range: U+0041-005A, U+0061-007A, U+00C0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; size-adjust: 100.84%; ascent-override: 94.42%; descent-override: 23.92%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("HelveticaNeue"); font-weight: 1 449; unicode-range: U+0030-0039; size-adjust: 99.15%; ascent-override: 96.03%; descent-override: 24.33%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("HelveticaNeue-Medium"); font-weight: 450 574; unicode-range: U+0030-0039; size-adjust: 101.65%; ascent-override: 93.67%; descent-override: 23.73%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 575 674; unicode-range: U+0030-0039; size-adjust: 103.76%; ascent-override: 91.76%; descent-override: 23.25%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 675 774; unicode-range: U+0030-0039; size-adjust: 105.62%; ascent-override: 90.15%; descent-override: 22.84%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 775 1000; unicode-range: U+0030-0039; size-adjust: 107.53%; ascent-override: 88.55%; descent-override: 22.43%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("HelveticaNeue"); font-weight: 1 449; unicode-range: U+0000-002F, U+003A-0040, U+005B-0060, U+007B-00BF, U+2000-206F; size-adjust: 94.29%; ascent-override: 100.98%; descent-override: 25.58%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("HelveticaNeue-Medium"); font-weight: 450 574; unicode-range: U+0000-002F, U+003A-0040, U+005B-0060, U+007B-00BF, U+2000-206F; size-adjust: 94.01%; ascent-override: 101.28%; descent-override: 25.66%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 575 674; unicode-range: U+0000-002F, U+003A-0040, U+005B-0060, U+007B-00BF, U+2000-206F; size-adjust: 93.63%; ascent-override: 101.69%; descent-override: 25.76%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 675 774; unicode-range: U+0000-002F, U+003A-0040, U+005B-0060, U+007B-00BF, U+2000-206F; size-adjust: 93.92%; ascent-override: 101.38%; descent-override: 25.68%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 775 1000; unicode-range: U+0000-002F, U+003A-0040, U+005B-0060, U+007B-00BF, U+2000-206F; size-adjust: 94.18%; ascent-override: 101.09%; descent-override: 25.61%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback Arial"; src: local("ArialMT"); font-weight: 1 549; unicode-range: U+0041-005A, U+0061-007A, U+00C0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; size-adjust: 100.71%; ascent-override: 94.54%; descent-override: 23.95%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback Arial"; src: local("Arial-BoldMT"); font-weight: 550 674; unicode-range: U+0041-005A, U+0061-007A, U+00C0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; size-adjust: 97.59%; ascent-override: 97.57%; descent-override: 24.72%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback Arial"; src: local("Arial-BoldMT"); font-weight: 675 1000; unicode-range: U+0041-005A, U+0061-007A, U+00C0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; size-adjust: 99.49%; ascent-override: 95.70%; descent-override: 24.24%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback Arial"; src: local("ArialMT"); font-weight: 1 549; unicode-range: U+0030-0039; size-adjust: 100.04%; ascent-override: 95.17%; descent-override: 24.11%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback Arial"; src: local("Arial-BoldMT"); font-weight: 550 674; unicode-range: U+0030-0039; size-adjust: 104.45%; ascent-override: 91.16%; descent-override: 23.09%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback Arial"; src: local("Arial-BoldMT"); font-weight: 675 1000; unicode-range: U+0030-0039; size-adjust: 106.52%; ascent-override: 89.39%; descent-override: 22.64%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback Arial"; src: local("ArialMT"); font-weight: 1 549; unicode-range: U+0000-002F, U+003A-0040, U+005B-0060, U+007B-00BF, U+2000-206F; size-adjust: 93.14%; ascent-override: 102.23%; descent-override: 25.90%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback Arial"; src: local("Arial-BoldMT"); font-weight: 550 674; unicode-range: U+0000-002F, U+003A-0040, U+005B-0060, U+007B-00BF, U+2000-206F; size-adjust: 90.64%; ascent-override: 105.05%; descent-override: 26.61%; line-gap-override: 0%; }
@font-face { font-family: "NB Text Fallback Arial"; src: local("Arial-BoldMT"); font-weight: 675 1000; unicode-range: U+0000-002F, U+003A-0040, U+005B-0060, U+007B-00BF, U+2000-206F; size-adjust: 90.97%; ascent-override: 104.66%; descent-override: 26.52%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback"; src: local("AppleSDGothicNeo-Bold"); font-weight: 1 749; unicode-range: U+1100-11FF, U+3000-303F, U+3130-318F, U+A960-A97F, U+AC00-D7AF, U+D7B0-D7FF, U+FF00-FFEF; size-adjust: 99.91%; ascent-override: 95.30%; descent-override: 24.14%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback"; src: local("AppleSDGothicNeo-ExtraBold"); font-weight: 750 1000; unicode-range: U+1100-11FF, U+3000-303F, U+3130-318F, U+A960-A97F, U+AC00-D7AF, U+D7B0-D7FF, U+FF00-FFEF; size-adjust: 99.91%; ascent-override: 95.30%; descent-override: 24.14%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 1 749; unicode-range: U+0041-005A, U+0061-007A, U+00C0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; size-adjust: 100.65%; ascent-override: 94.60%; descent-override: 23.97%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 750 849; unicode-range: U+0041-005A, U+0061-007A, U+00C0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; size-adjust: 102.57%; ascent-override: 92.83%; descent-override: 23.52%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 850 1000; unicode-range: U+0041-005A, U+0061-007A, U+00C0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; size-adjust: 104.49%; ascent-override: 91.12%; descent-override: 23.08%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 1 749; unicode-range: U+0030-0039; size-adjust: 106.22%; ascent-override: 89.64%; descent-override: 22.71%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 750 849; unicode-range: U+0030-0039; size-adjust: 108.38%; ascent-override: 87.85%; descent-override: 22.26%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 850 1000; unicode-range: U+0030-0039; size-adjust: 110.52%; ascent-override: 86.15%; descent-override: 21.83%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 1 749; unicode-range: U+0000-002F, U+003A-0040, U+005B-0060, U+007B-00BF, U+2000-206F; size-adjust: 97.47%; ascent-override: 97.69%; descent-override: 24.75%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 750 849; unicode-range: U+0000-002F, U+003A-0040, U+005B-0060, U+007B-00BF, U+2000-206F; size-adjust: 99.00%; ascent-override: 96.18%; descent-override: 24.37%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback"; src: local("HelveticaNeue-Bold"); font-weight: 850 1000; unicode-range: U+0000-002F, U+003A-0040, U+005B-0060, U+007B-00BF, U+2000-206F; size-adjust: 100.43%; ascent-override: 94.81%; descent-override: 24.02%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback Arial"; src: local("Arial-BoldMT"); font-weight: 1 849; unicode-range: U+0041-005A, U+0061-007A, U+00C0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; size-adjust: 102.75%; ascent-override: 92.67%; descent-override: 23.48%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback Arial"; src: local("Arial-BoldMT"); font-weight: 850 1000; unicode-range: U+0041-005A, U+0061-007A, U+00C0-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; size-adjust: 104.67%; ascent-override: 90.96%; descent-override: 23.04%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback Arial"; src: local("Arial-BoldMT"); font-weight: 1 849; unicode-range: U+0030-0039; size-adjust: 109.10%; ascent-override: 87.28%; descent-override: 22.11%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback Arial"; src: local("Arial-BoldMT"); font-weight: 850 1000; unicode-range: U+0030-0039; size-adjust: 111.25%; ascent-override: 85.59%; descent-override: 21.68%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback Arial"; src: local("Arial-BoldMT"); font-weight: 1 849; unicode-range: U+0000-002F, U+003A-0040, U+005B-0060, U+007B-00BF, U+2000-206F; size-adjust: 95.83%; ascent-override: 99.35%; descent-override: 25.17%; line-gap-override: 0%; }
@font-face { font-family: "NB Display Fallback Arial"; src: local("Arial-BoldMT"); font-weight: 850 1000; unicode-range: U+0000-002F, U+003A-0040, U+005B-0060, U+007B-00BF, U+2000-206F; size-adjust: 97.22%; ascent-override: 97.94%; descent-override: 24.81%; line-gap-override: 0%; }

:root {
    /* Workspace palette */
    --nb-accent: #ccff3a;
    --nb-accent-2: #b6ec12;
    --nb-accent-soft: #efffc4;
    --nb-on-accent: #111113;
    --nb-ink: #111113;
    --nb-ink-2: #46474e;
    --nb-ink-3: #6e6f77;
    --nb-line: #e6e6ea;
    --nb-line-2: #d6d6dc;
    --nb-mist: #f3f3f5;
    --nb-mist-2: #e9e9ed;
    --nb-paper: #ffffff;
    --nb-on-ink: #ffffff;
    --nb-danger: #b5102c;       /* errors and destructive only: 6.8:1 on white, white on it 6.8:1 */
    --nb-danger-soft: #fdecef;
    --nb-dim: rgba(17, 17, 19, .42);

    /* Type */
    --nb-font: "DMDM Text", "NB Text Fallback", "NB Text Fallback Arial", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --nb-display: "DMDM Display", "NB Display Fallback", "NB Display Fallback Arial", "DMDM Text", -apple-system, sans-serif;
    --nb-text-sm: 13px;
    --nb-text-md: 15px;
    --nb-text-lg: 17px;
    --nb-text-xl: 24px;
    --nb-text-2xl: 34px;

    /* Headings (landing v3). Hangul set heavy and tight reads as a shouting poster, and line-height 1.0
       makes 받침 touch the next line, so headings are a step lighter and looser than v2:
       display 780 · -0.04em · 1.06, section 760 · -0.035em · 1.12, card 720 · -0.03em · 1.2.
       Latin carries more letters per line and no 받침: a hair tighter in tracking and leading. */
    --nb-h-display-w: 780;
    --nb-h-display-ls: -0.04em;
    --nb-h-display-lh: 1.06;
    --nb-h2-w: 760;
    --nb-h2-ls: -0.035em;
    --nb-h2-lh: 1.12;
    --nb-h3-w: 720;
    --nb-h3-ls: -0.03em;
    --nb-h3-lh: 1.2;

    /* Space: 4px base */
    --nb-space-1: 4px;
    --nb-space-2: 8px;
    --nb-space-3: 12px;
    --nb-space-4: 16px;
    --nb-space-5: 20px;
    --nb-space-6: 24px;
    --nb-space-8: 32px;
    --nb-space-10: 40px;
    --nb-space-12: 48px;
    --nb-gutter: 16px;

    /* Radius */
    --nb-radius-sm: 10px;
    --nb-radius-md: 14px;
    --nb-radius-lg: 24px;
    --nb-radius-tile: 20px;
    --nb-radius-panel: 32px;
    --nb-radius-pill: 999px;

    /* Elevation: floating layers only (grey-blue, measured on ManyChat) and the phone. */
    --nb-shadow-rest: 0 6px 16px rgba(132, 146, 166, .16);
    --nb-shadow-hover: 0 8px 32px rgba(132, 146, 166, .22);
    --nb-shadow-float: 0 1px 2px rgba(17, 17, 19, .06), 0 12px 32px rgba(132, 146, 166, .26);
    --nb-e-phone: 0 2px 6px -2px rgba(17, 17, 19, .22), 0 24px 48px -20px rgba(17, 17, 19, .34);

    /* Motion */
    --nb-dur-1: 150ms;
    --nb-dur-2: 200ms;
    --nb-dur-reveal: 300ms;
    --nb-dur-3: 300ms;
    --nb-dur-4: 400ms;
    --nb-ease: cubic-bezier(.2, 0, 0, 1);
    --nb-ease-io: ease-in-out;
    /* Motion system (app): three durations, two curves. Standard for state changes (hover, colour,
       press), emphasized for things arriving (page, sheet, settings menu, toast, tab). */
    --nb-motion-1: 120ms;
    --nb-motion-2: 200ms;
    --nb-motion-3: 320ms;
    --nb-ease-standard: cubic-bezier(.2, 0, 0, 1);
    --nb-ease-emph: cubic-bezier(.05, .7, .1, 1);

    /* Touch target floor (in-app browsers) */
    --nb-hit: 44px;
}
:root:lang(en) {
    --nb-h-display-ls: -0.035em; --nb-h-display-lh: 1.0;
    --nb-h2-ls: -0.03em; --nb-h2-lh: 1.06;
    --nb-h3-ls: -0.02em; --nb-h3-lh: 1.15;
}

/*
 * Languages past Korean and English (config/locales.php). The page's <html lang> is the registry's
 * BCP-47 tag, so :lang(es) covers es-419 and es-ES. Web fonts named here load only on their own
 * language's pages (newbrand.layouts._locale-fonts, Google Fonts split by unicode-range, swap).
 *  - Latin-script languages read like English: its tighter headings.
 *  - Vietnamese: the brand subsets lack U+1EA0-1EF9 (ạ ế ữ ...), which would come from another face
 *    mid-word, so whole runs are Inter (the Latin Pretendard is built on). Stacked marks on capitals
 *    (Ế, Ộ) need taller lines and less negative tracking.
 *  - Japanese: Latin from the brand face, kana and kanji from Hiragino on Apple (nothing downloaded)
 *    or Noto Sans JP elsewhere. No metric-matched fallback in this stack: its faces cover CJK punctuation
 *    and full-width forms from a Korean font.
 *  - Each stack keeps the metric-matched fallbacks for Latin, so the swap moves nothing there.
 *  - Thai and Devanagari: Noto. Any letter-spacing breaks Devanagari's headline joins and Thai mark
 *    stacking (Chrome also drops ligatures under it), so tracking is zero everywhere; marks above and
 *    below the line need taller lines.
 */
:root:lang(es), :root:lang(pt), :root:lang(fr), :root:lang(de), :root:lang(it), :root:lang(id) {
    --nb-h-display-ls: -0.035em; --nb-h-display-lh: 1.0;
    --nb-h2-ls: -0.03em; --nb-h2-lh: 1.06;
    --nb-h3-ls: -0.02em; --nb-h3-lh: 1.15;
}
:root:lang(vi) {
    --nb-font: "Inter", "NB Text Fallback", "NB Text Fallback Arial", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --nb-display: "Inter", "NB Display Fallback", "NB Display Fallback Arial", -apple-system, sans-serif;
    --nb-h-display-ls: -0.03em; --nb-h-display-lh: 1.14;
    --nb-h2-ls: -0.025em; --nb-h2-lh: 1.18;
    --nb-h3-ls: -0.015em; --nb-h3-lh: 1.25;
}
:root:lang(ja) {
    --nb-font: "DMDM Text", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
    --nb-display: "DMDM Display", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", sans-serif;
    --nb-h-display-ls: -0.02em; --nb-h-display-lh: 1.14;
    --nb-h2-ls: -0.015em; --nb-h2-lh: 1.2;
    --nb-h3-ls: -0.01em; --nb-h3-lh: 1.3;
}
:root:lang(th) {
    --nb-font: "DMDM Text", "NB Text Fallback", "NB Text Fallback Arial", "Noto Sans Thai", Thonburi, "Leelawadee UI", sans-serif;
    --nb-display: "DMDM Display", "NB Display Fallback", "NB Display Fallback Arial", "Noto Sans Thai", Thonburi, "Leelawadee UI", sans-serif;
}
:root:lang(hi) {
    --nb-font: "DMDM Text", "NB Text Fallback", "NB Text Fallback Arial", "Noto Sans Devanagari", "Kohinoor Devanagari", "Nirmala UI", sans-serif;
    --nb-display: "DMDM Display", "NB Display Fallback", "NB Display Fallback Arial", "Noto Sans Devanagari", "Kohinoor Devanagari", "Nirmala UI", sans-serif;
}
:root:is(:lang(th), :lang(hi)) {
    --nb-h-display-ls: 0; --nb-h-display-lh: 1.3;
    --nb-h2-ls: 0; --nb-h2-lh: 1.34;
    --nb-h3-ls: 0; --nb-h3-lh: 1.4;
}
/* Japanese and Thai have no spaces between words, so the Korean `word-break: keep-all` (body and ~20
   components, plus Tailwind's break-keep) leaves a heading or a sentence one unbreakable line that runs off
   a phone screen (Japanese everywhere; Thai in Safari, which applies keep-all to Thai too). They break
   normally, Japanese by phrase where the browser can (auto-phrase, Chrome 119+). */
:root:is(:lang(ja), :lang(th)) body, :root:is(:lang(ja), :lang(th)) body * { word-break: normal !important; line-break: strict; overflow-wrap: anywhere; }
@supports (word-break: auto-phrase) {
    :root:lang(ja) body, :root:lang(ja) body * { word-break: auto-phrase !important; }
}
:root:is(:lang(ja), :lang(th)) :is(.break-all, .nb-int__codebox code) { word-break: break-all !important; }
/* The hero's first line 「リンクください」 is one phrase, wider than a phone at the 44px floor: size it to the
   column there so it does not break mid-word. */
@media (max-width: 480px) {
    :root:lang(ja) .nb-hero__title { font-size: min(44px, 10.4cqi); }
}
:root:is(:lang(th), :lang(hi)) body { line-height: 1.6; }
:root:is(:lang(th), :lang(hi)) *, :root:is(:lang(th), :lang(hi)) *::before, :root:is(:lang(th), :lang(hi)) *::after { letter-spacing: 0 !important; }
@media (prefers-reduced-motion: reduce), (update: slow) {
    :root { --nb-dur-1: 0ms; --nb-dur-2: 0ms; --nb-dur-reveal: 0ms; --nb-dur-3: 0ms; --nb-dur-4: 0ms; --nb-motion-1: 0ms; --nb-motion-2: 0ms; --nb-motion-3: 0ms; }
}

/* ─── Base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--nb-font);
    font-size: var(--nb-text-md);
    color: var(--nb-ink);
    background: var(--nb-paper);
    word-break: keep-all;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--nb-ink); outline-offset: 2px; box-shadow: 0 0 0 2px var(--nb-accent); }
.nb-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;
}

/* StylMatch DM logo (partials/logo + wordmark): the original drawing (both bubbles, both DMs) at every size,
 * inline SVG in currentColor so it is drawn as vector at the screen's pixel ratio. Lockup 32px tall in bars and
 * the sidebar, 24px in phone bars, 48px in the footer; the mark alone 24px. Ink (or white) on light surfaces,
 * Acid Lime on dark ones. Outlines: Baloo 2 ExtraBold, OFL. */
.nb-logo, .nb-wordmark { display: inline-flex; flex: none; align-items: center; justify-content: center; }
.nb-logo { width: 24px; height: 24px; }
.nb-logo svg { width: 100%; height: 100%; }
.nb-wordmark svg { display: block; height: 32px; width: auto; aspect-ratio: 405.94 / 100; }
.nb-logo svg, .nb-wordmark svg { fill: currentColor; }
/* Dark surfaces: Acid Lime, as drawn (a nav over a dark hero, footer, app sidebar, ink tiles). On the
 * public pages with a dark hero this also fixes the ink logo that was invisible there. */
:is(.nb-nav[data-tone="dark"]:not([data-open]) .nb-nav__brand, .nb-ft__logo, .nb-side .nb-brand, .nb-ob-link__us, .nb-igc-consent__tile--us) :is(.nb-wordmark, .nb-logo) {
    color: var(--nb-accent);
}
.nb-ft__logo .nb-wordmark svg { height: 48px; }
/* Phone bars that share the row with other controls (landing nav, docs header): 24px so the row stays on one line. */
@media (max-width: 639.98px) {
    :is(.nb-nav .nb-nav__bar, .nb-docs__top) .nb-wordmark.nb-brand__name { width: auto; }
    :is(.nb-nav__bar, .nb-docs__top) .nb-wordmark svg { height: 24px; }
}
.nb-wordmark + .nb-logo { display: none; }

/* ─── Language menu (newbrand.layouts._lang-menu, lang-menu.js) ─────────────────────────────────────
 * One control on every page: globe + the current language's short code + chevron, opening the offered
 * languages named in themselves. Desktop: a menu under the button (above it in the footer). Phones: a
 * bottom sheet over a scrim, rows a thumb wide. Placements (--top, --panel: app.css) only restyle the
 * button. */
.nb-lmenu { position: relative; flex: none; min-width: 0; }
.nb-lmenu__btn {
    display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 9px 0 8px;
    border: 0; border-radius: 999px; background: none; color: inherit; font: inherit; font-size: 13px; font-weight: 700;
    letter-spacing: .02em; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background-color var(--nb-motion-1) var(--nb-ease-standard), color var(--nb-motion-1) var(--nb-ease-standard);
}
.nb-lmenu__btn .nb-lmenu__globe { width: 17px; height: 17px; flex: none; }
.nb-lmenu__btn .nb-lmenu__chev { width: 14px; height: 14px; flex: none; margin-left: -1px; opacity: .7; transition: transform var(--nb-motion-1) var(--nb-ease-standard); }
.nb-lmenu__btn[aria-expanded="true"] .nb-lmenu__chev { transform: rotate(180deg); }
.nb-lmenu__btn:focus-visible { outline: 2px solid var(--nb-ink); outline-offset: 2px; }
.nb-lmenu__cur { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.nb-lmenu[data-busy] .nb-lmenu__btn { opacity: .55; cursor: progress; }
@media (hover: hover) { .nb-lmenu__btn:hover, .nb-lmenu__btn[aria-expanded="true"] { background: var(--nb-mist); color: var(--nb-ink); } }
.nb-lmenu__pop {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 220px; max-width: min(320px, calc(100vw - 24px));
    max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain; padding: 6px;
    border-radius: var(--nb-radius-md); background: var(--nb-paper); color: var(--nb-ink); letter-spacing: 0; text-align: start;
    box-shadow: var(--nb-shadow-float), 0 0 0 1px var(--nb-line);
    transform-origin: top right; animation: nb-lmenu-in var(--nb-motion-1) var(--nb-ease-standard);
}
.nb-lmenu__pop[hidden], .nb-lmenu__scrim[hidden] { display: none; }
@keyframes nb-lmenu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.nb-lmenu__title { display: none; }
.nb-lmenu__item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 0 10px;
    border-radius: var(--nb-radius-sm); font-size: 14px; font-weight: 600; line-height: 1.25; color: var(--nb-ink-2); text-decoration: none;
}
.nb-lmenu__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The brand faces lack Vietnamese's stacked vowels: the whole name in one system face, not two. */
.nb-lmenu__item[lang="vi"] .nb-lmenu__name { font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif; }
.nb-lmenu__item .nb-lmenu__tick { width: 18px; height: 18px; flex: none; visibility: hidden; }
.nb-lmenu__item[aria-checked="true"] { color: var(--nb-ink); }
.nb-lmenu__item[aria-checked="true"] .nb-lmenu__tick { visibility: visible; }
.nb-lmenu__item:hover, .nb-lmenu__item:focus-visible { background: var(--nb-mist); color: var(--nb-ink); }
.nb-lmenu__item:focus-visible { outline: 2px solid var(--nb-ink); outline-offset: -2px; }
.nb-lmenu__scrim { display: none; }

/* Public nav: the row's height; on the ink hero the nav's own white text. */
.nb-lmenu--nav .nb-lmenu__btn, .nb-lmenu--docs .nb-lmenu__btn { height: 40px; }
.nb-nav[data-tone="dark"]:not([data-open]) .nb-lmenu--nav .nb-lmenu__btn { color: rgba(255, 255, 255, .8); }
@media (hover: hover) {
    .nb-nav[data-tone="dark"]:not([data-open]) .nb-lmenu--nav .nb-lmenu__btn:hover,
    .nb-nav[data-tone="dark"]:not([data-open]) .nb-lmenu--nav .nb-lmenu__btn[aria-expanded="true"] { background: rgba(255, 255, 255, .1); color: #fff; }
}
/* Footer (on ink): opens upward. */
.nb-lmenu--footer .nb-lmenu__btn { height: 40px; padding-inline: 12px 10px; background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .82); }
@media (hover: hover) { .nb-lmenu--footer .nb-lmenu__btn:hover, .nb-lmenu--footer .nb-lmenu__btn[aria-expanded="true"] { background: rgba(255, 255, 255, .16); color: #fff; } }
.nb-lmenu--footer .nb-lmenu__btn:focus-visible { outline-color: var(--nb-accent); }
.nb-lmenu--footer .nb-lmenu__pop { top: auto; bottom: calc(100% + 6px); transform-origin: bottom right; }
/* Settings > Display: a field, the language's full name. */
.nb-lmenu--field .nb-lmenu__btn {
    height: 44px; max-width: 100%; padding: 0 12px; gap: 8px; border-radius: var(--nb-radius-md);
    box-shadow: inset 0 0 0 1px var(--nb-line-2); background: var(--nb-paper); color: var(--nb-ink); font-size: 15px; font-weight: 600; letter-spacing: 0;
}
.nb-lmenu--field .nb-lmenu__globe { color: var(--nb-ink-3); }
.nb-lmenu--field .nb-lmenu__chev { margin-left: auto; }

@media (max-width: 639.98px) {
    .nb-lmenu__scrim {
        display: block; position: fixed; inset: 0; z-index: 1000; background: var(--nb-dim);
        animation: nb-lmenu-fade var(--nb-motion-2) var(--nb-ease-standard);
    }
    .nb-lmenu__pop,
    .nb-lmenu--footer .nb-lmenu__pop,
    .nb-lmenu--field .nb-lmenu__pop {
        position: fixed; inset: auto 0 0 0; z-index: 1001; width: auto; min-width: 0; max-width: none; max-height: min(78dvh, 680px);
        padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); border-radius: var(--nb-radius-lg) var(--nb-radius-lg) 0 0;
        box-shadow: 0 -8px 32px rgba(17, 17, 19, .18); transform-origin: bottom center;
        animation: nb-lmenu-sheet var(--nb-motion-3) var(--nb-ease-standard);
    }
    .nb-lmenu__title {
        display: block; position: sticky; top: -8px; z-index: 1; margin: -8px -12px 4px; padding: 20px 20px 10px;
        background: var(--nb-paper); font-family: var(--nb-display); font-size: 17px; font-weight: var(--nb-h3-w); color: var(--nb-ink);
    }
    .nb-lmenu__title::before {
        content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--nb-line-2);
    }
    .nb-lmenu__item { min-height: 48px; padding: 0 12px; font-size: 16px; }
    /* The bar that holds an open sheet rises over the dock and its hints (their own stacking contexts). */
    :is(.nb-top, .nb-nav, .nb-main, .nb-docs__top):has(.nb-lmenu[data-open]) { z-index: 1000; }
}
@keyframes nb-lmenu-sheet { from { transform: translateY(24px); opacity: 0; } }
@keyframes nb-lmenu-fade { from { opacity: 0; } }

/* ─── Product tile: catalog photo on mist (white backgrounds melt into the tile) ── */
.nb-tile {
    position: relative; display: grid; place-items: center; overflow: hidden;
    border-radius: var(--nb-radius-tile); background: var(--nb-mist);
}
.nb-tile img { width: 100%; height: 100%; padding: 14%; object-fit: contain; mix-blend-mode: multiply; }

/* ─── Phone frame: CSS bezel, the screen is whatever goes inside ── */
.nb-phone {
    --r: calc(var(--pw, 280px) * .155);
    position: relative; z-index: 2; flex: none;
    width: var(--pw, 280px); margin: 0;
    padding: calc(var(--pw, 280px) * .03);
    border-radius: var(--r);
    background: #111113;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 0 0 1px rgba(17, 17, 19, .5), var(--nb-e-phone);
}
.nb-phone::before, .nb-phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #222226; }
.nb-phone::before { left: -3px; top: 22%; height: 9%; box-shadow: 0 calc(var(--pw, 280px) * .2) 0 #222226; }
.nb-phone::after { right: -3px; top: 27%; height: 14%; }
.nb-phone__screen {
    position: relative; overflow: hidden;
    aspect-ratio: 780 / 1688;
    border-radius: calc(var(--r) - var(--pw, 280px) * .03);
    background: #fff;
    isolation: isolate;
}
.nb-phone__island { position: absolute; z-index: 6; top: 1.9%; left: 50%; translate: -50% 0; width: 30%; height: 3.6%; border-radius: 999px; background: #000; }

/* ─── Long languages (de, fr, es, pt, it, id, vi, th, hi, ja) ─────────────────────────────────────────
 * Korean and English copy was fitted by hand; the other languages run 20-60% longer (German compounds,
 * French and Spanish phrasing, Thai with no spaces to break at). Only those pages get these rules, so a
 * Korean or English page renders exactly as before. A label that cannot fit wraps or ellipsizes inside its
 * control instead of pushing the row wider than the screen; long words hyphenate (the page's lang picks
 * the dictionary). */
:root:not(:lang(ko)):not(:lang(en)) :is(h1, h2, h3, .nb-display, .nb-h2, .nb-h3) { overflow-wrap: break-word; hyphens: auto; }
:root:not(:lang(ko)):not(:lang(en)) :is(p, li, dd, label) { overflow-wrap: break-word; }
:root:not(:lang(ko)):not(:lang(en)) .nb-b { max-width: 100%; min-width: 0; white-space: normal; text-wrap: balance; text-align: center; line-height: 1.2; padding-block: 8px; }
:root:not(:lang(ko)):not(:lang(en)) .nb-nav__actions .nb-b { white-space: nowrap; max-width: 46vw; padding-block: 0; overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 40px; }
:root:not(:lang(ko)):not(:lang(en)) .nb-nav__bar, :root:not(:lang(ko)):not(:lang(en)) .nb-nav__actions { min-width: 0; }
:root:not(:lang(ko)):not(:lang(en)) .nb-nav__links { min-width: 0; overflow-x: auto; scrollbar-width: none; }
:root:not(:lang(ko)):not(:lang(en)) .nb-nav__links > a { white-space: nowrap; }
