/* Dhan look 1.0, 30 Oct 2026 - a copy of the Dhan design standard's dhan-look.css (draft 1, 29 Oct 2026); change the master, then copy it here. */
/*
 * dhan-look.css - the Dhan design standard, draft 1 (29 Oct 2026). One stylesheet for every Dhan site.
 *
 * It is opus's own look (opus_ver2 public/css/opus.css) written so that every site can carry it: opus's variable and
 * class names are kept exactly; what opus does not have yet is added in the same hand and marked "proposed".
 *   1  group colours, shape and type (opus.css:7-32, 241, 280)    9  tables, pager, density
 *   2  the three looks (opus.css:44-46, 242-244, 281-287)          10 alerts, toasts, pop-ups, modals
 *   3  business marks for tiles, dots and tags (opus.css:99-126)    11 page patterns (record, forms, history)
 *   4  page basics                                                12 tiles and app icons (opus.css:99-213)
 *   5  the frame: top bar, left column, page (opus.css:49-64, 238-272)
 *   6  menu Left / Top / Slim and the other "Your way" choices    13 the door: pages before sign-in (opus.css:274-376)
 *   7  cards, figures, buttons (opus.css:68-84)                   14 phones (opus.css:129-136, 198-213, 268-272, 359-370)
 *   8  fields, search, switches, filters, tabs (opus.css:85-89, 142-154)
 * Nothing is fetched from outside: the computer's own fonts, inline line icons.
 * Colours, cards and boxes are always opus's: no personal colours, no themes, no dark mode.
 */

/* ---------- 1. Group colours, shape and type ---------- */
:root {
    /* opus today (opus.css:7-32): the Dhan amber and brown, the page's greys, and the alert colours */
    --ink: #170a03;
    --gold: #f6a81a;
    --gold-strong: #d98b06;
    --gold-text: #9a5700;
    --gold-soft: #fff4de;
    --gold-line: #f3d391;
    --bg: #f4f5f7;
    --surface: #ffffff;
    --border: #e5e7eb;
    --text: #1f2430;
    --muted: #586070;
    --red: #c2410c;    --red-soft: #fdece6;    --red-line: #f5c7b3;
    --blue: #1d4ed8;   --blue-soft: #e8efff;   --blue-line: #b9cbfb;
    --grey-soft: #f3f4f6; --grey-line: #d6d8de;
    --dhan: #f6a81a; --dhan-dark: #170a03;
    --smsf: #2e558e; --smsf-dark: #0d213f; --smsf-light: #9cc8f0;
    --both-dark: #2c2c2a;
    --radius: 12px;
    --radius-sm: 8px;
    --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;

    /* proposed: the same family, named so every site can use it */
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;  /* opus.css:35 */
    --smsf-mid: #16335f;   /* smsfaudits.com's second navy: SMSF Audits' button hover */
    --smsf-soft: #eef3f8;  /* smsfaudits.com's pale blue */
    --smsf-line: #c3d5ec;
    --surface-2: #f9fafb;  /* a quiet fill inside white cards: table headings, card feet */
    --placeholder: #6b7280;
    --grey-strong: #8a909c; /* edges of ticks and switches (3:1 on white) */
    --green: #15803d;  --green-text: #166534; --green-soft: #e6f6ec; --green-line: #b4dfc2;
    --amber: #b45309;  --amber-text: #6b3d00; --amber-soft: var(--gold-soft); --amber-line: var(--gold-line);
    --red-text: #9a3412;  /* opus.css:72, 222 */
    --blue-text: #1e3a8a; /* opus.css:73 */
    --grey-text: #3f4652;
    --radius-md: 10px;    /* opus's alerts and the door's fields (opus.css:71, 316) */
    --radius-xs: 6px;     /* key hints, tags, tips (opus.css:147) */
    --radius-pill: 999px; /* search, switches, pills, counts (opus.css:143, 149) */
    --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-7: 28px;
    --space-8: 32px; --space-10: 40px; --space-14: 56px;
    --control: 44px; --control-sm: 36px; --control-xs: 32px;
    --shadow-hover: 0 8px 22px rgba(23, 10, 3, .1);   /* opus.css:109 */
    --shadow-dark: 0 14px 30px rgba(0, 0, 0, .28);     /* opus.css:266 */
    --shadow-float: 0 14px 34px rgba(23, 10, 3, .16);  /* white pop-ups and modals */
    --ease: .15s ease;                                  /* opus.css:333 */
}

/* the type scale (proposed names for opus's sizes); "Larger text" multiplies every size, never a box */
:root, [data-text] {
    --text-scale: 1;
    --fs-door: calc(40px * var(--text-scale));     /* opus.css:311, the door only */
    --fs-title: calc(26px * var(--text-scale));    /* opus.css:63 */
    --fs-h2: calc(18px * var(--text-scale));       /* opus.css:227 */
    --fs-h3: calc(16px * var(--text-scale));       /* opus.css:114 */
    --fs-body: calc(15px * var(--text-scale));     /* opus.css:36 */
    --fs-table: calc(14px * var(--text-scale));
    --fs-small: calc(13.5px * var(--text-scale));  /* opus.css:86, 223 */
    --fs-label: calc(12.5px * var(--text-scale));  /* opus.css:100 */
    --fs-micro: calc(12px * var(--text-scale));    /* opus.css:147 */
}
[data-text="larger"] { --text-scale: 1.125; }

/* ---------- 2. The three looks (App\Support\Brand: body class look-dhan, look-smsf or look-both) ----------
   Everything that differs between Dhan Accountants, SMSF Audits and "both businesses" is here and only here.
   --look-bar is always written as a gradient: border-image takes an image, so a plain colour drew no line (opus today). */
.look-dhan {
    --look-top: var(--dhan-dark);
    --look-bar: linear-gradient(90deg, var(--dhan), var(--dhan));
    --look-accent: var(--gold);
    --look-accent-hover: var(--gold-strong);
    --look-on-accent: var(--ink);
    --look-soft: var(--gold-soft);
    --look-line: var(--gold-line);
    --look-text: var(--gold-text);
    --look-focus: var(--gold-text);
    --side-bg: var(--dhan-dark);
    --side-mark: var(--dhan);
    --on-mark: var(--ink);
    --initials: var(--dhan-dark); --initials-text: var(--dhan);
    --door-bg: var(--dhan-dark); --door-button: var(--dhan-dark); --door-mark: var(--dhan); --door-names: var(--dhan);
    --door-ring: var(--dhan-dark); --door-icon: var(--gold-strong);
}
.look-smsf {
    --look-top: var(--smsf-dark);
    --look-bar: linear-gradient(90deg, var(--smsf), var(--smsf));
    --look-accent: var(--smsf);
    --look-accent-hover: var(--smsf-mid);
    --look-on-accent: #fff;
    --look-soft: var(--smsf-soft);
    --look-line: var(--smsf-line);
    --look-text: var(--smsf);
    --look-focus: var(--smsf);
    --side-bg: var(--smsf-dark);
    --side-mark: var(--smsf-light);
    --on-mark: var(--smsf-dark);
    --initials: var(--smsf-dark); --initials-text: #fff;
    --door-bg: var(--smsf-dark); --door-button: var(--smsf-dark); --door-mark: var(--smsf-light); --door-names: var(--smsf-light);
    --door-ring: var(--smsf-dark); --door-icon: var(--smsf);
}
/* both businesses: only on sites both businesses share (opus, Team, Knowledge), chosen by the person's own sites */
.look-both {
    --look-top: var(--both-dark);
    --look-bar: linear-gradient(90deg, var(--dhan) 50%, var(--smsf) 50%);
    --look-accent: var(--gold);
    --look-accent-hover: var(--gold-strong);
    --look-on-accent: var(--ink);
    --look-soft: var(--gold-soft);
    --look-line: var(--gold-line);
    --look-text: var(--gold-text);
    --look-focus: var(--gold-text);
    --side-bg: linear-gradient(180deg, var(--dhan-dark), var(--smsf-dark));
    --side-mark: var(--dhan);
    --on-mark: var(--ink);
    --initials: linear-gradient(135deg, var(--dhan-dark) 50%, var(--smsf-dark) 50%); --initials-text: #fff;
    --door-bg: linear-gradient(180deg, var(--dhan-dark), var(--smsf-dark)); --door-button: linear-gradient(90deg, var(--dhan-dark), var(--smsf-dark));
    --door-mark: var(--dhan); --door-names: #e9e3dc; --door-ring: var(--dhan-dark); --door-icon: var(--gold-strong);
}

/* ---------- 3. Business marks: the colour says which business a thing belongs to (opus.css:102-126) ---------- */
.brand-dhan { --mark-band: linear-gradient(90deg, var(--dhan), var(--dhan)); --mark-tile: var(--dhan-dark); --mark-icon: var(--dhan);
    --mark-dot: var(--dhan); --mark-soft: var(--gold-soft); --mark-line: var(--gold-line); --mark-text: var(--ink); }
.brand-smsf { --mark-band: linear-gradient(90deg, var(--smsf), var(--smsf)); --mark-tile: var(--smsf-dark); --mark-icon: #fff;
    --mark-dot: var(--smsf-dark); --mark-soft: var(--smsf-soft); --mark-line: var(--smsf-line); --mark-text: var(--smsf-dark); }
.brand-both { --mark-band: linear-gradient(90deg, var(--dhan) 50%, var(--smsf) 50%); --mark-tile: var(--both-dark); --mark-icon: #fff;
    --mark-dot: linear-gradient(135deg, var(--dhan) 50%, var(--smsf-dark) 50%); --mark-soft: var(--grey-soft); --mark-line: var(--grey-line);
    --mark-text: var(--text); }

/* ---------- 4. Page basics (opus.css:34-41) ---------- */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: var(--fs-body); line-height: 1.55;
    -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; }
a { color: var(--look-text); text-decoration: none; }
a:hover { color: var(--look-top); text-decoration: underline; }
button { font: inherit; }
.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.num, .tabular { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--look-focus); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 30; padding: 8px 14px; border-radius: var(--radius-sm); background: var(--surface);
    color: var(--text); font-weight: 600; }
.skip-link:focus { top: 10px; }
kbd, .key { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
    border: 1px solid var(--grey-line); border-radius: var(--radius-xs); background: var(--surface); color: var(--muted);
    font: inherit; font-size: var(--fs-micro); font-weight: 600; line-height: 1; }

/* ---------- 5. The frame: one layout for every site (opus.css:49-64, 238-272) ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 28px;
    background: var(--look-top); border-bottom: 4px solid transparent; border-image: var(--look-bar) 1; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: #fff; }
.brand:hover { color: #fff; text-decoration: none; }
.brand-mark { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.brand-mark .brand-logo { display: block; height: 34px; width: auto; border-radius: 4px; }
.brand-divider { flex: none; width: 1px; height: 26px; background: rgba(255, 255, 255, .28); }  /* the door's divider (opus.css:302) */
.brand-name { color: rgba(255, 255, 255, .88); font-size: var(--fs-body); font-weight: 600; white-space: nowrap; }
.topbar-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar-end form { margin: 0; }
.who { display: inline-flex; align-items: center; gap: 7px; padding: 0 6px; color: rgba(255, 255, 255, .85); font-weight: 600; white-space: nowrap; }
.who .icon { color: var(--side-mark); }
a.who:hover { color: #fff; text-decoration: none; }

/* proposed: an app's own things in the top bar, in this order - Quick find, its one "+ New", a running timer, counts, your name */
.bar-find { position: relative; display: flex; align-items: center; gap: 8px; flex: 0 1 380px; min-width: 0; height: 40px; margin: 0 0 0 18px;
    padding: 0 8px 0 12px; border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius-pill); background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .72); }
.bar-find > .icon { color: rgba(255, 255, 255, .72); }
.bar-find input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: #fff; font: inherit; font-size: var(--fs-small); }
.bar-find input::placeholder { color: rgba(255, 255, 255, .7); }
.bar-find .key { border-color: rgba(255, 255, 255, .25); background: none; color: rgba(255, 255, 255, .78); }
.bar-find:focus-within { background: rgba(255, 255, 255, .14); outline: 2px solid var(--side-mark); outline-offset: 1px; }
.bar-find:focus-within .key { display: none; }
.menu-panel .bar-find { display: none; margin: 2px 0 10px; height: 44px; }  /* a phone's Quick find, at the top of the Menu */
.bar-new { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border: 0; border-radius: var(--radius-sm);
    background: var(--side-mark); color: var(--on-mark); font-size: var(--fs-small); font-weight: 700; white-space: nowrap; cursor: pointer; }
.bar-new:hover { background: linear-gradient(rgba(255, 255, 255, .16), rgba(255, 255, 255, .16)), var(--side-mark); color: var(--on-mark); text-decoration: none; }
.bar-new:focus-visible, .bar-icon:focus-visible, .bar-timer button:focus-visible, .who:focus-visible { outline: 2px solid var(--side-mark); outline-offset: 2px; }
.bar-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none;
    border: 0; border-radius: var(--radius-sm); background: none; color: rgba(255, 255, 255, .86); cursor: pointer; }
.bar-icon:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.bar-icon .icon { width: 20px; height: 20px; }
.bar-count { position: absolute; top: 2px; right: 0; min-width: 19px; height: 19px; padding: 0 5px; border: 2px solid var(--look-top);
    border-radius: var(--radius-pill); background: var(--side-mark); color: var(--on-mark); font-size: 11px; font-weight: 700; line-height: 15px;
    text-align: center; }
.bar-timer { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 4px 0 12px; border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--radius-pill); color: #fff; font-size: var(--fs-body); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-timer .timer-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--side-mark); }
.bar-timer button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.bar-timer button .icon { width: 15px; height: 15px; }
.bar-timer button:hover { background: rgba(255, 255, 255, .2); }

/* the frame under the bar: the left column and the page (opus.css:248-258) */
.frame { display: flex; align-items: stretch; min-height: calc(100vh - 64px); }
.frame > .page { flex: 1; min-width: 0; }
.side { flex: none; width: 236px; padding: 18px 12px; background: var(--side-bg); }
.side-list { position: sticky; top: 82px; display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.side-list form { margin: 0; }
.side-link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-left: 3px solid transparent;
    border-radius: var(--radius-sm); background: none; color: rgba(255, 255, 255, .86); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.side-link:hover, .side-link:focus-visible { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.side-link:focus-visible { outline: 2px solid var(--side-mark); outline-offset: 1px; }
.side-link.is-current { border-left-color: var(--side-mark); background: rgba(255, 255, 255, .1); color: #fff; }
.side-link.is-current .icon { color: var(--side-mark); }
/* proposed for big apps: group labels, counts and a line before the column's foot (Vridhi has the first two) */
.side-label { margin: 14px 12px 2px; color: rgba(255, 255, 255, .62); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.side-label:first-child { margin-top: 2px; }
.side-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-count { flex: none; min-width: 22px; height: 20px; padding: 0 7px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .16); color: #fff;
    font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.side-link.is-current .side-count { background: var(--side-mark); color: var(--on-mark); }
.side-rule { height: 1px; margin: 10px 8px; background: rgba(255, 255, 255, .12); }
/* option: a section's own pages opening under it in the column */
.side-sub { display: grid; gap: 2px; margin: 2px 0 6px 25px; padding: 0 0 0 10px; border-left: 1px solid rgba(255, 255, 255, .18); list-style: none; }
.side-sublink { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, .78); font-size: var(--fs-small); font-weight: 600; }
.side-sublink:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.side-sublink.is-current { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 3px 0 0 var(--side-mark); }

/* on a phone or narrow tablet: the column folds into a Menu button in the bar, no script needed (opus.css:259-272) */
.menu { position: relative; display: none; }
.menu-button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .25);
    border-radius: var(--radius-sm); color: #fff; font-weight: 600; list-style: none; cursor: pointer; }
.menu-button::-webkit-details-marker { display: none; }
.menu-button:focus-visible { outline: 2px solid var(--side-mark); outline-offset: 2px; }
.menu[open] > .menu-button { border-color: var(--side-mark); }
.menu-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 20; width: min(280px, calc(100vw - 28px)); padding: 10px;
    border-radius: var(--radius); background: var(--side-bg); box-shadow: var(--shadow-dark); }
.menu-panel .side-list { position: static; }

/* the page (opus.css:62-65) */
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 28px 56px; }
.page.is-wide { max-width: 1560px; }  /* proposed: lists with many columns */
.page-title { font-size: var(--fs-title); font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.page-sub { margin: 6px 0 0; color: var(--muted); max-width: 72ch; }
/* proposed: the page's head - where you are, the title, the page's own buttons */
.trail { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 8px; padding: 0; list-style: none; color: var(--muted);
    font-size: var(--fs-small); }
.trail a { color: var(--muted); }
.trail a:hover { color: var(--text); }
.trail .icon { width: 14px; height: 14px; color: var(--grey-strong); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; margin: 0 0 20px; }
.page-head > div:first-child { min-width: 0; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ---------- 6. Your way: menu Left (the default) / Top / Slim, Comfortable / Compact, Standard / Larger text ----------
   Set on <html> by the person's own choices (data-menu, data-lists, data-text). They move the menu and change spacing in lists
   and the size of text; the colours, cards and boxes never change. */
/* Top: the sections in a band under the bar; the line moves under the band */
.topmenu { display: none; }
[data-menu="top"] .topbar { border-bottom: 1px solid rgba(255, 255, 255, .1); border-image: none; }
[data-menu="top"] .topmenu { position: sticky; top: 64px; z-index: 9; display: flex; align-items: stretch; gap: 2px; height: 52px; padding: 0 24px;
    overflow-x: auto; scrollbar-width: none; background: var(--look-top); border-bottom: 4px solid transparent; border-image: var(--look-bar) 1; }
[data-menu="top"] .side { display: none; }
.topmenu-link { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; color: rgba(255, 255, 255, .86);
    font-size: var(--fs-small); font-weight: 600; white-space: nowrap; }
.topmenu-link:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.topmenu-link.is-current { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 -3px 0 var(--side-mark); }
.topmenu-link.is-current .icon { color: var(--side-mark); }
.topmenu-link .side-count { min-width: 20px; height: 18px; padding: 0 6px; font-size: 11.5px; line-height: 18px; }
/* Slim: the same column, icons with their short names under them */
[data-menu="slim"] .side { width: 84px; padding: 14px 6px; }
[data-menu="slim"] .side-label, [data-menu="slim"] .side-sub { display: none; }
[data-menu="slim"] .side-link { position: relative; flex-direction: column; justify-content: center; gap: 4px; min-height: 60px; padding: 6px 2px;
    border-left-width: 3px; font-size: 11.5px; line-height: 1.2; text-align: center; }
[data-menu="slim"] .side-link .icon { width: 21px; height: 21px; }
[data-menu="slim"] .side-text { width: 100%; }
[data-menu="slim"] .side-count { position: absolute; top: 4px; right: 12px; min-width: 18px; height: 17px; padding: 0 5px; font-size: 10.5px; line-height: 17px; }
/* Compact lists: rows closer together; the boxes stay the same */
[data-lists="compact"] .table { font-size: var(--fs-small); }
[data-lists="compact"] .table td { padding-top: 6px; padding-bottom: 6px; }
[data-lists="compact"] .table th { padding-top: 8px; padding-bottom: 8px; }
[data-lists="compact"] .details dt, [data-lists="compact"] .details dd { padding-top: 6px; padding-bottom: 6px; }

/* ---------- 7. Cards, figures and buttons (opus.css:68-84) ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card.has-band { position: relative; overflow: hidden; }
.card.has-band::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--look-bar); }
.message { padding: 22px 24px; display: grid; gap: 14px; justify-items: start; }
.message p { margin: 0; }
.form-card { padding: 22px 24px; }
.card-title { margin: 0; font-size: var(--fs-h2); font-weight: 600; line-height: 1.3; }
/* proposed: a card's head and foot */
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; min-height: 60px; padding: 12px 20px;
    border-bottom: 1px solid var(--border); }
.card-head .card-title { display: flex; align-items: baseline; gap: 8px; }
.card-count { color: var(--muted); font-size: var(--fs-small); font-weight: 500; }
.card-body { padding: 18px 20px; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px;
    border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
/* proposed: figures - a labelled number, alone or in a strip */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.figure { padding: 16px 18px; }
.figure-label { color: var(--muted); font-size: var(--fs-label); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.figure-value { margin-top: 6px; font-size: calc(26px * var(--text-scale)); font-weight: 600; letter-spacing: -.01em; line-height: 1.2;
    font-variant-numeric: tabular-nums; }
.figure-note { margin-top: 4px; color: var(--muted); font-size: var(--fs-small); }
.figure-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.figure-strip .figure + .figure { border-left: 1px solid var(--border); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 1px solid transparent;
    border-radius: var(--radius-sm); font-size: var(--fs-body); font-weight: 700; line-height: 1.55; white-space: nowrap; cursor: pointer; text-decoration: none;
    transition: background-color var(--ease), border-color var(--ease), color var(--ease); }
.btn:hover { text-decoration: none; }
.btn-brand { background: var(--look-accent); border-color: var(--look-accent); color: var(--look-on-accent); }
.btn-brand:hover, .btn-brand:focus { background: var(--look-accent-hover); border-color: var(--look-accent-hover); color: var(--look-on-accent); }
.look-dhan .btn-brand:hover, .look-both .btn-brand:hover { color: var(--ink); }
.btn-quiet { background: var(--surface); border-color: var(--grey-line); color: var(--text); }
.btn-quiet:hover { border-color: var(--look-top); color: var(--text); }
.btn-quiet .icon { color: var(--muted); }
.topbar .btn-quiet, .on-dark .btn-quiet { background: transparent; border-color: rgba(255, 255, 255, .25); color: #fff; }
.topbar .btn-quiet:hover, .on-dark .btn-quiet:hover { border-color: var(--side-mark); color: var(--side-mark); }
.btn-block { display: flex; width: 100%; }
.link-button { padding: 0; border: 0; background: none; color: var(--look-text); font-weight: 600; cursor: pointer; }
/* proposed: the button that removes or refuses, a smaller size, and a button that is only an icon */
.btn-danger { background: var(--surface); border-color: var(--red-line); color: var(--red-text); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); color: var(--red-text); }
.btn-danger.is-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: var(--fs-small); }
.btn-icon { width: 40px; height: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; height: 32px; }
.btn-icon.btn-sm .icon { width: 16px; height: 16px; }
.btn[disabled], .btn.is-off { opacity: .55; cursor: not-allowed; }

/* ---------- 8. Fields, search, switches, filters, tabs (opus.css:85-89, 142-154, 217-229) ---------- */
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.field-label { font-size: var(--fs-small); font-weight: 600; color: var(--muted); }
.field-label .optional { font-weight: 500; }
.input { width: 100%; min-height: var(--control); padding: 9px 12px; border: 1px solid var(--grey-line); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-body); }
.input::placeholder { color: var(--placeholder); }
.input:focus { outline: 3px solid var(--look-soft); border-color: var(--look-focus); }
textarea.input { min-height: 96px; resize: vertical; }
select.input { appearance: none; padding-right: 38px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23586070' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 9.5 5.5 5.5 5.5-5.5'/%3E%3C/svg%3E") no-repeat right 12px center / 18px; }
.input.is-invalid, .input[aria-invalid="true"] { border-color: var(--red); }
.input.is-invalid:focus { outline-color: var(--red-soft); }
.field-error { margin: 0; color: var(--red-text); font-size: var(--fs-small); }
.field-hint { margin: 0; color: var(--muted); font-size: var(--fs-small); }
.code-input { font-size: 22px; letter-spacing: .3em; text-align: center; }
.input-money { display: flex; align-items: stretch; }
.input-money > span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--grey-line); border-right: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--grey-soft); color: var(--muted); font-weight: 600; }
.input-money .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; text-align: right; font-variant-numeric: tabular-nums; }
/* ticks, choices and on/off switches in the look's colour */
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { appearance: none; flex: none; position: relative; display: inline-grid; place-content: center; width: 20px; height: 20px; margin: 2px 0 0;
    border: 1.5px solid var(--grey-strong); border-radius: var(--radius-xs); background: var(--surface); cursor: pointer; }
.check input[type="radio"] { border-radius: 50%; }
.check input:checked { border-color: var(--look-accent); background: var(--look-accent); }
.check input[type="checkbox"]:checked::before { content: ''; width: 6px; height: 11px; margin-top: -2px; border: solid var(--look-on-accent);
    border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
.check input[type="radio"]:checked::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--look-on-accent); }
.check input:focus-visible { outline: 2px solid var(--look-focus); outline-offset: 2px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { appearance: none; position: relative; flex: none; width: 42px; height: 24px; margin: 0; border-radius: var(--radius-pill);
    background: var(--grey-strong); cursor: pointer; transition: background-color var(--ease); }
.switch input::before { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 2px rgba(23, 10, 3, .25); transition: transform var(--ease); }
.switch input:checked { background: var(--look-accent); }
.switch input:checked::before { transform: translateX(18px); }
.switch input:focus-visible { outline: 2px solid var(--look-focus); outline-offset: 2px; }

/* Quick find with its key (opus.css:142-148) */
.quick-open { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; min-width: 0; height: 46px; margin: 0; padding: 0 14px;
    border: 1px solid var(--grey-line); border-radius: var(--radius-pill); background: var(--surface); }
.quick-open:focus-within { border-color: var(--look-accent); box-shadow: 0 0 0 3px var(--look-soft); }
.quick-open > .icon { color: var(--muted); }
.quick-open-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 16px; }
.quick-open-input::placeholder { color: var(--placeholder); }
.quick-open-key { padding: 0 7px; border: 1px solid var(--grey-line); border-radius: var(--radius-xs); color: var(--muted); font: inherit; font-size: var(--fs-micro); }
.quick-open:focus-within .quick-open-key { display: none; }
/* the switch between ways of showing (opus.css:149-154, Home's Tiles / Icons / List) */
.segmented, .home-views { display: inline-flex; margin: 0; padding: 3px; border: 1px solid var(--grey-line); border-radius: var(--radius-pill); background: var(--surface); }
.segment, .home-view { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--radius-pill);
    background: none; color: var(--muted); font-weight: 600; white-space: nowrap; cursor: pointer; }
.segment:hover, .home-view:hover { color: var(--text); }
.segment[aria-pressed="true"], .home-view[aria-pressed="true"] { background: var(--look-top); color: #fff; }
.segment:focus-visible, .home-view:focus-visible { outline: 3px solid var(--look-accent); outline-offset: 2px; }
.segmented.is-small .segment { min-height: 32px; padding: 0 12px; font-size: var(--fs-small); }
/* proposed: filters - pills you press, a set filter you can clear */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.filter-bar .grow { flex: 1; }
.find { display: flex; align-items: center; gap: 8px; flex: 0 1 300px; min-width: 180px; height: 38px; padding: 0 12px; border: 1px solid var(--grey-line);
    border-radius: var(--radius-pill); background: var(--surface); }
.find:focus-within { border-color: var(--look-accent); box-shadow: 0 0 0 3px var(--look-soft); }
.find .icon { width: 16px; height: 16px; color: var(--muted); }
.find input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: var(--fs-small); }
.find input::placeholder { color: var(--placeholder); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--grey-line); border-radius: var(--radius-pill);
    background: var(--surface); color: var(--text); font-size: var(--fs-small); font-weight: 600; white-space: nowrap; cursor: pointer; }
.chip .icon { width: 15px; height: 15px; color: var(--muted); }
.chip:hover { border-color: var(--look-top); }
.chip[aria-pressed="true"] { background: var(--look-top); border-color: var(--look-top); color: #fff; }
.chip[aria-pressed="true"] .icon { color: var(--side-mark); }
.chip.is-set { background: var(--look-soft); border-color: var(--look-line); }
.chip.is-set .icon { color: var(--text); }
.clear-link { padding: 0 4px; border: 0; background: none; color: var(--look-text); font-size: var(--fs-small); font-weight: 600; cursor: pointer; }
/* proposed: a section's own pages as tabs on the page (opus has no menus inside menus) */
.tabs { display: flex; gap: 2px; margin: 0 0 18px; padding: 0; overflow-x: auto; border-bottom: 1px solid var(--border); list-style: none; scrollbar-width: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; color: var(--muted);
    font-weight: 600; white-space: nowrap; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.tab:hover { color: var(--text); text-decoration: none; background: rgba(23, 10, 3, .03); }
.tab.is-current { color: var(--text); }
.tab.is-current::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--look-accent); }
.tab-count { min-width: 22px; height: 20px; padding: 0 7px; border-radius: var(--radius-pill); background: var(--grey-soft); color: var(--muted);
    font-size: var(--fs-micro); font-weight: 700; line-height: 20px; text-align: center; }
.tab.is-current .tab-count { background: var(--look-top); color: #fff; }

/* section labels with the business's dot (opus.css:100-105) */
.group-title { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; color: var(--muted); font-size: var(--fs-label); font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; }
.brand-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--mark-dot); }

/* ---------- 9. Tables, the pager and density (proposed) ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-table); font-variant-numeric: tabular-nums; }
.table th { position: sticky; top: 0; z-index: 1; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
    font-size: var(--fs-micro); font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.table tr > :first-child { padding-left: 16px; }
.table tr > :last-child { padding-right: 16px; }
.table td.wrap { min-width: 140px; white-space: normal; }  /* long words that may take two lines */
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--look-soft); }
.table tr.is-selected td { background: var(--look-soft); }
.table .num { text-align: right; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table .tick-cell { width: 44px; padding-right: 0; }
.table .sub { display: block; color: var(--muted); font-size: var(--fs-micro); }
.table .ref { font-weight: 700; white-space: nowrap; }
.table tfoot td { border-top: 1px solid var(--border); border-bottom: 0; background: var(--surface-2); font-weight: 700; }
.table th .sort { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit;
    text-transform: inherit; cursor: pointer; }
.table th .sort .icon { width: 13px; height: 13px; }
.table th[aria-sort] { color: var(--text); }
/* a row's state: a 3px mark at its start, as the side column marks where you are; the words say it in the pill */
.table tr[data-state] td:first-child { box-shadow: inset 3px 0 0 var(--row-mark, transparent); }
.table tr[data-state="done"] { --row-mark: var(--green); }
.table tr[data-state="waiting"] { --row-mark: var(--gold-strong); }
.table tr[data-state="problem"] { --row-mark: var(--red); }
.table tr[data-state="neutral"] { --row-mark: var(--grey-line); }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px; border-top: 1px solid var(--border);
    color: var(--muted); font-size: var(--fs-small); }
.pager-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pager-link { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 36px; height: 36px; padding: 0 10px;
    border: 1px solid var(--grey-line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-weight: 600; }
.pager-link:hover { border-color: var(--look-top); color: var(--text); text-decoration: none; }
.pager-link[aria-current="page"] { background: var(--look-top); border-color: var(--look-top); color: #fff; }
.pager-gap { padding: 0 4px; }

/* badges: a state in words with a dot, a count, a tag */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border: 1px solid var(--grey-line); border-radius: var(--radius-pill);
    background: var(--grey-soft); color: var(--grey-text); font-size: var(--fs-label); font-weight: 600; line-height: 1; white-space: nowrap; }
.pill::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--pill-dot, var(--grey-strong)); }
.pill.is-done { background: var(--green-soft); border-color: var(--green-line); color: var(--green-text); --pill-dot: var(--green); }
.pill.is-waiting { background: var(--amber-soft); border-color: var(--amber-line); color: var(--amber-text); --pill-dot: var(--gold-strong); }
.pill.is-problem { background: var(--red-soft); border-color: var(--red-line); color: var(--red-text); --pill-dot: var(--red); }
.pill.is-info { background: var(--blue-soft); border-color: var(--blue-line); color: var(--blue-text); --pill-dot: var(--blue); }
.pill.no-dot::before { display: none; }
.count { display: inline-block; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--look-top); color: #fff;
    font-size: var(--fs-micro); font-weight: 700; line-height: 20px; text-align: center; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--radius-xs); background: var(--grey-soft);
    color: var(--muted); font-size: var(--fs-label); font-weight: 600; white-space: nowrap; }
.tag.brand-dhan, .tag.brand-smsf, .tag.brand-both { background: var(--mark-soft); box-shadow: inset 0 0 0 1px var(--mark-line); color: var(--mark-text); }
.tag .brand-dot { width: 8px; height: 8px; }
/* a timer on a light page (the bar's own is in section 5) */
.timer { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 3px 0 10px; border: 1px solid var(--grey-line); border-radius: var(--radius-pill);
    background: var(--surface); color: var(--text); font-size: var(--fs-small); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.timer .timer-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grey-strong); }
.timer button { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 0; border-radius: 50%;
    background: var(--grey-soft); color: var(--text); cursor: pointer; }
.timer button .icon { width: 13px; height: 13px; }
.timer.is-running { background: var(--look-soft); border-color: var(--look-line); }
.timer.is-running .timer-dot { background: var(--look-accent); }
.timer.is-running button { background: var(--look-top); color: #fff; }
.timer-start { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 8px; border: 1px solid var(--grey-line);
    border-radius: var(--radius-pill); background: var(--surface); color: var(--text); font-size: var(--fs-small); font-weight: 600; cursor: pointer; }
.timer-start .icon { width: 14px; height: 14px; color: var(--muted); }
.timer-start:hover { border-color: var(--look-top); }
.progress { height: 8px; overflow: hidden; border-radius: var(--radius-pill); background: var(--grey-soft); }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--look-accent); }

/* ---------- 10. Alerts, toasts, pop-ups and modals (opus.css:71-74; the rest proposed) ---------- */
.alert { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; padding: 12px 16px; border: 1px solid transparent; border-radius: var(--radius-md);
    font-size: calc(14.5px * var(--text-scale)); text-align: left; }
.alert > .icon { margin-top: 2px; }
.alert p { margin: 0; }
.alert strong { font-weight: 700; }
.alert-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.alert-error { background: var(--red-soft); border-color: var(--red-line); color: var(--red-text); }
.alert-info { background: var(--blue-soft); border-color: var(--blue-line); color: var(--blue-text); }
.alert-warning { background: var(--gold-soft); border-color: var(--gold-line); color: var(--amber-text); }
.alert-success { background: var(--green-soft); border-color: var(--green-line); color: var(--green-text); }
.alert .link-button { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.toast { display: flex; align-items: flex-start; gap: 12px; width: min(400px, calc(100vw - 28px)); padding: 14px 10px 14px 16px; border-radius: var(--radius);
    background: var(--look-top); color: #fff; box-shadow: var(--shadow-dark); font-size: calc(14.5px * var(--text-scale)); }
.toast > .icon { margin-top: 2px; color: var(--side-mark); }
.toast p { margin: 0; color: rgba(255, 255, 255, .86); }
.toast strong { display: block; color: #fff; }
.toast .toast-close { margin: -4px 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none;
    border: 0; border-radius: var(--radius-sm); background: none; color: rgba(255, 255, 255, .75); cursor: pointer; }
.toast .toast-close:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.toast .toast-action { color: var(--side-mark); font-weight: 700; }
.pop { min-width: 230px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-float); }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: none;
    color: var(--text); font: inherit; font-size: var(--fs-small); font-weight: 600; text-align: left; cursor: pointer; }
.pop-item .icon { color: var(--muted); }
.pop-item:hover { background: var(--look-soft); color: var(--text); text-decoration: none; }
.pop-item.is-danger, .pop-item.is-danger .icon { color: var(--red-text); }
.pop-rule { height: 1px; margin: 6px 4px; background: var(--border); }
.pop-label { padding: 6px 10px 2px; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tip { display: inline-block; padding: 6px 10px; border-radius: var(--radius-xs); background: var(--look-top); color: #fff; font-size: var(--fs-label); font-weight: 600; }
.scrim { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(23, 10, 3, .45); }
.modal { position: relative; width: min(560px, 100%); overflow: hidden; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-float); }
.modal::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--look-bar); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 22px 0 24px; }
.modal-title { margin: 0; font-size: var(--fs-h2); font-weight: 600; line-height: 1.3; }
.modal-body { padding: 10px 24px 22px; }
.modal-body p { margin: 0 0 12px; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface-2); }
.empty { display: grid; justify-items: center; gap: 6px; padding: 40px 24px 44px; text-align: center; }
.empty-icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 8px; border-radius: 16px;
    background: var(--look-soft); color: var(--look-text); }
.empty-icon .icon { width: 27px; height: 27px; }
.empty-title { margin: 0; font-size: var(--fs-h3); font-weight: 600; }
.empty-text { max-width: 46ch; margin: 0 0 10px; color: var(--muted); }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 28px; border-bottom: 1px solid var(--gold-line); background: var(--gold-soft);
    color: var(--amber-text); font-size: calc(14.5px * var(--text-scale)); }

/* ---------- 11. Page patterns: details, history, forms in sections, initials (proposed) ---------- */
.details { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; margin: 0; }
.details dt { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: var(--fs-small); }
.details dd { min-width: 0; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--border); font-weight: 600; overflow-wrap: anywhere; }
.details dd .sub { display: block; color: var(--muted); font-size: var(--fs-micro); font-weight: 500; }
.details dt:nth-last-of-type(1), .details dd:last-child { border-bottom: 0; }
.history { margin: 0; padding: 0; list-style: none; }
.history li { position: relative; padding: 0 0 18px 28px; }
.history li::before { content: ''; position: absolute; left: 5px; top: 18px; bottom: 0; width: 2px; background: var(--border); }
.history li:last-child { padding-bottom: 0; }
.history li:last-child::before { display: none; }
.history .history-dot { position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border: 2px solid var(--grey-strong); border-radius: 50%; background: var(--surface); }
.history li.is-latest .history-dot { border-color: var(--look-accent); background: var(--look-accent); }
.history-time { display: block; color: var(--muted); font-size: var(--fs-micro); }
.form-section { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 20px 32px; padding: 24px; border-bottom: 1px solid var(--border); }
.form-section:last-of-type { border-bottom: 0; }
.form-section-title { margin: 0 0 4px; font-size: var(--fs-h3); font-weight: 600; }
.form-section-text { margin: 0; color: var(--muted); font-size: var(--fs-small); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .is-full { grid-column: 1 / -1; }
.save-bar { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 24px;
    border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); background: rgba(255, 255, 255, .96); }
.save-bar .save-note { margin-right: auto; color: var(--muted); font-size: var(--fs-small); }
.initials { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
    background: var(--initials); color: var(--initials-text); font-size: var(--fs-micro); font-weight: 700; letter-spacing: .02em; }

/* ---------- 12. Tiles and app icons: the colour says the business, the icon says the app (opus.css:99-213) ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 14px 14px; overflow: hidden; color: var(--text);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
a.tile:hover, a.tile:focus-visible { border-color: var(--ink); box-shadow: var(--shadow-hover); color: var(--text); text-decoration: none; }
.tile-band { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--mark-band); }
.tile-icon { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 11px;
    background: var(--mark-tile); color: var(--mark-icon); }
.tile-icon .icon { width: 24px; height: 24px; }
.tile-text { display: flex; flex-direction: column; min-width: 0; }
.tile-name { font-size: var(--fs-h3); font-weight: 700; line-height: 1.25; }
.tile-about { color: var(--muted); font-size: calc(14px * var(--text-scale)); }
.tile-why { margin-top: 2px; color: var(--muted); font-size: var(--fs-label); font-weight: 600; }
.tile.is-wide { flex-direction: row; align-items: center; gap: 16px; margin-bottom: 4px; padding: 20px 18px 16px; }
.tile.is-wide .tile-icon { width: 52px; height: 52px; border-radius: 13px; }
.tile.is-wide .tile-name { font-size: var(--fs-h2); }
/* a site that does not open from here: opus fades the whole tile to 55%, which takes its words under 4.5:1; proposed: fade
   only the colour and the icon, and keep the words and the reason readable */
.tile.is-off { background: var(--surface-2); }
.tile.is-off .tile-icon, .tile.is-off .tile-band { opacity: .45; }
.view-icons .tiles { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 18px 8px; }
.view-icons .tiles .tile { align-items: center; gap: 6px; padding: 0; overflow: visible; border: 0; background: none; text-align: center; }
.view-icons .tiles a.tile:hover, .view-icons .tiles a.tile:focus-visible { box-shadow: none; }
.view-icons .tiles .tile-band { display: none; }
.view-icons .tiles .tile-icon { width: 56px; height: 56px; border-radius: 16px; }
.view-icons .tiles .tile-icon .icon { width: 27px; height: 27px; }
.view-icons .tiles .tile.brand-both .tile-icon { background: linear-gradient(90deg, var(--dhan) 50%, var(--smsf) 50%) bottom / 100% 5px no-repeat, var(--both-dark); }
.view-icons .tiles .tile-text { width: 100%; align-items: center; }
.view-icons .tiles .tile-name { max-width: 100%; overflow: hidden; font-size: var(--fs-label); font-weight: 600; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.view-icons .tiles .tile-why { font-size: 10.5px; }
.view-list .tiles { display: flex; flex-direction: column; gap: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.view-list .tiles .tile { flex-direction: row; align-items: center; gap: 14px; padding: 10px 14px 10px 18px; border: 0; border-radius: 0; background: none; }
.view-list .tiles .tile + .tile { border-top: 1px solid var(--border); }
.view-list .tiles a.tile:hover, .view-list .tiles a.tile:focus-visible { box-shadow: none; background: var(--look-soft); }
.view-list .tiles .tile-band { top: 0; bottom: 0; left: 0; right: auto; width: 4px; height: auto; }
.view-list .tiles .tile-icon { width: 36px; height: 36px; border-radius: 9px; }
.view-list .tiles .tile-icon .icon { width: 20px; height: 20px; }
.home-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0 0 18px; }

/* ---------- 13. The door: the pages before you are signed in (opus.css:274-376) ---------- */
.door { display: flex; min-height: 100vh; min-height: 100dvh; background: var(--surface); }
.door-brand { position: relative; flex: 0 0 44%; max-width: 760px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
    padding: 40px clamp(28px, 3.6vw, 56px) 34px; overflow: hidden; background: var(--door-bg); color: #fff; }
.door-lines { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--door-mark); pointer-events: none; }
.door-lines path { fill: none; stroke: currentColor; stroke-opacity: .14; stroke-width: 1; vector-effect: non-scaling-stroke; }
.door-logos, .door-pitch, .door-place { position: relative; }
.door-logos { display: flex; align-items: center; gap: 18px; }
.door-logo { display: block; width: auto; min-width: 0; object-fit: contain; object-position: left center; }
.door-logo-dhan { height: 54px; }
.door-logo-smsf { height: 54px; border-radius: 3px; }
.look-both .door-logo-smsf { height: 46px; }
.door-divider { flex: none; align-self: stretch; width: 1px; background: rgba(255, 255, 255, .28); }
.door-names { margin: 0 0 16px; color: var(--door-names); font-size: 12.5px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
.door-tagline { max-width: 13ch; margin: 0; font-family: var(--serif); font-size: clamp(32px, 3.4vw, 44px); font-weight: 400; line-height: 1.18; }
.door-place { margin: 0; color: rgba(255, 255, 255, .66); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; }
.nowrap { white-space: nowrap; }
.door-main { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 56px clamp(24px, 6vw, 80px); }
.door-inner { width: 100%; max-width: 400px; }
.door-title { margin: 0 0 8px; color: #1b1e25; font-family: var(--serif); font-size: var(--fs-door); font-weight: 400; line-height: 1.15; letter-spacing: -.01em;
    text-wrap: balance; }
.door-sub { margin: 0 0 28px; color: var(--muted); font-size: 15.5px; text-wrap: pretty; }
.door-form { display: grid; gap: 14px; }
.door-main .input { min-height: 48px; padding: 11px 14px; border-radius: var(--radius-md); font-size: 16px; }
.door-main .input:focus { outline: 2px solid transparent; border-color: var(--door-ring); box-shadow: 0 0 0 1px var(--door-ring); }
.door-main a:focus-visible, .door-main button:focus-visible { outline: 2px solid var(--door-ring); outline-offset: 3px; }
.door-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; padding: 12px 18px; border: 0;
    border-radius: var(--radius-md); background: var(--door-button); color: #fff; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
    transition: box-shadow var(--ease); }
.door-button .icon { width: 20px; height: 20px; color: var(--door-mark); }
.door-button:hover, .door-button:focus-visible { background: linear-gradient(rgba(255, 255, 255, .09), rgba(255, 255, 255, .09)), var(--door-button);
    box-shadow: 0 6px 18px rgba(23, 10, 3, .18); color: #fff; text-decoration: none; }
.door-quiet { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; padding: 11px 18px; border: 1px solid var(--grey-line);
    border-radius: var(--radius-md); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; }
.door-quiet .icon { color: var(--door-icon); }
.door-quiet:hover { border-color: var(--door-ring); color: var(--text); text-decoration: none; }
.door-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.door-link { color: #3f434c; text-decoration: underline; text-decoration-color: var(--grey-line); text-underline-offset: 3px; }
.door-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--muted); font-size: 13px; }
.door-or::before, .door-or::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.door-note { margin: 12px 0 0; color: var(--muted); font-size: 13.5px; text-align: center; text-wrap: pretty; }
.door-trust { display: flex; align-items: flex-start; gap: 8px; margin: 36px 0 0; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.door-trust .icon { width: 15px; height: 15px; margin-top: 2px; }

/* ---------- 14. Narrow screens ---------- */
@media (max-width: 1180px) {
    .bar-find { flex-basis: 260px; }
    .who-name { display: none; }
}
@media (max-width: 900px) {
    /* opus.css:268-272: the column (and the Top band) fold into the Menu button */
    .side, [data-menu="top"] .topmenu { display: none; }
    [data-menu="top"] .topbar { border-bottom: 4px solid transparent; border-image: var(--look-bar) 1; }
    .menu { display: block; }
    .frame { min-height: 0; }
    .topbar .bar-find { display: none; }
    .menu-panel .bar-find { display: flex; }
    .bar-new .bar-new-text { display: none; }
    .bar-new { width: 40px; padding: 0; justify-content: center; }
}
@media (max-width: 860px) {
    .door { flex-direction: column; }
    .door-brand { flex: none; max-width: none; justify-content: flex-start; gap: 12px; padding: 18px 20px 16px; }
    .door-lines, .door-tagline, .door-place { display: none; }
    .door-logos { gap: 14px; }
    .door-logo-dhan { height: 34px; }
    .door-logo-smsf, .look-both .door-logo-smsf { height: 36px; }
    .door-names { margin: 0; font-size: 10.5px; }
    .door-main { align-items: flex-start; padding: 28px 20px 40px; }
    .door-title { font-size: calc(30px * var(--text-scale)); }
    .door-sub { margin-bottom: 20px; font-size: 14.5px; }
}
@media (max-width: 600px) {
    /* opus.css:129-136 */
    .topbar { height: 56px; padding: 0 14px; gap: 6px; }
    .topbar-end { gap: 6px; }
    .brand-mark .brand-logo { height: 30px; }
    .who, .brand-name, .brand-divider { display: none; }
    .menu-button { padding: 0 10px; }
    .bar-timer { padding-right: 12px; }
    .bar-timer button { display: none; }
    .page { padding: 18px 14px 36px; }
    .page-title { font-size: calc(22px * var(--text-scale)); }
    .bar-timer { padding-left: 10px; font-size: var(--fs-small); }
    .bar-icon.is-extra { display: none; }
    .card-head, .card-body { padding-left: 16px; padding-right: 16px; }
    .form-card, .message { padding: 18px 16px; }
    .filter-bar { padding: 12px; }
    .find { flex: 1 1 100%; }
    .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .figure-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .figure-strip .figure:nth-child(odd) { border-left: 0; }
    .figure-strip .figure:nth-child(n + 3) { border-top: 1px solid var(--border); }
    .figure-value { font-size: calc(22px * var(--text-scale)); }
    .form-section { grid-template-columns: 1fr; gap: 14px; padding: 18px 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .save-bar { padding: 12px 16px; }
    .pager { justify-content: center; }
    /* a phone zooms into a field whose words are under 16 px */
    .input, .find input, .bar-find input, .quick-open-input { font-size: 16px; }
    .pager-link:not([aria-current]):not(.is-step), .pager-gap { display: none; }
    .segmented.is-small .segment .icon { display: none; }
    /* a list's rows become small cards: the same words, no sideways scrolling (proposed) */
    .table.is-stackable thead { display: none; }
    .table.is-stackable, .table.is-stackable tbody { display: block; }
    .table.is-stackable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "job more" "client fee" "task due" "state timer";
        align-items: center; gap: 4px 12px; padding: 12px 14px 14px 16px; border-bottom: 1px solid var(--border); }
    .table.is-stackable tbody tr:last-child { border-bottom: 0; }
    .table.is-stackable td { display: block; padding: 0; border: 0; white-space: normal; }
    .table.is-stackable tbody tr:hover td { background: none; }
    .table.is-stackable tr[data-state] { box-shadow: inset 3px 0 0 var(--row-mark, transparent); }
    .table.is-stackable tr[data-state] td:first-child { box-shadow: none; }
    .table.is-stackable .c-tick { display: none; }
    .table.is-stackable .c-job { grid-area: job; }
    .table.is-stackable .c-more { grid-area: more; }
    .table.is-stackable .c-client { grid-area: client; color: var(--muted); font-size: var(--fs-small); }
    .table.is-stackable .c-fee { grid-area: fee; font-weight: 600; }
    .table.is-stackable .c-task { grid-area: task; }
    .table.is-stackable .c-due { grid-area: due; text-align: right; }
    .table.is-stackable .c-due::before { content: 'Due '; color: var(--muted); }
    .table.is-stackable .c-state { grid-area: state; margin-top: 4px; }
    .table.is-stackable .c-timer { grid-area: timer; margin-top: 4px; }
    .modal { align-self: end; border-radius: var(--radius) var(--radius) 0 0; }
    .banner { padding: 10px 14px; }
    /* a phone shows Home's sites as app icons, four to a row (opus.css:198-213) */
    .view-auto .tiles, .view-icons .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 6px; }
    .view-auto .tiles .tile { align-items: center; gap: 6px; padding: 0; overflow: visible; border: 0; background: none; text-align: center; }
    .view-auto .tiles .tile-band { display: none; }
    .view-auto .tiles .tile-icon { width: 56px; height: 56px; border-radius: 16px; }
    .view-auto .tiles .tile-icon .icon { width: 27px; height: 27px; }
    .view-auto .tiles .tile-text { width: 100%; align-items: center; }
    .view-auto .tiles .tile-name { max-width: 100%; overflow: hidden; font-size: var(--fs-micro); font-weight: 600; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
    .view-tiles .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .home-view, .segment { padding: 0 11px; }
    .quick-open { flex-basis: 100%; }
}
@media (max-width: 380px) {
    /* the smallest phones: the Menu button keeps its icon */
    .menu-button > span { display: none; }
}
/* every size: keep to the person's wishes for motion and for forced colours (opus.css:377-382) */
@media (prefers-reduced-motion: reduce) {
    .btn, .door-button, .door-quiet, .switch input, .switch input::before { transition: none; }
}
@media (forced-colors: active) {
    .door-button, .initials, .bar-new, .pill, .count, .segment[aria-pressed="true"] { border: 1px solid ButtonText; }
}
@media print {
    .topbar, .topmenu, .side, .menu, .bar-find, .page-actions, .row-actions, .pager, .save-bar { display: none !important; }
    body { background: #fff; }
    .card { break-inside: avoid; }
}
