/* Design 002 · Green and white: the approved FedM8 app design.
   Tokens sit on body, not :root, because the Tweak panel writes overrides inline on <body>.
   Values are copied from assets/approved-design.css and the Chat files (fedm8-room.css,
   chat-home.css, first-post.css, talk-doors.css, talk-follow.css, teaming.css, room-extras.css).
   Every sample selector starts with .x2- so nothing here reaches the documentation shell. */

body[data-design="002"] {
  --fd-bg: #f5f3ec;
  --fd-paper: #fffef9;
  --fd-soft: #eef1e7;
  --fd-ink: #29372e;
  --fd-muted: #586653;
  --fd-line: #d9ded0;
  --fd-green: #526547;
  --fd-green-dark: #344b2c;
  --fd-mint: #d9eddd;

  --fd-line-2: #cbd4bf;
  --fd-field-line: #81976b;
  --fd-hover: #ebeee3;
  --fd-hover-2: #edf1e5;
  --fd-active: #e4ead8;
  --fd-chip: #eef1e7;
  --fd-chip-ink: #42533a;
  --fd-callout: #f0f4e8;
  --fd-callout-line: #cfd8c2;
  --fd-selected-line: #b8c5aa;
  --fd-selected-bar: #81976b;
  --fd-olive-hover: #3e5234;
  --fd-link: #435e36;
  --fd-label: #5d6958;
  --fd-count-ink: #31553b;
  --fd-count-line: #c5ddc9;
  --fd-due-ink: #825322;
  --fd-due-bg: #fff2d8;
  --fd-due-line: #eddbb6;
  --fd-ai-bg: #fbf7e9;
  --fd-ai-line: #eadfb8;
  --fd-ai-mark: #efe2b5;
  --fd-amber: #fbf3dc;
  --fd-amber-line: #e3cf94;
  --fd-amber-ink: #5c4708;
  --fd-fail-bg: #fbf4e8;
  --fd-fail-line: #e3c9a6;
  --fd-fail-ink: #5b3a12;
  --fd-red: #8f2d22;
  --fd-red-soft: #fbecea;
  --fd-online: #2f7d4a;
  --fd-answered: #2f6b3a;
  --fd-placeholder: #6a7565;
  --fd-selection: #dce8cd;
  --fd-scrim: #23302366;

  --fd-radius: 8px;
  --fd-radius-control: 5px;
  --fd-radius-room: 6px;
  --fd-radius-dialog: 10px;
  --fd-radius-pill: 999px;
  --fd-shadow-card: 0 1px 3px #29372e04;
  --fd-shadow-menu: 0 8px 25px #29372e16;
  --fd-shadow-room-menu: 0 8px 24px #29372e2e;
  --fd-shadow-dialog: 0 18px 80px #1f2f2540;
  --fd-shadow-dock: 0 -2px 12px #29372e06;
  --fd-shadow-pill: 0 2px 6px #29372e33;

  --fd-font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --fd-font-serif: "Newsreader", "Source Serif 4", Georgia, serif;
  --fd-font-room: "Source Serif 4", "Newsreader", Georgia, serif;

  --fd-header-h: 64px;
  --fd-rail-w: 190px;
  --fd-content-x: 248px;
  --fd-max: 1454px;
  --fd-target: 44px;
  --fd-phone-header-h: 59px;
  --fd-dock-h: 78px;

  --ds-bg: var(--fd-bg);
  --ds-surface: var(--fd-paper);
  --ds-ink: var(--fd-ink);
  --ds-muted: var(--fd-muted);
  --ds-line: var(--fd-line);
  --ds-accent: var(--fd-green);
  --ds-accent-ink: #fff;
  --ds-soft: var(--fd-soft);
  --ds-focus: var(--fd-green);
  --ds-font-sans: "DM Sans", system-ui, sans-serif;
  --ds-font-serif: "Source Serif 4", Georgia, serif;
  --ds-radius: 8px;

  --plan-b-ink: #526547;
  --plan-b-bg: transparent;
  --plan-b-line: #b8c5aa;
  --plan-p-ink: #344b2c;
  --plan-p-bg: #e4ead8;
  --plan-p-line: #b8c5aa;
  --plan-lock-ink: var(--fd-muted);
  --plan-lock-link: var(--fd-green-dark);
  --plan-view-line: var(--fd-line);
  --plan-view-bg: var(--fd-soft);
  --plan-view-ink: var(--fd-muted);
  --plan-view-on: var(--fd-paper);
  --plan-view-ink-on: var(--fd-ink);

  --pc-surface: var(--fd-paper);
  --pc-ink: var(--fd-ink);
  --pc-muted: var(--fd-muted);
  --pc-line: var(--fd-line);
  --pc-line-strong: var(--fd-field-line);
  --pc-accent: var(--fd-green);
  --pc-accent-ink: #fff;
  --pc-act-ink: var(--fd-green-dark);
  --pc-soft: var(--fd-soft);
  --pc-radius: 8px;
  --pc-font: "DM Sans", system-ui, sans-serif;

  color-scheme: light;
}

body[data-design="002"] ::selection { background: var(--fd-selection); color: #253323; }

/* ---------- Sample base ---------- */
.x2 { font: 400 14px/1.55 var(--fd-font-sans); color: var(--fd-ink); text-align: left; -webkit-font-smoothing: antialiased; }
.x2 :where(p, h1, h2, h3, h4, ul, ol, li, dl, dt, dd, figure, fieldset, legend) { margin: 0; padding: 0; }
.x2 :where(ul, ol) { list-style: none; }
.x2 :where(fieldset) { border: 0; min-width: 0; }
.x2 :where(button, input, select, textarea) { margin: 0; font: inherit; color: inherit; }
.x2 :where(button) { cursor: pointer; }
.ds .x2 :where(a) { color: var(--fd-link); }
.x2 .x2-ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.x2 :focus-visible { outline: 3px solid var(--fd-green); outline-offset: 3px; }
.x2 :is(input, select, textarea):focus-visible { outline-offset: 1px; }
.x2 :is(.x2-room, .x2-ch, .x2-here, .x2-hi, .x2-fp, .x2-phone, .x2-chiprow, .x2-tiles) :focus-visible { outline-width: 2px; outline-offset: 2px; }
.x2 .is-focus { outline: 3px solid var(--fd-green); outline-offset: 3px; }
.x2 .x2-input.is-focus { outline-offset: 1px; }
.x2 .is-focus-sm { outline: 2px solid var(--fd-green); outline-offset: 2px; }
.x2 [hidden] { display: none !important; }
.x2 a.plan-tile { color: var(--pt-ink); }
.x2-only-narrow { display: none; }
.x2-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- Documentation helpers ---------- */
.x2-principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.x2-principle { padding: 16px 18px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-paper); }
.x2-principle h3 { margin: 0 0 6px; font: 600 15px/1.4 var(--fd-font-sans); color: var(--fd-ink); }
.x2-principle p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--fd-muted); }
.x2-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.x2-caption { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--fd-muted); }
.x2-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.x2-mt { margin-top: 12px; }
.x2 .x2-w-search { flex: 1 1 260px; width: auto; max-width: 420px; }
.x2-stack { display: grid; gap: 14px; }
.x2-statehead { margin: 0 0 6px; font: 600 11px/1.5 var(--fd-font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--fd-muted); }

.x2-pair { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 30px; padding: 0 10px; border: 1px solid var(--fd-line); border-radius: 4px; font: 600 13px/1 var(--fd-font-sans); }
.x2-pair--ink-paper { color: #29372e; background: #fffef9; }
.x2-pair--ink-canvas { color: #29372e; background: #f5f3ec; }
.x2-pair--muted-paper { color: #586653; background: #fffef9; }
.x2-pair--muted-canvas { color: #586653; background: #f5f3ec; }
.x2-pair--muted-soft { color: #586653; background: #eef1e7; }
.x2-pair--paper-olive { color: #fffef9; background: #526547; border-color: #526547; }
.x2-pair--paper-hover { color: #fffef9; background: #3e5234; border-color: #3e5234; }
.x2-pair--dark-active { color: #344b2c; background: #e4ead8; }
.x2-pair--link-paper { color: #435e36; background: #fffef9; text-decoration: underline; }
.x2-pair--label-canvas { color: #5d6958; background: #f5f3ec; font-size: 10px; letter-spacing: 1px; }
.x2-pair--chip { color: #42533a; background: #eef1e7; }
.x2-pair--count { color: #31553b; background: #d9eddd; }
.x2-pair--due { color: #825322; background: #fff2d8; }
.x2-pair--amber { color: #5c4708; background: #fbf3dc; }
.x2-pair--fail { color: #5b3a12; background: #fbf4e8; }
.x2-pair--red { color: #8f2d22; background: #fffef9; }
.x2-pair--placeholder { color: #6a7565; background: #fff; font-weight: 400; }
.x2-pair--ring { background: #fffef9; outline: 2px solid #526547; outline-offset: 2px; }
.x2-pair--field { background: #fffef9; border-color: #81976b; }
.x2-pair--line { background: #fffef9; border-color: #d9ded0; }
.x2-pair--line2 { background: #fffef9; border-color: #cbd4bf; }

/* ---------- Typography samples ---------- */
.x2-t-brand { font: 700 29px/1 var(--fd-font-sans); letter-spacing: -1px; color: var(--fd-ink); }
.x2-t-page { font: 500 31px/1.18 var(--fd-font-serif); letter-spacing: -.8px; color: var(--fd-ink); }
.x2-t-panel { font: 500 27px/1.25 var(--fd-font-serif); letter-spacing: -.5px; color: var(--fd-ink); }
.x2-t-dialog { font: 500 26px/1.3 var(--fd-font-serif); letter-spacing: -.4px; color: var(--fd-ink); }
.x2-t-home { font: 600 21px/1.25 var(--fd-font-serif); color: var(--fd-ink); }
.x2-t-room { font: 600 19px/1.3 var(--fd-font-room); color: var(--fd-ink); }
.x2-t-card { font: 600 17px/1.3 var(--fd-font-serif); color: var(--fd-ink); }
.x2-t-notice { font: 500 16px/1.4 var(--fd-font-sans); color: var(--fd-ink); }
.x2-t-heading { font: 600 15px/1.45 var(--fd-font-sans); color: var(--fd-ink); }
.x2-t-body { font: 400 14px/1.55 var(--fd-font-sans); color: var(--fd-ink); }
.x2-t-post { font: 400 13.5px/1.55 var(--fd-font-sans); color: var(--fd-ink); }
.x2-t-second { font: 400 13px/1.6 var(--fd-font-sans); color: var(--fd-muted); }
.x2-t-control { font: 500 12px/1.4 var(--fd-font-sans); color: var(--fd-ink); }
.x2-t-meta { font: 400 11.5px/1.5 var(--fd-font-sans); color: var(--fd-muted); }
.x2-t-label { font: 600 10px/1.5 var(--fd-font-sans); letter-spacing: 1px; text-transform: uppercase; color: var(--fd-label); }
.x2-t-metric { font: 500 25px/1.2 var(--fd-font-sans); color: var(--fd-ink); }
.x2-gloss { border-bottom: 1px dotted #7d97ab; cursor: help; }

/* ---------- Space, corners, shadows ---------- */
.x2-space { display: grid; gap: 8px; }
.x2-space-row { display: grid; grid-template-columns: 64px 34px minmax(0, 1fr); align-items: center; gap: 12px; font-size: 13px; color: var(--fd-muted); }
.x2-space-row code { font-size: 12px; color: var(--fd-ink); }
.x2-bar { display: block; height: 16px; border-radius: 2px; background: var(--fd-field-line); }
.x2-w4 { width: 4px; } .x2-w6 { width: 6px; } .x2-w8 { width: 8px; } .x2-w10 { width: 10px; }
.x2-w12 { width: 12px; } .x2-w14 { width: 14px; } .x2-w16 { width: 16px; } .x2-w18 { width: 18px; }
.x2-w20 { width: 20px; } .x2-w22 { width: 22px; } .x2-w24 { width: 24px; } .x2-w28 { width: 28px; }
.x2-w30 { width: 30px; } .x2-w44 { width: 44px; }
.x2-shapes { display: flex; flex-wrap: wrap; gap: 18px; }
.x2-shape { display: grid; justify-items: start; gap: 8px; font-size: 12px; color: var(--fd-muted); }
.x2-shape b { color: var(--fd-ink); font-weight: 600; }
.x2-shape-box { width: 96px; height: 56px; border: 1px solid var(--fd-field-line); background: var(--fd-soft); }
.x2-r2 { border-radius: 2px; } .x2-r3 { border-radius: 3px; } .x2-r4 { border-radius: 4px; } .x2-r5 { border-radius: 5px; }
.x2-r6 { border-radius: 6px; } .x2-r8 { border-radius: 8px; } .x2-r10 { border-radius: 10px; }
.x2-r14 { border-radius: 14px 14px 0 0; } .x2-r999 { border-radius: 999px; }
.x2-shadows { display: flex; flex-wrap: wrap; gap: 26px; padding: 10px 6px 18px; }
.x2-shadow-box { width: 150px; height: 72px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-paper); }
.x2-sh-card { box-shadow: var(--fd-shadow-card); }
.x2-sh-menu { box-shadow: var(--fd-shadow-menu); border-radius: 6px; }
.x2-sh-room { box-shadow: var(--fd-shadow-room-menu); }
.x2-sh-dialog { box-shadow: var(--fd-shadow-dialog); border-color: var(--fd-line-2); border-radius: 10px; }
.x2-sh-dock { box-shadow: var(--fd-shadow-dock); border-radius: 0; border-width: 1px 0 0; border-color: #cdd5bf; }
.x2-sh-pill { box-shadow: var(--fd-shadow-pill); border: 0; border-radius: 999px; height: 34px; background: var(--fd-green); }

/* ---------- Layout map (1440 x 1000, drawn to scale) ---------- */
.x2-map { position: relative; width: 100%; max-width: 760px; aspect-ratio: 1440 / 1000; overflow: hidden; border: 1px solid var(--fd-line-2); background: var(--fd-bg); font: 500 11px/1.3 var(--fd-font-sans); color: var(--fd-green-dark); }
.x2-map-head { position: absolute; left: 0; right: 0; top: 0; height: 6.4%; display: flex; align-items: center; padding-left: 1.94%; background: var(--fd-paper); border-bottom: 1px solid var(--fd-line); }
.x2-map-rail { position: absolute; left: 1.94%; top: 6.4%; bottom: 0; width: 13.19%; padding: 8px 6px; border-left: 1px dashed var(--fd-field-line); border-right: 1px dashed var(--fd-field-line); background: #efeee5; }
.x2-map-main { position: absolute; left: 17.22%; right: 1.94%; top: 8.8%; bottom: 4%; padding: 8px 10px; border: 1px dashed var(--fd-field-line); background: #fbfaf4; }
.x2-map-title { display: block; height: 4%; }
.x2-map-block { display: block; margin-top: 6px; padding: 6px 8px; border: 1px solid var(--fd-line); border-radius: 4px; background: var(--fd-paper); color: var(--fd-muted); }
.x2-map-block--tabs { background: #e8ebdf; }

/* ---------- App frame: desktop ---------- */
.x2-app { min-width: 960px; background: var(--fd-bg); }
.x2-app--screen { width: 1440px; height: 1000px; min-width: 0; overflow: hidden; }
.x2-app-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; padding: 0 28px; background: var(--fd-paper); border-bottom: 1px solid var(--fd-line); }
.x2 .x2-brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; flex: none; color: var(--fd-ink); font: 700 29px/1 var(--fd-font-sans); letter-spacing: -1px; text-decoration: none; white-space: nowrap; }
.x2-brand img { display: block; width: 40px; height: 40px; object-fit: contain; flex: none; }
.x2-brand-word { display: inline-flex; align-items: baseline; }
.x2-brand-fed { color: #000; }
.x2-brand-m8 { color: #3b472c; background: url("/assets/brand-camo.svg") repeat; background-size: 44px 33px; }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .x2-brand-m8 { -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: .2px #303b25; }
}
.x2-hacts { display: flex; align-items: center; gap: 9px; }
.x2 .x2-hbtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--fd-line); border-radius: 5px; background: transparent; color: var(--fd-ink); text-decoration: none; }
.x2 .x2-hbtn:hover { background: var(--fd-hover-2); }
.x2-app-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); column-gap: 30px; padding-left: 28px; }
.x2-main { min-width: 0; padding: 24px 28px 40px 0; }

/* Rail */
.x2-rail { padding: 24px 0 18px; }
.x2-rail--alone { width: 190px; padding: 0; }
.x2-rail-label { display: block; margin: 22px 0 9px; padding: 0 10px; font: 600 10px/1.5 var(--fd-font-sans); letter-spacing: 1px; text-transform: uppercase; color: var(--fd-label); }
.x2-rail-label--first { margin-top: 0; }
.x2-rail-mine { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--fd-line); }
.x2-rail-mine .x2-rail-label { margin-top: 0; }
.x2 .x2-rail-link { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin: 1px 0; padding: 10px; border: 0; border-radius: 5px; background: transparent; color: var(--fd-muted); font: 400 13px/1.4 var(--fd-font-sans); text-align: left; text-decoration: none; }
.x2 .x2-rail-link:hover, .x2 .x2-rail-link.is-hover { color: var(--fd-green-dark); background: var(--fd-hover); }
.x2 .x2-rail-link.is-current { color: var(--fd-green-dark); font-weight: 600; background: var(--fd-active); }
.x2 .x2-rail-link.is-current::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: var(--fd-green); }
.x2-rail-states { display: grid; grid-template-columns: repeat(3, 190px); gap: 18px; }

/* Page head */
.x2-pagehead { min-height: 42px; margin: 0 0 16px; }
.x2-titlerow { display: flex; align-items: center; gap: 9px; }
.x2-page-title { font: 500 31px/1.18 var(--fd-font-serif); letter-spacing: -.8px; color: var(--fd-ink); }
.x2-page-sub { max-width: 70ch; margin-top: 4px; font-size: 13px; color: var(--fd-muted); }
.x2-help { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid #cbd3c0; border-radius: 50%; background: transparent; color: #53634a; font: 500 15px/1 var(--fd-font-sans); }
.x2-help:hover { background: #e9eedf; border-color: #9dae8e; }

/* Public scope tabs */
.x2-ptabs { display: flex; align-items: center; gap: 3px; width: 100%; min-height: 48px; margin: 0 0 17px; padding: 3px; overflow: auto; border: 1px solid #d2d9c8; border-radius: 6px; background: #e8ebdf; scrollbar-width: none; }
.x2-ptabs-label { display: inline-flex; align-items: center; padding: 0 8px; color: #43553a; font-size: 10px; letter-spacing: .8px; text-transform: uppercase; white-space: nowrap; }
.x2-ptab { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 4px; background: transparent; color: #42543a; font-size: 13px; font-weight: 400; white-space: nowrap; }
.x2-ptab:hover { background: #dce4d0; }
.x2-ptab[aria-pressed="true"] { color: #fffef9; background: var(--fd-green); }
.x2-ptab small { padding: 2px 5px; border: 1px solid #bdc7b2; border-radius: 2px; font-size: 10px; }
.x2-ptab-short { display: none; }

/* Section tabs (subnav) */
.x2-subnav { display: flex; flex-wrap: wrap; gap: 22px; margin: 0 0 14px; border-bottom: 1px solid var(--fd-line); }
.x2 .x2-subnav-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--fd-muted); font-size: 12px; font-weight: 400; text-decoration: none; white-space: nowrap; }
.x2 .x2-subnav-link:hover { color: var(--fd-green-dark); }
.x2 .x2-subnav-link.is-on { border-bottom-color: var(--fd-green); color: var(--fd-green-dark); font-weight: 600; }
.x2 .x2-subnav-more { margin-left: auto; }
.x2-subnav-chip { padding: 1px 4px; border-radius: 3px; background: #eef1e7; color: var(--fd-muted); font-size: 10px; font-weight: 400; }

/* ---------- App frame: phone ---------- */
.x2-phone { display: flex; flex-direction: column; height: 100%; min-height: 560px; overflow: hidden; background: var(--fd-bg); }
.x2-phone-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; height: 59px; padding: 0 13px; background: var(--fd-paper); border-bottom: 1px solid var(--fd-line); }
.x2-phone .x2-brand { gap: 6px; font-size: 22px; letter-spacing: -.8px; }
.x2-phone .x2-brand img { width: 28px; height: 28px; }
.x2-phone .x2-hacts { gap: 4px; }
.x2-phone-main { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 17px 13px 24px; }
.x2-phone-main .x2-page-title { font-size: 28px; line-height: 1.2; }
.x2-phone .x2-ptabs { min-height: 46px; margin-bottom: 12px; }
.x2-phone .x2-ptabs-label, .x2-phone .x2-ptab small, .x2-phone .x2-ptab-full { display: none; }
.x2-phone .x2-ptab-short { display: inline; }
.x2-phone .x2-ptab { flex: 1 1 0; min-width: 0; padding: 8px 5px; font-size: 12px; }
.x2-dock { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; flex: none; min-height: 78px; padding: 7px 4px; background: var(--fd-paper); border-top: 1px solid #cdd5bf; box-shadow: var(--fd-shadow-dock); }
.x2 .x2-dock-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0; min-height: 58px; padding: 5px 1px; border-radius: 5px; color: var(--fd-muted); font: 400 11px/1.3 var(--fd-font-sans); text-align: center; text-decoration: none; }
.x2 .x2-dock-link .x2-ic { width: 20px; height: 20px; }
.x2 .x2-dock-link.is-current { color: var(--fd-green-dark); background: #e5ebd9; font-weight: 600; }
.x2-dock--alone { max-width: 375px; border: 1px solid #cdd5bf; }

/* ---------- Buttons and fields ---------- */
.x2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 13px; border: 1px solid var(--fd-line-2); border-radius: 5px; background: var(--fd-paper); color: var(--fd-green-dark); font: 500 12px/1.4 var(--fd-font-sans); text-decoration: none; white-space: nowrap; }
.x2-btn--primary { border-color: var(--fd-green); background: var(--fd-green); color: #fffef9; }
.x2-btn--primary:hover, .x2-btn--primary.is-hover { border-color: var(--fd-olive-hover); background: var(--fd-olive-hover); }
.x2-btn--ghost:hover, .x2-btn--ghost.is-hover { border-color: #aebf9c; background: var(--fd-hover-2); color: var(--fd-green-dark); }
.x2-btn--danger { border-color: #d9b2a9; background: #fff5f1; color: #9a302d; }
.x2-btn:disabled { opacity: .55; cursor: not-allowed; }
.x2 .x2-link { color: var(--fd-link); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.x2 .x2-link--strong { color: var(--fd-green-dark); font-weight: 600; text-decoration-thickness: 1px; }
.x2-field { display: grid; gap: 6px; min-width: 0; }
.x2-label { font: 600 12px/1.4 var(--fd-font-sans); color: var(--fd-ink); }
.x2-hint { font-size: 12px; color: var(--fd-muted); }
.x2-input, .x2-select, .x2-textarea { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--fd-field-line); border-radius: 5px; background: var(--fd-paper); color: var(--fd-ink); font: 400 13px/1.45 var(--fd-font-sans); }
.x2-textarea { min-height: 88px; resize: vertical; }
.x2-input::placeholder, .x2-textarea::placeholder { color: var(--fd-placeholder); opacity: 1; }
.x2-select { appearance: auto; }
.x2-input[aria-invalid="true"] { border: 2px solid var(--fd-ink); padding: 7px 9px; }
.x2-input:disabled { border-color: var(--fd-line-2); background: #f1f2ee; color: #7d8778; cursor: not-allowed; }
.x2-check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.5; color: var(--fd-ink); }
.x2-check input { flex: none; width: 20px; height: 20px; margin-top: 0; accent-color: var(--fd-green); }
.x2-controls-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; max-width: 720px; }
.x2-focusdemo { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; padding: 6px; }

/* ---------- Chips and badges ---------- */
.x2-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border: 1px solid var(--fd-line); border-radius: 4px; background: #eef1e7; color: #42533a; font-size: 11px; font-weight: 400; line-height: 1.4; white-space: nowrap; }
.x2-chip--due { border-color: var(--fd-due-line); background: var(--fd-due-bg); color: var(--fd-due-ink); }
.x2-count { display: inline-flex; align-items: center; padding: 1px 9px; border: 1px solid var(--fd-count-line); border-radius: 999px; background: var(--fd-mint); color: var(--fd-count-ink); font-size: 12px; font-weight: 600; white-space: nowrap; }
.x2-count--lg { min-height: 44px; padding: 4px 9px; font-size: 13px; }
.x2-kind { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 9px; border: 1px solid var(--fd-line); border-radius: 999px; background: var(--fd-soft); color: var(--fd-green-dark); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.x2-kind--grant { background: #e9f4ea; }
.x2-kind--code { background: #f6efdc; }
.x2 .x2-talk { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px; border: 1px solid var(--fd-green); border-radius: 999px; background: transparent; color: var(--fd-green-dark); font-size: 13px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.x2 .x2-talk:hover { background: #eef2e6; }
.x2 .x2-talk--primary { background: var(--fd-green); color: #fffef9; }
.x2 .x2-talk--primary:hover { background: var(--fd-green-dark); }
.x2-talk svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.x2-talk-in { font-size: 12.5px; color: var(--fd-muted); }
.x2-tag { display: inline-block; padding: 2px 9px; border: 1px solid #c3d0b2; border-radius: 999px; background: #e5ecdb; color: var(--fd-green-dark); font-size: 11.5px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.x2-new { display: inline-flex; align-items: center; padding: 0 7px; border: 1px solid var(--fd-line-2); border-radius: 999px; background: #e6ecdd; color: var(--fd-green-dark); font-size: 11px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.x2-pin { padding: 1px 7px; border-radius: 999px; background: var(--fd-ai-mark); color: var(--fd-amber-ink); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.x2-you { padding: 1px 6px; border: 1px solid var(--fd-line); border-radius: 999px; color: var(--fd-muted); font-size: 11.5px; }
.x2-crew { display: inline-flex; align-items: center; padding: 1px 8px; border: 1px solid var(--fd-green); border-radius: 999px; background: #eef2e6; color: var(--fd-green-dark); font-size: 11.5px; font-weight: 650; line-height: 1.5; white-space: nowrap; }
.x2-answered { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border: 1px solid #b9d4b3; border-radius: 999px; background: #e6f1e3; color: var(--fd-answered); font-size: 11.5px; font-weight: 650; line-height: 1.6; white-space: nowrap; }
.x2-waiting { display: inline-flex; padding: 1px 8px; border-radius: 999px; background: var(--fd-amber); color: var(--fd-amber-ink); font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.x2-sam { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: #e3f0e3; color: #22502a; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.x2-hostchip { display: inline-flex; align-items: center; min-height: 20px; padding: 1px 8px; border-radius: 4px; background: var(--fd-green-dark); color: #fffef9; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.x2-chiprow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.x2-chipcell { display: grid; justify-items: start; gap: 6px; min-width: 150px; font-size: 12px; color: var(--fd-muted); }

/* ---------- Cards and panels ---------- */
.x2-panel { padding: 18px 20px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-paper); box-shadow: var(--fd-shadow-card); }
.x2-panel-h { font: 600 15px/1.45 var(--fd-font-sans); color: var(--fd-ink); }
.x2-panel-p { margin-top: 4px; font-size: 13px; line-height: 1.6; color: var(--fd-muted); }
.x2-cards { display: grid; gap: 10px; }
.x2-card { position: relative; min-width: 0; padding: 14px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-paper); box-shadow: var(--fd-shadow-card); }
.x2-card.is-selected { border-color: var(--fd-selected-line); box-shadow: inset 2px 0 var(--fd-selected-bar); }
.x2-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 7px; }
.x2-card-title { font: 500 16px/1.4 var(--fd-font-sans); color: var(--fd-ink); }
.x2-card-org { margin-top: 3px; font-size: 12px; color: var(--fd-muted); }
.x2-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; font-size: 12px; color: var(--fd-muted); }
.x2-matchpct { font-weight: 700; color: var(--fd-count-ink); }
.x2-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.x2-metric { padding: 14px 16px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-paper); }
.x2-metric-lbl { font: 600 10px/1.5 var(--fd-font-sans); letter-spacing: .7px; text-transform: uppercase; color: var(--fd-muted); }
.x2-metric-val { margin-top: 2px; font: 500 25px/1.2 var(--fd-font-sans); color: var(--fd-ink); }
.x2-metric-note { margin-top: 2px; font-size: 12px; color: var(--fd-muted); }
.x2-callout { padding: 12px; border: 1px solid var(--fd-callout-line); border-radius: 6px; background: var(--fd-callout); color: var(--fd-ink); font-size: 13px; font-weight: 500; }
.x2-lede { padding: 11px 13px; border-left: 2px solid var(--fd-selected-bar); border-radius: 0 4px 4px 0; background: var(--fd-soft); font-size: 13px; color: var(--fd-ink); }
.x2-kicker { font: 600 10px/1.5 var(--fd-font-sans); letter-spacing: .7px; text-transform: uppercase; color: var(--fd-green); }
.x2-scrim { display: grid; place-items: center; padding: 34px 16px; border-radius: 6px; background: var(--fd-scrim); }
.x2-dialog { width: min(520px, 100%); padding: 24px; border: 1px solid var(--fd-line-2); border-radius: 10px; background: var(--fd-paper); color: var(--fd-ink); box-shadow: var(--fd-shadow-dialog); line-height: 1.65; }
.x2-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.x2-dialog-title { font: 500 26px/1.3 var(--fd-font-serif); letter-spacing: -.4px; }
.x2-dialog-close { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--fd-line); border-radius: 5px; background: transparent; color: var(--fd-ink); font-size: 23px; line-height: 1; }
.x2-dialog p { margin: 10px 0; font-size: 13px; color: var(--fd-muted); }
.x2-dialog-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ---------- Chat home ---------- */
.x2-ch { display: grid; grid-template-columns: minmax(190px, 220px) minmax(0, 1fr) minmax(240px, 290px); grid-template-areas: "rooms ask rail" "rooms stream rail"; grid-template-rows: auto 1fr; gap: 16px 20px; align-items: start; max-width: 1180px; }
.x2-ch > .x2-ch-rooms { grid-area: rooms; }
.x2-ch > .x2-ch-ask { grid-area: ask; }
.x2-ch > .x2-ch-stream { grid-area: stream; }
.x2-ch > .x2-ch-rail { grid-area: rail; }
.x2-ch-rooms { padding: 14px 10px 12px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-paper); }
.x2-ch-ask { padding: 16px 18px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-paper); }
.x2-ch-stream { display: grid; gap: 10px; }
.x2-ch-rail { display: grid; gap: 8px; }
.x2-ch-kicker { margin-bottom: 8px; padding: 0 6px; font: 600 10px/1.5 var(--fd-font-sans); letter-spacing: 1px; text-transform: uppercase; color: var(--fd-label); }
.x2-ch-group { margin: 10px 0 4px; padding: 0 6px; font: 500 11.5px/1.4 var(--fd-font-sans); color: var(--fd-muted); }
.x2-ch-list li { margin: 1px 0; }
.x2-ch-room { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 38px; padding: 7px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--fd-ink); font: 400 13px/1.35 var(--fd-font-sans); text-align: left; }
.x2 a.x2-ch-room { color: var(--fd-ink); text-decoration: none; }
.x2-ch-room:hover { background: #edf1e6; }
.x2-ch-room.is-current { background: var(--fd-active); color: var(--fd-green-dark); font-weight: 600; box-shadow: inset 3px 0 var(--fd-green); }
.x2-ch-room-label { display: -webkit-box; min-width: 0; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.x2-ch-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--fd-green); }
.x2-ch-room.x2-ch-messages { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--fd-line); border-radius: 0 0 5px 5px; font-weight: 600; }
.x2-ch-note { margin: 10px 6px 0; font-size: 12.5px; line-height: 1.45; color: var(--fd-muted); }
.x2-ch-h2 { font: 600 21px/1.25 var(--fd-font-serif); color: var(--fd-ink); }
.x2-ch-form { display: grid; gap: 8px; margin-top: 10px; }
.x2-ch-rules { font-size: 12px; line-height: 1.5; color: var(--fd-muted); }
.x2-ch-input { width: 100%; min-height: 72px; padding: 10px 12px; border: 1px solid #b9c4ab; border-radius: 6px; background: #fff; color: var(--fd-ink); font: 400 14px/1.5 var(--fd-font-sans); resize: vertical; }
.x2-ch-input::placeholder { color: var(--fd-placeholder); opacity: 1; }
.x2-ch-dest { font-size: 13px; color: var(--fd-muted); }
.x2-ch-desttext { color: var(--fd-ink); }
.x2-ch-cap { font-size: 12.5px; line-height: 1.45; color: var(--fd-muted); }
.x2-ch-linkbtn { min-height: 32px; padding: 6px 2px; border: 0; background: none; color: var(--fd-green-dark); font: 600 13px/1.3 var(--fd-font-sans); text-decoration: underline; text-underline-offset: 2px; }
.x2-ch-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--fd-ink); }
.x2-ch-check input { flex: none; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--fd-green); }
.x2-ch-actions { display: flex; justify-content: flex-end; gap: 8px; }
.x2 .x2-ch-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; border: 1px solid #b9c4ab; border-radius: 5px; background: var(--fd-paper); color: var(--fd-green-dark); font: 600 13px/1.2 var(--fd-font-sans); text-decoration: none; white-space: nowrap; }
.x2 .x2-ch-btn--primary { border-color: var(--fd-green); background: var(--fd-green); color: #fffef9; }
.x2-ch-streamhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.x2-ch-streamhead .x2-ch-h2 { font-size: 18px; }
.x2-ch-post { display: flex; gap: 12px; padding: 13px 15px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-paper); }
.x2-ch-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: #dfe7d3; color: var(--fd-green-dark); font: 700 12px/1 var(--fd-font-sans); }
.x2-ch-main { display: grid; gap: 3px; min-width: 0; }
.x2-ch-posthead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.x2-ch-name { min-height: 28px; padding: 0; border: 0; background: none; color: var(--fd-ink); font: 600 13.5px/1.35 var(--fd-font-sans); text-align: left; text-decoration: underline; text-decoration-color: #b9c4ab; text-underline-offset: 2px; }
.x2-ch-meta { font-size: 12px; color: var(--fd-muted); }
.x2-ch-ptitle { font: 600 14px/1.4 var(--fd-font-sans); color: var(--fd-ink); }
.x2-ch-body { display: -webkit-box; overflow: hidden; font-size: 14px; line-height: 1.5; color: var(--fd-ink); -webkit-line-clamp: 5; -webkit-box-orient: vertical; }
.x2-ch-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 4px; font-size: 12.5px; color: var(--fd-muted); }
.x2 .x2-ch-link { color: var(--fd-green-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.x2-ch-foot .x2-ch-link { display: inline-flex; align-items: center; min-height: 32px; }
.x2-ch-unans { display: grid; gap: 6px; padding: 13px 15px; border: 1px solid #e3d6ae; border-radius: 8px; background: #f7f0dc; }
.x2-ch-unans-title { font: 600 14px/1.3 var(--fd-font-sans); color: #5a4a17; }
.x2-ch-unans-body { display: -webkit-box; overflow: hidden; font-size: 14px; line-height: 1.5; color: var(--fd-ink); -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.x2-ch-unans-meta { font-size: 12.5px; color: #5d5532; }
.x2-ch-unans-note { font-size: 12.5px; color: #5d5532; }
.x2-ch-unans-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 4px; }
.x2-ch-card { display: grid; gap: 8px; padding: 15px 16px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-paper); }
.x2-ch-card .x2-ch-kicker { padding: 0; color: #6b5a1f; }
.x2-ch-cardtitle { font: 600 17px/1.3 var(--fd-font-serif); color: var(--fd-ink); }
.x2-ch-cardmeta { font-size: 12.5px; color: var(--fd-muted); }
.x2-ch-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.x2-ch-pill { display: inline-flex; align-items: center; padding: 2px 9px; border: 1px solid var(--fd-line-2); border-radius: 999px; background: #f3f5ee; color: var(--fd-green-dark); font-size: 11.5px; font-weight: 600; }
.x2-ch-pill--due { border-color: #e3d6ae; background: #fbf3df; color: #5a4a17; }
.x2-ch-cardnote { font-size: 12.5px; line-height: 1.5; color: var(--fd-muted); }
.x2-ch-cardacts { display: flex; flex-wrap: wrap; gap: 8px; }
.x2-ch-railfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px; font-size: 12.5px; color: var(--fd-muted); }
.x2-photo { margin-bottom: 4px; padding: 5px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-paper); }
.x2-photo-box { display: grid; place-items: center; height: 118px; border: 1px dashed var(--fd-line-2); border-radius: 4px; background: var(--fd-soft); color: var(--fd-muted); font-size: 12px; line-height: 1.4; text-align: center; }

/* ---------- One room ---------- */
.x2-room { min-width: 0; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.x2-room--sample { max-width: 760px; }
.x2-room-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 10px; }
.x2-room-top > :first-child { flex: 1 1 240px; min-width: 0; margin-bottom: 0; }
.x2-followwrap { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; max-width: 100%; text-align: right; }
.x2-follow-hint { color: var(--fd-muted); font-size: 12.5px; line-height: 1.4; }
.x2-room-head { display: grid; gap: 4px; margin-bottom: 10px; justify-items: start; }
.x2-room-title { font: 600 19px/1.3 var(--fd-font-room); color: var(--fd-ink); }
.x2-room-sub { font-size: 12.5px; color: var(--fd-muted); }
.x2-room-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--fd-line); }
.x2-room-tab { min-height: 36px; padding: 6px 12px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--fd-muted); font-size: 13px; }
.x2-room-tab:hover { color: var(--fd-green-dark); }
.x2-room-tab[aria-pressed="true"] { border-color: var(--fd-line); background: var(--fd-soft); color: var(--fd-green-dark); font-weight: 600; }
.x2-room-body { display: grid; gap: 10px; min-width: 0; }
.x2-post { position: relative; min-width: 0; padding: 12px; border: 1px solid var(--fd-line); border-radius: 6px; background: var(--fd-paper); }
.x2-post--mine { background: #fbfcf6; }
.x2-post--held { border-style: dashed; }
.x2-post--ai { border-color: var(--fd-ai-line); background: var(--fd-ai-bg); }
.x2-post--accepted { border-color: #a9c9a2; background: #f2f8ef; }
.x2-author { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 6px; min-width: 0; }
.x2-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 30px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: var(--fd-soft); color: var(--fd-green-dark); font: 600 11px/1 var(--fd-font-sans); }
.x2-avatar--ai { background: var(--fd-ai-mark); color: var(--fd-amber-ink); }
.x2-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.x2-name { min-height: 24px; padding: 0; border: 0; background: none; color: var(--fd-green-dark); font: 600 13px/1.4 var(--fd-font-sans); text-align: left; }
button.x2-name:hover { text-decoration: underline; }
.x2-meta, .x2-time { color: var(--fd-muted); font-size: 11.5px; }
.x2-text { font-size: 13.5px; white-space: pre-line; color: var(--fd-ink); }
.x2-subject { font-size: 13.5px; font-weight: 600; }
.x2-posttag { margin-bottom: 6px; }
.x2-heldnote { margin-bottom: 4px; color: var(--fd-muted); font-size: 12px; }
.x2-acts { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; }
.x2-act { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 4px 8px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--fd-green-dark); font-size: 12.5px; }
.x2-act:hover { background: var(--fd-soft); }
.x2-act--helpful[aria-pressed="true"] { border-color: #c9d4bb; background: #e8eedf; font-weight: 600; }
.x2-act--check { padding: 4px 10px; border-color: var(--fd-line); background: var(--fd-paper); font-weight: 600; }
.x2-act.x2-act--count { padding: 4px 0; color: var(--fd-muted); font-size: 12px; cursor: default; }
.x2-act.x2-act--count:hover { background: none; }
.x2-act--more { min-width: 36px; justify-content: center; font-size: 16px; letter-spacing: 1px; }
.x2-act--more[aria-expanded="true"] { background: var(--fd-soft); }
.x2-follow { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; border: 1px solid var(--fd-line); border-radius: 999px; background: var(--fd-paper); color: var(--fd-green-dark); font-size: 12.5px; font-weight: 600; }
.x2-follow[aria-pressed="true"] { border-color: var(--fd-green); background: var(--fd-soft); }
.x2-follow svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.x2-follow--big { min-height: 36px; padding: 6px 12px; border-color: var(--fd-green); font-size: 13px; }
.x2-menuwrap { position: relative; display: inline-flex; }
.x2-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 3; display: grid; min-width: 200px; max-width: 260px; padding: 6px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-paper); box-shadow: var(--fd-shadow-room-menu); }
.x2-menu--static { position: static; max-width: 240px; }
.x2-menu-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 5px; background: none; color: var(--fd-ink); font-size: 13.5px; text-align: left; }
.x2-menu-item:hover { background: var(--fd-soft); }
.x2-menu-item--danger { color: var(--fd-red); }
.x2-menu-hint { color: var(--fd-muted); font-size: 11.5px; }
.x2-menu-foot { margin-top: 4px; padding: 8px 12px 4px; border-top: 1px solid var(--fd-line); font-size: 12.5px; }
.x2 .x2-menu-link { color: var(--fd-green-dark); font-weight: 600; }
.x2-branch { display: grid; gap: 8px; margin: 10px 0 0 6px; padding-left: 12px; border-left: 2px solid var(--fd-line); }
.x2-branch > summary { min-height: 32px; padding: 6px 0; color: var(--fd-green-dark); font-size: 12.5px; cursor: pointer; }
.x2-branch .x2-post { padding: 10px; background: #fdfdf8; }
.x2-newpill-row { display: flex; justify-content: center; }
.x2-newpill { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 16px; border: 0; border-radius: 999px; background: var(--fd-green); color: #fff; font-size: 13px; font-weight: 600; box-shadow: var(--fd-shadow-pill); }
.x2-followed { padding: 6px 10px; border-left: 3px solid var(--fd-green); background: #f4f6ee; color: var(--fd-muted); font-size: 12.5px; }
.x2-accepted-line { display: flex; align-items: center; gap: 4px; margin: 6px 0 2px; color: var(--fd-answered); font-size: 12.5px; font-weight: 600; }
.x2-composehost { display: grid; gap: 6px; margin-top: 12px; }
.x2-composehost > .x2-compose { margin-top: 0; }
.x2-compose { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid var(--fd-line); border-radius: 6px; background: var(--fd-paper); }
.x2-compose--reply { margin-top: 8px; background: #fdfdf8; }
.x2-rules { font-size: 12.5px; line-height: 1.5; color: var(--fd-muted); }
.x2-clabel { display: grid; gap: 6px; color: var(--fd-muted); font-size: 12px; }
.x2-cinput { width: 100%; min-height: 72px; padding: 9px 10px; border: 1px solid #c9d1bd; border-radius: 6px; background: #fff; color: var(--fd-ink); font: 400 15px/1.5 var(--fd-font-sans); resize: vertical; }
.x2-cinput::placeholder { color: var(--fd-placeholder); opacity: 1; }
.x2-notsent { color: var(--fd-muted); font-size: 12px; font-style: italic; }
.x2-cap { font-size: 12px; color: var(--fd-ink); }
.x2-crow { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.x2-dest { margin-right: auto; color: var(--fd-muted); font-size: 12px; }
.x2-rbtn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--fd-line); border-radius: 6px; background: var(--fd-paper); color: var(--fd-green-dark); font-size: 13px; font-weight: 600; }
.x2-rbtn--primary { border-color: var(--fd-green); background: var(--fd-green); color: #fff; }
.x2-rbtn--primary:hover { background: var(--fd-green-dark); }
.x2-rbtn--ghost { background: none; }
.x2-rbtn--danger { border-color: var(--fd-red); background: var(--fd-red); color: #fff; }
.x2-rbtn:disabled { opacity: .6; cursor: default; }
.x2-looking { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.x2-looking-label { margin-right: 2px; color: var(--fd-muted); font-size: 12.5px; }
.x2-lchip { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 11px; border: 1px solid var(--fd-line); border-radius: 999px; background: var(--fd-paper); color: var(--fd-green-dark); font-size: 12.5px; }
.x2-lchip:hover { background: var(--fd-soft); }
.x2-lchip[aria-pressed="true"] { border-color: var(--fd-green); background: #e5ecdb; font-weight: 600; box-shadow: inset 0 0 0 1px var(--fd-green); }
.x2-act--interest { padding: 4px 10px; border-color: var(--fd-line); border-radius: 999px; }
.x2-act--interest[aria-pressed="true"] { border-color: #c3d0b2; background: #e5ecdb; font-weight: 600; }
.x2-rolesonly { color: var(--fd-muted); font-size: 12px; }
.x2-host { min-width: 0; padding: 12px 14px; border: 1px solid var(--fd-line); border-left: 3px solid var(--fd-green); border-radius: 6px; background: var(--fd-paper); line-height: 1.5; }
.x2-host-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 6px; font-size: 12px; color: var(--fd-muted); }
.x2-host-body { color: var(--fd-ink); }
.x2-host-lead { font-size: 15.5px; font-weight: 650; line-height: 1.4; color: var(--fd-ink); }
.x2-host-links { display: grid; margin-top: 8px; }
.x2-host-links li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 7px 0; border-top: 1px solid var(--fd-line); font-size: 13.5px; }
.x2-host-links li:first-child { border-top: 0; }
.x2 .x2-host-links a { color: var(--fd-green-dark); font-weight: 600; }
.x2-host-meta { display: inline-flex; padding: 1px 8px; border-radius: 999px; background: #f6efdc; color: var(--fd-amber-ink); font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.x2-host-meta--grant { background: #e9f4ea; color: var(--fd-green-dark); }
.x2-host-rest { color: var(--fd-muted); font-size: 12.5px; }
.x2-host-note { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--fd-line); font-size: 12px; color: var(--fd-muted); }
.x2-catchup { padding: 8px 10px; border: 1px solid var(--fd-line); border-radius: 6px; background: var(--fd-bg); font-size: 13.5px; }
.x2-catchup-meta { margin-top: 2px; color: var(--fd-muted); font-size: 12px; }
.x2-roomparts { align-items: start; }

/* Who's here and People to say hi to */
.x2-here { display: grid; gap: 10px; min-width: 0; padding: 12px 14px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-paper); }
.x2-here-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.x2-here-line { font-size: 13.5px; color: var(--fd-ink); }
.x2-here-count { font-weight: 700; }
.x2-here-gap { display: inline-block; padding: 0 8px; border: 1px solid #c3d0b2; border-radius: 999px; background: #e5ecdb; color: var(--fd-green-dark); font-size: 12px; font-weight: 600; }
.x2-here-split { color: var(--fd-muted); }
.x2-here-matched { color: var(--fd-muted); font-style: italic; }
.x2-here-online::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--fd-online); vertical-align: 1px; }
.x2-dot { color: var(--fd-muted); }
.x2-join { display: inline-flex; flex-wrap: wrap; align-items: stretch; overflow: hidden; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-paper); }
.x2-join-label { display: inline-flex; align-items: center; padding: 0 10px; border-right: 1px solid var(--fd-line); color: var(--fd-muted); font-size: 12.5px; }
.x2-seg { min-height: 36px; padding: 6px 12px; border: 0; border-right: 1px solid var(--fd-line); background: none; color: var(--fd-green-dark); font-size: 13px; font-weight: 600; }
.x2-seg:last-child { border-right: 0; }
.x2-seg:hover { background: var(--fd-soft); }
.x2-seg[aria-pressed="true"] { background: var(--fd-green); color: #fff; }
.x2-hi { display: grid; gap: 8px; }
.x2-hi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.x2-hi-title { font: 600 16px/1.3 var(--fd-font-room); color: var(--fd-ink); }
.x2-hi-hide, .x2-hi-why { min-height: 32px; padding: 0 2px; border: 0; background: none; color: var(--fd-green-dark); font-size: 12.5px; text-decoration: underline; }
.x2-hi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.x2-hi-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px; border: 1px solid var(--fd-line); border-radius: 6px; background: #fdfdf8; }
.x2-hi-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.x2-hi-name { display: flex; flex-direction: column; min-width: 0; font-size: 11.5px; color: var(--fd-muted); }
.x2-hi-name strong { color: var(--fd-ink); font-size: 13.5px; }
.x2-pavatar { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: var(--fd-soft); color: var(--fd-green-dark); font: 600 11px/1 var(--fd-font-sans); }
.x2-pavatar.is-on::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border: 2px solid #fffef9; border-radius: 50%; background: var(--fd-online); }
.x2-reason { font-size: 12.5px; line-height: 1.45; color: var(--fd-ink); }
.x2-online { color: var(--fd-online); font-size: 11.5px; font-weight: 600; }
.x2-hi-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; }
.x2 .x2-hibtn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--fd-green); border-radius: 6px; background: var(--fd-green); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.x2 .x2-hibtn:hover { border-color: var(--fd-green-dark); background: var(--fd-green-dark); }
.x2-consent { font-size: 11.5px; color: var(--fd-muted); }
.x2-hi-compact { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; font-size: 13.5px; color: var(--fd-ink); }
.x2-hi-compact-label { margin-right: 2px; font-weight: 700; }
.x2 a.x2-hi-compact-name { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--fd-green-dark); font-weight: 600; text-decoration: underline; }
.x2-hi-compact .x2-hi-why { margin-left: auto; }
.x2-hi-compact :is(.x2-hi-why, .x2-hi-hide) { min-height: 44px; }

/* Before your first post */
.x2-fp { display: flex; flex-direction: column; gap: 10px; max-width: 560px; padding: 14px 16px; border: 1px solid var(--fd-line-2); border-radius: 8px; background: #f6f8f1; color: var(--fd-ink); font: 400 14px/1.45 var(--fd-font-sans); }
.x2-fp-title { font: 600 17px/1.3 var(--fd-font-serif); }
.x2-fp-line { font-size: 13px; color: var(--fd-muted); }
.x2-fp-legend { margin: 0 0 6px; font: 600 13px/1.4 var(--fd-font-sans); }
.x2-fp-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.x2-fp-segbtn { min-height: 38px; padding: 6px 14px; border: 1px solid #b9c4ab; border-radius: 999px; background: #fff; color: var(--fd-ink); font: 500 13px/1.2 var(--fd-font-sans); }
.x2-fp-segbtn[aria-pressed="true"] { border-color: var(--fd-green); background: var(--fd-active); color: var(--fd-green-dark); font-weight: 600; }
.x2-fp-segbtn:disabled { border-style: dashed; background: #f1f2ee; color: #7d8778; cursor: not-allowed; }
.x2-fp-note { margin-top: 6px; font-size: 12.5px; color: var(--fd-muted); }
.x2-fp-label { display: flex; flex-direction: column; gap: 4px; font: 600 13px/1.4 var(--fd-font-sans); }
.x2-fp-input { width: 100%; max-width: 420px; min-height: 40px; padding: 8px 10px; border: 1px solid #b9c4ab; border-radius: 5px; background: #fff; color: var(--fd-ink); font: 400 14px/1.4 var(--fd-font-sans); }
.x2-fp-preview { margin-top: -4px; font-size: 13px; font-weight: 600; color: var(--fd-green-dark); }
.x2-fp-check { display: flex; align-items: center; gap: 8px; min-height: 38px; font-size: 13.5px; }
.x2-fp-check input { flex: none; width: 18px; height: 18px; accent-color: var(--fd-green); }
.x2-fp-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.x2-fp-codes { display: flex; flex-wrap: wrap; gap: 6px; }
.x2-fp-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 5px 12px; border: 1px solid var(--fd-line-2); border-radius: 999px; background: #fff; font-size: 13px; }
.x2-fp-chip input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--fd-green); }
.x2-fp-input.x2-fp-code { max-width: 140px; }
.x2-fp-label-inline { margin-top: 8px; }
.x2-fp-status { padding: 8px 10px; border: 1px solid #d9d2b6; border-radius: 6px; background: #fbf7ea; font-size: 13px; }

/* Talk doors */
.x2-doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.x2-social { display: grid; gap: 7px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--fd-line); }
.x2-quote { overflow: hidden; color: var(--fd-muted); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.x2-quote b { color: var(--fd-ink); font-weight: 600; }
.x2-gd { grid-column: 1 / -1; }
.x2-gd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 2px 0; }
.x2-gd-talk, .x2-gd-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 0 16px; border-radius: 6px; font: 600 14px/1.2 var(--fd-font-sans); white-space: nowrap; }
.x2-gd-talk { border: 1px solid var(--fd-green); background: var(--fd-green); color: #fffef9; }
.x2-gd-talk:hover { border-color: var(--fd-green-dark); background: var(--fd-green-dark); }
.x2-gd-ghost { border: 1px solid var(--fd-field-line); background: var(--fd-paper); color: var(--fd-green-dark); }
.x2-gd-ghost:hover { background: #eef2e6; }
.x2-gd-n { font-variant-numeric: tabular-nums; }
.x2-gd-phone { grid-column: 1 / -1; max-width: 375px; }
.x2-gd-actions--phone { flex-wrap: nowrap; margin: 0; padding: 8px 13px; border: 1px solid var(--fd-line); border-bottom-color: #dfe5d4; background: var(--fd-paper); }
.x2-gd-actions--phone .x2-gd-talk { flex: 1 1 auto; }

/* Phone chat shell */
.x2-pc-head { display: flex; align-items: center; gap: 6px; flex: none; padding: 4px 15px; border-bottom: 1px solid var(--fd-line); background: var(--fd-paper); }
.x2 a.x2-pc-back { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 44px; min-height: 44px; color: var(--fd-green-dark); font-size: 22px; line-height: 1; text-decoration: none; }
.x2-pc-title { flex: 1 1 auto; min-width: 0; overflow: hidden; color: var(--fd-ink); font: 650 15px/1.3 var(--fd-font-sans); text-overflow: ellipsis; white-space: nowrap; }
.x2-pc-info { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--fd-line); border-radius: 50%; background: var(--fd-paper); color: var(--fd-green-dark); font: 700 17px/1 Georgia, serif; }
.x2-pc-main { flex: 1 1 auto; min-height: 0; overflow: auto; display: grid; align-content: start; gap: 10px; padding: 12px 13px 16px; }
.x2-pc-compose { flex: none; padding: 8px 12px 10px; border-top: 1px solid var(--fd-line); background: var(--fd-paper); box-shadow: 0 -4px 14px #29372e14; }
.x2-pc-compose .x2-rules { display: -webkit-box; margin-bottom: 6px; overflow: hidden; font-size: 12px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.x2-pc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.x2-pc-input { box-sizing: border-box; width: 100%; height: auto; min-height: 66px; padding: 10px; border: 1px solid #c9d1bd; border-radius: 6px; background: #fff; color: var(--fd-ink); font: 400 16px/22px var(--fd-font-sans); resize: none; }
.x2-pc-input::placeholder { color: var(--fd-placeholder); opacity: 1; }
.x2-pc-send { min-width: 64px; min-height: 44px; padding: 6px 14px; border: 1px solid var(--fd-green); border-radius: 6px; background: var(--fd-green); color: #fff; font-size: 13px; font-weight: 600; }
.x2-phone :is(.x2-act, .x2-follow, .x2-room-tab, .x2-seg, .x2-hi-hide, .x2-hi-why, .x2-hu-act, .x2-branch > summary) { min-height: 44px; }
.x2-phone .x2-act--more { min-width: 44px; }
.x2-phone .x2-post { padding: 10px; }
.x2-phone .x2-branch { margin-left: 2px; padding-left: 8px; }
.x2-phone button.x2-avatar { box-sizing: border-box; flex: 0 0 44px; width: 44px; height: 44px; padding: 7px; background-clip: content-box; }
.x2-phone button.x2-name { display: inline-flex; align-items: center; min-height: 44px; }
.x2-here--phone { padding: 10px 12px; }
.x2-here--phone .x2-join { width: 100%; }
.x2-here--phone .x2-seg { flex: 1 1 auto; }
.x2 .x2-seg:focus-visible { outline: 2px solid var(--fd-green-dark); outline-offset: -3px; box-shadow: inset 0 0 0 4px var(--fd-paper); }
.x2 .x2-seg[aria-pressed="true"]:focus-visible { outline-color: var(--fd-paper); box-shadow: inset 0 0 0 4px var(--fd-green-dark); }

/* Phone sheets: drawn in place; in the app they rise from the bottom of the screen */
.x2-sheets { display: grid; grid-template-columns: repeat(2, minmax(0, 375px)); justify-content: center; gap: 18px; }
.x2-sheetstage { display: flex; flex-direction: column; justify-content: flex-end; min-height: 340px; padding-top: 40px; overflow: hidden; border-radius: 6px; background: #1b241e66; }
.x2-sheetstage--menu { background: #1d2a2140; }
.x2-sheet { position: relative; width: 100%; border-radius: 14px 14px 0 0; background: var(--fd-paper); color: var(--fd-ink); box-shadow: 0 -6px 28px #29372e33; }
.x2-sheet-head { position: relative; display: flex; align-items: center; gap: 8px; padding: 16px 14px 8px; border-bottom: 1px solid var(--fd-line); }
.x2-sheet-head .x2-sheet-grip { position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: #cdd5bf; }
.x2-sheet-title { flex: 1 1 auto; min-width: 0; font: 600 18px/1.3 var(--fd-font-room); }
.x2-sheet-close { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-paper); color: var(--fd-green-dark); font-size: 14px; }
.x2-sheet-close:hover { background: var(--fd-soft); }
.x2-sheet-body { display: grid; gap: 12px; padding: 12px 14px 20px; }
.x2-sheet-h { font: 600 15px/1.4 var(--fd-font-sans); }
.x2-sheet-muted { color: var(--fd-muted); font-size: 13px; line-height: 1.5; }
.x2 a.x2-sheet-link { color: var(--fd-green-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.x2-sheet-row { display: flex; align-items: center; min-height: 44px; }
.x2-sheet-row .x2-rbtn { min-height: 44px; }
.x2-sheet-row .x2-sheet-link { display: inline-flex; align-items: center; min-height: 44px; }
.x2-sheet--menu { display: grid; padding: 10px 14px 16px; border: 1px solid var(--fd-line); border-bottom: 0; box-shadow: var(--fd-shadow-room-menu); }
.x2-sheet--menu .x2-sheet-grip { justify-self: center; width: 40px; height: 4px; margin: 2px 0 8px; border-radius: 2px; background: var(--fd-line); }
.x2-sheet--menu .x2-menu-item { min-height: 48px; font-size: 15px; }

.x2-pills { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.x2-pill { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 44px; padding: 6px 14px; border: 1px solid var(--fd-line-2); border-radius: 999px; background: var(--fd-paper); color: var(--fd-ink); font-size: 13px; white-space: nowrap; }
.x2-pill.is-current { border-color: var(--fd-green); background: var(--fd-active); color: var(--fd-green-dark); font-weight: 600; }

/* ---------- States and feedback ---------- */
.x2-loading { color: var(--fd-muted); font-size: 13px; padding: 4px 0; }
.x2-empty { padding: 14px 16px; border: 1px dashed var(--fd-line-2); border-radius: 8px; background: var(--fd-paper); color: var(--fd-muted); font-size: 13px; line-height: 1.55; }
.x2-fail { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border: 1px solid var(--fd-fail-line); border-radius: 6px; background: var(--fd-fail-bg); }
.x2-fail-note { flex: 1 1 220px; color: var(--fd-fail-ink); font-size: 13px; line-height: 1.45; }
.x2-fail-btn { min-height: 44px; padding: 8px 16px; border: 1px solid var(--fd-green); border-radius: 5px; background: var(--fd-green); color: #fff; font-size: 13px; font-weight: 600; }
.x2-fail-btn:hover { border-color: var(--fd-olive-hover); background: var(--fd-olive-hover); }
.x2-gates { gap: 8px; }
.x2-gate { color: var(--fd-muted); font-size: 13px; }
.x2 .x2-gate-link { color: var(--fd-green-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.x2-headsup, .x2-refusal { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--fd-amber-line); border-radius: 6px; background: var(--fd-amber); color: var(--fd-amber-ink); }
.x2-refusal { border-color: #e2b8b2; background: var(--fd-red-soft); color: #6d231b; }
.x2-hu-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid currentColor; border-radius: 50%; font: 700 12px/1 var(--fd-font-sans); }
.x2-hu-main { display: grid; gap: 6px; min-width: 0; }
.x2-hu-text { font-size: 13px; line-height: 1.5; }
.x2-hu-acts { display: flex; gap: 6px; }
.x2-hu-act { display: inline-flex; align-items: center; min-height: 30px; padding: 2px 10px; border: 1px solid currentColor; border-radius: 6px; background: #fffdf5; color: inherit; font-size: 12.5px; }
.x2-hu-whytext { font-size: 12.5px; line-height: 1.5; }
.x2-err { color: var(--fd-red); font-size: 12.5px; }
.x2-saved { display: inline-flex; align-items: center; gap: 6px; color: var(--fd-answered); font-size: 12.5px; font-weight: 600; }
.x2-scrim--room { padding: 28px 16px; background: #1d2a2140; }
.x2-rdialog { display: grid; gap: 12px; width: min(460px, 100%); padding: 20px; border: 1px solid var(--fd-line); border-radius: 10px; background: var(--fd-paper); color: var(--fd-ink); box-shadow: 0 12px 40px #29372e40; font-size: 14px; }
.x2-rdialog-title { font: 600 20px/1.3 var(--fd-font-room); }
.x2-rdialog-text { color: var(--fd-muted); font-size: 13px; }
.x2-rdialog-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.x2-toasts { display: grid; justify-items: start; gap: 8px; }
.x2-toast { display: inline-block; max-width: 520px; padding: 10px 16px; border-radius: 8px; background: var(--fd-green-dark); color: #fff; font-size: 13.5px; box-shadow: 0 6px 20px #29372e40; }
.x2-states { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; }

/* ---------- Match-M8 and plan features ---------- */
.x2-matchbox { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--fd-callout-line); border-radius: 10px; background: var(--fd-callout); }
.x2-matchbox-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.x2-matchbox-big { font-size: 16px; font-weight: 700; color: var(--fd-count-ink); }
.x2-matchbox-list { padding-left: 18px; font-size: 15px; line-height: 1.6; color: var(--fd-ink); list-style: disc; }
.x2 .x2-matchbox-list { list-style: disc; padding-left: 18px; }
.x2-note { font-size: 14px; line-height: 1.5; color: var(--fd-muted); }
.x2-wk { padding: 16px 18px; border: 1px solid var(--fd-line); border-top: 4px solid var(--fd-green); border-radius: 8px; background: var(--fd-paper); }
.x2-wk-h { display: flex; align-items: center; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--fd-line); font: 600 16px/1.35 var(--fd-font-sans); color: var(--fd-ink); }
.x2-wk-job { margin: 0 0 10px; font-size: 15px; line-height: 1.5; color: var(--fd-ink); }
.x2-wk-sub { margin: 12px 0 4px; font-size: 14px; font-weight: 700; color: var(--fd-muted); }
.x2-wk-list li { padding: 6px 0; border-top: 1px solid var(--fd-line); font-size: 14px; line-height: 1.5; }
.x2-wk-amt { color: var(--fd-count-ink); }
.x2-wk-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border: 1px solid var(--fd-line-2); border-radius: 999px; background: var(--fd-bg); color: var(--fd-muted); font-size: 11.5px; font-weight: 700; }
.x2-wk-quiet { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--fd-muted); }
.x2-band { display: flex; gap: 10px; margin: 6px 0 12px; }
.x2-band-cell { flex: 1 1 0; padding: 12px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-soft); text-align: center; }
.x2-band-val { display: block; font-size: 20px; font-weight: 700; color: var(--fd-count-ink); }
.x2-band-lbl { display: block; font-size: 13px; color: var(--fd-muted); }

/* ---------- Plan tiles demo ---------- */
.x2-tiles { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: start; }
.x2-tiles-col { display: grid; gap: 16px; min-width: 0; }
.x2-featlist { display: grid; gap: 0; max-width: 460px; padding: 4px 14px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-paper); }
.x2-featlist li { display: flex; align-items: center; min-height: 44px; border-top: 1px solid var(--fd-line); font-size: 13.5px; color: var(--fd-ink); }
.x2-featlist li:first-child { border-top: 0; }
.x2 .plan-lock { margin: 0; }
.x2-tileforms { align-items: flex-start; gap: 16px 28px; }
.x2-tileforms .x2-chipcell { max-width: 220px; }

/* ---------- Words ---------- */
.x2-voice { display: grid; gap: 8px; max-width: 72ch; margin: 0 0 18px; padding: 0; list-style: none; }
.x2-voice li { position: relative; padding-left: 18px; color: var(--fd-ink); font-size: 14px; line-height: 1.6; }
.x2-voice li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--fd-green); }

/* ---------- Full-screen samples: a 1440 x 1000 screen scaled to the frame it sits in ---------- */
.x2-fitbox { container-type: inline-size; }
.x2-fit { zoom: .5; }
@container (min-width: 636px) { .x2-fit { zoom: .44; } }
@container (min-width: 722px) { .x2-fit { zoom: .5; } }
@container (min-width: 794px) { .x2-fit { zoom: .55; } }
@container (min-width: 866px) { .x2-fit { zoom: .6; } }
@container (min-width: 952px) { .x2-fit { zoom: .66; } }
@container (min-width: 1010px) { .x2-fit { zoom: .7; } }
@container (min-width: 1068px) { .x2-fit { zoom: .74; } }

/* ---------- Phone samples: a true 375 x 812 screen inside the frame's border, scaled down on a narrow page ---------- */
.x2-phonespec { container: x2-phone / inline-size; }
.x2-phonespec > .ds-phone { box-sizing: content-box; width: 375px; height: 812px; max-width: none; }
@container x2-phone (width < 395px) { .x2-phonespec > .ds-phone { zoom: .94; } }
@container x2-phone (width < 364px) { .x2-phonespec > .ds-phone { zoom: .9; } }
@container x2-phone (width < 349px) { .x2-phonespec > .ds-phone { zoom: .86; } }
@container x2-phone (width < 333px) { .x2-phonespec > .ds-phone { zoom: .82; } }
@container x2-phone (width < 318px) { .x2-phonespec > .ds-phone { zoom: .78; } }
@container x2-phone (width < 302px) { .x2-phonespec > .ds-phone { zoom: .74; } }
@container x2-phone (width < 287px) { .x2-phonespec > .ds-phone { zoom: .7; } }
@container x2-phone (width < 271px) { .x2-phonespec > .ds-phone { zoom: .66; } }
@container x2-phone (width < 256px) { .x2-phonespec > .ds-phone { zoom: .62; } }
@container x2-phone (width < 240px) { .x2-phonespec > .ds-phone { zoom: .56; } }

/* ---------- Wide and narrow screens ---------- */
@media (max-width: 1000px) {
  .x2-principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .x2-tiles, .x2-cols, .x2-states, .x2-controls-grid, .x2-doors, .x2-sheets { grid-template-columns: minmax(0, 1fr); }
  .x2-metrics { grid-template-columns: minmax(0, 1fr); }
  .x2-rail-states { grid-template-columns: 190px; }
  .x2:not(.x2-app) :is(.x2-act, .x2-follow, .x2-room-tab, .x2-rbtn, .x2-seg, .x2-hibtn, .x2-fp-segbtn, .x2-fp-chip, .x2-fp-check, .x2-fp-input, .x2-ch-btn, .x2-ch-room, .x2-ch-linkbtn, .x2-ch-name, .x2-talk, .x2-branch > summary, .x2-newpill, .x2-lchip, .x2-menu-item, .x2-hi-hide, .x2-hi-why, .x2-hu-act, .x2-name) { min-height: 44px; }
  .x2:not(.x2-app) .x2-act--more { min-width: 44px; }
  .x2:not(.x2-app) :is(a.x2-ch-link, .x2-menu-link, .x2-host-links a, .x2-matchbox-top .x2-link) { display: inline-flex; align-items: center; min-height: 44px; }
  .x2:not(.x2-app) .x2-host-links li { padding: 9px 0; }
  .x2:not(.x2-app) .x2-talk { padding: 6px 14px; }
  .x2:not(.x2-app) :is(.x2-cinput, .x2-ch-input, .x2-fp-input, .x2-input, .x2-select, .x2-textarea) { font-size: 16px; }
  .x2:not(.x2-app) .x2-fp-input { max-width: none; }
  .x2:not(.x2-app) .x2-fp-input.x2-fp-code { max-width: 160px; }
  .x2-band { gap: 6px; }
  .x2-band-cell { padding: 10px 4px; }
  .x2-band-val { font-size: 17px; }
}
@media (max-width: 680px) {
  .x2-principles { grid-template-columns: minmax(0, 1fr); }
  .x2-only-narrow { display: block; }
  .x2-space-row { grid-template-columns: 34px 34px minmax(0, 1fr); }
  .x2-dialog { padding: 20px; }
  .x2-dialog-title { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .x2 * { transition: none !important; animation: none !important; }
}
