/* Shared look for LicenseRequest.html, AdminLicenseOrders.html and NoAccess.html: WorkLog's common.css
   (WorkLogWeb) without the application - the same rules in the same order, under the product's name.
   Colours are tokens; <html data-theme="dark"> (set by common.js from the Theme setting) swaps them. */

:root {
  /* Rick Tony Software palette (ricktony.com): navy pages, brass trim */
  --rt-navy: #142744;
  --rt-navy-deep: #0d1b31;
  --brass: #c0a050;
  --brass-dark: #8a6e2f;
  --brass-deep: #6b5423;
  --brass-light: #dcc079;
  --brass-pale: #efdba4;
  --brass-ink: #16202a;            /* text on a brass button */
  --brass-band: linear-gradient(135deg, var(--brass-dark) 0%, var(--brass-pale) 10%, var(--brass) 22%,
    var(--brass-deep) 36%, var(--brass-light) 52%, var(--brass) 66%, var(--brass-pale) 82%, var(--brass-dark) 100%);
  --brass-bevel: 0 0 0 1px rgba(46, 34, 10, 0.9), 0 3px 10px rgba(0, 0, 0, 0.32),
    inset 0 0 0 1px rgba(46, 34, 10, 0.78), inset 0 0 0 2px rgba(255, 244, 214, 0.26);
  --chrome: var(--rt-navy);        /* the header, footer and the other bars in the brass frame */
  --on-navy: #e6edf5;              /* text on the header and footer (--chrome) */
  --on-navy-muted: #aebbcc;
  --on-navy-line: rgba(255, 255, 255, 0.35);
  --on-navy-hover: rgba(255, 255, 255, 0.08);   /* a control there under the pointer */
  --on-menu-colour: #e6edf5;       /* text on a menu button painted in a MenuColour (menu-coloured); on a light colour (on-light) it is --brass-ink */
  --brand: var(--brass-pale);      /* the name in the header */

  /* text straight on the page background: dark on the light theme's white page - a theme with a dark page lightens it */
  --on-bg: #111827;
  --on-bg-muted: color-mix(in srgb, #111827 70%, var(--bg));
  --on-bg-line: rgba(0, 0, 0, 0.35);
  --heading: var(--brass-deep);    /* the section headings on the page */

  --bg: #ffffff;                   /* light theme: white panels on a white page, each framed by its border */
  --panel: #ffffff;
  --panel-2: #f9fafb;       /* quiet surfaces inside a panel: table headers */
  --input-bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #d1d5db;
  --primary: #2563eb;
  --primary-text: #ffffff;
  --danger: #dc2626;
  --ok: #16a34a;
  --warn: #b45309;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  color-scheme: light;
}

/* Admin menu -> Visual -> Look and feel -> Color Saturation - I Care (data-saturation matched, common.js applySaturation):
   the Rick Tony website's navy and brass at the menu colours' saturation - 30%, as WorkLog's - each keeping its hue and
   lightness; Don't Care (site) keeps the website's own, above */
html[data-saturation="matched"] {
  --rt-navy: #1f2939;
  --brass: #ac9764;
  --brass-dark: #786741;
  --brass-deep: #5c4f32;
  --brass-light: #c4b691;
  --brass-pale: #dad1b9;
}

html[data-theme="dark"] {
  --bg: #000000;                   /* dark theme: dark panels on a black page */
  --on-bg: var(--on-navy);         /* and light text straight on it */
  --on-bg-muted: var(--on-navy-muted);
  --on-bg-line: var(--on-navy-line);
  --heading: var(--brass-light);
  --panel: #1f2937;
  --panel-2: #283548;
  --input-bg: #111827;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --border: #4b5563;
  --primary: #3b82f6;
  --primary-text: #ffffff;
  --danger: #f87171;
  --ok: #4ade80;
  --warn: #fbbf24;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

/* A theme from USSLicense-Themes.json (common.js applyTheme) is the light or the dark theme above, as its Dark-Light
   says, with its Primary colour on the page (--bg) and its Secondary on the panels and on the header, footer and the
   other bars in the brass frame (--chrome). The text straight on the page follows how light the Primary is
   (data-theme-page); on a light theme's Secondary the header's text is dark. */
html[data-theme-page="light"] {
  --on-bg: #111827;
  --on-bg-muted: color-mix(in srgb, #111827 70%, var(--bg));
  --on-bg-line: rgba(0, 0, 0, 0.35);
  --heading: #111827;
}
html[data-theme-page="dark"] {
  --on-bg: #e6edf5;
  --on-bg-muted: #aebbcc;
  --on-bg-line: rgba(255, 255, 255, 0.35);
  --heading: var(--brass-light);
}
html[data-custom-theme][data-theme="light"] {
  --on-navy: #111827;
  --on-navy-muted: color-mix(in srgb, #111827 65%, var(--chrome));
  --on-navy-line: rgba(0, 0, 0, 0.35);
  --on-navy-hover: rgba(0, 0, 0, 0.06);
  --brand: #111827;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

button, input, select, textarea { font: inherit; color: inherit; }

button {
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  min-height: 44px;                 /* comfortable touch target */
  touch-action: manipulation;
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); font-weight: 600; }
button.danger { color: var(--danger); border-color: var(--danger); }
button.icon { min-width: 44px; padding: 0 0.5rem; font-size: 1.3rem; line-height: 1; }
button.small { min-height: 34px; min-width: 34px; padding: 0 0.5rem; font-size: 0.9rem; }

input[type="text"], input[type="number"], textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  background: var(--input-bg);
  color: var(--text);
  min-height: 40px;
}
input:focus, textarea:focus, select:focus, button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.invalid { outline: 2px solid var(--danger) !important; outline-offset: 1px; }

/* nothing is shown until USSLicense-Lang.json has loaded and the text is in place (common.js removes the class) */
html.lang-loading body { visibility: hidden; }

/* header bar (filled by USSLicense.mountHeader): brand on the left, controls on the right; the controls drop
   to a second line on a phone. Framed like the ricktony.com header: navy inside a brass band. */
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0.5rem 0;
  margin-top: max(0.5rem, env(safe-area-inset-top));   /* installed on a phone the page runs under the status bar */
  border: 5px solid transparent;
  border-radius: 16px;
  background: linear-gradient(var(--chrome), var(--chrome)) padding-box, var(--brass-band) border-box;
  box-shadow: var(--brass-bevel);
  color: var(--on-navy);
}
.app-header .brand {
  display: flex;
  flex-wrap: wrap;             /* a long page name drops under the product's on a narrow screen */
  align-items: center;
  gap: 0.25rem 0.5rem;
  min-width: 0;
  max-width: 100%;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--brand);
}
/* the page's name after the product's, in its font (common.js headerName); a long one wraps on a narrow screen */
.app-header .brand-page { min-width: 0; white-space: normal; }
.app-header .brand-page[hidden] { display: none; }
.app-header .brand-page::before { content: '\2013'; margin-right: 0.5rem; }
.app-header .brand img { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 0 1px var(--brass-dark); }
.app-header .controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  /* the block takes what is left of the brand's line - never sized to its content alone, which rounds to a hair less than
     the content needs and wraps the last button under the others; too wide for the line: the whole block moves under
     the brand instead of being squeezed */
  flex: 1 0 auto;
  /* wider than the frame itself (a phone; or an administrator's two groups of page buttons with a message showing): the
     block is capped at the frame and its items wrap inside it instead of running out of it */
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: flex-end;
}
/* the messages before the user's name (common.js): the demo badge, orange - "Demo Mode" ("Demo Mode / Read Only" with
   Demo-ReadOnlyMode), flashing whenever the server runs with any Demo-* setting - a pill that is a button and opens a
   dialog about it; an empty place takes no room */
.app-header .demo-mount:empty { display: none; }
.app-header .header-message {
  min-height: 0;
  min-width: 0;
  padding: 0.15rem 0.55rem;
  border: none;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  cursor: pointer;
  animation: demo-flash 1.2s ease-in-out infinite;
}
.app-header .demo-badge, .app-header .demo-badge:hover { background: #f59e0b; color: #1f2937; }
@keyframes demo-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}
.app-header .user {
  color: var(--on-navy-muted);
  font-size: 0.85rem;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Demo-SwitchUser: the selector that replaces the name, outlined like the header's other controls */
.app-header .user-select {
  max-width: 10rem;
  min-height: 40px;
  padding: 0 0.4rem;
  font-size: 0.85rem;
  color: var(--on-navy);
  background: transparent;
  border: 1px solid var(--on-navy-line);
  border-radius: var(--radius);
}
.app-header .user-select option { color: #111; background: #fff; }
/* the Language (globe) button, left of the gear */
.app-header .lang-btn { display: inline-flex; align-items: center; justify-content: center; }
.app-header .lang-btn svg { display: block; }
/* the Language dialog: one button per language, the one in use marked */
.lang-list { display: grid; gap: 0.4rem; }
.lang-list button { display: flex; justify-content: space-between; align-items: center; text-align: left; }
.lang-list button.current { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); font-weight: 600; }
.lang-list button.current::after { content: "\2713"; color: var(--primary); }
/* controls sitting on the navy: outlined in light, primary actions in brass */
.app-header button, .toolbar button {
  background: transparent;
  color: var(--on-navy);
  border-color: var(--on-navy-line);
}
.app-header button:hover, .toolbar button:hover { background: var(--on-navy-hover); }
.toolbar button.primary { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); }
.toolbar button.primary:hover { background: var(--brass-light); }
.page-nav {
  display: inline-flex;
  border: 1px solid var(--on-navy-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.page-nav .page-btn {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 0.7rem;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--on-navy);
  border-left: 1px solid var(--on-navy-line);
  white-space: nowrap;
}
.page-nav .page-btn:first-child { border-left: none; }
.page-nav a.page-btn:hover { background: var(--on-navy-hover); }
/* Admin menu -> Visual -> Look and feel -> Menu Classic (common.js drawPageNavs): a button per menu group, each opening the list of its pages under it - lined up on the button's right edge, or on its left
   (from-left) when the list would run off the screen. A group with one page for the user is that page on the bar
   (menu-single, menu-page): a link in the look of the groups' buttons, without the arrow - it opens nothing */
.menu-group { position: relative; }
.menu-single { display: inline-flex; }
.app-header .menu-btn, .app-header .menu-page {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0 0.5rem;
  font-size: 0.85rem;
  white-space: nowrap;
}
.app-header .menu-btn::after { content: "\25BE"; font-size: 0.85em; }
.app-header .menu-btn[aria-expanded="true"]::after { content: "\25B4"; }
.app-header .menu-page .admin-icon { margin-left: 0; }
.app-header .menu-page {
  border: 1px solid var(--on-navy-line);
  border-radius: var(--radius);
  color: var(--on-navy);
  text-decoration: none;
}
.app-header a.menu-page:hover { background: var(--on-navy-hover); }
.app-header a.menu-page:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
/* Classic look: every menu button on the bar - a group's, or its one page - one width:
   the widest one's, which common.js sizeMenuButtons puts on the header as --menu-button-width as the menu is drawn; a
   name wider than 11rem wraps under itself; the text centred */
.app-header .menu-btn, .app-header .menu-page {
  width: var(--menu-button-width, auto);
  max-width: 11rem;
  justify-content: center;
  text-align: center;
  white-space: normal;
}
.menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 2px;
  min-width: max(100%, 11rem);
  padding: 0.3rem;
  background: var(--chrome);
  border: 2px solid var(--brass);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}
.menu-list.from-left { right: auto; left: 0; }
.menu-list[hidden] { display: none; }
.menu-list .menu-item {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--on-navy);
  text-decoration: none;
  white-space: nowrap;
}
.menu-list a.menu-item:hover, .menu-list a.menu-item:focus-visible { background: var(--on-navy-hover); }
/* a MenuColour from USSLicense-Permissions.JSON (common.js menuColourClasses puts the class and --menu-colour on the element):
   a group's on its button, on its one page on the bar and, in the Buttons look, on its page buttons; a page's own on its
   own button or list entry, over the group's. Light text, or dark on a light colour (on-light) */
.app-header .menu-coloured { background: var(--menu-colour); color: var(--on-menu-colour); }
.app-header .menu-coloured.on-light { color: var(--brass-ink); }
.app-header a.menu-coloured:hover, .app-header button.menu-coloured:hover,
.menu-list a.menu-item.menu-coloured:hover, .menu-list a.menu-item.menu-coloured:focus-visible { background: color-mix(in srgb, var(--menu-colour), #fff 12%); }
/* the admin logo (common.js adminIcon), a shield after the name of anything only Admin-Global has, instead of "(admin)":
   the admin pages in the header, which are a group of their own, so on a phone it takes a line of its own rather than
   running out of the frame; a user who has no admin page has an empty group, which takes no room */
.admin-icon { flex: none; margin-left: 0.3rem; vertical-align: -0.15em; }
.page-nav:empty { display: none; }
@media (max-width: 480px) {
  .app-header .user { max-width: 6rem; }
  .app-header .icon { min-width: 40px; min-height: 40px; }
  .page-nav .page-btn { min-height: 40px; padding: 0 0.5rem; font-size: 0.8rem; }
  .app-header .menu-btn, .app-header .menu-page { min-height: 40px; padding: 0 0.5rem; font-size: 0.8rem; }
}

/* a second row inside the frame (a page's own buttons under the header) */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0.5rem 0.5rem 0;
  margin-top: max(0.5rem, env(safe-area-inset-top));   /* installed on a phone the page runs under the status bar */
  border: 5px solid transparent;
  border-radius: 16px;
  background: linear-gradient(var(--chrome), var(--chrome)) padding-box, var(--brass-band) border-box;
  box-shadow: var(--brass-bevel);
  color: var(--on-navy);
}
.top .app-header { position: static; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--brass-pale) 35%, transparent);
}
.toolbar .meta { color: var(--brass-light); font-size: 0.85rem; white-space: nowrap; }

/* footer: the page's buttons in one thin row with the company line under them, framed like the header and kept at the
   bottom of the screen. The page lays out as a column so the footer sits at the bottom even when there is little content. */
body:has(> .app-footer) { min-height: 100dvh; display: flex; flex-direction: column; }
body:has(> .app-footer) > main { flex: 1 0 auto; }
.app-footer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0 0.5rem;
  margin-bottom: max(0.5rem, env(safe-area-inset-bottom));   /* installed on a phone the page runs over the home bar */
  padding: 3px 12px;
  border: 5px solid transparent;
  border-radius: 16px;
  background: linear-gradient(var(--chrome), var(--chrome)) padding-box, var(--brass-band) border-box;
  box-shadow: var(--brass-bevel);
  color: var(--on-navy);
}
.footer-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.footer-actions button {
  min-height: 30px;
  padding: 2px 11px;
  font-size: 0.8rem;
  background: transparent;
  color: var(--on-navy);
  border-color: var(--on-navy-line);
}
.footer-actions button:hover:not(:disabled) { background: var(--on-navy-hover); }
.footer-legal { margin: 0; font-size: 10.5px; line-height: 1.3; text-align: center; color: var(--on-navy-muted); }
.footer-legal a { color: inherit; text-decoration: none; }
.footer-legal a:hover { text-decoration: underline; }

/* text that sits straight on the page background */
.on-navy { color: var(--on-bg); }
.on-navy-muted { color: var(--on-bg-muted); }

/* message banners (USSLicense.showMessage): a sticky one in #messages, in the page; the others in #messagesFloat, over the
   page just under the header (common.js sets its top) - a popover, so above an open dialog too - the gaps between
   them letting clicks through to the page */
#messages { width: 100%; max-width: 60rem; margin: 0 auto; }
#messagesFloat {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  width: 100%;
  max-width: 60rem;
  height: auto;
  margin: 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  overflow: visible;
  pointer-events: none;
}
#messagesFloat .banner { pointer-events: auto; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.banner {
  margin: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.banner.error { background: color-mix(in srgb, var(--danger) 12%, var(--panel)); border-color: var(--danger); color: var(--danger); }
.banner.info { background: color-mix(in srgb, var(--primary) 12%, var(--panel)); border-color: var(--primary); color: var(--text); }
.banner.ok { background: color-mix(in srgb, var(--ok) 14%, var(--panel)); border-color: var(--ok); color: var(--text); }
.banner.warn { background: color-mix(in srgb, var(--warn) 16%, var(--panel)); border-color: var(--warn); color: var(--text); }
.banner .linkish { margin-left: 0.25rem; }
.banner .msg { flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; }
.banner .close { background: none; border: none; min-height: 0; min-width: 0; padding: 0 0.25rem; font-size: 1.3rem; line-height: 1; color: inherit; }

/* settings dialog */
dialog {
  border: none;
  border-radius: 12px;
  padding: 0;
  width: min(26rem, calc(100% - 2rem));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color: var(--text);
  background: var(--panel);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.dialog-body { padding: 1.25rem; display: grid; gap: 0.9rem; }
.dialog-body h2 { margin: 0; font-size: 1.1rem; }
.dialog-body label { display: grid; gap: 0.3rem; font-size: 0.9rem; color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.form-error { color: var(--danger); font-size: 0.9rem; }
/* the User ID is a 36-character GUID: monospace and a little smaller so it fits a phone-width dialog;
   masked like a password, with a Show/Hide button beside it */
.dialog-body input[name="userId"] { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 0.85rem; }
.secret-row { display: flex; gap: 0.4rem; align-items: stretch; }
.secret-row input { flex: 1; min-width: 0; }
.secret-row .reveal { flex: none; min-height: 0; padding: 0 0.75rem; font-size: 0.85rem; }
/* the General tab's block for the layer in force (the User ID, or who is signed in), laid out as the panel is */
.settings-panel [data-layer] { display: grid; gap: inherit; }
.settings-panel [data-layer][hidden] { display: none; }
/* Sign in, Change password and Sign out, under the User ID or the signed-in line: the session's buttons */
.settings-signout-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.settings-signin, .settings-password, .settings-signout { min-height: 36px; padding: 0 0.9rem; font-size: 0.9rem; }
.dialog-actions .settings-signout { margin-right: auto; }   /* Sign out at the foot of every tab, on the left; Cancel and Save on the right */
.version-warning { color: var(--warn); font-weight: 600; }   /* the pages' version is not the server's */
/* the App button row in the settings dialog */
.button-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.button-row button { flex: 1 1 auto; min-height: 40px; padding: 0.4rem 0.8rem; font-size: 0.95rem; }
.setting-group { display: grid; gap: 0.35rem; }
.setting-group .group-label { font-size: 0.9rem; color: var(--muted); }
/* the Configuration tab's sections, Switch Mode, Website Mode and Standalone Mode (common.js mountAdminMenu): a heading each; the
   first and the last are a native app's, which these pages have none of: hidden */
.settings-section { display: grid; gap: 0.9rem; }
.settings-section h3 { margin: 0.35rem 0 0; padding-bottom: 0.25rem; font-size: 0.95rem; color: var(--heading); border-bottom: 1px solid var(--border); }
.settings-section[hidden] { display: none; }
.dialog-body .app-home { display: block; margin-top: 0.25rem; font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 0.85rem; word-break: break-all; user-select: all; }   /* the app's folder: the whole path shown, a click selects it */
/* the About tab (common.js fillAbout): a table of sections - a heading row, then a label and a value a row */
.about-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.about-table th.about-section { text-align: left; padding: 0.75rem 0 0.25rem; color: var(--heading); border-bottom: 1px solid var(--border); }
.about-table tr:first-child th.about-section { padding-top: 0; }
.about-table td { padding: 0.3rem 0; vertical-align: top; }
.about-table td.about-label { width: 1%; white-space: nowrap; padding-right: 1.25rem; color: var(--muted); }
.about-table td.about-value { overflow-wrap: anywhere; }
.about-table .about-warning { color: var(--warn); font-weight: 600; }   /* the pages' version is not the server's */
/* the settings' tabs - Visual, About: a row of buttons under the heading, the open one underlined; where they do not
   fit in one row, they take a second rather than break their names */
.settings-tabs { display: flex; flex-wrap: wrap; gap: 0 0.25rem; border-bottom: 1px solid var(--border); }
.settings-tab {
  min-height: 36px;
  padding: 0.35rem 0.6rem;
  white-space: nowrap;
  margin-bottom: -1px;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 6px 6px 0 0;
  background: none;
  color: var(--muted);
  font-weight: 600;
}
.settings-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--primary); }
.settings-tab[hidden] { display: none; }
.settings-panel { display: grid; gap: 0.9rem; }
.settings-panel[hidden] { display: none; }

/* "settings missing" panel */
.setup {
  margin: 1.5rem auto;
  max-width: 28rem;
  padding: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 0.75rem;
  text-align: center;
}
.setup h2 { margin: 0; font-size: 1.1rem; }

/* the header messages' dialog (common.js openMessageDialog): the demo settings in force, or a page's own message - a
   title, then its parts. Its buttons go onto a second line where they do not fit one */
.message-dialog .parts { display: grid; gap: 0.5rem; }
.message-dialog .parts p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-dialog .parts h2 { overflow-wrap: anywhere; }
.message-dialog .when { font-size: 0.8rem; color: var(--muted); }
.message-dialog .dialog-actions { flex-wrap: wrap; }

.linkish {
  background: none;
  border: none;
  min-height: 0;
  padding: 0.1rem 0.2rem;
  color: var(--primary);
  font-size: 0.8rem;
  text-decoration: underline;
}

.hint { font-size: 0.8rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
[hidden] { display: none !important; }
body.busy { cursor: progress; }
