/* features.css: ส่วนที่ 5 ฟีเจอร์ (#features) ของ krobjobsystem.com, choice page 28 พ.ย. 2569.
   Loaded by the choice page (index.html), the locked page final.html and docs/design/index.html: the owner locked the top of variant A
   (text + orbit) on 28 พ.ย. 2569; the 5 stories, B and C are on the choice page only.
   The owner saw the archdesk.com "one end-to-end system" section and asked for that look: a big heading and a problem paragraph on the left,
   module chips floating on two faint rings around the logo on the right. Krobjob's content comes from the 26 พ.ย. infographic:
   10 modules, each with its own colour, plus 3 mobile apps.
   Round 2 (28 พ.ย. 2569, orbit only): the owner said the orbit looked like an oval, so it is now a true circle (square box, SVG circles,
   chip centres placed with sin()/cos() on the ring), and the chips follow the real menu of the app (origin/main 27 พ.ย. 2569):
   12 desktop modules on the outer ring (CRM and Account added, Data and Settings left out) and 3 mobile apps on the inner ring.
   Variant C and the 5 stories still use the round 1 set of 10 (.m01 to .m10 keep their round 1 meaning; .m11 .m12 are new).
   One file serves the three variants; the section carries ft-a, ft-b or ft-c and that class changes the layout.
     A (recommended): opener like archdesk (heading + problem paragraph + closing line left, orbit of 13 chips right), then the 5 stories.
     B: the orbit is the whole section. Chips are buttons; pressing one swaps the panel under the orbit (features.js). No stories.
     C: brochure grid of 10 numbered module cards + the 3 mobile apps + the 4 benefits, then the 5 stories.
   Module colours (order 01 to 10, from the infographic JSON templates/samples/infographic-2026-11.json) are used ONLY in this section, as tile
   backgrounds, icon colour and the numbers of C. Module 04 is the site gold #d4af37 as a tile background with a navy icon; it is never text.
   Numbers in C use an ink shade where the tile colour is under 4.5:1 on white (03 orange, 06 green) and navy for 04 (gold is never text).
   Icons: Lucide (ISC), inline SVG, stroke 2, no CDN. Thai text: no text-transform, no letter-spacing.
   Layout uses container queries: put the section inside .ft-frame (container-type: inline-size) so the same markup lays out by its real
   width on the site and inside the 390 px phone box of the choice page. The orbit has its own container (.ft-orb-frame): under 600 px the
   rings hide and the chips become a 2-column grid, so nothing overlaps on phones.
   Colour tokens come from the page's :root block: --navy --gold --white --h-bg --h-tint --h-ink --h-muted --h-line --font-head --font-body.
   Every px, ms and hex is declared once as a custom property below, so the rules only use var(). */

.ft-frame { container-type: inline-size; container-name: ft; }

/* ds-allow-hardcode:start */
.ft {
  /* module colours 01 to 10 (infographic order) */
  --ft-m01: #1e3a8a;
  --ft-m02: #0f6b4f;
  --ft-m03: #ea580c;
  --ft-m04: #d4af37;
  --ft-m05: #be1e4f;
  --ft-m06: #3d8b1f;
  --ft-m07: #2e6b62;
  --ft-m08: #1d63d6;
  --ft-m09: #5b2a9e;
  --ft-m10: #8a4b1c;
  --ft-m11: #0e7490;               /* round 2: CRM, deep cyan, white icon 5.36:1 */
  --ft-m12: #475569;               /* round 2: Account (reports and tax), slate, white icon 7.58:1 */
  /* text shades for numbers: same hue, 4.5:1 or more on white and on the 8% tints */
  --ft-m03-ink: #c2410c;
  --ft-m06-ink: #2f7a14;
  --ft-mob: var(--navy);           /* mobile app tiles */
  /* surfaces */
  --ft-bg: var(--white);
  --ft-ink: var(--h-ink);
  --ft-title: var(--navy);
  --ft-muted: var(--h-muted);
  --ft-line: var(--h-line);
  --ft-orbit-line: rgba(10, 22, 40, .14);
  --ft-orbit-fill: var(--h-bg);
  --ft-shadow: 0 8px 24px rgba(10, 22, 40, .08);
  --ft-shadow-chip: 0 6px 18px rgba(10, 22, 40, .09);
  --ft-shadow-float: 0 18px 44px rgba(10, 22, 40, .22);
  --ft-tint-pct: 8%;
  /* type */
  --ft-h2-min: 30px;
  --ft-h2-step: 14px;
  --ft-h2-max: 36px;               /* A's first line (เสนอราคา ... เก็บเงิน) fits its 9fr column at 1440 so the h2 is 2 lines; shared by B and C */
  --ft-fs-lead: 18px;
  --ft-fs-body: 17px;
  --ft-fs-close: 20px;
  --ft-fs-h3: 24px;
  --ft-fs-h4-min: 22px;
  --ft-fs-h4-max: 28px;
  --ft-fs-chip: 15px;
  --ft-fs-chip-m: 14px;
  --ft-fs-small: 14px;
  --ft-fs-cap: 13px;
  --ft-fs-sub: 12px;
  --ft-fs-num: 16px;
  --ft-lh: 1.75;
  --ft-lh-h: 1.3;
  --ft-lh-tight: 1.35;
  --ft-measure: 34em;
  --ft-step-label: 6.5em;          /* copy steps: fixed label column so the text after each label lines up */
  --ft-step-label-m: 5em;          /* narrow box: the longest label (เสนอราคา, bold) still fits, text keeps more room */
  --ft-lh-step: 1.55;              /* tighter than body so a wrapped step stays one group, the row gap separates steps */
  /* sizes */
  --ft-wrap: 1200px;
  --ft-pad: 96px;
  --ft-pad-m: 56px;
  --ft-gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --ft-gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --ft-tile: 36px;
  --ft-tile-s: 28px;
  --ft-tile-r: 9px;
  --ft-tile-r-s: 7px;
  --ft-icon: 20px;
  --ft-icon-s: 16px;
  --ft-icon-xs: 14px;
  --ft-chip-h: 48px;
  --ft-chip-r: 12px;
  --ft-chip-pad: 6px;
  --ft-chip-pad-r: 14px;
  --ft-logo-w: 164px;
  --ft-logo-w-m: 140px;
  --ft-orb-max-a: 680px;
  --ft-orb-max-b: 900px;
  /* round 2 true circle: ring radii as % of the square orbit box. The SVG circles use the same numbers (in a
     100 x 100 viewBox: r="41" and r="21"), so change both together */
  --ft-orb-r: 41%;
  --ft-orb-r-in: 21%;
  /* orbit chips are small stacked cards (tile on top, Thai name, English menu name), width min-content so a two-part name always
     breaks at its <wbr> and the chip stays narrow: 12 chips 30 degrees apart only clear each other when they are narrow.
     Two steps: compact (A, and B under 760 px) and roomy (B from 760 px) */
  --ft-och-min: 76px;
  --ft-och-min-l: 88px;
  --ft-och-pad: 6px;
  --ft-och-pad-l: 8px;
  --ft-fs-och: 13px;
  --ft-fs-och-l: 14px;
  --ft-fs-och-sub: 11px;
  --ft-fs-och-sub-l: 12px;
  --ft-lh-och: 1.3;
  --ft-logo-w-o: 116px;
  --ft-logo-w-ol: 150px;
  --ft-radius: 12px;
  --ft-radius-lg: 16px;
  --ft-radius-phone: 22px;
  --ft-hair: 1px;
  --ft-ring: 2px;
  --ft-focus: 3px;
  --ft-focus-off: 2px;
  --ft-check: 24px;
  --ft-phone-w: 220px;
  --ft-phone-inset: 28%;
  --ft-phone-inset-max: 170px;
  --ft-phone-border: 5px;
  --ft-s1: 4px;
  --ft-s2: 8px;
  --ft-s3: 12px;
  --ft-s4: 16px;
  --ft-s5: 20px;
  --ft-s6: 24px;
  --ft-s7: 32px;
  --ft-s8: 40px;
  --ft-s9: 48px;
  --ft-s10: 64px;
  --ft-s11: 80px;
  --ft-panel-min: 400px;
  /* round 5 motion "current in the wire" (28 พ.ย. 2569, like Magic UI Animated Beam). The owner did not want the round 4 ring sweeps,
     the grey haze round the hub or the blurred beams: every light now has a clear source, a bright core and a short tail, no wide blur.
     A faint wire (primary 14%, 1 px) shows from the hub ring to one chip while a short pulse of light runs along it, like current in a
     cable: a white-hot head on a 3 px gold front that thins and clears to a 1.5 px gold tail, all of it --ft-l-len of the wire.
     No primary in the light itself (gold and navy mixed on white read grey). Glow is one narrow gold band (7 px, under 8 px), no filter.
     The light is three strokes of the same path, each painted with a moving gradient (Magic UI's method): features.js moves the
     gradient ends along the wire every frame. Each layer's stops: --*-at offsets (0 = tail end, 1 = head), --*-op stop opacity,
     --*-tone g (gold) or w (white). Colours fade by stop-opacity on one colour, never through transparent black, so nothing turns grey.
     features.js reads these lists, the ms values, --ft-back-ratio, --ft-wire-bend and --ft-wire-inset, so the CSS stays the one place
     they live */
  --ft-wire: color-mix(in srgb, var(--blue) 14%, transparent);
  --ft-wire-w: 1px;
  --ft-wire-bend: .08;              /* sideways bow of the wire, share of its length (all wires bow the same way round) */
  --ft-wire-inset: 4px;             /* the wire ends this far inside the chip edge, under the card */
  --ft-wire-clear: 6px;             /* a wire bows round a chip in its way with this much room */
  --ft-wire-in: 200ms;
  --ft-wire-out: 400ms;
  --ft-l-len: .22;                  /* pulse length, share of the wire */
  --ft-l-min: 40px;                 /* but never shorter than this (the short wires to the inner ring), and at most half the wire */
  --ft-l-tail-w: 1.5px;
  --ft-l-tail-at: 0 .4 .85 .998 1;
  --ft-l-tail-op: 0 .4 .9 .9 0;
  --ft-l-tail-tone: g g g g g;
  --ft-l-halo-w: 7px;
  --ft-l-halo-at: .4 .75 .92 .998 1;
  --ft-l-halo-op: 0 .22 .26 .12 0;
  --ft-l-halo-tone: g g g g g;
  --ft-l-front-w: 3px;
  --ft-l-front-at: .3 .68 .9 .998 1;
  --ft-l-front-op: 0 1 1 1 0;
  --ft-l-front-tone: g g w w w;
  --ft-ping-every-min: 700ms;
  --ft-ping-every-max: 900ms;
  --ft-ping-dur: 1300ms;
  --ft-ping-ease: cubic-bezier(.4, .12, .6, .88);   /* a soft ease-in-out: a strong one spends the run hidden at the hub and under the chip */
  --ft-back-ratio: .25;             /* share of pulses that run from a chip back into the hub */
  --ft-max-runs: 3;                 /* never more pulses on the move than this */
  --ft-twin-ratio: .35;             /* share of ticks that send a second pulse (to another chip) at the same time, so 2 to 3 run together */
  /* hub: the white logo plate with one thin gold ring that flashes when a pulse leaves (or a returning one arrives) */
  --ft-hub-r: 11%;
  --ft-hub-bg: var(--white);
  --ft-hub-line: 1px;
  --ft-hub-dim: .4;
  --ft-hub-flash: 300ms;
  /* reached chip: gold 1.5 px edge + 4 px gold 20% ring, held, then faded */
  --ft-hit-line: 1.5px;
  --ft-hit-ring: 4px;
  --ft-hit-glow: inset 0 0 0 var(--ft-hit-line) var(--gold), 0 0 0 var(--ft-hit-ring) color-mix(in srgb, var(--gold) 20%, transparent);
  --ft-hit-bright: 1.08;
  --ft-hit-hold: 700ms;
  --ft-hit-fade: 300ms;
  --ft-float-a: -7px;
  --ft-float-b: -5px;
  --ft-float-c: -8px;
  --ft-dur: 200ms;
  --ft-ease: cubic-bezier(.22, 1, .36, 1);
  /* reference only (container query values cannot read custom properties): open 2 columns at 1080 px, orbit mode at 600 px,
     stories split at 820 px, C grid 5 columns at 1000 px */
  --ft-bp-open: 1080px;
  --ft-bp-orb: 600px;
  --ft-bp-story: 820px;

  background: var(--ft-bg);
  color: var(--ft-ink);
  font-family: var(--font-body);
  font-size: var(--ft-fs-body);
  line-height: var(--ft-lh);
}
/* per-module colour hooks: --c tile colour, --ink text colour for numbers, --on icon colour on the tile */
.ft .m01 { --c: var(--ft-m01); --ink: var(--ft-m01); }
.ft .m02 { --c: var(--ft-m02); --ink: var(--ft-m02); }
.ft .m03 { --c: var(--ft-m03); --ink: var(--ft-m03-ink); }
.ft .m04 { --c: var(--ft-m04); --ink: var(--navy); --on: var(--navy); }
.ft .m05 { --c: var(--ft-m05); --ink: var(--ft-m05); }
.ft .m06 { --c: var(--ft-m06); --ink: var(--ft-m06-ink); }
.ft .m07 { --c: var(--ft-m07); --ink: var(--ft-m07); }
.ft .m08 { --c: var(--ft-m08); --ink: var(--ft-m08); }
.ft .m09 { --c: var(--ft-m09); --ink: var(--ft-m09); }
.ft .m10 { --c: var(--ft-m10); --ink: var(--ft-m10); }
.ft .mob { --c: var(--ft-mob); --ink: var(--navy); }
.ft .m11 { --c: var(--ft-m11); --ink: var(--ft-m11); }
.ft .m12 { --c: var(--ft-m12); --ink: var(--ft-m12); }
/* round 2 orbit angles, clockwise from 12 o'clock. o01 to o12: the 12 modules on the outer ring, 30 degrees apart.
   oi1 to oi3: the 3 mobile apps on the inner ring, 120 degrees apart. The chip centre sits on the ring (see the orbit rules). */
.ft .o01 { --a: 0deg; }   .ft .o02 { --a: 30deg; }  .ft .o03 { --a: 60deg; }  .ft .o04 { --a: 90deg; }
.ft .o05 { --a: 120deg; } .ft .o06 { --a: 150deg; } .ft .o07 { --a: 180deg; } .ft .o08 { --a: 210deg; }
.ft .o09 { --a: 240deg; } .ft .o10 { --a: 270deg; } .ft .o11 { --a: 300deg; } .ft .o12 { --a: 330deg; }
.ft .oi1 { --a: 0deg; --r: var(--ft-orb-r-in); }
.ft .oi2 { --a: 120deg; --r: var(--ft-orb-r-in); }
.ft .oi3 { --a: 240deg; --r: var(--ft-orb-r-in); }
/* round 3 bob: three keyframe sets in turn, a period of 6.0 to 7.6 s and a delay of 0 to 1.8 s, different on every chip so no two move in step */
.ft .o01 { --fk: ft-float-a; --fd: 6.4s; --d: 0s; }    .ft .o02 { --fk: ft-float-b; --fd: 7.2s; --d: .6s; }
.ft .o03 { --fk: ft-float-c; --fd: 6.0s; --d: 1.2s; }  .ft .o04 { --fk: ft-float-a; --fd: 7.6s; --d: .3s; }
.ft .o05 { --fk: ft-float-b; --fd: 6.6s; --d: 1.5s; }  .ft .o06 { --fk: ft-float-c; --fd: 7.0s; --d: .9s; }
.ft .o07 { --fk: ft-float-a; --fd: 6.2s; --d: 1.8s; }  .ft .o08 { --fk: ft-float-b; --fd: 7.4s; --d: .15s; }
.ft .o09 { --fk: ft-float-c; --fd: 6.8s; --d: 1.05s; } .ft .o10 { --fk: ft-float-a; --fd: 7.1s; --d: .45s; }
.ft .o11 { --fk: ft-float-b; --fd: 6.3s; --d: 1.35s; } .ft .o12 { --fk: ft-float-c; --fd: 7.5s; --d: .75s; }
.ft .oi1 { --fk: ft-float-b; --fd: 6.9s; --d: 1.65s; } .ft .oi2 { --fk: ft-float-c; --fd: 6.5s; --d: .25s; }
.ft .oi3 { --fk: ft-float-a; --fd: 7.3s; --d: 1.1s; }
/* ds-allow-hardcode:end */

.ft *, .ft *::before, .ft *::after { box-sizing: border-box; }
.ft :where(h2, h3, h4, p, ul, ol, figure) { margin: 0; }
.ft :where(ul, ol) { padding: 0; list-style: none; }
.ft img { display: block; max-width: 100%; height: auto; }
.ft ::selection { background: var(--navy); color: var(--white); }
.ft .nw { white-space: nowrap; }
.ft .num { font-variant-numeric: tabular-nums; }

.ft-in {
  max-width: calc(var(--ft-wrap) + var(--ft-gutter-l) + var(--ft-gutter-r));
  margin: 0 auto;
  padding: var(--ft-pad-m) var(--ft-gutter-r) var(--ft-pad-m) var(--ft-gutter-l);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ft-s10);
}
@container ft (min-width: 760px) { .ft-in { padding-block: var(--ft-pad); gap: var(--ft-s11); } }

/* ---------- shared: heading, tiles, chips ---------- */
.ft-h2 {
  font-family: var(--font-head); font-weight: 700; color: var(--ft-title);
  font-size: clamp(var(--ft-h2-min), 2.4cqi + var(--ft-h2-step), var(--ft-h2-max));
  line-height: var(--ft-lh-h); text-wrap: balance;
}
.ft-lead { font-size: var(--ft-fs-lead); line-height: var(--ft-lh); max-width: var(--ft-measure); text-wrap: pretty; }
.ft-steps { display: grid; gap: var(--ft-s4); max-width: var(--ft-measure); font-size: var(--ft-fs-lead); line-height: var(--ft-lh-step); }
.ft-steps li { display: grid; grid-template-columns: var(--ft-step-label) minmax(0, 1fr); column-gap: var(--ft-s4); align-items: baseline; }
@container ft (max-width: 479px) { .ft-steps li { grid-template-columns: var(--ft-step-label-m) minmax(0, 1fr); column-gap: var(--ft-s3); } }
.ft-steps b { font-family: var(--font-head); font-weight: 700; color: var(--ft-title); }
.ft-steps li > span { text-wrap: pretty; }
.ft-close {
  font-family: var(--font-head); font-weight: 700; color: var(--ft-title);
  font-size: var(--ft-fs-close); line-height: var(--ft-lh-tight);
  padding-top: var(--ft-s5); border-top: var(--ft-hair) solid var(--ft-line); max-width: var(--ft-measure);
}
.ft-tile {
  flex: none; display: grid; place-items: center;
  width: var(--ft-tile); height: var(--ft-tile); border-radius: var(--ft-tile-r);
  background: var(--c); color: var(--on, var(--white));
}
.ft-tile svg { width: var(--ft-icon); height: var(--ft-icon); }
.ft-tile-s { width: var(--ft-tile-s); height: var(--ft-tile-s); border-radius: var(--ft-tile-r-s); }
.ft-tile-s svg { width: var(--ft-icon-s); height: var(--ft-icon-s); }

.ft-chip {
  display: flex; align-items: center; gap: var(--ft-s3);
  min-height: var(--ft-chip-h); padding: var(--ft-chip-pad) var(--ft-chip-pad-r) var(--ft-chip-pad) var(--ft-chip-pad);
  background: var(--white); border: var(--ft-hair) solid var(--ft-line); border-radius: var(--ft-chip-r);
  box-shadow: var(--ft-shadow-chip);
  font: inherit; font-size: var(--ft-fs-chip-m); font-weight: 500; line-height: var(--ft-lh-tight); color: var(--ft-title);
  text-align: left;
}
.ft-chip-txt { display: grid; min-width: 0; }
.ft-chip-sub { display: inline-flex; align-items: center; gap: var(--ft-s1); font-size: var(--ft-fs-sub); font-weight: 500; color: var(--ft-muted); }
.ft-chip-sub svg { width: var(--ft-icon-xs); height: var(--ft-icon-xs); flex: none; }
/* A: the one emphasised chip (บริหารโครงการ), navy ring like archdesk's purple Projects chip */
.ft-chip.is-key { border-color: var(--navy); box-shadow: inset 0 0 0 var(--ft-hair) var(--navy), var(--ft-shadow-chip); }

/* ---------- orbit (A and B) ---------- */
.ft-orb-frame { container-type: inline-size; container-name: orb; min-width: 0; }
.ft-orb { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ft-s2); }
.ft-orb-logo { grid-column: 1 / -1; justify-self: center; padding-block: var(--ft-s2) var(--ft-s4); }
.ft-orb-logo img { width: var(--ft-logo-w-m); }
.ft-orb-rings { display: none; }
.ft-orb > ul { display: contents; }
.ft-orb .ft-chip { width: 100%; height: 100%; }
.ft-orb .ft-chip-txt { gap: 0; }
/* grid mode (phones, cells down to 140 px at a 320 px screen): smaller tile and tighter padding so each name part fits whole */
.ft-orb .ft-chip { gap: var(--ft-s2); padding-right: var(--ft-s2); }
.ft-orb .ft-tile { width: var(--ft-tile-s); height: var(--ft-tile-s); border-radius: var(--ft-tile-r-s); }
.ft-orb .ft-tile svg { width: var(--ft-icon-s); height: var(--ft-icon-s); }

@container orb (min-width: 600px) {
  .ft-orb { display: block; width: 100%; margin-inline: auto; aspect-ratio: 1; }
  .ft-a .ft-orb, .ft-c .ft-orb { max-width: var(--ft-orb-max-a); }
  .ft-b .ft-orb { max-width: var(--ft-orb-max-b); }
  .ft-orb-rings { display: block; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  .ft-orb-rings .r-out { fill: none; stroke: var(--ft-orbit-line); stroke-width: var(--ft-hair); }
  .ft-orb-rings .r-in { fill: var(--ft-orbit-fill); stroke: var(--ft-orbit-line); stroke-width: var(--ft-hair); }
  .ft-orb-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 0; }
  .ft-orb-logo img { width: var(--ft-logo-w-o); }
  /* the box is square, so left (% of width) and top (% of height) share one radius: a true circle */
  .ft-orb > ul > li {
    position: absolute; transform: translate(-50%, -50%);
    left: calc(50% + var(--r, var(--ft-orb-r)) * sin(var(--a)));
    top: calc(50% - var(--r, var(--ft-orb-r)) * cos(var(--a)));
  }
  .ft-orb .ft-chip {
    flex-direction: column; justify-content: center; gap: var(--ft-s1);
    width: min-content; min-width: var(--ft-och-min); height: auto; min-height: 0; padding: var(--ft-och-pad);
    font-size: var(--ft-fs-och); line-height: var(--ft-lh-och); text-align: center;
  }
  .ft-orb .ft-chip-txt { justify-items: center; }
  .ft-orb .ft-chip-sub { font-size: var(--ft-fs-och-sub); white-space: nowrap; }
  .ft-orb .ft-tile { width: var(--ft-tile-s); height: var(--ft-tile-s); border-radius: var(--ft-tile-r-s); }
  .ft-orb .ft-tile svg { width: var(--ft-icon-s); height: var(--ft-icon-s); }
}
/* B only: its orbit grows to 900 px, so from 760 px the chips and the logo step up. A's orbit stops at 680 px and stays compact */
@container orb (min-width: 760px) {
  .ft-b .ft-orb-logo img { width: var(--ft-logo-w-ol); }
  .ft-b .ft-orb .ft-chip { min-width: var(--ft-och-min-l); padding: var(--ft-och-pad-l); font-size: var(--ft-fs-och-l); }
  .ft-b .ft-orb .ft-chip-sub { font-size: var(--ft-fs-och-sub-l); }
  .ft-b .ft-orb .ft-tile { width: var(--ft-tile); height: var(--ft-tile); border-radius: var(--ft-tile-r); }
  .ft-b .ft-orb .ft-tile svg { width: var(--ft-icon); height: var(--ft-icon); }
}
/* ---------- round 5 orbit motion "current in the wire" (A and B) ----------
   Only in orbit mode (600 px and up). Under 600 px (2-column grid) the light layer (.ft-fx) is hidden and nothing moves.
   Layers, back to front: SVG rings (still, 14%), .ft-fx (.ft-hub white plate with its gold ring, .ft-wires SVG), the logo, the chips.
   features.js draws one <g class="ft-wire"> per pulse in .ft-wires (viewBox = the orbit box in px): four copies of one gently bowed
   path from the hub ring to a point just inside the chip edge, or the other way for a returning pulse. .w-base is the faint wire
   (fades in, and out once the pulse has drained); .w-tail .w-halo .w-front carry the pulse through their own moving gradients
   (stops outside the pulse are clear). The head runs from the start of the wire past its end until the tail has drained into the
   chip or the hub plate; when the head reaches the end the chip gets .is-lit (or the hub flashes, for a returning pulse).
   The class was .is-hit until the section went into docs/design/index.html (28 พ.ย. 2569): hero.css has a global .is-hit (3 px navy outline),
   so the reached chip there would also get that outline. .is-lit is used nowhere else on the page.
   The frame loop in features.js stops the clock while the orbit is paused, like the CSS animations below.
   Hover or keyboard focus inside the orbit pauses everything (and features.js starts no new pulse) so the chips can be read.
   .is-off (orbit out of view) and .is-held (B after the visitor pressed a chip) pause it the same way.
   With reduced motion no pulse runs: the rings, the hub plate and the chips stay still. */
.ft-fx { display: none; }
@container orb (min-width: 600px) {
  .ft-fx { display: block; position: absolute; inset: 0; pointer-events: none; }
  .ft-hub { position: absolute; inset: calc(50% - var(--ft-hub-r)); border-radius: 50%; background: var(--ft-hub-bg); }
  .ft-hub::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    border: var(--ft-hub-line) solid var(--gold); opacity: var(--ft-hub-dim);
  }
  .ft-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  .ft-wire path { fill: none; }
  .ft-wire .w-base { stroke: var(--ft-wire); stroke-width: var(--ft-wire-w); }
  .ft-wire .w-tail { stroke-width: var(--ft-l-tail-w); }
  .ft-wire .w-halo { stroke-width: var(--ft-l-halo-w); }
  .ft-wire .w-front { stroke-width: var(--ft-l-front-w); }
  .ft-wires stop { stop-color: var(--gold); }
  .ft-wires stop.is-w { stop-color: var(--white); }

  /* reached chip: a gold edge over the card (the navy ring of บริหารโครงการ stays under it) and a brighter tile */
  .ft-orb .ft-chip { position: relative; }
  .ft-orb .ft-chip::after {
    content: ""; position: absolute; inset: calc(var(--ft-hair) * -1); pointer-events: none;
    border-radius: calc(var(--ft-chip-r) + var(--ft-hair)); box-shadow: var(--ft-hit-glow);
    opacity: 0; transition: opacity var(--ft-hit-fade) var(--ft-ease);
  }
  .ft-orb .ft-chip .ft-tile { transition: filter var(--ft-hit-fade) var(--ft-ease); }
  .ft-orb .ft-chip.is-lit::after { opacity: 1; transition-duration: var(--ft-dur); }
  .ft-orb .ft-chip.is-lit .ft-tile { filter: brightness(var(--ft-hit-bright)); }
}
@media (prefers-reduced-motion: no-preference) {
  @container orb (min-width: 600px) {
    .ft-orb .ft-chip { animation: var(--fk, ft-float-a) var(--fd, 7s) ease-in-out var(--d, 0s) infinite; }
    .ft-hub.is-emit::after { animation: ft-flash var(--ft-hub-flash) var(--ft-ease) 1; }
    .ft-wire .w-base { animation: ft-in var(--ft-wire-in) linear 1 both; }
    .ft-wire.is-done .w-base { animation: ft-out var(--ft-wire-out) linear 1 both; }
    .ft-orb:hover *, .ft-orb:focus-within *, .ft-orb.is-off *, .ft-orb.is-held * { animation-play-state: paused; }
  }
}
@media (prefers-reduced-motion: reduce) { .ft-wires { display: none; } }
@keyframes ft-float-a { 50% { translate: 0 var(--ft-float-a); } }
@keyframes ft-float-b { 50% { translate: 0 var(--ft-float-b); } }
@keyframes ft-float-c { 50% { translate: 0 var(--ft-float-c); } }
@keyframes ft-flash { 50% { opacity: 1; } }
@keyframes ft-in { from { opacity: 0; } }
@keyframes ft-out { to { opacity: 0; } }

/* ---------- A: opener ---------- */
.ft-open { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ft-s8); align-items: center; }
.ft-open-txt { display: grid; gap: var(--ft-s6); align-content: center; }
@container ft (min-width: 1080px) {
  /* 9fr/11fr: text column wide enough for the 2-line h2, orbit column stays over 600px so the orbit (container orb >= 600px) still draws round */
  .ft-a .ft-open { grid-template-columns: minmax(0, 9fr) minmax(0, 11fr); gap: var(--ft-s9); }
}

/* ---------- stories (A and C) ---------- */
.ft-stories { display: grid; gap: var(--ft-s10); }
.ft-stories-head { display: grid; gap: var(--ft-s2); padding-top: var(--ft-s9); border-top: var(--ft-hair) solid var(--ft-line); }
.ft-stories-head h3 { font-family: var(--font-head); font-size: var(--ft-fs-h3); line-height: var(--ft-lh-h); color: var(--ft-title); }
.ft-stories-head p { color: var(--ft-muted); font-size: var(--ft-fs-small); }
.ft-story { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ft-s6); align-items: center; }
.ft-story-txt { display: grid; gap: var(--ft-s4); align-content: start; }
.ft-tag {
  justify-self: start; display: inline-flex; align-items: center; gap: var(--ft-s2);
  font-size: var(--ft-fs-small); font-weight: 500; color: var(--ft-muted); line-height: var(--ft-lh-tight);
}
.ft-tag-plus { color: var(--ft-muted); }
.ft-story h4 {
  font-family: var(--font-head); font-weight: 700; color: var(--ft-title);
  font-size: clamp(var(--ft-fs-h4-min), 1cqi + var(--ft-s4), var(--ft-fs-h4-max)); line-height: var(--ft-lh-h); text-wrap: balance;
}
.ft-story p { max-width: var(--ft-measure); text-wrap: pretty; }
.ft-checks { display: grid; gap: var(--ft-s2); }
.ft-checks li { display: flex; gap: var(--ft-s3); align-items: flex-start; }
.ft-checks .ck {
  flex: none; display: grid; place-items: center; width: var(--ft-check); height: var(--ft-check);
  margin-top: var(--ft-s1); border-radius: 50%; background: var(--navy); color: var(--white);
}
.ft-checks .ck svg { width: var(--ft-icon-xs); height: var(--ft-icon-xs); }
.ft-shot { display: grid; gap: var(--ft-s2); min-width: 0; }
.ft-shot-box {
  position: relative; border-radius: var(--ft-radius); border: var(--ft-hair) solid var(--ft-line);
  background: var(--white); box-shadow: var(--ft-shadow); overflow: clip;
}
.ft-shot-box img { width: 100%; }
.ft-shot figcaption { font-size: var(--ft-fs-cap); color: var(--ft-muted); line-height: var(--ft-lh-tight); }
/* story 5: payroll screen with the check-in phone screen laid over its corner */
.ft-shot-pair { position: relative; padding-bottom: var(--ft-s6); }
.ft-shot-pair .ft-phone-inset {
  position: absolute; right: calc(var(--ft-s3) * -1); bottom: 0; width: var(--ft-phone-inset); max-width: var(--ft-phone-inset-max);
  border-radius: var(--ft-radius-phone); border: var(--ft-phone-border) solid var(--navy); background: var(--navy);
  box-shadow: var(--ft-shadow-float); overflow: clip;
}
.ft-shot-pair .ft-phone-inset img { border-radius: calc(var(--ft-radius-phone) - var(--ft-phone-border)); }
@container ft (max-width: 819px) { .ft-shot-pair .ft-phone-inset { right: 0; } }
@container ft (min-width: 820px) {
  .ft-story { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--ft-s9); }
  .ft-story.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .ft-story.flip .ft-story-txt { order: 2; }
  .ft-story.wide { grid-template-columns: minmax(0, 1fr); gap: var(--ft-s6); }
  .ft-story.wide .ft-story-txt {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--ft-s9);
    grid-template-areas: "tag tag" "h p" "h ck";
  }
  .ft-story.wide .ft-tag { grid-area: tag; }
  .ft-story.wide h4 { grid-area: h; }
  .ft-story.wide .ft-story-txt > p:not(.ft-tag) { grid-area: p; }
  .ft-story.wide .ft-checks { grid-area: ck; }
}

/* ---------- B: orbit + switch panel ---------- */
.ft-b-head { display: grid; gap: var(--ft-s4); justify-items: center; text-align: center; }
.ft-b-head .ft-lead { margin-inline: auto; }
.ft-b-hint { font-size: var(--ft-fs-small); color: var(--ft-muted); }
.ft-b .ft-body { display: grid; gap: var(--ft-s8); }
.ft-b button.ft-chip { cursor: pointer; transition: border-color var(--ft-dur) var(--ft-ease), background-color var(--ft-dur) var(--ft-ease), box-shadow var(--ft-dur) var(--ft-ease); }
.ft-b button.ft-chip:hover { border-color: var(--navy); background: var(--white); color: var(--ft-title); }
.ft-b button.ft-chip:focus-visible { outline: var(--ft-focus) solid var(--navy); outline-offset: var(--ft-focus-off); }
.ft-b button.ft-chip:active { translate: 0 var(--ft-hair); }
/* pressed (the visitor's choice) outranks the pulse's passing highlight: tinted fill + 2 px navy ring + navy tile edge,
   while the highlight is only an outer blue ring on a white chip */
.ft-b button.ft-chip[aria-pressed="true"] {
  border-color: var(--navy); background: var(--h-tint); color: var(--ft-title);
  box-shadow: inset 0 0 0 var(--ft-ring) var(--navy), var(--ft-shadow-float);
}
.ft-panel {
  border: var(--ft-hair) solid var(--ft-line); border-radius: var(--ft-radius-lg); background: var(--white);
  box-shadow: var(--ft-shadow); padding: var(--ft-s5);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ft-s6); align-items: center;
}
.ft-panel[hidden] { display: none; }
.ft-panel-txt { display: grid; gap: var(--ft-s3); align-content: center; }
.ft-panel-name { display: flex; align-items: center; gap: var(--ft-s3); }
.ft-panel h3 { font-family: var(--font-head); font-size: var(--ft-fs-h3); line-height: var(--ft-lh-h); color: var(--ft-title); }
.ft-panel-no { font-size: var(--ft-fs-small); font-weight: 500; color: var(--ft-muted); }
.ft-panel p { max-width: var(--ft-measure); }
.ft-pills { display: flex; flex-wrap: wrap; gap: var(--ft-s2); }
.ft-pills li {
  padding: var(--ft-s1) var(--ft-s3); border-radius: var(--ft-s2); background: var(--h-tint);
  font-size: var(--ft-fs-small); font-weight: 500; color: var(--ft-title); line-height: var(--ft-lh-tight);
}
.ft-panel .ft-shot-box.phone { justify-self: center; width: var(--ft-phone-w); border-radius: var(--ft-radius-phone); border: var(--ft-phone-border) solid var(--navy); background: var(--navy); }
.ft-panel .ft-shot-box.phone img { border-radius: calc(var(--ft-radius-phone) - var(--ft-phone-border)); }
.ft-panel .ft-shot.phone-shot { justify-items: center; text-align: center; }
.ft-panel-more {
  border-radius: var(--ft-radius); background: var(--h-bg); border: var(--ft-hair) dashed var(--ft-line);
  padding: var(--ft-s5); display: grid; gap: var(--ft-s3); align-content: center;
}
.ft-panel-more h4 { font-size: var(--ft-fs-small); font-weight: 700; color: var(--ft-title); }
.ft-panel-more p { font-size: var(--ft-fs-cap); color: var(--ft-muted); }
@container ft (min-width: 820px) {
  .ft-panel { padding: var(--ft-s8); grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--ft-s8); min-height: var(--ft-panel-min); }
}

/* ---------- C: brochure grid ---------- */
.ft-c-head { display: grid; gap: var(--ft-s4); }
.ft-c-board { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ft-s6); }
.ft-mods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ft-s3); align-content: start; }
.ft-mod {
  display: grid; align-content: start; gap: var(--ft-s2);
  padding: var(--ft-s4); border-radius: var(--ft-radius);
  background: color-mix(in srgb, var(--c) var(--ft-tint-pct), var(--white));
  border: var(--ft-hair) solid color-mix(in srgb, var(--c) 22%, var(--white));
}
.ft-mod-top { display: flex; align-items: center; justify-content: space-between; gap: var(--ft-s2); }
.ft-mod-no { font-family: var(--font-head); font-weight: 700; font-size: var(--ft-fs-num); color: var(--ink); font-variant-numeric: tabular-nums; }
.ft-mod h3 { font-family: var(--font-head); font-size: var(--ft-fs-body); line-height: var(--ft-lh-tight); color: var(--ft-title); }
.ft-mod p { font-size: var(--ft-fs-cap); line-height: var(--ft-lh-tight); color: var(--ft-ink); }
.ft-apps {
  display: grid; gap: var(--ft-s3); align-content: start;
  padding: var(--ft-s4); border-radius: var(--ft-radius); background: var(--h-bg); border: var(--ft-hair) solid var(--ft-line);
}
.ft-apps h3 { display: flex; align-items: center; gap: var(--ft-s2); font-family: var(--font-head); font-size: var(--ft-fs-body); color: var(--ft-title); line-height: var(--ft-lh-tight); }
.ft-apps h3 svg { width: var(--ft-icon); height: var(--ft-icon); flex: none; }
.ft-app { display: grid; grid-template-columns: var(--ft-s11) minmax(0, 1fr); gap: var(--ft-s3); align-items: center; padding: var(--ft-s2); border-radius: var(--ft-radius); background: var(--white); border: var(--ft-hair) solid var(--ft-line); }
.ft-app-shot { border-radius: var(--ft-s3); border: var(--ft-s1) solid var(--navy); background: var(--navy); overflow: clip; }
.ft-app-shot img { border-radius: var(--ft-s2); }
.ft-app h4 { font-size: var(--ft-fs-chip); font-weight: 700; color: var(--ft-title); line-height: var(--ft-lh-tight); }
.ft-app p { font-size: var(--ft-fs-cap); line-height: var(--ft-lh-tight); color: var(--ft-ink); }
.ft-benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ft-s4); padding-top: var(--ft-s6); border-top: var(--ft-hair) solid var(--ft-line); }
.ft-benefits li { display: flex; gap: var(--ft-s3); align-items: flex-start; font-size: var(--ft-fs-small); line-height: var(--ft-lh-tight); }
.ft-benefits strong { display: block; font-size: var(--ft-fs-chip); color: var(--ft-title); }
.ft-benefits .ft-tile { background: var(--navy); }
@container ft (min-width: 640px) {
  .ft-mods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ft-apps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ft-apps h3 { grid-column: 1 / -1; }
  .ft-app { grid-template-columns: minmax(0, 1fr); }
  .ft-app-shot { width: var(--ft-s11); }
}
@container ft (min-width: 1000px) {
  .ft-mods { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ft-app { grid-template-columns: var(--ft-s10) minmax(0, 1fr); }
  .ft-app-shot { width: auto; }
  .ft-benefits { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (forced-colors: active) {
  .ft-tile, .ft-checks .ck { border: var(--ft-hair) solid CanvasText; }
  .ft-b button.ft-chip[aria-pressed="true"] { outline: var(--ft-ring) solid Highlight; }
  .ft-fx { display: none; }
  .ft-orb .ft-chip::after { box-shadow: none; outline: var(--ft-ring) solid Highlight; }
}
.ft-c-open { display: grid; gap: var(--ft-s8); }
