/* The app's look ("Shell v2"): calm, precise, one accent - the client's own brand colour. Hairline cards, glowing status dots, generous space.
   Tokens first. Light by default; dark follows the system unless the person chose otherwise (data-theme, set by shell.js from localStorage aw_theme).
   No external fonts, no CDN. Every class a page used before v2 is still here; new classes are all prefixed aw- so a tool's own css never collides.
   Logical properties everywhere (inline-start/end) so right-to-left just works. */
:root {
  /* the client's colour: shell.js sets --brand, --brand-rgb and --brand-ink from the saved brand; these are the defaults */
  --brand: #2f6df6;
  --brand-rgb: 47, 109, 246;
  --brand-ink: #ffffff;
  --brand-text: var(--brand);   /* the brand colour as TEXT on the page (links, active tab): shell.js darkens a pale brand until it reads; --brand stays for fills */
  --brand-soft: rgba(var(--brand-rgb), .10);
  --brand-line: rgba(var(--brand-rgb), .35);

  --bg: #f6f7f9;
  --surface: #ffffff;
  --hairline: #e5e8ed;
  --text: #0e1217;
  --muted: #626b79;
  /* the names every page already uses */
  --card: var(--surface);
  --line: var(--hairline);
  --ink: var(--text);

  --ok: #11805f; --ok-rgb: 17, 128, 95; --ok-bg: #e4f5ee;
  --warn: #a15f00; --warn-rgb: 214, 133, 0; --warn-bg: #fdf1dc;
  --bad: #c0352b; --bad-rgb: 192, 53, 43; --bad-bg: #fbe8e6;
  --off-rgb: 140, 149, 163;
  /* the text or tick drawn ON a solid status colour (the bell count on --bad, the done tick on --ok): white on the deep light-mode colours, dark on the pale dark-mode ones */
  --on-ok: #ffffff; --on-bad: #ffffff;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -12px rgba(16, 24, 40, .10);
  --shadow-lift: 0 2px 4px rgba(16, 24, 40, .05), 0 14px 30px -14px rgba(16, 24, 40, .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: 150ms cubic-bezier(.2, .7, .3, 1);

  --top-h: 56px;
  --rail-w: 72px;
  --aw-tabs-h: 0px;   /* the height of the bottom tab bar while it is showing (phones); pages with fixed bottom bars lift themselves by this */
  color-scheme: light dark;
}
/* the same numbers under the names the tool pages read (defined on body so --aw-tabs-h resolves to the framed value) */
body { --aw-tabbar-h: var(--aw-tabs-h); --aw-bottom: var(--aw-tabs-h); --aw-top-h: var(--top-h); }
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0e13; --surface: #12161d; --hairline: #232a35; --text: #e9edf3; --muted: #8e98a8;
    --ok: #4fd1a1; --ok-rgb: 79, 209, 161; --ok-bg: #12342a;
    --warn: #f2b34a; --warn-rgb: 242, 179, 74; --warn-bg: #3a2b0e;
    --bad: #ff8f86; --bad-rgb: 255, 143, 134; --bad-bg: #3d1a17;
    --on-ok: #06231a; --on-bad: #2a0a07;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px -14px rgba(0, 0, 0, .6);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .4), 0 16px 34px -14px rgba(0, 0, 0, .75);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0e13; --surface: #12161d; --hairline: #232a35; --text: #e9edf3; --muted: #8e98a8;
  --ok: #4fd1a1; --ok-rgb: 79, 209, 161; --ok-bg: #12342a;
  --warn: #f2b34a; --warn-rgb: 242, 179, 74; --warn-bg: #3a2b0e;
  --bad: #ff8f86; --bad-rgb: 255, 143, 134; --bad-bg: #3d1a17;
  --on-ok: #06231a; --on-bad: #2a0a07;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px -14px rgba(0, 0, 0, .6);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .4), 0 16px 34px -14px rgba(0, 0, 0, .75);
}

* { box-sizing: border-box; }
/* the top bar is sticky: a #hash link or scrollIntoView({ block: 'start' }) must not leave the target's first lines hiding under it */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-text); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 650; } h2 { font-size: 1.15rem; font-weight: 650; } h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid rgba(var(--brand-rgb), .65); outline-offset: 2px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 16px; }
.narrow { max-width: 460px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; }
.aw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- the frame: top bar, left rail (wide screens), bottom tabs (phones) --------------------------------------------------------- */
.top { position: sticky; top: 0; z-index: 20; height: var(--top-h); background: var(--surface); border-bottom: 1px solid var(--hairline); }
.top .wrap, .top .aw-top-in { display: flex; align-items: center; gap: 12px; height: 100%; padding: 0 16px; max-width: none; margin: 0; }
.top .brand { font-weight: 650; text-decoration: none; color: var(--text); display: flex; align-items: center; gap: 10px; min-width: 0; }
.top .brand .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42vw; }
/* a logo already says who they are: next to one, the written name is for screen readers only */
.brand.has-logo .name, .aw-auth .has-logo h1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); display: inline-block; box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .18); }
.top .where { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.top .where::before { content: "/"; margin-inline-end: 8px; opacity: .6; }
.top .space { flex: 1; }
.iconbtn { border: 1px solid transparent; background: transparent; color: var(--text); border-radius: 12px; min-width: 44px; height: 44px; cursor: pointer; font: inherit; position: relative; display: inline-flex; align-items: center; justify-content: center; transition: background var(--ease), border-color var(--ease); }
.iconbtn:hover { background: var(--brand-soft); }
.iconbtn svg { display: block; }
.badge { position: absolute; top: 4px; inset-inline-end: 3px; min-width: 18px; height: 18px; padding: 0 5px; background: var(--bad); color: var(--on-bad); border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.aw-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; border: 1px solid var(--brand-line); }
.aw-ico { display: inline-block; flex: none; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .aw-flip { transform: scaleX(-1); }

.aw-rail { display: none; }
.aw-tabs { display: none; }
@media (min-width: 960px) {
  body.aw-framed { padding-inline-start: var(--rail-w); }
  body.aw-framed #aw-top { margin-inline-start: calc(var(--rail-w) * -1); }
  .aw-rail { display: flex; flex-direction: column; align-items: center; gap: 6px; position: fixed; inset-block: var(--top-h) 0; inset-inline-start: 0; width: var(--rail-w); padding: 14px 0; z-index: 25; background: var(--surface); border-inline-end: 1px solid var(--hairline); overflow-y: auto; }
  .aw-rail .sp { flex: 1; }
  .aw-rail-item { position: relative; width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; color: var(--muted); text-decoration: none; font-size: 1.35rem; line-height: 1; background: transparent; border: 0; cursor: pointer; transition: background var(--ease), color var(--ease); }
  .aw-rail-item:hover { background: var(--brand-soft); color: var(--text); }
  .aw-rail-item.on { background: var(--brand-soft); color: var(--brand-text); }
  .aw-rail-item.on::before { content: ""; position: absolute; inset-inline-start: -13px; top: 11px; bottom: 11px; width: 3px; border-radius: 3px; background: var(--brand); box-shadow: 0 0 10px rgba(var(--brand-rgb), .7); }
  .aw-rail-item .aw-ico { width: 22px; height: 22px; }
  .aw-rail-item:focus-visible { outline-offset: 0; }
}
@media (max-width: 959.98px) {
  body.aw-framed:not(.aw-own-tabs) { --aw-tabs-h: calc(60px + env(safe-area-inset-bottom)); padding-bottom: var(--aw-tabs-h); }
  .aw-tabs { display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 30; height: var(--aw-tabs-h); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--hairline); }
  body.aw-own-tabs .aw-tabs { display: none; }
  .aw-tab { flex: 1; min-width: 0; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; text-decoration: none; cursor: pointer; position: relative; transition: color var(--ease); }
  .aw-tab .aw-ico { width: 22px; height: 22px; }
  .aw-tab.on { color: var(--brand-text); }
  .aw-tab.on::before { content: ""; position: absolute; top: 0; width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); box-shadow: 0 0 10px rgba(var(--brand-rgb), .7); }
  .aw-tab .badge { top: 5px; inset-inline-start: calc(50% + 4px); inset-inline-end: auto; }
}

/* ---- cards, tiles ---------------------------------------------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.aw-card-title { margin: 0 0 10px; font-size: .8rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-height: 118px; transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease); }
.tile:hover, .tile:focus-visible { border-color: var(--brand-line); outline: none; box-shadow: var(--shadow-lift); }
.tile .ico { font-size: 1.9rem; line-height: 1; }
.tile .nm { font-weight: 650; margin-top: 8px; }
.tile .tg { color: var(--muted); font-size: .85rem; margin-top: 2px; }

/* ---- forms ----------------------------------------------------------------------------------------------------------------------- */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 12px; min-height: 44px; transition: border-color var(--ease), box-shadow var(--ease); }
input[type="checkbox"], input[type="radio"] { width: 20px; min-height: 20px; height: 20px; accent-color: var(--brand); }
input[type="color"] { padding: 4px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .22); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
textarea { min-height: 90px; resize: vertical; }
.field + .field { margin-top: 12px; }
.help { color: var(--muted); font-size: .85rem; margin-top: 4px; }

.btn { font: inherit; font-weight: 600; border-radius: 10px; border: 1px solid var(--hairline); background: var(--surface); color: var(--text); padding: 10px 16px; min-height: 44px; cursor: pointer; transition: border-color var(--ease), background var(--ease), box-shadow var(--ease), transform var(--ease); }
.btn:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .12), 0 6px 16px -8px rgba(var(--brand-rgb), .7); }
.btn.primary:hover { background: var(--brand); filter: brightness(1.06); }
.btn.danger { color: var(--bad); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.small { min-height: 44px; padding: 6px 12px; font-size: .9rem; }   /* "small" is smaller type and padding, never a smaller touch target */

.chip { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 600; background: var(--hairline); color: var(--muted); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }

.banner { border-radius: var(--radius); padding: 12px 14px; background: var(--warn-bg); color: var(--warn); border: 1px solid var(--hairline); }
.error { color: var(--bad); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.tablewrap { overflow-x: auto; }

/* wizard (the owner's Setup page) */
.steps { display: flex; gap: 6px; margin-bottom: 14px; }
.steps span { flex: 1; height: 6px; border-radius: 3px; background: var(--hairline); }
.steps span.on { background: var(--brand); }
.pick { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color var(--ease), background var(--ease); }
.pick.on { border-color: var(--brand); background: var(--brand-soft); }
.pick input { margin-top: 4px; flex: none; }
ol.steplist { padding-inline-start: 1.2em; margin: .3em 0 .8em; color: var(--muted); font-size: .9rem; }

.toast { position: fixed; inset-inline-start: 50%; transform: translateX(-50%); bottom: calc(var(--aw-tabs-h) + 16px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; z-index: 99; max-width: 90vw; box-shadow: var(--shadow-lift); animation: aw-rise 180ms ease-out; }
[dir="rtl"] .toast { transform: translateX(50%); }
@media (min-width: 720px) { .wrap { padding: 24px; } h1 { font-size: 1.9rem; } }

/* the client's own logo */
.logo { height: 34px; width: auto; max-width: min(50vw, 200px); object-fit: contain; display: inline-block; }
/* the sign-in and welcome pages: the logo is the hero — big, on nothing, with a soft glow in the brand colour */
.hero-logo { display: block; width: min(84vw, 460px); height: auto; max-height: 170px; margin: 0 auto 26px; object-fit: contain; filter: drop-shadow(0 12px 28px rgba(var(--brand-rgb), .22)); }
.center { text-align: center; }
.credits { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.credits .amt { font-size: 1.6rem; font-weight: 700; }
.logo-pick { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.logo-pick .preview { width: 72px; height: 72px; border: 1px dashed var(--hairline); border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: var(--bg); }
.logo-pick .preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* links styled as buttons behave like buttons */
a.btn { display: inline-block; text-decoration: none; text-align: center; line-height: 1.4; }
.btn.block { display: block; width: 100%; }

/* ---- shell helpers: lights, sheet, empty, progress, skeleton ---------------------------------------------------------------------- */
.aw-lights { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.aw-light { --c-rgb: var(--off-rgb); display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--muted); min-height: 20px; }
.aw-light .aw-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: rgb(var(--c-rgb)); box-shadow: 0 0 0 3px rgba(var(--c-rgb), .14), 0 0 9px rgba(var(--c-rgb), .55); }
.aw-light.ok { --c-rgb: var(--ok-rgb); }
.aw-light.warn { --c-rgb: var(--warn-rgb); }
.aw-light.bad { --c-rgb: var(--bad-rgb); }
.aw-light.off .aw-dot { box-shadow: none; opacity: .6; }
.aw-light-detail { min-width: 0; overflow-wrap: anywhere; }   /* written out after a warn or bad light where a hover title would never be seen (AW.lights(list, { showDetail: true })) */
.aw-light-detail::before { content: "\00b7\00a0"; }
.aw-light.bad .aw-dot { animation: aw-pulse 2s ease-in-out infinite; }

body.aw-noscroll { overflow: hidden; }
.aw-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(8, 11, 16, .45); display: flex; align-items: flex-end; justify-content: center; animation: aw-fade 140ms ease-out; backdrop-filter: blur(2px); }
.aw-sheet { width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--hairline); border-bottom: 0; border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lift); padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); animation: aw-slide 200ms cubic-bezier(.2, .8, .3, 1); }
.aw-sheet:focus { outline: none; }
.aw-sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--hairline); margin: 6px auto 10px; }
.aw-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.aw-sheet-head h2 { margin: 0; }
.aw-sheet-body { padding-block: 4px 8px; }
.aw-sheet-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.aw-sheet-actions .btn { flex: 1 1 120px; }
@media (min-width: 720px) {
  .aw-backdrop { align-items: center; }
  .aw-sheet { border-radius: 20px; border-bottom: 1px solid var(--hairline); padding-bottom: 18px; }
  .aw-sheet .grab { display: none; }
}

.aw-list { list-style: none; margin: 0; padding: 0; display: grid; }
.aw-list > li, .aw-list > a { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--hairline); color: var(--text); text-decoration: none; min-height: 48px; }
.aw-list > li:last-child, .aw-list > a:last-child { border-bottom: 0; }
.aw-list > a:hover { background: var(--brand-soft); }
.aw-seg { display: inline-flex; border: 1px solid var(--hairline); border-radius: 12px; padding: 3px; gap: 2px; background: var(--bg); }
.aw-seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: .9rem; min-height: 44px; padding: 0 14px; border-radius: 9px; cursor: pointer; transition: background var(--ease), color var(--ease); }
.aw-seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }

.aw-empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.aw-empty .aw-empty-ico { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 16px; background: var(--brand-soft); color: var(--brand-text); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.aw-empty .aw-empty-ico .aw-ico { width: 24px; height: 24px; }
.aw-empty p { margin: 0 0 12px; }

.aw-progress { height: 6px; border-radius: 6px; background: var(--hairline); overflow: hidden; }
.aw-progress > i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--brand); box-shadow: 0 0 10px rgba(var(--brand-rgb), .5); transition: width 300ms cubic-bezier(.2, .8, .3, 1); }
.aw-ring { display: inline-block; position: relative; flex: none; }
.aw-ring svg { display: block; transform: rotate(-90deg); }
.aw-ring .track { stroke: var(--hairline); }
.aw-ring .bar { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset 400ms cubic-bezier(.2, .8, .3, 1); filter: drop-shadow(0 0 4px rgba(var(--brand-rgb), .55)); }
.aw-ring .num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }

.aw-skeleton { display: grid; gap: 10px; }
.aw-skeleton i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--hairline) 25%, rgba(var(--brand-rgb), .10) 50%, var(--hairline) 75%); background-size: 200% 100%; animation: aw-shimmer 1.4s linear infinite; }
.aw-skeleton i:nth-child(odd) { width: 100%; }
.aw-skeleton i:nth-child(even) { width: 72%; }
.aw-skeleton i:first-child { height: 22px; width: 46%; }

@keyframes aw-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes aw-slide { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes aw-rise { from { opacity: 0; margin-block-start: 8px; } to { opacity: 1; margin-block-start: 0; } }
@keyframes aw-shimmer { to { background-position: -200% 0; } }
@keyframes aw-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(var(--c-rgb), .14), 0 0 9px rgba(var(--c-rgb), .55); } 50% { box-shadow: 0 0 0 6px rgba(var(--c-rgb), .08), 0 0 14px rgba(var(--c-rgb), .75); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---- the home screen --------------------------------------------------------------------------------------------------------------- */
.aw-home { max-width: 1080px; display: grid; gap: 22px; }
.aw-hero h1 { margin: 0; font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
.aw-hero .sub { color: var(--muted); margin-top: 2px; }
.aw-ask { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 999px; padding: 5px 5px 5px 18px; box-shadow: var(--shadow); transition: border-color var(--ease), box-shadow var(--ease); }
[dir="rtl"] .aw-ask { padding: 5px 18px 5px 5px; }
.aw-ask:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .20), var(--shadow); }
.aw-ask input { border: 0; background: transparent; box-shadow: none !important; min-height: 40px; padding: 0; flex: 1; min-width: 0; }
.aw-ask input:focus { outline: none; }
.aw-ask button { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: var(--brand-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px -6px rgba(var(--brand-rgb), .8); }
.aw-ask button .aw-ico { width: 18px; height: 18px; }
.aw-next { display: flex; align-items: center; gap: 16px; border-color: var(--brand-line); background: linear-gradient(135deg, var(--brand-soft), transparent 70%), var(--surface); }
.aw-next .txt { flex: 1; min-width: 0; }
.aw-next .txt strong { display: block; font-size: 1.02rem; }
.aw-section-title { margin: 0 0 10px; font-size: .8rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.aw-toolgrid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .aw-toolgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .aw-toolgrid { grid-template-columns: repeat(3, 1fr); } }
.aw-tool { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 16px; }
.aw-tool:hover { transform: translateY(-1px); }
.aw-tool .head { display: flex; align-items: center; gap: 12px; }
.aw-tool .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); border: 1px solid rgba(var(--brand-rgb), .15); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; line-height: 1; flex: none; }
.aw-tool .nm { margin: 0; font-size: 1.02rem; }
.aw-tool .main { color: inherit; text-decoration: none; }
.aw-tool .main::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.aw-tool .line { color: var(--muted); font-size: .92rem; margin: 0; min-height: 1.4em; }
.aw-tool .foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.aw-tool .foot .btn, .aw-tool .foot a { position: relative; z-index: 1; }
.aw-chip-steps { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--brand-text); background: var(--brand-soft); border-radius: 999px; padding: 3px 10px; }
.aw-shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.aw-shortcuts .tile { min-height: 0; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.aw-shortcuts .tile .ico { font-size: 1.4rem; width: 34px; text-align: center; }
.aw-shortcuts .tile .txt { min-width: 0; }
.aw-shortcuts .tile .nm { margin: 0; }
.aw-shortcuts .tile .tg { margin: 0; }
.aw-alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.aw-alert:last-child { border-bottom: 0; }
.aw-alert .pip { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: transparent; }
.aw-alert.unseen .pip { background: var(--brand); box-shadow: 0 0 8px rgba(var(--brand-rgb), .7); }
.aw-alert .what { flex: 1; min-width: 0; }
.aw-alert .what a { color: inherit; font-weight: 650; text-decoration: none; }
.aw-alert .when { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.aw-activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.aw-activity li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; font-size: .9rem; }
.aw-activity .who { font-weight: 650; }
.aw-activity .when { margin-inline-start: auto; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.aw-two { display: grid; gap: 22px; }
@media (min-width: 900px) { .aw-two { grid-template-columns: 3fr 2fr; align-items: start; } }

/* ---- onboarding (full-screen cards) -------------------------------------------------------------------------------------------------- */
body.aw-ob { min-height: 100vh; background: radial-gradient(900px 420px at 50% -120px, rgba(var(--brand-rgb), .14), transparent 70%), var(--bg); }
.aw-ob-wrap { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.aw-ob-head { display: flex; align-items: center; gap: 10px; padding-block: 6px 14px; }
.aw-ob-head .brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--text); min-width: 0; }
.aw-ob-head .brand .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-ob-head .space { flex: 1; }
.aw-ob-head .linkbtn { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; min-height: 44px; padding: 0 6px; }
.aw-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.aw-dots i { width: 8px; height: 8px; border-radius: 8px; background: var(--hairline); transition: width var(--ease), background var(--ease); }
.aw-dots i.done { background: rgba(var(--brand-rgb), .45); }
.aw-dots i.on { width: 26px; background: var(--brand); box-shadow: 0 0 10px rgba(var(--brand-rgb), .6); }
.aw-ob-card { flex: 1; background: var(--surface); border: 1px solid var(--hairline); border-radius: 22px; box-shadow: var(--shadow-lift); padding: 24px 20px; animation: aw-rise 220ms ease-out; align-self: stretch; }
.aw-ob-card .kicker { color: var(--brand-text); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.aw-ob-card h1 { font-size: 1.6rem; margin-bottom: .35em; }
.aw-ob-card .lead { color: var(--muted); margin-bottom: 1.2em; }
.aw-ob-card .big { width: 64px; height: 64px; border-radius: 20px; background: var(--brand-soft); border: 1px solid var(--brand-line); display: flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 14px; }
.aw-ob-card .big .aw-ico { width: 30px; height: 30px; color: var(--brand-text); }
.aw-ob-nav { display: flex; gap: 10px; align-items: center; padding-top: 16px; }
.aw-ob-nav .space { flex: 1; }
.aw-ob-nav .btn { min-width: 96px; }
.aw-ob-nav .linkbtn { border: 0; background: transparent; color: var(--muted); font: inherit; min-height: 44px; padding: 0 12px; cursor: pointer; }
.aw-checks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.aw-checks li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.aw-checks .tick { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--hairline); flex: none; margin-top: 1px; display: flex; align-items: center; justify-content: center; color: var(--brand-ink); }
.aw-checks li.done .tick { background: var(--ok); border-color: var(--ok); color: var(--on-ok); box-shadow: 0 0 8px rgba(var(--ok-rgb), .5); }
.aw-checks .tick .aw-ico { width: 12px; height: 12px; stroke-width: 3; }
.aw-checks li.done { color: var(--muted); }
.aw-step { border: 1px solid var(--hairline); border-radius: 14px; padding: 14px; display: grid; gap: 8px; background: var(--surface); }
.aw-step.done { background: var(--ok-bg); border-color: transparent; }
.aw-step h3 { margin: 0; display: flex; align-items: center; gap: 8px; }

/* ---- sign-in and welcome pages (the client's logo and name, nothing else) --------------------------------------------------------------- */
body.aw-auth { min-height: 100vh; background: radial-gradient(1100px 560px at 50% -200px, rgba(var(--brand-rgb), .22), transparent 70%), radial-gradient(640px 420px at 100% 100%, rgba(var(--brand-rgb), .09), transparent 70%), var(--bg); }
.aw-auth-box { padding-top: 12vh; }
.aw-auth .center { margin-bottom: 4px; }
.aw-auth-box .card { border-radius: 20px; padding: 22px 20px; box-shadow: var(--shadow-lift); }
.aw-auth-box h1 { letter-spacing: -.02em; }

/* ---- pages with their own fixed or sticky bars sit above the phone tab bar ------------------------------------------------------------ */
/* (body.aw-framed in front, so these win over each tool's own stylesheet, which loads after this one) */
body.aw-framed .st-bulk { bottom: var(--aw-tabs-h); }
body.aw-framed .st-formbar { bottom: var(--aw-tabs-h); }
body.aw-framed .sticky-actions { inset-block-end: var(--aw-tabs-h); }
@media (min-width: 960px) { body.aw-framed .st-bulk { inset-inline-start: var(--rail-w); } }
@media print { .top, .aw-rail, .aw-tabs, .toast { display: none !important; } body.aw-framed { padding: 0 !important; } }
