/* Ekkamai Vibe (OFL 1.1, Reserved Font Name "Ekkamai Vibe"; licence: fonts/OFL-EkkamaiVibe.txt) — the site font since 2026-12-01.
   WOFF2 converted from the free 1.001 TTFs, unchanged otherwise (the README allows WOFF2). The font uses an old Thai encoding:
   U+00A0-00FF (× © · é …) map to Thai shapes and ฤๅ / a few rare marks are blank, so unicode-range keeps it to ASCII, Thai
   (minus ๅ U+0E45 and the blank ones) and the dashes / quotes / bullet / ellipsis it draws; everything else falls back to Sarabun.
   Weights: its Bold is only a little heavier than Regular, so Bold serves 600 and Heavy serves 700 (headings, <strong>). */
@font-face { font-family: 'Ekkamai Vibe'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ekkamai-vibe-regular.woff2) format('woff2'); unicode-range: U+0020-007E, U+0E01-0E3A, U+0E3F-0E44, U+0E46-0E4D, U+0E4F-0E59, U+2013-2014, U+2018-2019, U+201C-201D, U+2022, U+2026; }
@font-face { font-family: 'Ekkamai Vibe'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ekkamai-vibe-bold.woff2) format('woff2'); unicode-range: U+0020-007E, U+0E01-0E3A, U+0E3F-0E44, U+0E46-0E4D, U+0E4F-0E59, U+2013-2014, U+2018-2019, U+201C-201D, U+2022, U+2026; }
@font-face { font-family: 'Ekkamai Vibe'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/ekkamai-vibe-heavy.woff2) format('woff2'); unicode-range: U+0020-007E, U+0E01-0E3A, U+0E3F-0E44, U+0E46-0E4D, U+0E4F-0E59, U+2013-2014, U+2018-2019, U+201C-201D, U+2022, U+2026; }
/* Sarabun (OFL), self-hosted: same files and unicode ranges Google Fonts serves. Used for financial / tax documents
   (receipt, quotation, 50 ทวิ — var(--font-doc)), the certification stamp, and as the fallback for characters Ekkamai lacks */
@font-face { font-family: 'Sarabun'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/sarabun-400-thai.woff2) format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Sarabun'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/sarabun-400-vietnamese.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Sarabun'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/sarabun-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sarabun'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/sarabun-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sarabun'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/sarabun-600-thai.woff2) format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Sarabun'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/sarabun-600-vietnamese.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Sarabun'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/sarabun-600-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sarabun'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/sarabun-600-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sarabun'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/sarabun-700-thai.woff2) format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Sarabun'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/sarabun-700-vietnamese.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Sarabun'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/sarabun-700-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sarabun'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/sarabun-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* ==========================================================================
   style.css — mobile-first, calm & professional
   เปลี่ยนสีหลักได้ที่ --accent ด้านล่าง
   ========================================================================== */

:root {
  --accent: #01417b;          /* navy จากโลโก้ — สีหลัก */
  --accent-dark: #002f5c;
  --accent-soft: #eef2f8;
  --accent-ring: rgba(1, 65, 123, 0.28);
  --accent-bright: #006192;   /* ฟ้าจากโลโก้: เส้นเน้นและไอคอน */
  --hero-grad: linear-gradient(135deg, #006192 0%, #01417b 45%, #0a1830 100%);
  --footer-bg: #0f1b2e;
  --on-accent: #ffffff;       /* text on --accent backgrounds */

  --text: #1d2433;
  --text-soft: #343c4c;       /* long-form text (policy, posts) */
  --muted: #566072;
  --placeholder: #8a93a3;
  --border: #d9dee7;
  --border-strong: #b9c1ce;   /* form fields */
  --accent-line: #d3dcea;     /* light-blue borders and icon circles */
  --bg: #f5f8fc;              /* page colour under --page-grad */
  --surface: #ffffff;         /* cards, fields, menus, pop-ups */
  --bg-soft: #f6f8fb;
  --header-bg: rgba(255, 255, 255, 0.88);
  --promo-tint: #eef5fb;

  /* Page background: soft washes of the logo blues + faint wave lines like the logo */
  --page-grad:
    radial-gradient(1100px 560px at -5% -10%, rgba(0, 97, 146, 0.13), transparent 60%),
    radial-gradient(900px 520px at 105% 0%, rgba(1, 65, 123, 0.10), transparent 60%),
    linear-gradient(180deg, #edf3fa 0%, #f6f9fc 420px, #ffffff 1200px);
  --waves: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='300' viewBox='0 0 720 300' fill='none' stroke='%23006192' stroke-opacity='0.10' stroke-width='1.5'%3E%3Cpath d='M0 60C160 20 260 120 420 90S640 10 720 40'/%3E%3Cpath d='M0 85C160 45 260 145 420 115S640 35 720 65'/%3E%3Cpath d='M0 110C160 70 260 170 420 140S640 60 720 90'/%3E%3Cpath d='M0 135C160 95 260 195 420 165S640 85 720 115'/%3E%3Cpath d='M0 160C160 120 260 220 420 190S640 110 720 140'/%3E%3Cpath d='M0 185C160 145 260 245 420 215S640 135 720 165'/%3E%3Cpath d='M0 210C160 170 260 270 420 240S640 160 720 190'/%3E%3C/svg%3E");

  --error: #b42318;
  --error-soft: #fef3f2;
  --error-line: #fecdca;
  --success: #067647;
  --success-soft: #ecfdf3;
  --success-line: #a6f4c5;

  /* Notices, badges and job status chips */
  --warn-bg: #fffaeb;  --warn-line: #fedf89;  --warn-text: #5c3d00;
  --badge-bg: #fff4d6; --badge-text: #7a4d00; --special-bg: #fffcf2;
  --st-received: #e8f0fe;   --st-received-text: #1a4fa0;
  --st-quoted: #fef7e0;     --st-quoted-text: #8a5a00;
  --st-paid: #e6f4ea;       --st-paid-text: #137333;
  --st-progress: #e3f2fd;   --st-progress-text: #01417b;
  --st-review: #f3e8ff;     --st-review-text: #6b3fa0;
  --st-delivered: #d2f0dc;  --st-delivered-text: #0b6b2d;
  --st-cancelled: #f1f3f4;  --st-cancelled-text: #566072;
  --tier-bronze: #9a5b22; --tier-silver: #5f6b7a; --tier-gold: #8a6700; --tier-platinum: #4b5d8a;

  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 28px rgba(16, 24, 40, 0.12);
  --shadow-pop: 0 24px 60px rgba(10, 24, 48, 0.35);
  --gutter: 16px;
  --maxw: 760px;              /* reading width (phone/tablet) */
  --maxw-wide: 1160px;        /* page width on PC */
  --header-h: 69px;           /* header bar height incl. border */
  --tap: 44px;

  --font: "Ekkamai Vibe", "Sarabun", "Noto Sans Thai", "Leelawadee UI", "Tahoma",
          system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  /* financial and tax documents stay in Sarabun (= TH Sarabun New's web version), owner 2026-12-01 */
  --font-doc: "Sarabun", "Noto Sans Thai", "Leelawadee UI", "Tahoma",
          system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  color-scheme: light;
}

/* ==========================================================================
   Dark theme — only the tokens change. js/app.js sets <html data-theme="light|dark">
   (Auto follows the device); without JS the media query below follows the device.
   ========================================================================== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: #6cb4ec;          /* lighter logo blue: readable on dark */
  --accent-dark: #93c9f2;
  --accent-soft: #14304d;
  --accent-ring: rgba(108, 180, 236, 0.4);
  --accent-bright: #4fb0e8;
  --footer-bg: #070d18;
  --on-accent: #06101e;

  --text: #e6ecf5;
  --text-soft: #c9d3e1;
  --muted: #9aa8bd;
  --placeholder: #6f7d94;
  --border: #26344f;
  --border-strong: #3a4a68;
  --accent-line: #22405f;
  --bg: #0b1220;
  --surface: #111a2c;
  --bg-soft: #16213a;
  --header-bg: rgba(11, 18, 32, 0.86);
  --promo-tint: #132842;

  --page-grad:
    radial-gradient(1100px 560px at -5% -10%, rgba(0, 97, 146, 0.32), transparent 60%),
    radial-gradient(900px 520px at 105% 0%, rgba(1, 65, 123, 0.38), transparent 60%),
    linear-gradient(180deg, #0e1a33 0%, #0b1220 520px);
  --waves: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='300' viewBox='0 0 720 300' fill='none' stroke='%236cb4ec' stroke-opacity='0.10' stroke-width='1.5'%3E%3Cpath d='M0 60C160 20 260 120 420 90S640 10 720 40'/%3E%3Cpath d='M0 85C160 45 260 145 420 115S640 35 720 65'/%3E%3Cpath d='M0 110C160 70 260 170 420 140S640 60 720 90'/%3E%3Cpath d='M0 135C160 95 260 195 420 165S640 85 720 115'/%3E%3Cpath d='M0 160C160 120 260 220 420 190S640 110 720 140'/%3E%3Cpath d='M0 185C160 145 260 245 420 215S640 135 720 165'/%3E%3Cpath d='M0 210C160 170 260 270 420 240S640 160 720 190'/%3E%3C/svg%3E");

  --error: #f97066;
  --error-soft: #3a1513;
  --error-line: #7a2a24;
  --success: #47cd89;
  --success-soft: #0e2a1c;
  --success-line: #1d5c3b;

  --warn-bg: #2e2411;  --warn-line: #6b5020;  --warn-text: #f5d58a;
  --badge-bg: #3d2f12; --badge-text: #f5d58a; --special-bg: #251f12;
  --st-received: #16294a;   --st-received-text: #9ec2ff;
  --st-quoted: #3a2e12;     --st-quoted-text: #f3cf7a;
  --st-paid: #12321f;       --st-paid-text: #7fdca2;
  --st-progress: #12304d;   --st-progress-text: #8cc8f5;
  --st-review: #2c1d45;     --st-review-text: #cdb2f5;
  --st-delivered: #0f3a24;  --st-delivered-text: #6fe0a0;
  --st-cancelled: #222a38;  --st-cancelled-text: #a3afc2;
  --tier-bronze: #e0a36b; --tier-silver: #c3ccd8; --tier-gold: #f2c94c; --tier-platinum: #a9b8e8;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 24px 60px rgba(0, 0, 0, 0.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --accent: #6cb4ec;          /* lighter logo blue: readable on dark */
    --accent-dark: #93c9f2;
    --accent-soft: #14304d;
    --accent-ring: rgba(108, 180, 236, 0.4);
    --accent-bright: #4fb0e8;
    --footer-bg: #070d18;
    --on-accent: #06101e;

    --text: #e6ecf5;
    --text-soft: #c9d3e1;
    --muted: #9aa8bd;
    --placeholder: #6f7d94;
    --border: #26344f;
    --border-strong: #3a4a68;
    --accent-line: #22405f;
    --bg: #0b1220;
    --surface: #111a2c;
    --bg-soft: #16213a;
    --header-bg: rgba(11, 18, 32, 0.86);
    --promo-tint: #132842;

    --page-grad:
      radial-gradient(1100px 560px at -5% -10%, rgba(0, 97, 146, 0.32), transparent 60%),
      radial-gradient(900px 520px at 105% 0%, rgba(1, 65, 123, 0.38), transparent 60%),
      linear-gradient(180deg, #0e1a33 0%, #0b1220 520px);
    --waves: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='300' viewBox='0 0 720 300' fill='none' stroke='%236cb4ec' stroke-opacity='0.10' stroke-width='1.5'%3E%3Cpath d='M0 60C160 20 260 120 420 90S640 10 720 40'/%3E%3Cpath d='M0 85C160 45 260 145 420 115S640 35 720 65'/%3E%3Cpath d='M0 110C160 70 260 170 420 140S640 60 720 90'/%3E%3Cpath d='M0 135C160 95 260 195 420 165S640 85 720 115'/%3E%3Cpath d='M0 160C160 120 260 220 420 190S640 110 720 140'/%3E%3Cpath d='M0 185C160 145 260 245 420 215S640 135 720 165'/%3E%3Cpath d='M0 210C160 170 260 270 420 240S640 160 720 190'/%3E%3C/svg%3E");

    --error: #f97066;
    --error-soft: #3a1513;
    --error-line: #7a2a24;
    --success: #47cd89;
    --success-soft: #0e2a1c;
    --success-line: #1d5c3b;

    --warn-bg: #2e2411;  --warn-line: #6b5020;  --warn-text: #f5d58a;
    --badge-bg: #3d2f12; --badge-text: #f5d58a; --special-bg: #251f12;
    --st-received: #16294a;   --st-received-text: #9ec2ff;
    --st-quoted: #3a2e12;     --st-quoted-text: #f3cf7a;
    --st-paid: #12321f;       --st-paid-text: #7fdca2;
    --st-progress: #12304d;   --st-progress-text: #8cc8f5;
    --st-review: #2c1d45;     --st-review-text: #cdb2f5;
    --st-delivered: #0f3a24;  --st-delivered-text: #6fe0a0;
    --st-cancelled: #222a38;  --st-cancelled-text: #a3afc2;
    --tier-bronze: #e0a36b; --tier-silver: #c3ccd8; --tier-gold: #f2c94c; --tier-platinum: #a9b8e8;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.45);
    --shadow-pop: 0 24px 60px rgba(0, 0, 0, 0.6);
}
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  min-height: 100vh;
  background: var(--waves) no-repeat right -140px top 30px / 780px auto, var(--page-grad), var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;       /* 17px — Sarabun reads small */
  line-height: 1.65;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.3; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2rem); }
.h3 { font-size: 1.125rem; }
.h4 { font-size: 1.0625rem; margin-bottom: 0.15em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 2px; }

:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--accent); color: var(--on-accent); border-radius: var(--radius-sm);
}
.skip-link:focus { top: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.header-actions .header-cta { display: none; }
@media (min-width: 640px) { .header-actions .header-cta { display: inline-flex; } }
/* PC 1024–1279: the menu needs the room; "Submit a job" is in the Orders menu */
@media (min-width: 1024px) and (max-width: 1279px) { .header-actions .header-cta { display: none; } }

/* Account button: tablet/PC (phone uses the menu item) */
.account-btn {
  display: none; align-items: center; gap: 8px; flex: none;
  min-width: var(--tap); min-height: var(--tap); padding: 0 10px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); cursor: pointer;
  font: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--accent);
}
.account-btn svg { width: 22px; height: 22px; flex: none; }
.account-btn:hover { border-color: var(--accent); }
.account-btn.is-signed-in { background: var(--accent-soft); border-color: var(--accent-line); }
/* profile picture (owner 2026-12-02): shown only to the person themself; organisation logos also to the team */
.account-avatar { width: 28px; height: 28px; flex: none; border-radius: 50%; object-fit: cover; background: #ffffff; }
.account-btn.has-avatar svg { display: none; }
.avatar-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar-preview {
  flex: none; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 1.75rem; border: 1px solid var(--border);
}
.avatar-preview.is-logo { border-radius: var(--radius); }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; display: block; background: #ffffff; }
.avatar-actions { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.avatar-actions .btn-link { min-height: var(--tap); }
.avatar-field .label { display: block; font-weight: 600; margin-bottom: 8px; }
.avatar-field .form-status { margin-top: 8px; }
.dash-avatar.has-img { overflow: hidden; background: #ffffff; }
/* crop pop-up: drag / zoom inside a square; circle guide for people, rounded square for logos */
.modal.crop-modal { width: min(440px, calc(100vw - 32px)); }
.crop-hint { margin: 0 0 12px; }
.crop-stage {
  position: relative; width: min(320px, 100%); aspect-ratio: 1; margin: 0 auto; overflow: hidden; touch-action: none;
  cursor: grab; background: #ffffff; border-radius: var(--radius-sm); user-select: none;
}
.crop-stage:active { cursor: grabbing; }
.crop-stage:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 3px; }
.crop-stage img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.crop-mask { position: absolute; inset: 0; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 999px rgba(10, 20, 35, 0.45); outline: 2px solid #ffffff; }
.crop-stage.is-logo .crop-mask { border-radius: 14px; }
.crop-zoom { display: flex; align-items: center; gap: 10px; width: min(320px, 100%); margin: 14px auto 0; color: var(--muted); font-weight: 700; }
.crop-zoom input { flex: 1; min-height: var(--tap); accent-color: var(--accent); }
.crop-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.dash-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.job-logo, .dash-user-logo {
  flex: none; width: 32px; height: 32px; object-fit: contain; border-radius: 8px; background: #ffffff;
  border: 1px solid var(--border); vertical-align: middle;
}
.job-no:has(.job-logo) { display: inline-flex; align-items: center; gap: 10px; }
.dash-user-logo { width: 28px; height: 28px; }
.dash-user-name:has(.dash-user-logo) { display: flex; align-items: center; gap: 8px; }
.account-label { display: none; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 640px) { .account-btn { display: inline-flex; } }
/* Name/"Sign in" label only on wide screens, so the header menu keeps its room */
@media (min-width: 1440px) { .account-btn { padding: 0 14px 0 10px; } .account-label { display: inline; } }

.header-bar {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: calc(var(--header-h) - 1px); padding: 0 var(--gutter);
}

.brand {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--tap); padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 1.125rem; color: var(--accent);
}
.brand-logo { display: block; width: auto; height: 44px; max-width: 46vw; object-fit: contain; object-position: left center; }
@media (min-width: 640px) { .brand-logo { height: 52px; } }

.lang-toggle {
  display: inline-flex; flex: none;
  border: 1px solid var(--border); border-radius: 999px; padding: 3px; background: var(--bg-soft);
}
.lang-toggle button {
  min-width: var(--tap); min-height: var(--tap); padding: 0 12px;
  border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--muted);
}
.lang-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* ---------- Menu ----------
   Phone/tablet: menu button opens a panel under the header (groups open, accordion)
   PC (≥1024px): items in the header bar, groups open as dropdowns */
.menu-btn {
  display: inline-grid; place-items: center; flex: none;
  width: var(--tap); height: var(--tap); padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--accent); cursor: pointer;
}
.menu-btn svg { width: 24px; height: 24px; }
.menu-btn .i-close, .menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: inline; }
.menu-btn[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); }

.main-nav { display: none; }
.site-header.menu-open .main-nav {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  max-height: calc(100vh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
  padding: 8px var(--gutter) 16px;
  background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.nav-list, .nav-sub { list-style: none; margin: 0; padding: 0; }
.nav-list > li + li { border-top: 1px solid var(--border); }
.nav-link, .nav-sublink {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; min-height: 48px; padding: 0 4px;
  border: 0; background: none; cursor: pointer; text-align: left;
  font: inherit; font-weight: 600; color: var(--text);
}
.nav-sublink { min-height: var(--tap); padding: 0 12px; font-weight: 400; border-radius: var(--radius-sm); }
.nav-sub { display: none; padding: 0 0 8px 8px; }
.nav-toggle[aria-expanded="true"] + .nav-sub { display: block; }
.chev { width: 12px; height: 8px; flex: none; color: var(--muted); transition: transform .2s ease; }
.nav-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-link[aria-current="page"], .nav-group.is-current > .nav-toggle { color: var(--accent); }
.nav-sublink[aria-current="page"] {
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent-bright);
}
.nav-sublink:hover { background: var(--bg-soft); }

@media (min-width: 1024px) {
  .menu-btn { display: none; }
  .main-nav, .site-header.menu-open .main-nav {
    display: block; position: static; flex: 1 1 auto; min-width: 0;
    max-height: none; overflow: visible; padding: 0; border: 0; box-shadow: none; background: none;
  }
  .nav-list { display: flex; justify-content: center; align-items: center; gap: 2px; }
  .nav-list > li + li { border-top: 0; }
  .nav-group { position: relative; }
  .nav-link {
    width: auto; min-height: var(--tap); padding: 0 14px; border-radius: 999px;
    font-size: 0.9875rem; white-space: nowrap;
  }
  .nav-link:hover { background: var(--bg-soft); }
  .nav-link[aria-current="page"], .nav-group.is-current > .nav-toggle { background: var(--accent-soft); }
  .nav-sub {
    position: absolute; top: calc(100% + 10px); left: 0; z-index: 60;
    min-width: 230px; padding: 6px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  }
  .nav-sub::before { /* keeps the dropdown open while the pointer crosses the gap */
    content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px;
  }
  .nav-sublink { white-space: nowrap; }
  .nav-account, .nav-theme { display: none; }
}

/* ---------- Layout ---------- */
main { outline: none; }
.panel > h1::after {
  content: ""; display: block; width: 56px; height: 4px; margin-top: 12px;
  border-radius: 2px; background: var(--accent-bright);
}
.panel {
  max-width: var(--maxw); margin: 0 auto;
  padding: 24px var(--gutter) 40px;
}
.lead { font-size: 1.125rem; color: var(--muted); }
.note { font-size: 0.9375rem; color: var(--muted); }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-block; margin-bottom: 12px; padding: 2px 12px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: 0.9375rem; font-weight: 600;
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-lg { min-height: 54px; font-size: 1.125rem; padding: 0 28px; }
.btn-sm { min-height: var(--tap); padding: 0 18px; font-size: 0.9375rem; }
.btn-outline { background: var(--surface); border: 2px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); }
.btn-outline-light { background: transparent; border: 2px solid rgba(255, 255, 255, 0.85); color: #fff; }
.btn-outline-light:hover { background: #fff; color: #01417b; }
.btn-block { width: 100%; }
.btn .icon { width: 22px; height: 22px; }

.btn-link {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0;
  border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--accent);
  text-decoration: underline; text-underline-offset: 3px;
}
.btn-link.inline { display: inline; min-height: 0; font-weight: 600; }

/* ---------- Home ---------- */
/* Hero: navy gradient band, white text (full-bleed on phone, rounded card above) */
.hero {
  margin: -24px calc(var(--gutter) * -1) 0;
  padding: 40px var(--gutter) 36px;
  background: var(--hero-grad); color: #fff;
}
.hero h1 { color: #fff; font-size: clamp(1.75rem, 1.3rem + 2.4vw, 2.6rem); max-width: 18em; }
.hero .lead { color: #d5e1f3; }
.hero .eyebrow { background: rgba(255, 255, 255, 0.14); color: #fff; }
.hero .btn-primary { background: #fff; color: #01417b; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); }
.hero .btn-primary:hover { background: #e4eef9; }
.hero :focus-visible { outline-color: rgba(255, 255, 255, 0.8); }
.hero .actions { gap: 12px; }
@media (max-width: 479px) {
  .hero .actions .btn { width: 100%; }
}
@media (min-width: 640px) {
  .hero { margin: 0; padding: 48px 40px; border-radius: 20px; }
}

.features { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 12px; }
.features li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); transition: box-shadow .2s ease;
}
.features li:hover, .card:hover { box-shadow: var(--shadow-lg); }
.features p { margin: 0; color: var(--muted); font-size: 0.9875rem; }
.features .icon, .contact-item .icon {
  flex: none; width: 40px; height: 40px; padding: 9px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
}

/* ---------- Cards (services) ---------- */
.cards { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.card {
  padding: 24px 20px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); transition: box-shadow .2s ease;
}
.card p { margin: 0; color: var(--muted); }
.icon-circle {
  display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 16px;
  border-radius: 50%; background: var(--accent-line); color: var(--accent-bright);
}
.icon-circle svg { width: 30px; height: 30px; }
@media (min-width: 600px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: repeat(3, 1fr); }
  .features li { flex-direction: column; }
}

/* ---------- Pricing table ---------- */
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: var(--radius); }
.price-table { width: 100%; border-collapse: collapse; font-size: 0.9875rem; }
.price-table th, .price-table td { padding: 12px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.price-table thead th { background: var(--bg-soft); font-weight: 700; }
.price-table thead small { display: block; font-weight: 400; color: var(--muted); font-size: 0.8125rem; white-space: normal; }
.price-table tbody tr:last-child > * { border-bottom: 0; }
.price-table .num { text-align: right; }
.price-table td.num { white-space: nowrap; }
.price-table td.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.price-table tbody th { font-weight: 400; }
.price-extra {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px;
  padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft);
}
@media (min-width: 480px) {
  .price-table th, .price-table td { padding: 12px 16px; }
}

/* ---------- Forms ---------- */
.form { margin-top: 16px; }
.group { margin: 0 0 8px; padding: 0; border: 0; min-width: 0; }
.group-title {
  width: 100%; margin-bottom: 12px; padding: 16px 0 8px;
  border-bottom: 1px solid var(--border);
  font-size: 1.125rem; font-weight: 700; color: var(--accent);
}
.field { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
fieldset.field > legend, .field > label, .label-like {
  display: block; margin-bottom: 6px; padding: 0; font-weight: 600;
}
.req { color: var(--error); }
.field > label.choice { display: flex; margin-bottom: 0; padding: 12px 18px 12px 16px; font-weight: 400; }
.field > label.choice-top { padding: 16px 20px 16px 16px; }
.field > label.file-drop { display: flex; margin-bottom: 0; font-weight: 400; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="password"], input[type="search"], input[type="date"], select, textarea {
  display: block; width: 100%; min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 1rem;     /* ≥16px stops iOS zoom */
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 112px; resize: vertical; }
select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23566072' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input[type="date"] { min-width: 0; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring);
}
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--error); background-color: var(--error-soft);
}
::placeholder { color: var(--placeholder); }

.hint { margin: 6px 0 0; font-size: 0.9375rem; color: var(--muted); }
.field-error { margin: 6px 0 0; font-size: 0.9375rem; font-weight: 600; color: var(--error); }

.grid-2 { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
/* Option boxes: room around the tick box and the text, same look in both themes */
.choice {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 12px 18px 12px 16px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; font-weight: 400; line-height: 1.5;
  transition: border-color .15s ease, background-color .15s ease;
}
.choice:hover { border-color: var(--accent); }
.choice-row .choice { flex: 1 1 150px; }
.choice input {
  -webkit-appearance: none; appearance: none; flex: none;
  display: grid; place-content: center;
  width: 22px; height: 22px; margin: 0;
  border: 2px solid var(--border-strong); border-radius: 6px; background: var(--surface);
  cursor: pointer; transition: background-color .15s ease, border-color .15s ease;
}
.choice input[type="radio"] { border-radius: 50%; }
.choice input:checked { border-color: var(--accent); background: var(--accent); }
.choice input[type="checkbox"]::before {
  content: ""; width: 6px; height: 11px; margin-top: -3px;
  border: solid var(--on-accent); border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0); transition: transform .12s ease;
}
.choice input[type="checkbox"]:checked::before { transform: rotate(45deg) scale(1); }
.choice input[type="radio"]::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--on-accent); transform: scale(0); transition: transform .12s ease;
}
.choice input[type="radio"]:checked::before { transform: scale(1); }
.choice input:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.choice input[aria-invalid="true"] { border-color: var(--error); background-color: var(--surface); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice-top { align-items: flex-start; padding: 16px 20px 16px 16px; }
.choice-top input { margin-top: 2px; }
.consent .choice { display: flex; }

/* File picker */
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 22px 16px; text-align: center; cursor: pointer;
  border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--bg-soft);
  font-weight: 400;
}
.file-drop:hover, .file-drop.dragover { border-color: var(--accent); background: var(--accent-soft); }
.field:has(.file-input:focus-visible) .file-drop { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.file-drop .icon { width: 32px; height: 32px; color: var(--accent); }
.file-drop-btn {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 18px;
  border: 1px solid var(--accent); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--accent); font-weight: 600;
}
.file-drop .hint { margin: 0; }
.file-list { list-style: none; margin: 10px 0 0; padding: 0; font-size: 0.9375rem; }
.file-list li { padding: 6px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.file-list li:last-child { border-bottom: 0; }

.form-status { margin-top: 16px; padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--border); }
.form-status.success { background: var(--success-soft); border-color: var(--success-line); color: var(--success); }
.form-status.error { background: var(--error-soft); border-color: var(--error-line); color: var(--error); }

/* Estimate box */
.estimate {
  margin: 8px 0 0; padding: 18px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.estimate p { margin: 0; }
.estimate-label { font-weight: 600; color: var(--accent); }
.estimate-value { font-size: 2rem; font-weight: 700; line-height: 1.3; color: var(--accent); font-variant-numeric: tabular-nums; }
.estimate-note { font-size: 0.875rem; color: var(--muted); }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 20px 0 0; padding: 0; counter-reset: step; }
.steps li {
  position: relative; counter-increment: step;
  padding: 0 0 22px 60px; min-height: 64px;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--accent); font-weight: 700; font-size: 1.125rem;
  border: 3px solid var(--accent-line); box-shadow: 0 2px 6px rgba(16, 24, 40, 0.12);
}
.steps li:last-child::before { content: "✓"; background: var(--accent); color: var(--on-accent); border-color: var(--accent-line); }
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 21px; top: 46px; bottom: 4px;
  width: 2px; background: var(--border);
}
.steps p { margin: 0; color: var(--muted); }

/* ---------- FAQ accordion ---------- */
.accordion { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius); }
.faq-group { margin: 28px 0 0; color: var(--accent); }
.accordion details + details { border-top: 1px solid var(--border); }
.accordion summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 12px 16px; cursor: pointer; list-style: none;
  font-weight: 600;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s ease;
}
.accordion details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.accordion details[open] summary { color: var(--accent); }
.accordion details p { margin: 0; padding: 0 16px 16px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.contact-item {
  display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); text-decoration: none;
}
a.contact-item:hover { border-color: var(--accent); }
.contact-label { display: block; font-size: 0.875rem; color: var(--muted); }
.contact-value { display: block; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Privacy ---------- */
.prose h2 { margin-top: 1.4em; }
.prose p { color: var(--text-soft); }
.prose a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }
.doc-body h2 { margin-top: 1.6em; }
.prose ul.terms-list { margin: 0 0 1em; padding-left: 1.4em; }
.prose ul.terms-list li { margin: 0 0 0.4em; color: var(--text-soft); }
.terms-closing { font-weight: 600; }
.doc-toc {
  margin: 16px 0 8px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-soft);
}
.doc-toc summary {
  display: flex; align-items: center; min-height: var(--tap); padding: 0 16px;
  cursor: pointer; font-weight: 600; color: var(--accent);
}
.doc-toc ol { list-style: none; margin: 0; padding: 0 8px 10px; }
.doc-toc button {
  display: block; width: 100%; min-height: var(--tap); padding: 8px 10px;
  border: 0; border-radius: var(--radius-sm); background: none; cursor: pointer;
  font: inherit; font-size: 0.9375rem; line-height: 1.4; text-align: left; color: var(--text);
}
.doc-toc button:hover { background: var(--surface); color: var(--accent); }
.doc-toc button[aria-current="true"] { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent-bright); }
.modal-body .doc-layout { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 24px; background: var(--footer-bg); color: #b8c3d4;
  border-top: 4px solid var(--accent-bright); font-size: 0.9375rem;
}
.footer-inner, .footer-bottom { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.footer-inner { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 24px; }
.site-footer p { margin: 0; }
.footer-name { margin-bottom: 12px !important; }
.footer-logo { display: block; width: auto; height: 76px; max-width: 100%; }   /* no tagline under it (owner 2026-11-18): logo larger */
.footer-title { margin: 0 0 6px; font-size: 1rem; color: #fff; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-link {
  display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); padding: 0;
  border: 0; background: none; cursor: pointer; text-align: left;
  font: inherit; color: #d5dde9; text-decoration: none; overflow-wrap: anywhere;
}
.footer-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-hours { padding-top: 4px; color: #8f9bb0; font-size: 0.875rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px;
  width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--maxw) - 2 * var(--gutter));
  padding: 8px 0 20px; border-top: 1px solid #22324b;
  font-size: 0.875rem; color: #8f9bb0;
}
.footer-bottom .footer-link { font-size: 0.875rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 0 20px; }
/* DBD Registered trustmark (code from DBD, unchanged): a white plate so the badge reads on the dark footer */
.dbd-badge { margin-top: 16px; }
.dbd-badge a { display: inline-flex; padding: 6px 10px; background: #fff; border-radius: 10px; }
.dbd-badge img { display: block; width: auto; height: 48px; max-width: 100%; }
/* DBD picture failed to load on this device: hide the empty plate, show our text link to the same page */
.dbd-badge.is-broken > a:not(.dbd-fallback) { display: none; }
.dbd-badge a.dbd-fallback { background: transparent; }
.dbd-fallback { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 6px 14px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 10px; color: #ffffff; font-weight: 600; text-decoration: none; }
.dbd-fallback::before { content: "✓"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #ffffff; color: #01417b; font-size: 0.75rem; }
.dbd-badge a.dbd-fallback:hover { border-color: #ffffff; }
.site-footer :focus-visible { outline-color: rgba(255, 255, 255, 0.7); }
@media (min-width: 640px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
  .footer-logo { height: 92px; }
}

.noscript { margin: 16px; padding: 12px; background: var(--error-soft); color: var(--error); border-radius: var(--radius); }

@media (min-width: 480px) and (max-width: 1023px) {
  :root { --gutter: 24px; }
}

/* ==========================================================================
   Tablet (≥640px) and PC (≥1024px)
   ========================================================================== */
@media (min-width: 640px) {
  .lead { max-width: 62ch; }
  .contact-list { grid-template-columns: repeat(3, 1fr); }
  .contact-item { flex-direction: column; align-items: flex-start; }
  #contact .btn-block { width: auto; }
  #track-form { max-width: 560px; }
  .steps { max-width: 640px; }
}

/* Calculator: inputs left, live estimate right */
@media (min-width: 900px) {
  #calc-form {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px;
    column-gap: 32px; align-items: start;
  }
  #calc-form > * { grid-column: 1; }
  #calc-form > .estimate {
    grid-column: 2; grid-row: 1 / span 6;
    position: sticky; top: calc(var(--header-h) + 24px); margin: 0;
  }
}

/* Side card next to the job form — PC only */
.side-card { display: none; }
.side-links { list-style: none; margin: 12px 0 0; padding: 0; }
.mini-steps { list-style: none; margin: 12px 0 16px; padding: 0; counter-reset: ms; }
.mini-steps li { position: relative; counter-increment: ms; padding: 6px 0 6px 38px; font-weight: 600; }
.mini-steps li::before {
  content: counter(ms); position: absolute; left: 0; top: 5px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--accent-line); color: var(--accent); font-size: 0.875rem;
}

/* PC: menu in the header, content full width */
@media (min-width: 1024px) {
  #submit { display: grid; grid-template-columns: minmax(0, 760px) 300px; column-gap: 48px; align-items: start; }
  #submit > * { grid-column: 1; }
  #faq { display: grid; grid-template-columns: minmax(0, 760px) 300px; column-gap: 48px; align-items: start; }
  #faq > * { grid-column: 1; }
  #submit > .side-card { grid-row: 1 / span 6; }
  #faq > .side-card { grid-row: 2 / span 12; }
  #faq > .actions { display: none; }   /* the side card carries the terms link on PC */
  #faq > .side-card,
  #submit > .side-card {
    display: block; grid-column: 2;
    position: sticky; top: calc(var(--header-h) + 24px);
    padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-soft);
  }
  :root { --gutter: 32px; }
  .header-bar, .footer-inner { max-width: var(--maxw-wide); }
  .footer-bottom { max-width: calc(var(--maxw-wide) - 2 * var(--gutter)); }
  .panel { max-width: var(--maxw-wide); padding: 32px var(--gutter) 56px; }
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero { margin-top: 0; padding: 56px 48px; }
  .steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; max-width: none; text-align: center; }
  .steps li { padding: 64px 0 0; min-height: 0; }
  .steps li::before { left: 50%; transform: translateX(-50%); width: 52px; height: 52px; }
  .steps li:not(:last-child)::after { left: calc(50% + 30px); right: calc(-50% + 14px); top: 25px; bottom: auto; width: auto; height: 2px; }
  #job-form { max-width: 760px; }
  .prose { max-width: 72ch; }
  /* Terms, privacy: contents in the left margin (sticky), text at reading width */
  .prose.has-toc { max-width: var(--maxw-wide); }
  .doc-layout { display: grid; grid-template-columns: 260px minmax(0, 74ch); column-gap: 56px; align-items: start; }
  .doc-toc {
    position: sticky; top: calc(var(--header-h) + 24px); margin-top: 20px;
    max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; overscroll-behavior: contain;
  }
  .doc-toc summary { display: none; }
  .doc-toc ol { padding-top: 10px; }
  .table-wrap, .price-extra, .accordion { max-width: 760px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Phase 2: calculator details, file list, notices ---------- */
.estimate .estimate-breakdown { margin-top: 4px; font-size: 0.9375rem; color: var(--text); font-variant-numeric: tabular-nums; }
.estimate .estimate-breakdown:empty { display: none; }
.estimate .estimate-note { margin-top: 8px; }
.estimate-value.is-empty { font-size: 1.0625rem; font-weight: 600; color: var(--muted); }

.notice {
  margin: 12px 0 0; padding: 14px 18px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent); font-size: 0.9375rem;
}

.file-list li.file-item {
  display: flex; align-items: center; gap: 10px; padding: 4px 0;
}
.file-item .file-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.file-item .file-size { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.file-item.is-bad .file-name { color: var(--error); font-weight: 600; }
.file-remove {
  flex: none; min-width: var(--tap); min-height: var(--tap); padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--muted); font: inherit; font-size: 0.9375rem; cursor: pointer;
}
.file-remove:hover { border-color: var(--error); color: var(--error); }
.file-remove:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.field.has-error .file-drop { border-color: var(--error); background: var(--error-soft); }
.field-error .err-line { display: block; }
.consent.has-error .choice { border-color: var(--error); background: var(--error-soft); }

/* ---------- My account ---------- */
.notice-soft { background: var(--bg-soft); border-color: var(--border); color: var(--text); }
.btn-danger { background: var(--error); color: var(--on-accent); }
.btn-danger:hover { background: #8f1c13; }
.btn-link.danger { color: var(--error); }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn-link[disabled] { color: var(--muted); text-decoration: none; cursor: default; }

.acct-signin { display: grid; gap: 8px 48px; }
.benefits { list-style: none; margin: 0 0 12px; padding: 0; }
.benefits li { position: relative; padding: 6px 0 6px 32px; }
.benefits li::before {
  content: "✓"; position: absolute; left: 0; top: 7px;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-bright); font-size: 0.8125rem; font-weight: 700;
}
.acct-box { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-soft); }
.acct-box .form { margin-top: 0; }
.acct-box .notice { margin-top: 0; }
.code-input { font-size: 1.5rem !important; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }
.acct-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin-top: 12px; }

.acct-grid { display: grid; gap: 16px; margin-top: 16px; }
.acct-card { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); min-width: 0; }
.acct-card .form { margin-top: 8px; }
.acct-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* Sign-in security card: optional password + backup email */
.sec-block { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-head h3 { margin: 0; }
.sec-current { margin: 8px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.sec-help { margin-top: 18px; }
/* Password field with a show/hide eye */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-toggle {
  position: absolute; top: 0; right: 0; width: 48px; height: 100%; min-height: 44px;
  display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.pw-toggle svg { width: 22px; height: 22px; }
.pw-toggle[aria-pressed="true"] { color: var(--accent); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.acct-mode { justify-content: center; margin-top: 4px; }
.acct-card-head h2 { margin: 0; }
.confirm-box { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--error-line); border-radius: var(--radius); background: var(--error-soft); }
.confirm-box p { margin: 0; }

.job-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.job-empty { padding: 16px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); }
.job-item { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.job-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.job-no { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.job-meta, .job-dates { margin: 4px 0 0; font-size: 0.9375rem; color: var(--muted); }
.status-chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 0.875rem; font-weight: 600; background: var(--bg-soft); color: var(--text);
}
.status-received   { background: var(--st-received); color: var(--st-received-text); }
.status-quoted     { background: var(--st-quoted); color: var(--st-quoted-text); }
.status-paid       { background: var(--st-paid); color: var(--st-paid-text); }
.status-inProgress { background: var(--st-progress); color: var(--st-progress-text); }
.status-review     { background: var(--st-review); color: var(--st-review-text); }
.status-delivered  { background: var(--st-delivered); color: var(--st-delivered-text); }
.status-cancelled  { background: var(--st-cancelled); color: var(--st-cancelled-text); }

@media (min-width: 1024px) {
  .acct-signin { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
  .acct-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
  .acct-grid .acct-jobs { grid-row: span 2; }
}

/* ---------- Civil registration documents (special rate, ID required) ---------- */
.badge {
  display: inline-block; margin: 0 0 6px; padding: 1px 10px; border-radius: 999px;
  background: var(--badge-bg); color: var(--badge-text); font-size: 0.8125rem; font-weight: 700;
}
.badge-inline { margin: 0; vertical-align: 2px; }
.notice-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-text); }
.notice-warn p { margin: 0; }
.notice-warn p + p { margin-top: 8px; }
.card-featured { text-align: left; border-color: var(--accent-line); background: var(--surface); }
.card-featured .icon-circle { margin: 0 0 12px; }
.card-featured .card-note { margin-top: 10px; font-size: 0.9375rem; color: var(--warn-text); }
.doc-list { margin-top: 12px; }
.doc-list summary {
  display: inline-flex; align-items: center; min-height: var(--tap); cursor: pointer;
  color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.doc-list ul { margin: 8px 0 0; padding-left: 1.2em; color: var(--text); columns: 1; column-gap: 32px; }
.doc-list li { break-inside: avoid; padding: 2px 0; }
#id-section .notice-warn { margin: 0 0 16px; }
@media (min-width: 600px) {
  .card-featured { grid-column: 1 / -1; display: flex; gap: 20px; align-items: flex-start; }
  .card-featured .icon-circle { flex: none; }
  .doc-list ul { columns: 2; }
}
@media (min-width: 1024px) { .doc-list ul { columns: 3; } }
.consent > label.choice { display: flex; }

/* ---------- Pop-up (privacy policy while filling in the job form) ---------- */
html.modal-open, html.modal-open body { overflow: hidden; }
.modal {
  width: min(720px, calc(100vw - 32px)); max-height: min(85vh, 860px);
  margin: auto; padding: 0; border: 0; border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop);
}
.modal[open] { display: flex; flex-direction: column; }
.modal::backdrop { background: rgba(10, 24, 48, 0.55); }
/* Open and close with a short fade (owner 2026-11-30); app.js closeDialog adds .is-closing for 0.2 s */
.modal[open] { animation: modal-in .24s cubic-bezier(.2, .8, .2, 1); }
.modal[open]::backdrop { animation: backdrop-in .24s ease-out; }
.modal.is-closing { animation: modal-out .2s ease-in forwards; pointer-events: none; }
.modal.is-closing::backdrop { animation: backdrop-out .2s ease-in forwards; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes backdrop-in { from { opacity: 0; } }
@keyframes backdrop-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .modal[open], .modal[open]::backdrop, .modal.is-closing, .modal.is-closing::backdrop { animation: none; }
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; }
.modal-close {
  display: grid; place-items: center; flex: none; width: var(--tap); height: var(--tap);
  border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer;
}
.modal-close svg { width: 22px; height: 22px; }
.modal-close:hover { border-color: var(--accent); color: var(--accent); }
.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px; }
.modal-body h2:first-of-type { margin-top: 1em; }
.modal-foot { padding: 12px 20px 16px; border-top: 1px solid var(--border); }
@media (max-width: 479px) {
  .modal { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .modal-body { padding: 12px 16px; }
  .modal-foot { padding: 12px 16px; }
}

/* ==========================================================================
   Home page: hero with instant estimate, offers, popular documents, steps,
   news, FAQ teaser, closing call to action
   ========================================================================== */
.hero-trust { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; color: #e4ecf8; font-size: 0.9375rem; }
.hero-trust svg { width: 18px; height: 18px; flex: none; color: #8fc3ea; }

.quick-quote {
  margin-top: 28px; padding: 20px; border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}
.hero .quick-quote :focus-visible { outline-color: var(--accent-ring); }
.quick-quote h2 { color: var(--accent); margin-bottom: 12px; }
.quick-quote .field { margin-bottom: 12px; }
.grid-qq { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 0 12px; }
/* a label that wraps ("Number of pages" in English on a phone) must not push its box lower: labels sit on the box */
.grid-qq .field { display: flex; flex-direction: column; justify-content: flex-end; }
.qq-result { margin: 4px 0 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft); min-height: 64px; }
.qq-empty { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.qq-prices { margin: 0; display: grid; gap: 6px; }
.qq-prices div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.qq-prices dt { font-size: 0.9375rem; color: var(--muted); }
.qq-prices dd { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qq-civil { margin: 8px 0 0; font-size: 0.875rem; color: var(--warn-text); }
.qq-note { margin: 8px 0 0; font-size: 0.8125rem; color: var(--muted); text-align: center; }
#q-pages[aria-invalid="true"] { border-color: var(--error); background-color: var(--error-soft); }

.home-block { margin-top: 48px; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.block-title { margin: 0 0 4px; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); }
.block-title::after {
  content: ""; display: block; width: 40px; height: 3px; margin-top: 8px;
  border-radius: 2px; background: var(--accent-bright);
}
.block-lead { margin: 4px 0 0; color: var(--muted); }

/* Offers: swipe on phone, grid on tablet/PC */
.promo-list {
  list-style: none; margin: 16px calc(var(--gutter) * -1) 0; padding: 4px var(--gutter) 12px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); overscroll-behavior-x: contain;
}
.promo-card {
  scroll-snap-align: start; display: flex; flex-direction: column;
  padding: 20px; border: 1px solid var(--accent-line); border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--promo-tint) 0%, var(--surface) 60%);
}
.promo-card h3 { margin: 0 0 6px; font-size: 1.125rem; color: var(--accent); }
.promo-text {
  margin: 0; color: var(--muted); font-size: 0.9875rem; white-space: pre-line; overflow-wrap: anywhere;
  /* Long offers: first 6 lines on the card, the rest in the pop-up ("Read more") */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden;
}
.promo-read { align-self: flex-start; margin-top: 6px; }
.promo-foot { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.promo-until { font-size: 0.875rem; color: var(--muted); }
@media (min-width: 640px) {
  .promo-list { margin: 16px 0 0; padding: 0; grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
}
@media (min-width: 1024px) { .promo-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Popular documents */
.doc-chips { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.doc-chip {
  display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center;
  min-height: 56px; padding: 6px 16px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); cursor: pointer; font: inherit; text-align: left;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.doc-chip:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.doc-chip-name { font-weight: 600; color: var(--text); }
.doc-chip-price { font-size: 0.8125rem; color: var(--muted); }
.doc-chip.is-special { border-color: var(--warn-line); background: var(--special-bg); }
.doc-chip.is-special .doc-chip-price { color: var(--badge-text); font-weight: 600; }

/* Steps, compact */
.mini-flow { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: mf; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.mini-flow li {
  counter-increment: mf; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius); background: var(--bg-soft); font-weight: 600;
}
.mini-flow li::before {
  content: counter(mf); flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 0.9375rem;
}
.mini-flow li:last-child::before { content: "✓"; background: var(--accent-bright); }

.home-block .accordion { max-width: none; }

/* Closing call to action */
.cta-band {
  margin-top: 56px; padding: 28px 24px; border-radius: 20px;
  background: var(--hero-grad); color: #fff;
}
.cta-band h2 { margin: 0 0 6px; color: #fff; font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.625rem); }
.cta-band p { margin: 0; color: #d5e1f3; }
.cta-band .actions { margin-top: 20px; gap: 12px; }
.cta-band .btn-primary { background: #fff; color: #01417b; }
.cta-band .btn-primary:hover { background: #e4eef9; }
.cta-band :focus-visible { outline-color: rgba(255, 255, 255, 0.8); }
@media (max-width: 479px) { .cta-band .actions .btn { width: 100%; } }

@media (min-width: 1024px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 48px; align-items: center; }
  .hero .quick-quote { margin-top: 0; }
  .cta-band { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 36px 48px; }
  .cta-band .actions { margin-top: 0; flex: none; }
}
.promo-card .badge { align-self: flex-start; }

/* FAQ side card: contact details + document links */
.side-contact { list-style: none; margin: 12px 0 0; padding: 0; }
.side-contact li { display: flex; }
.side-contact a, .side-hours {
  display: flex; align-items: center; gap: 10px; min-height: var(--tap); min-width: 0;
  color: var(--text); font-weight: 600; text-decoration: none; overflow-wrap: anywhere;
}
.side-contact a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.side-hours { font-weight: 400; color: var(--muted); font-size: 0.9375rem; }
.side-contact .icon { width: 20px; height: 20px; flex: none; color: var(--accent-bright); }
.side-links { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.side-links .btn-link { text-align: left; font-weight: 600; }
.side-contact a[data-contact="email"] { font-size: 0.9375rem; overflow-wrap: normal; word-break: normal; }
.side-contact a[data-contact="email"] span { min-width: 0; }

/* ---------- News & announcements: square posts ---------- */
.post-grid { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1280px) { .post-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.post-card {
  display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
  cursor: pointer; font: inherit; text-align: left; color: var(--text);
  transition: box-shadow .2s ease, transform .2s ease;
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.post-media { position: relative; aspect-ratio: 1 / 1; width: 100%; overflow: hidden; background: var(--bg-soft); }
.post-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-card-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.post-date { font-size: 0.8125rem; font-weight: 600; color: var(--accent-bright); }
.post-title {
  font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Cover used when a post has no picture */
.post-cover {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  padding: 8%; color: #fff; background: var(--hero-grad);
}
.post-cover.tone-1 { background: linear-gradient(150deg, #0a6fa8 0%, #01417b 70%); }
.post-cover.tone-2 { background: linear-gradient(150deg, #01417b 0%, #0a1830 100%); }
.post-cover-icon { position: absolute; top: 8%; left: 8%; width: 22%; height: auto; color: #8fc3ea; }
.post-cover-title {
  font-weight: 700; line-height: 1.35; font-size: clamp(0.9375rem, 0.75rem + 1vw, 1.25rem);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.post-cover-brand { font-size: 0.75rem; letter-spacing: 0.08em; color: #b9d3ef; text-transform: uppercase; }

/* Post pop-up: one window, picture + text like a social post */
.modal-post { width: min(560px, calc(100vw - 32px)); }
.post-by { display: flex; align-items: center; gap: 10px; min-width: 0; }
.post-by-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.post-by-name { margin: 0; font-weight: 700; line-height: 1.3; }
.post-dialog-date { margin: 0; font-size: 0.875rem; font-weight: 400; color: var(--muted); }
.post-dialog-body { padding: 0; }
.post-dialog-media { margin: 0; overflow: hidden; background: var(--bg-soft); }
.post-dialog-media img { display: block; width: 100%; height: auto; }
.post-dialog-media .post-cover-title { font-size: clamp(1.25rem, 1rem + 1.5vw, 1.75rem); -webkit-line-clamp: 5; }
.post-dialog-copy { padding: 16px 20px 8px; }
#post-dialog-title { margin: 0 0 10px; font-size: 1.375rem; line-height: 1.35; }
.post-dialog-text p { margin: 0 0 0.8em; color: var(--text-soft); line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .post-card:hover { transform: none; } }
@media (min-width: 768px) {
  .modal-post.has-media { width: min(980px, calc(100vw - 48px)); }
  .modal-post.has-media .post-dialog-body {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start;
  }
  /* the picture fills the left side; the text scrolls beside it */
  .modal-post.has-media .post-dialog-media { position: sticky; top: 0; align-self: stretch; display: flex; align-items: center; }
  .modal-post.has-media .post-dialog-copy { padding: 22px 26px 12px; }
}

/* Email addresses: wrap only at the <wbr> after "@" */
[data-contact-text="email"] { overflow-wrap: normal; word-break: normal; }

/* Page switch: the new page fades in and rises slightly */
.panel-enter { animation: panel-in .28s cubic-bezier(.2, .7, .2, 1) backwards; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .panel-enter { animation: none; } }

/* ---------- Theme switch ---------- */
/* Header button (tablet/PC): icon shows the current choice; click cycles Auto → Light → Dark */
.theme-btn {
  display: none; place-items: center; flex: none; width: var(--tap); height: var(--tap); padding: 0;
  border: 1px solid var(--border); border-radius: 50%; background: var(--surface);
  color: var(--accent); cursor: pointer;
}
.theme-btn:hover { border-color: var(--accent); }
.theme-btn svg { width: 22px; height: 22px; }
@media (min-width: 640px) { .theme-btn { display: inline-grid; } }
.theme-btn .i-light, .theme-btn .i-dark { display: none; }
:root[data-theme-pref="light"] .theme-btn .i-auto, :root[data-theme-pref="dark"] .theme-btn .i-auto { display: none; }
:root[data-theme-pref="light"] .theme-btn .i-light { display: inline; }
:root[data-theme-pref="dark"] .theme-btn .i-dark { display: inline; }

/* Phone/tablet menu: Auto · Light · Dark */
.nav-theme { padding: 12px 4px 4px; }
.nav-theme-label { display: block; margin-bottom: 8px; font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.theme-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--border); }
.theme-seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap);
  border: 0; border-radius: 9px; background: transparent; color: var(--text); cursor: pointer;
  font: inherit; font-size: 0.9375rem;
}
.theme-seg button svg { width: 18px; height: 18px; flex: none; }
.theme-seg button[aria-pressed="true"] { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: var(--shadow-sm); }

/* Logo: navy on light, white on dark */
.logo-on-dark { display: none; }
:root[data-theme="dark"] .logo-on-light { display: none; }
:root[data-theme="dark"] .logo-on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo-on-light { display: none; }
  :root:not([data-theme]) .logo-on-dark { display: block; }
}

/* Dark: lift cards a little off the page, keep the hero/footer edges visible */
:root[data-theme="dark"] .hero, :root[data-theme="dark"] .cta-band { box-shadow: inset 0 0 0 1px rgba(108, 180, 236, 0.18); }
:root[data-theme="dark"] .site-footer { border-top-color: #1f5f93; }
:root[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.85); }

/* Content boxes sit on the card surface, not the patterned page */
.table-wrap, .accordion, .contact-item, .doc-toc { background: var(--surface); }

/* ---------- Theme change effect ----------
   Circle reveal (js/app.js revealTheme, View Transitions): turn off the default cross-fade
   so only the circle animates. Fallback / device switch: colours fade for 0.45s. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease,
              box-shadow .45s ease, fill .45s ease, stroke .45s ease !important;
}

/* ---------- Sending a job (js/submit.js) ---------- */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.submit-progress { display: block; width: 100%; height: 8px; margin-top: 10px; accent-color: var(--accent); }
.submit-done {
  max-width: 640px; margin: 24px 0 0; padding: 32px 24px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg);
}
.submit-done:focus { outline: none; }
.submit-done-icon { display: inline-block; width: 64px; height: 64px; color: var(--success); }
.submit-done-icon svg { width: 100%; height: 100%; }
.submit-done h2 { margin: 8px 0 4px; }
.submit-done-label { margin: 12px 0 0; color: var(--muted); }
.submit-done-no { margin: 0; font-size: 2rem; font-weight: 700; letter-spacing: 0.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.submit-done-text { margin: 12px auto 0; max-width: 46ch; color: var(--text-soft); }
.submit-done .actions { justify-content: center; }
#job-form.is-sending { opacity: .6; pointer-events: none; }

/* ---------- Track a job (Phase 4, js/track.js) ---------- */
.track-card {
  margin-top: 20px; padding: 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.track-card:focus { outline: none; }
.track-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.track-label { margin: 0; font-size: 0.875rem; color: var(--muted); }
.track-no { margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.3; letter-spacing: 0.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.track-card .job-meta { margin-top: 2px; }

/* Steps: a vertical list on phone, a row on tablet/PC */
.track-steps { list-style: none; margin: 20px 0 0; padding: 0; display: grid; }
.track-steps li { position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.track-steps li:last-child { padding-bottom: 0; }
.track-steps li::before {            /* line to the next step */
  content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px;
  border-radius: 2px; background: var(--border);
}
.track-steps li:last-child::before { display: none; }
.track-steps li.done::before { background: var(--success); }
.track-dot {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--border-strong); background: var(--surface);
}
.done .track-dot { background: var(--success); border-color: var(--success); }
.done .track-dot::after {
  content: ""; width: 5px; height: 10px; margin-top: -2px;
  border: solid var(--surface); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.current:not(.done) .track-dot { background: var(--accent-bright); border-color: var(--accent-bright); box-shadow: 0 0 0 4px var(--accent-ring); }
.current:not(.done) .track-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); }
.track-step { display: flex; flex-direction: column; padding-top: 1px; min-width: 0; }
.track-step-name { overflow-wrap: anywhere; }
.current .track-step-name { font-weight: 700; }
.todo .track-step-name { color: var(--muted); }
.track-step-date { font-size: 0.875rem; color: var(--muted); }

.track-next { margin: 18px 0 0; padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft); color: var(--text); }
.track-next.is-cancelled { background: var(--bg-soft); color: var(--muted); }
.track-confirmed { margin: 8px 0 0; color: var(--success); font-weight: 600; }
.track-dates { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 16px 0 0; }
.track-dates dt { font-size: 0.875rem; color: var(--muted); }
.track-dates dd { margin: 0; font-weight: 600; }
.track-help { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: 0.9375rem; color: var(--muted); }

@media (min-width: 640px) {
  .track-card { max-width: 560px; padding: 24px; }
  .track-steps { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .track-steps li { flex-direction: column; align-items: center; gap: 8px; padding: 0 2px; text-align: center; }
  .track-steps li::before { left: calc(50% + 16px); right: calc(-50% + 16px); top: 11px; bottom: auto; width: auto; height: 2px; }
  .track-step { align-items: center; padding-top: 0; font-size: 0.9375rem; }
}

/* ---------- Phase 5: role dashboards (js/portal.js) ---------- */
.dash { display: grid; gap: 16px; margin-top: 8px; }
.dash-side {
  display: grid; gap: 12px; padding: 14px; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.dash-me { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dash-avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 1.125rem;
}
.dash-me-text { min-width: 0; }
.dash-name { margin: 0; font-weight: 700; overflow-wrap: anywhere; line-height: 1.35; }
.dash-role { margin: 0; font-size: 0.875rem; color: var(--muted); }
/* Menu (owner 2026-12-02): groups fold like the header menu — one open at a time, the current page's group opens
   by itself. Group = bold row with an icon and a chevron; its pages sit indented under a guide line, in lighter text.
   phone/tablet: groups are chips that wrap; the open group's pages show in a tinted box under them */
.dash-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-group { display: contents; }
.dash-ico { flex: none; display: inline-grid; width: 20px; height: 20px; }
.dash-ico svg, .dash-chev svg { width: 100%; height: 100%; display: block; }
.dash-chev { flex: none; display: inline-grid; width: 16px; height: 16px; transition: transform .2s ease; }
.dash-group-btn[aria-expanded="true"] .dash-chev { transform: rotate(180deg); }
.dash-group-btn, .dash-top {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 14px; white-space: nowrap;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
  font: inherit; font-size: 0.9375rem; font-weight: 600; cursor: pointer; text-align: left;
}
.dash-group-btn:hover, .dash-top:hover { border-color: var(--accent); color: var(--accent); }
.dash-group-btn[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.dash-group.has-current > .dash-group-btn { color: var(--accent); border-color: var(--accent); }
.dash-top[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.dash-sub {
  order: 1; flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 6px; list-style: none;
  margin: 4px 0 0; padding: 10px; background: var(--bg-soft); border-radius: var(--radius);
}
.dash-sub[hidden] { display: none; }
.dash-sub li { display: block; }
.dash-link {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 14px; white-space: nowrap;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
  font: inherit; font-size: 0.9375rem; cursor: pointer;
}
.dash-sub .dash-link:hover { border-color: var(--accent); color: var(--accent); }
.dash-sub .dash-link[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.dash-link:focus-visible, .dash-group-btn:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.dash-logout { color: var(--muted); font-weight: 400; }
.dash-main { min-width: 0; scroll-margin-top: 80px; }
.dash-main > .notice { margin: 0 0 12px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; }
.dash-head h2 { margin: 0; }
.dash-card {
  padding: 18px; margin-bottom: 14px; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.dash-card-title { margin: 0 0 10px; }
.dash-card > .note:first-child { margin-top: 0; }
.dash-card .actions { margin-top: 14px; }
.dash-settings .acct-card { margin-bottom: 14px; }

.dash-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.dash-stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); font: inherit;
}
button.dash-stat { cursor: pointer; }
button.dash-stat:hover { border-color: var(--accent); }
button.dash-stat:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.dash-stat-n { font-size: 1.75rem; font-weight: 700; line-height: 1.2; color: var(--accent); font-variant-numeric: tabular-nums; }
.dash-stat-label { font-size: 0.9375rem; color: var(--muted); }
.dash-stat.tone-warn .dash-stat-n { color: var(--st-quoted-text); }
.dash-stat.tone-bad .dash-stat-n { color: var(--error); }
.dash-stat.tone-ok .dash-stat-n { color: var(--success); }

.dash-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
.dash-tab {
  flex: none; min-height: var(--tap); padding: 0 16px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer; white-space: nowrap;
}
.dash-tab[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.job-item-btn {
  display: block; width: 100%; text-align: left; cursor: pointer; font: inherit; color: var(--text);
  background: var(--surface); transition: border-color .15s ease, background-color .15s ease;
}
.job-item-btn:hover { border-color: var(--accent); background: var(--bg-soft); }
.job-item-btn:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.job-item-btn .job-top, .job-item-btn .job-meta, .job-item-btn .job-dates { display: flex; }
.job-item-btn .job-meta, .job-item-btn .job-dates { margin-top: 4px; font-size: 0.9375rem; color: var(--muted); }
.job-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.flag {
  display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600;
  background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border); overflow-wrap: anywhere;
}
.flag-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-text); }
.flag-bad { background: var(--error-soft); border-color: var(--error-line); color: var(--error); }
.flag-ok { background: var(--success-soft); border-color: var(--success-line); color: var(--success); }

.dash-dl { display: grid; gap: 10px 20px; margin: 14px 0 0; }
.dash-dl div { min-width: 0; }
.dash-dl dt { font-size: 0.875rem; color: var(--muted); }
.dash-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; white-space: pre-line; }
.dash-dl a { color: var(--accent); }
.dash-steps { margin-top: 16px; }

.dash-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dash-files li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.dash-files li.muted { border-style: dashed; }
.dash-file-name { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.dash-file-size { color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.dash-upload { margin-top: 12px; }
.dash-upload .file-drop { padding: 16px; }
.dash-card textarea { margin-top: 4px; }
.dash-log {
  margin: 14px 0 0; padding: 12px 14px; max-height: 240px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); font: inherit; font-size: 0.875rem; color: var(--text-soft);
}
.dash-inline-status { margin-top: 10px; }

.dash-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dash-bar-row {
  display: grid; grid-template-columns: minmax(96px, 150px) minmax(0, 1fr) 40px; align-items: center; gap: 10px;
  width: 100%; padding: 4px 0; background: none; border: 0; color: var(--text); font: inherit; text-align: left;
}
button.dash-bar-row { cursor: pointer; border-radius: var(--radius-sm); }
button.dash-bar-row:hover .dash-bar { background: var(--accent-line); }
.dash-bar-row .status-chip { justify-self: start; white-space: nowrap; }
.dash-bar-label { font-size: 0.9375rem; color: var(--muted); }
.dash-bar { height: 10px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.dash-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent-bright); min-width: 2px; }
.dash-bar-fill.status-received { background: var(--st-received-text); }
.dash-bar-fill.status-quoted { background: var(--st-quoted-text); }
.dash-bar-fill.status-paid { background: var(--st-paid-text); }
.dash-bar-fill.status-inProgress { background: var(--st-progress-text); }
.dash-bar-fill.status-review { background: var(--st-review-text); }
.dash-bar-fill.status-delivered { background: var(--st-delivered-text); }
.dash-bar-fill.status-cancelled { background: var(--st-cancelled-text); }
.dash-bar-n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.dash-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dash-toolbar input { flex: 1 1 220px; width: auto; }
.dash-toolbar select { flex: 0 1 220px; width: auto; }
.dash-card > input[type="search"] { margin-bottom: 4px; }

.dash-users { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.dash-user { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.dash-user-who { display: flex; flex-direction: column; min-width: 0; }
.dash-user-name { font-weight: 700; overflow-wrap: anywhere; }
.dash-user-meta { font-size: 0.875rem; color: var(--muted); overflow-wrap: anywhere; }
.dash-email-change { margin-top: 4px; }
.dash-email-change summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; list-style: none; font-size: 0.9375rem; }
.dash-email-change summary::-webkit-details-marker { display: none; }
.dash-email-change[open] summary { font-weight: 600; }
.dash-email-change .note { margin: 0 0 8px; }
.dash-email-change input { flex: 1 1 200px; min-width: 0; }
/* Customer overview: suggest a password / backup email */
.dash-nudge { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; border-color: var(--accent-line); background: var(--promo-tint); }
.dash-nudge-text { margin: 0; flex: 1 1 260px; }
.dash-user-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dash-user-ctl select { width: auto; flex: 1 1 150px; min-height: var(--tap); }
.dash-saved { font-size: 0.875rem; color: var(--success); }

.dash-disc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.dash-disc-row:last-child { border-bottom: 0; }
.dash-disc-name { flex: 1 1 160px; font-weight: 600; }
.dash-pct { display: inline-flex; align-items: center; gap: 6px; }
.dash-pct input { width: 96px; }
.dash-tier input[type="text"] { flex: 1 1 180px; width: auto; }
.dash-min { display: inline-flex; flex-direction: column; gap: 2px; font-size: 0.8125rem; color: var(--muted); }
.dash-min input { width: 150px; }

.danger-outline { border-color: var(--error); color: var(--error); }

@media (min-width: 640px) {
  .dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-user { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .dash-user-ctl { justify-content: flex-end; }
  .dash-user-ctl select { flex: 0 1 170px; }
}
/* PC: sidebar on the left, grouped menu */
@media (min-width: 1024px) {
  .dash { grid-template-columns: 250px minmax(0, 1fr); align-items: start; gap: 24px; }
  .dash-side { position: sticky; top: 88px; padding: 16px 12px; }
  .dash-me { padding: 0 6px 12px; border-bottom: 1px solid var(--border); }
  .dash-nav { display: block; padding-top: 6px; }
  .dash-group { display: block; padding: 4px 0; border-top: 1px solid var(--border); }
  .dash-solo:first-child, .dash-solo + .dash-solo { border-top: 0; }
  .dash-group-btn, .dash-top {
    display: flex; width: 100%; gap: 10px; min-height: var(--tap); padding: 0 10px; white-space: normal;
    border: 0; border-radius: var(--radius-sm); background: transparent; font-size: 1rem; font-weight: 700;
  }
  .dash-group-btn:hover, .dash-top:hover { background: var(--bg-soft); color: var(--text); }
  .dash-group-btn[aria-expanded="true"] { background: transparent; color: var(--text); }
  .dash-group.has-current > .dash-group-btn { color: var(--accent); }
  .dash-chev { margin-left: auto; color: var(--muted); }
  .dash-top[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
  .dash-sub { display: block; margin: 2px 0 6px 19px; padding: 0 0 0 10px; background: none; border-radius: 0; border-left: 2px solid var(--border); }
  .dash-sub li + li { margin-top: 2px; }
  .dash-link {
    display: flex; width: 100%; min-height: 40px; padding: 0 10px; white-space: normal; text-align: left;
    border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-soft); font-size: 0.9375rem;
  }
  .dash-sub .dash-link:hover { background: var(--bg-soft); color: var(--text); }
  .dash-sub .dash-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
  .dash-out { margin-top: 6px; }
  .dash-logout { color: var(--muted); font-weight: 400; }
  .dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.flag-review { background: var(--st-review); border-color: var(--st-review-text); color: var(--st-review-text); }
.dash-attention { border-color: var(--st-review-text); background: var(--st-review); }
.dash-attention-title { margin: 0 0 10px; font-weight: 700; color: var(--st-review-text); }
.dash-review { border-color: var(--accent); }
.dash-revision { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.dash-revision summary { display: inline-flex; align-items: center; min-height: var(--tap); cursor: pointer; font-weight: 600; color: var(--accent); }
.dash-revision textarea { margin-top: 6px; }

/* ---------- "Please wait" pop-up (App.busy) ---------- */
.busy-modal { width: min(440px, calc(100vw - 32px)); max-height: none; }
.busy-body { padding: 30px 26px 26px; text-align: center; }
.busy-body h2 { margin: 16px 0 6px; }
.busy-icon { position: relative; width: 76px; height: 76px; margin: 0 auto; }
.busy-spinner {
  position: absolute; inset: 0; border-radius: 50%;
  border: 6px solid var(--accent-line); border-top-color: var(--accent-bright);
  animation: busy-spin .9s linear infinite;
}
.busy-check { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.busy-check circle { fill: var(--success-soft); stroke: var(--success); stroke-width: 3; }
.busy-check path { fill: none; stroke: var(--success); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
.busy-modal.is-done .busy-spinner, .busy-modal.is-failed .busy-spinner { display: none; }
.busy-cross { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.busy-cross circle { fill: var(--error-soft); stroke: var(--error); stroke-width: 3; }
.busy-cross path { fill: none; stroke: var(--error); stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: 24; stroke-dashoffset: 24; }
.busy-modal.is-failed .busy-cross { opacity: 1; animation: busy-pop .35s ease-out; }
.busy-modal.is-failed .busy-cross path { animation: busy-draw .4s .15s ease-out forwards; }
.busy-modal.is-failed #busy-title { color: var(--error); }
.busy-step:empty { display: none; }   /* plain loading / done / failed: no empty line under the title */
.busy-modal.is-done .busy-check { opacity: 1; animation: busy-pop .35s ease-out; }
.busy-modal.is-done .busy-check path { animation: busy-draw .45s .15s ease-out forwards; }
.busy-step { margin: 0; min-height: 1.6em; font-weight: 600; color: var(--accent); }
.busy-progress { display: block; width: 100%; height: 8px; margin: 10px 0 4px; accent-color: var(--accent-bright); }
.busy-text { margin: 10px 0 0; color: var(--muted); font-size: 0.9375rem; }
.busy-actions { margin-top: 18px; }
.busy-ref { margin: 12px 0 0; font-family: Consolas, Menlo, monospace; font-size: 0.875rem; color: var(--text-soft); user-select: all; }
.busy-report { display: block; margin: 10px auto 0; }
.report-modal { width: min(600px, calc(100vw - 32px)); }
.report-form .field:first-of-type { margin-top: 0; }
.report-form textarea { width: 100%; }
.report-tech { margin-top: 12px; }
.report-tech > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: var(--accent); font-weight: 600; }
.report-tech-pre { max-height: 180px; font-size: 0.75rem; }
.report-done { text-align: center; padding: 28px 22px; }
.report-done-title { font-size: 1.25rem; font-weight: 700; color: var(--success); margin: 0 0 8px; }
.report-text { white-space: pre-wrap; }
.report-ctl { margin-top: 8px; }
.report-ctl input[type="text"] { flex: 1 1 200px; width: auto; min-height: var(--tap); }
/* On the way to Beam: "Pay securely with [Beam]" + two short assurances */
.busy-beam { margin-top: 18px; padding: 16px 16px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); text-align: left; }
.busy-beam[hidden] { display: none; }
.busy-beam-by { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; margin: 0 0 10px !important; font-weight: 600; color: var(--text); }
.busy-beam-logo { height: 22px; width: auto; fill: currentColor; flex: none; }
.busy-beam-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 0.875rem; color: var(--muted); }
.busy-beam-list li { position: relative; padding-left: 24px; }
.busy-beam-list li::before { content: ""; position: absolute; left: 2px; top: 0.3em; width: 14px; height: 14px; border-radius: 50%; background: var(--success-soft); box-shadow: inset 0 0 0 1.5px var(--success); }
.busy-beam-list li::after { content: ""; position: absolute; left: 7px; top: calc(0.3em + 3px); width: 3px; height: 6px; border: solid var(--success); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
@keyframes busy-spin { to { transform: rotate(360deg); } }
@keyframes busy-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes busy-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .busy-spinner { animation-duration: 2.4s; }
  .busy-modal.is-done .busy-check, .busy-modal.is-done .busy-check path { animation: none; stroke-dashoffset: 0; }
  .busy-modal.is-failed .busy-cross, .busy-modal.is-failed .busy-cross path { animation: none; stroke-dashoffset: 0; }
}

/* Visitor counter in the footer (always-dark footer: white text allowed) */
.visit-count {
  display: inline-flex; align-items: center; gap: 8px; margin: 6px 0; padding: 6px 14px;
  border: 1px solid #2c3e5c; border-radius: 999px; background: rgba(255, 255, 255, 0.04);
  color: #c9d3e1; font-size: 0.875rem;
}
.visit-count[hidden] { display: none; }
.visit-count svg { width: 18px; height: 18px; color: #8fc3ea; flex: none; }
.visit-count strong { color: #fff; font-variant-numeric: tabular-nums; }

/* Admin: visitors, discount codes, posts */
.dash-stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.dash-checks { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 6px; }
.dash-checks .choice { flex: 0 1 auto; }
.flag-off { background: var(--bg-soft); color: var(--muted); }
.dash-coupons, .dash-posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dash-coupon, .dash-post { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.dash-coupon-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.dash-coupon-code { font-weight: 700; letter-spacing: .04em; color: var(--accent); font-family: ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.dash-coupon-meta { margin: 4px 0 0; font-size: 0.9375rem; color: var(--muted); }
.dash-coupon .acct-links, .dash-post .acct-links { margin-top: 8px; }
.dash-post { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: start; }
.dash-post-thumb { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-soft); }
.dash-post-cover { display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 1.5rem; }
.dash-post-title { font-weight: 700; overflow-wrap: anywhere; }
.dash-pic-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.dash-pic-preview { width: 120px; height: 120px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--bg-soft); flex: none; }
.dash-pic-preview[hidden] { display: none; }
.dash-pic-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dash-pic-side { flex: 1 1 220px; display: grid; gap: 8px; min-width: 0; }
.dash-pic-side .btn { justify-self: start; }
.dash-card textarea { width: 100%; }

/* ===== Certification check (#verify) and the QR card on job pages ===== */
#verify .form { max-width: 560px; }
#v-code { font-size: 1.125rem; letter-spacing: 0.08em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.verify-card {
  margin-top: 20px; max-width: 720px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); outline: none;
}
.verify-card.is-valid { border-color: var(--success-line); }
.verify-card.is-pending { border-color: var(--warn-line); }
.verify-card.is-revoked { border-color: var(--error-line); }
.verify-head { display: flex; align-items: flex-start; gap: 14px; }
.verify-icon { flex: none; width: 44px; height: 44px; }
.is-valid .verify-icon { color: var(--success); }
.is-pending .verify-icon { color: var(--warn-text); }
.is-revoked .verify-icon { color: var(--error); }
.verify-title { margin: 2px 0 2px; }
.verify-sub { margin: 0; color: var(--muted); }
.verify-dl { margin: 16px 0 0; display: grid; gap: 0; }
.verify-dl > div { display: grid; grid-template-columns: minmax(110px, 34%) minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.verify-dl dt { color: var(--muted); }
.verify-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.verify-card .note { margin: 12px 0 0; }
.verify-scope { margin-top: 20px; max-width: 720px; }

.dash-cert-row { display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: flex-start; margin-top: 8px; }
.dash-cert-qr { flex: none; width: 164px; min-height: 164px; border-radius: var(--radius); overflow: hidden; background: #ffffff; }
.dash-cert-qr canvas { display: block; width: 164px; height: 164px; image-rendering: pixelated; }
.dash-cert-info { flex: 1 1 220px; min-width: 0; }
.dash-cert-label { margin: 0; color: var(--muted); font-size: 0.875rem; }
.dash-cert-code { margin: 2px 0 8px; font-size: 1.375rem; font-weight: 700; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.dash-cert .form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* Online payment fees (pricing page) */
.pay-fees { margin-top: 24px; max-width: 560px; }
.pay-fees h2 { margin: 0 0 8px; }
.fee-table th[scope="row"] { font-weight: 400; }

/* Translation upload: automatic e-certification stamp */
.dash-stamp-choice { margin-top: 10px; }
.dash-stamp-choice > span { display: grid; gap: 2px; }
.dash-stamp-choice .hint { margin: 0; }

/* ===== Phase 6: quote & payment page, receipts, membership ===== */
.quote-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.quote-table th, .quote-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.quote-table th { font-size: 0.875rem; color: var(--muted); font-weight: 600; background: var(--bg-soft); }
.quote-table .num { text-align: right; white-space: nowrap; }
.quote-table tfoot td { border-bottom: 0; padding-top: 6px; padding-bottom: 6px; }
.quote-table tfoot .sub td { padding-top: 12px; }
.quote-table tfoot .disc td { color: var(--success); }
.quote-table tfoot .total td { font-weight: 700; font-size: 1.125rem; color: var(--accent); border-top: 2px solid var(--accent-line); padding-top: 10px; }
.pay-note { white-space: pre-line; background: var(--bg-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0 0; }
.pay-test { margin-bottom: 14px; }
.pay-box .actions { margin-top: 6px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1 1 auto; min-width: 0; text-transform: uppercase; }
.coupon-row .btn { flex: 0 0 auto; }
.pay-secure { margin-top: 12px; }
.pay-done { border-color: var(--success-line); background: var(--success-soft); }
.pay-done .dash-card-title { color: var(--success); }
.pay-receipt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--success-line); }
.pay-receipt-no { font-weight: 700; font-variant-numeric: tabular-nums; }
.pay-receipt-row .btn { margin-left: auto; }
.pay-list { list-style: none; margin: 0; padding: 0; }
.pay-item { padding: 12px 0; border-top: 1px solid var(--border); }
.pay-item:first-child { border-top: 0; padding-top: 4px; }
.pay-item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pay-amount { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-item .job-flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.pay-item .acct-links { margin-top: 6px; }
.refund-form { margin-top: 10px; padding: 12px; border: 1px solid var(--error-line); border-radius: var(--radius); background: var(--error-soft); }
.dash-stat-money { font-size: 1.25rem; }
.dash-sub { margin: 16px 0 4px; }
.mono { font-family: Consolas, Menlo, monospace; font-size: 0.875rem; width: 100%; }
/* quote form (admin) */
.quote-form { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.quote-form > summary { cursor: pointer; font-weight: 700; color: var(--accent); min-height: var(--tap); display: flex; align-items: center; }
.quote-items { display: grid; gap: 8px; margin: 8px 0; }
.quote-item { display: grid; grid-template-columns: 1fr 120px 44px; gap: 8px; align-items: center; }
.quote-item input { min-width: 0; }
.quote-item-rm { font-size: 1.4rem; min-height: var(--tap); }
.quote-sum { font-weight: 700; color: var(--accent); margin: 10px 0 0; }
@media (max-width: 420px) { .quote-item { grid-template-columns: 1fr 96px 40px; } }
/* membership */
.mem-card { border-color: var(--accent-line); }
.mem-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.mem-badge { display: grid; gap: 2px; }
.mem-badge-label, .mem-points-label { font-size: 0.875rem; color: var(--muted); }
.mem-badge-name { font-size: 1.5rem; font-weight: 700; color: var(--accent); line-height: 1.2; }
.tier-bronze .mem-badge-name { color: var(--tier-bronze); }
.tier-silver .mem-badge-name { color: var(--tier-silver); }
.tier-gold .mem-badge-name { color: var(--tier-gold); }
.tier-platinum .mem-badge-name { color: var(--tier-platinum); }
.mem-badge-off { display: inline-block; justify-self: start; padding: 1px 10px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-weight: 700; font-size: 0.875rem; }
.mem-points { display: grid; text-align: right; }
.mem-points-n { font-size: 2rem; font-weight: 700; color: var(--accent); line-height: 1.1; font-variant-numeric: tabular-nums; }
.mem-points-exp { font-size: 0.8125rem; color: var(--muted); }
.mem-progress { height: 10px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); margin: 14px 0 6px; overflow: hidden; }
.mem-progress-fill { display: block; height: 100%; background: var(--accent-bright); border-radius: 999px; }
.mem-table tr.is-current td { background: var(--accent-soft); font-weight: 700; }
.mem-rewards { list-style: none; margin: 0; padding: 0; }
.mem-reward { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--border); }
.mem-reward:first-child { border-top: 0; }
.mem-reward-name { flex: 1 1 160px; font-weight: 600; }
.mem-reward-cost { color: var(--muted); white-space: nowrap; }
/* receipt (screen + print) */
.receipt, .print-sheet { font-family: var(--font-doc); }   /* receipts, quotations, 50 ทวิ: Sarabun */
.receipt-actions { align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.receipt-actions .note { margin: 0; }
.receipt { position: relative; background: #ffffff; color: #1d2433; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 24px; max-width: 800px; box-shadow: var(--shadow-sm); }
.receipt .muted { color: #566072; }
.receipt-test { margin: 0 0 14px; padding: 6px 12px; border: 2px dashed #b42318; color: #b42318; font-weight: 700; text-align: center; border-radius: 8px; }
.receipt-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-bottom: 2px solid #01417b; padding-bottom: 16px; margin-bottom: 16px; }
.receipt-seller { flex: 1 1 300px; min-width: 0; }
.receipt-seller p { margin: 0; font-size: 0.9375rem; line-height: 1.55; }
.receipt-logo { height: 40px; width: auto; margin-bottom: 6px; }
.receipt-seller-name { font-weight: 700; font-size: 1.0625rem !important; color: #01417b; }
.receipt-title { flex: 0 0 auto; text-align: right; }
.receipt-title h2 { margin: 0; color: #01417b; font-size: 1.5rem; }
.receipt-sub { margin: 0 0 8px; color: #566072; font-size: 0.875rem; }
.receipt-meta { margin: 0; display: grid; gap: 2px; }
.receipt-meta > div { display: flex; gap: 8px; justify-content: flex-end; }
.receipt-meta dt { color: #566072; }
.receipt-meta dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.receipt-buyer h3 { margin: 0 0 4px; font-size: 0.875rem; color: #566072; font-weight: 600; }
.receipt-buyer p { margin: 0; }
.receipt-buyer { margin-bottom: 14px; }
.receipt .quote-table th { background: #f6f8fb; color: #566072; }
.receipt .quote-table th, .receipt .quote-table td { border-color: #d9dee7; }
.receipt .quote-table tfoot .total td { color: #01417b; border-top-color: #01417b; }
.receipt .quote-table tfoot .disc td { color: #067647; }
.receipt-words { text-align: right; margin: 6px 0 14px; font-weight: 600; }
.receipt-pay { margin: 10px 0; }
.receipt-pay > div { justify-content: flex-start; }
.receipt-note { margin: 6px 0 0; font-size: 0.8125rem; color: #566072; }
.receipt .pay-note { background: #f6f8fb; color: #1d2433; }
.qd-pay { display: flex; gap: 16px; align-items: center; margin: 14px 0 10px; padding: 12px 14px; border: 1px solid #d9dee7; border-radius: 12px; break-inside: avoid; }
.qd-qr canvas { display: block; width: 116px; height: 116px; image-rendering: pixelated; }
.qd-pay-text h3 { margin: 0 0 4px; font-size: 1rem; color: #01417b; }
.qd-pay-text p { margin: 0 0 4px; font-size: 0.9rem; }
.qd-url { font-family: Consolas, Menlo, monospace; font-size: 0.78rem !important; word-break: break-all; color: #566072; }
.qd-paid { margin: 0; font-weight: 700; color: #067647; }
@media (max-width: 480px) { .qd-pay { flex-direction: column; align-items: flex-start; } }
@media (max-width: 560px) {
  .receipt { padding: 20px 14px; }
  .receipt-title { text-align: left; }
  .receipt-meta > div { justify-content: flex-start; }
}
@media print {
  body.receipt-open .site-header, body.receipt-open footer, body.receipt-open .no-print,
  body.receipt-open #pay-title, body.receipt-open #pay-status, body.receipt-open .skip-link { display: none !important; }
  body.receipt-open { background: #ffffff !important; }
  body.receipt-open main, body.receipt-open .panel { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  body.receipt-open .receipt { border: 0; box-shadow: none; max-width: none; padding: 0; }
  @page { size: A4; margin: 14mm; }
}

/* Company billing details (job form + admin) */
.bill-box { margin: 0 0 6px; padding: 14px 14px 2px; border: 1px solid var(--accent-line); border-radius: var(--radius); background: var(--accent-soft); }
.bill-admin { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 4px; }
.receipt-buyer-name { font-weight: 700; }

/* ---------- Phase 7: translators (dashboard) ---------- */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.choice-sm { min-height: var(--tap); padding: 8px 12px; font-size: 0.9375rem; }
.field-group { border: 0; margin: 14px 0 0; padding: 0; min-width: 0; }
.field-group legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.dash-card > .choice { margin-top: 14px; }
.doc-wrap { margin-top: 12px; display: grid; gap: 10px; }
.doc-sec { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.doc-sec > summary { cursor: pointer; padding: 12px 16px; min-height: var(--tap); font-weight: 700; color: var(--accent); }
.doc-sec[open] > summary { border-bottom: 1px solid var(--border); }
.doc-sec .doc-body { padding: 4px 16px 14px; overflow-wrap: anywhere; }
.doc-sec .doc-body p, .doc-sec .doc-body li { color: var(--text); }
.doc-sec .doc-body ol, .doc-sec .doc-body ul { padding-left: 1.4em; margin: 0 0 1em; }
.doc-sec .doc-body li { margin-bottom: 0.35em; }
.doc-check { list-style: none; padding-left: 0 !important; }
.doc-check li::before { content: "☐ "; color: var(--accent); }
.doc-fill { background: var(--accent-soft); color: var(--text); padding: 0 4px; border-radius: 4px; font-weight: 600; }
.doc-field { color: var(--muted); font-style: italic; }
.doc-table-wrap { overflow-x: auto; margin: 0 0 1em; }
.doc-table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
.doc-table th, .doc-table td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; vertical-align: top; }
.doc-table th { background: var(--bg-soft); }
.pay-lines { list-style: none; margin: 10px 0 0; padding: 0; }
.pay-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.pay-lines .num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.dash-subcard { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-top: 12px; }
.tr-respond { margin-top: 10px; }
.tr-respond textarea { width: 100%; margin-top: 8px; }
.tr-more { margin-top: 10px; }
.tr-more > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: var(--accent); font-weight: 600; }
.tr-more > .choice-grid { margin-top: 6px; }
.field-group + .field, .field-group + .field-group { margin-top: 14px; }
.tr-test-result { margin: 6px 0 0; font-weight: 600; min-height: 1.5em; }
.tr-test-result.is-ok { color: var(--success); }
.tr-test-result.is-bad { color: var(--error); }
.tr-test-result.is-review { color: var(--warn-text); }

/* ---------- Phase 8: accounting (js/accounting.js) ---------- */
.span-2 { grid-column: 1 / -1; }
.acc-filters { margin-top: 4px; }
.acc-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-top: 12px; }
.acc-inline .field { flex: 1 1 200px; margin: 0; }
.acc-todo { list-style: none; margin: 0; padding: 0; }
.acc-todo li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--border); }
.acc-todo li:first-child { border-top: 0; padding-top: 0; }
.acc-todo li > span { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.acc-meter.is-warn .mem-progress-fill { background: var(--st-quoted-text); }
.acc-meter.is-over .mem-progress-fill { background: var(--error); }
.acc-item.is-void { opacity: .6; }
.acc-item.is-void .acc-amt { text-decoration: line-through; }
.acc-amt.is-in { color: var(--success); }
.acc-amt.is-out, .acc-amt.is-neg { color: var(--error); }
.acc-desc { margin: 4px 0 0; overflow-wrap: anywhere; }
.acc-evidence { margin-top: 8px; }
.acc-evidence > summary { display: inline-flex; align-items: center; min-height: var(--tap); cursor: pointer; color: var(--accent); font-weight: 600; }
.acc-evidence .dash-files { margin-bottom: 8px; }
.acc-form { border-color: var(--accent); }
.acc-table-wrap { margin-top: 12px; overflow-x: auto; }
.acc-table { min-width: 640px; font-size: 0.9375rem; }
.acc-table td, .acc-table th { white-space: nowrap; }
.acc-table td:first-child { white-space: normal; }
.acc-table tfoot td { font-weight: 700; border-top: 2px solid var(--border-strong); }
.acc-table .btn-link { min-height: 32px; }
.acc-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.acc-bars li { display: grid; grid-template-columns: minmax(84px, 150px) minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.acc-bar-label { font-size: 0.875rem; color: var(--muted); }
.acc-bar-pair { display: grid; gap: 3px; }
.acc-bar-pair .dash-bar { height: 7px; }
.dash-bar-fill.acc-is-in { background: var(--success); }
.dash-bar-fill.acc-is-out { background: var(--error); }
.acc-bar-n { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.875rem; }
.acc-bar-n.is-neg { color: var(--error); }
.acc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.acc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.acc-dot.is-in { background: var(--success); }
.acc-dot.is-out { background: var(--error); margin-left: 10px; }

/* A printable document over the page (50 ทวิ); print shows only the paper */
.print-sheet { position: fixed; inset: 0; z-index: 300; overflow: auto; padding: 16px; background: var(--bg); }
.print-sheet .receipt { margin: 0 auto 32px; }
.print-sheet .receipt-actions { max-width: 800px; margin: 0 auto 14px; }
.print-sheet > .notice { max-width: 800px; margin: 0 auto 14px; }
body.print-sheet-open { overflow: hidden; }
.wht-doc { font-size: 0.9375rem; }
.wht-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid #01417b; padding-bottom: 12px; margin-bottom: 14px; }
.wht-head h2 { margin: 0; font-size: 1.375rem; color: #01417b; }
.wht-party { border: 1px solid #d9dee7; border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; break-inside: avoid; }
.wht-party h3 { margin: 0 0 6px; font-size: 0.9375rem; color: #01417b; }
.wht-dl { margin: 0; display: grid; gap: 2px; }
.wht-dl > div { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); gap: 8px; }
.wht-dl dt { color: #566072; }
.wht-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.wht-form { margin: 10px 0; font-weight: 600; }
.wht-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.wht-table th, .wht-table td { border: 1px solid #d9dee7; padding: 6px 8px; vertical-align: top; text-align: left; }
.wht-table th { background: #f6f8fb; color: #566072; font-weight: 600; }
.wht-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wht-table tfoot td { font-weight: 700; color: #01417b; }
.wht-sign { margin-top: 18px; text-align: center; break-inside: avoid; }
.wht-sign p { margin: 4px 0; }
.wht-sign-line { margin-top: 28px !important; }
@media (max-width: 560px) { .wht-dl > div { grid-template-columns: 1fr; gap: 0; } }
.wht-copy { text-align: right; font-size: 0.8125rem; color: #566072; margin-bottom: 6px; }
.wht-forms { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #d9dee7; }
.wht-seq { margin: 0 0 4px; }
.wht-seq b { display: inline-block; min-width: 2.5em; text-align: center; border-bottom: 1px dotted #566072; }
.wht-ticks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.wht-tick { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.wht-box { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border: 1px solid #1d2433; font-size: 11px; line-height: 1; font-weight: 700; }
.wht-label { font-weight: 700; margin-right: 4px; }
.wht-payer { margin: 10px 0; }
.wht-table-wrap { overflow-x: auto; }
.wht-table { min-width: 560px; font-size: 0.875rem; }
.wht-table tr.is-ours td { background: #f6f8fb; }
.wht-words { margin: 6px 0; }
.wht-funds { font-size: 0.8125rem; color: #566072; margin: 6px 0; }
.wht-foot { display: grid; gap: 12px; margin-top: 12px; }
.wht-warn { margin: 0; font-size: 0.8125rem; color: #566072; border: 1px solid #d9dee7; border-radius: 8px; padding: 8px 10px; }
.wht-small { font-size: 0.8125rem; color: #566072; }
.print-sheet .wht-doc + .wht-doc { margin-top: 24px; }
@media (min-width: 720px) { .wht-foot { grid-template-columns: 1fr 1fr; align-items: end; } }
@media print { body.print-sheet-open .wht-doc + .wht-doc { break-before: page; margin-top: 0; } .wht-table { min-width: 0; } }
@media print {
  body.print-sheet-open > *:not(.print-sheet) { display: none !important; }
  body.print-sheet-open { background: #ffffff !important; overflow: visible; }
  body.print-sheet-open .print-sheet { position: static; overflow: visible; padding: 0; background: #ffffff; }
  body.print-sheet-open .print-sheet .no-print { display: none !important; }
  body.print-sheet-open .receipt { border: 0; box-shadow: none; max-width: none; padding: 0; margin: 0; }
  @page { size: A4; margin: 14mm; }
}
.wht-sub-1 { padding-left: 2em !important; }
.wht-sub-2 { padding-left: 3.5em !important; }
.wht-sign { position: relative; }
.wht-stamp { position: absolute; right: 0; bottom: 0; width: 64px; height: 64px; border: 1px dashed #9aa3b2; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 0.6875rem; line-height: 1.2; color: #9aa3b2; padding: 6px; }
.wht-note { margin: 10px 0 0; font-size: 0.75rem; color: #566072; }
