/* =====================================================================
   WAKEEL ACCOUNT — site stylesheet (one file for English LTR and Arabic RTL)
   Direction is handled with CSS logical properties (inline-start/end),
   so the same rules work for <html dir="ltr"> and <html dir="rtl">.

   Identity:
   - --navy (#0F2A44) is the confirmed brand colour (theme-color of the live site).
   - All other colours are proposed neutrals/tints. If the live site's CSS
     defines other brand colours, replace the values in :root only.
   - Font: IBM Plex Sans Arabic (covers Arabic + Latin). The .woff2 files are
     NOT bundled — see HANDOFF.md. Without them the system font stack is used.
   ===================================================================== */

@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-arabic-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

/* Inter for Latin text, as on the live site (Arabic falls through to IBM Plex Sans Arabic). */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/inter-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/inter-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/inter-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

:root {
  /* Brand */
  --navy: #0F2A44;        /* confirmed brand colour */
  --navy-2: #163A5C;      /* proposed: hover / gradient */
  --navy-3: #22507C;      /* proposed */
  --accent: #0C7373;      /* live site teal (--teal-dark), AA on white */
  --accent-soft: #E7F4F4; /* live site --teal-soft */

  /* Neutrals */
  --ink: #0E1C2A;
  --text: #2A3949;
  --muted: #5A6B7C;
  --line: #DFE6EE;
  --surface: #F4F7FA;
  --white: #FFFFFF;

  /* States */
  --ok: #1E7A4C;
  --err: #B42318;
  --err-soft: #FDECEA;

  /* Type & layout */
  --font: Inter, "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  --maxw: 1120px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 42, 68, .06), 0 8px 24px rgba(15, 42, 68, .07);
  --header-h: 68px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  text-rendering: optimizeLegibility;
}
[dir="rtl"] body { line-height: 1.85; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--navy-3); }
h1, h2, h3 { color: var(--ink); line-height: 1.3; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--white); color: var(--navy); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: 10px 22px; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-2); color: var(--white); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--accent-soft); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); color: var(--white); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: progress; }

/* ---------- Header ---------- */
.site-header {
  position: relative; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(6px);
}
/* Sticky only when the mobile menu can collapse (JS on) or on wide screens. */
.js .site-header { position: sticky; }
@media (min-width: 980px) { .site-header { position: sticky; } }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand-word { display: flex; flex-direction: column; line-height: 1.05; direction: ltr; text-align: start; }
.brand-word b { font-size: 1.05rem; letter-spacing: .14em; }
.brand-word span { font-size: .82rem; color: var(--muted); letter-spacing: .04em; }

.nav-toggle {
  margin-inline-start: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--navy); border-radius: 2px; position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

.site-nav { flex-basis: 100%; display: flex; flex-direction: column; gap: 4px; padding-bottom: 12px; }
.site-nav.is-collapsible:not(.is-open) { display: none; }
.site-nav a { text-decoration: none; color: var(--text); padding: 10px 6px; border-radius: 8px; font-weight: 500; }
.site-nav a:hover { color: var(--navy); background: var(--surface); }
.site-nav a.btn-primary, .site-nav a.btn-primary:hover { color: var(--white); background: var(--navy); }
.site-nav a.btn-primary:hover { background: var(--navy-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 6px; }
.lang-switch {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--navy) !important; font-weight: 600; text-decoration: none;
}
.lang-switch:hover { border-color: var(--navy); background: var(--white) !important; }

@media (min-width: 980px) {
  .nav-toggle { display: none !important; }
  .site-nav, .site-nav.is-collapsible:not(.is-open) {
    display: flex; flex-direction: row; align-items: center; flex-basis: auto; margin-inline-start: auto; padding: 0; gap: 2px;
  }
  .site-nav a { padding: 8px 10px; font-size: .95rem; }
  .nav-actions { padding: 0; margin-inline-start: 10px; }
  .nav-actions .btn { min-height: 40px; padding: 6px 18px; }
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 500px at 85% -10%, var(--navy-3) 0%, transparent 60%), var(--navy);
  color: #DCE6F0; padding: 72px 0 64px;
}
[dir="rtl"] .hero { background: radial-gradient(1200px 500px at 15% -10%, var(--navy-3) 0%, transparent 60%), var(--navy); }
.hero h1 { color: var(--white); max-width: 22ch; }
.eyebrow { display: inline-block; font-size: .9rem; font-weight: 600; color: #A9C4DE; margin-bottom: 14px; }
[dir="ltr"] .eyebrow { letter-spacing: .02em; }
.hero .lead { font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--white); font-weight: 500; margin-bottom: .6em; }
.hero .ai-line { max-width: 60ch; color: #C9D7E6; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 30px; }
.platforms-label { font-size: .9rem; color: #A9C4DE; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chips li {
  font-size: .88rem; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); color: var(--white);
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-cta { margin-top: 28px; }

.grid { display: grid; gap: 16px; grid-template-columns: 1fr; list-style: none; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-5 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .35em; }
.card p { margin: 0; color: var(--muted); }
.card .icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--navy); margin-bottom: 14px;
}
.card .icon svg { width: 22px; height: 22px; }

/* Steps */
.steps { list-style: none; counter-reset: step; display: grid; gap: 16px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; position: relative; padding-top: 56px; }
.steps li::before {
  content: counter(step); position: absolute; top: 18px; inset-inline-start: 22px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: var(--white); font-weight: 700; font-size: .95rem;
}

/* AI section */
.ai-points .card { border-top: 4px solid var(--navy); }

/* About */
.about { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .about { grid-template-columns: 1.4fr 1fr; } }
.tagline { font-size: 1.15rem; font-weight: 600; color: var(--navy); border-inline-start: 4px solid var(--accent); padding-inline-start: 14px; margin: 18px 0; }
.glance h3 { font-size: 1rem; color: var(--muted); }
.glance ul { list-style: none; display: grid; gap: 8px; }
.glance li { padding-inline-start: 22px; position: relative; }
.glance li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .7em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 18px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--accent); flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-bottom: 16px; margin: 0; }

/* Contact */
.contact-options .card { display: flex; flex-direction: column; gap: 10px; }
.contact-options .card .btn { align-self: flex-start; margin-top: auto; }
.contact-options .card p { margin-bottom: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #C9D7E6; padding: 40px 0 28px; font-size: .95rem; }
.site-footer a { color: var(--white); }
.footer-inner { display: grid; gap: 18px; }
@media (min-width: 800px) { .footer-inner { grid-template-columns: 1.2fr 1fr; align-items: center; } }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; }
@media (min-width: 800px) { .footer-links { justify-content: flex-end; } }
.footer-brand b { color: var(--white); }
.legal-line { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 16px; margin: 4px 0 0; color: #9FB4CA; font-size: .88rem; }

/* ---------- Inner pages ---------- */
.page-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 48px 0 32px; }
.page-hero p { color: var(--muted); max-width: 70ch; margin: 0; }
.page-body { padding: 40px 0 72px; }
.prose { max-width: 780px; }
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; }
.prose ul { padding-inline-start: 1.3em; margin-bottom: 1em; }
.prose li { margin-bottom: .35em; }
.updated { color: var(--muted); font-size: .92rem; }
.todo { background: #FFF4CC; color: #6B4E00; padding: 0 4px; border-radius: 4px; }

/* ---------- Form ---------- */
.form { max-width: 780px; display: grid; gap: 22px; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0; background: var(--white); display: grid; gap: 18px; min-width: 0; }
.form legend { font-weight: 700; color: var(--navy); padding: 0 8px; font-size: 1.05rem; }
.field { display: grid; gap: 6px; }
.field > label, .group-label { font-weight: 600; color: var(--ink); }
.req { color: var(--err); margin-inline-start: 2px; }
.opt { color: var(--muted); font-weight: 400; font-size: .9em; }
.hint { color: var(--muted); font-size: .9rem; margin: 0; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 1.5px solid #C9D4E0; border-radius: var(--radius-sm); padding: 11px 14px; min-height: 48px;
}
textarea { min-height: 110px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #8A99A8; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid rgba(14, 140, 140, .25); outline-offset: 0; }
[aria-invalid="true"] { border-color: var(--err) !important; }

.tel-wrap { display: flex; direction: ltr; }
.tel-wrap .tel-prefix {
  display: inline-flex; align-items: center; padding: 0 12px; border: 1.5px solid #C9D4E0; border-inline-end: 0;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--surface); color: var(--muted); font-weight: 600;
}
.tel-wrap input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; text-align: left; }
[dir="rtl"] input[type="email"] { direction: ltr; text-align: right; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; min-height: 42px; padding: 8px 16px; border-radius: 999px;
  border: 1.5px solid #C9D4E0; background: var(--white); color: var(--text); cursor: pointer; user-select: none;
}
.choice input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.group-invalid .choice span { border-color: var(--err); }

.consent { display: flex; gap: 10px; align-items: flex-start; }
.consent input { width: 22px; height: 22px; margin-top: 4px; flex-shrink: 0; accent-color: var(--navy); }

.error { color: var(--err); font-size: .9rem; margin: 0; font-weight: 500; }
.form-status { border-radius: var(--radius-sm); padding: 12px 16px; margin: 0; }
.form-status.is-error { background: var(--err-soft); color: var(--err); }
.form-status.is-info { background: var(--accent-soft); color: var(--navy); }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.honey { position: absolute !important; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Thank-you & 404 ---------- */
.center-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.center-page .check {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px;
  background: #E3F4EA; color: var(--ok);
}
.center-page .check svg { width: 32px; height: 32px; }
.center-page p { color: var(--muted); max-width: 52ch; margin-inline: auto; }
.center-page .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ---------- Reference number (thank-you page) ---------- */
.ref-box { max-width: 460px; margin: 20px auto 0; text-align: center; }
.ref-box .hint { margin: 0; }
.ref-id { font-size: 1.5rem; font-weight: 700; color: var(--navy); letter-spacing: .04em; margin: 6px 0 8px !important; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }

/* ---------- Status page ---------- */
.status-result { max-width: 780px; margin-top: 32px; display: grid; gap: 18px; }
.status-result h2 { font-size: 1.25rem; margin: 8px 0 0; }
.status-head p { margin: 0; }
.status-badge {
  display: inline-block; margin: 10px 0 !important; padding: 6px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--navy); font-weight: 700;
}
.status-badge[data-status="waiting_customer"] { background: #FFF4CC; color: #6B4E00; }
.status-badge[data-status="won"], .status-badge[data-status="answered"] { background: #E3F4EA; color: var(--ok); }
.status-badge[data-status="closed"] { background: var(--surface); color: var(--muted); }
.thread { list-style: none; display: grid; gap: 10px; }
.msg { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; background: var(--white); }
.msg-team { border-inline-start: 4px solid var(--navy); }
.msg-you { background: var(--surface); }
.msg-meta { margin: 0 0 4px; font-size: .85rem; color: var(--muted); }
.msg-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
select { appearance: auto; }

/* ---------- Pricing teaser (home) ---------- */
.price-band { background: linear-gradient(180deg, var(--white) 0%, var(--accent-soft) 100%); }
.price-teaser { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .price-teaser { grid-template-columns: 1.4fr 1fr; } }
.price-points { list-style: none; display: grid; gap: 8px; margin-top: 8px; }
.price-points li { padding-inline-start: 26px; position: relative; }
.price-points li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--ok); font-weight: 700; }
.price-card { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 28px; }
.price-card .hint { margin: 0; }
.price-from { margin: 0; color: var(--navy); }
.price-from b { font-size: 3rem; line-height: 1; }
.price-from span { color: var(--muted); }

/* ---------- Calculator ---------- */
.calc-layout { display: grid; gap: 24px; align-items: start; padding-bottom: 90px; }
@media (min-width: 980px) { .calc-layout { grid-template-columns: 1.5fr 1fr; padding-bottom: 0; } }
.calc { display: grid; gap: 18px; }
.calc fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0; background: var(--white); display: grid; gap: 14px; min-width: 0; }
.calc legend { font-weight: 700; color: var(--navy); padding: 0 8px; font-size: 1.05rem; }
.calc fieldset > .hint { margin: 0; }
.calc-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.calc fieldset > .calc-row:first-of-type, .calc legend + .calc-row { border-top: 0; }
/* label + control on the first line, explanation full width underneath */
.calc-row-text { display: contents; }
.calc-row-label { grid-row: 1; grid-column: 1; font-weight: 600; color: var(--ink); }
.calc-row > .stepper, .calc-row > select { grid-row: 1; grid-column: 2; }
.calc-row-text > .hint { grid-row: 2; grid-column: 1 / -1; }
.calc-row-text > .btn-link { grid-row: 3; grid-column: 1 / -1; }
.calc-row > .error { grid-row: 4; grid-column: 1 / -1; }
.calc-row.is-disabled { opacity: .55; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #FFF4CC; color: #6B4E00; vertical-align: middle; margin-inline-start: 6px; }
.btn-link { background: none; border: 0; padding: 4px 0; color: var(--accent); font: inherit; font-size: .9rem; text-decoration: underline; cursor: pointer; justify-self: start; }
.stepper { display: inline-flex; align-items: stretch; border: 1.5px solid #C9D4E0; border-radius: 12px; overflow: hidden; direction: ltr; background: var(--white); }
.stepper button { width: 42px; border: 0; background: var(--surface); color: var(--navy); font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.stepper button:disabled { cursor: not-allowed; }
.stepper input { width: 68px; min-height: 44px; border: 0; border-radius: 0; text-align: center; padding: 6px; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-row select { min-width: 0; max-width: 220px; }
.calc-summary { display: grid; gap: 10px; }
@media (min-width: 980px) { .calc-summary { position: sticky; top: calc(var(--header-h) + 16px); } }
.calc-summary h2 { font-size: 1.2rem; margin: 0; }
.calc-lines { list-style: none; display: grid; gap: 6px; }
.calc-lines li { display: flex; justify-content: space-between; gap: 10px; font-size: .95rem; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.calc-amount { color: var(--muted); white-space: nowrap; unicode-bidi: isolate; }
.calc-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 4px 0 0; font-weight: 600; }
.calc-total b { font-size: 1.6rem; color: var(--navy); }
.calc-summary .hint { margin: 0; }
.btn.is-blocked { opacity: .55; }
.calc-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40; background: var(--white);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15, 42, 68, .08); padding: 10px 0;
}
.calc-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calc-bar p { margin: 0; display: grid; line-height: 1.3; }
.calc-bar b { font-size: 1.3rem; color: var(--navy); }
@media (min-width: 980px) { .calc-bar { display: none; } }
.quote-box { display: grid; gap: 8px; border: 2px solid var(--navy); }
.quote-box h2 { font-size: 1.15rem; margin: 0; }

/* ---------- Owner control panel ---------- */
.owner-body { background: var(--surface); }
.owner-main { padding: 28px 0 110px; }
.narrow { max-width: 520px; }
.owner-logout { margin-inline-start: auto; }
.owner-cards { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-bottom: 16px; }
@media (min-width: 900px) { .owner-cards { grid-template-columns: repeat(4, 1fr); } }
.owner-cards .card { padding: 16px; }
.owner-cards .hint { margin: 0; }
.owner-big { font-size: 1.8rem; font-weight: 700; color: var(--navy); margin: 4px 0 0; }
.owner-big small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.owner-section { margin-bottom: 16px; display: grid; gap: 12px; }
.owner-section h2 { font-size: 1.15rem; margin: 0; }
.owner-section h3 { font-size: 1rem; margin: 0 0 8px; }
.owner-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
@media (min-width: 700px) { .owner-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.owner-grid .field label { font-size: .9rem; }
.owner-items { display: grid; gap: 12px; }
.owner-item { border-top: 1px solid var(--line); padding-top: 12px; }
.table-wrap { overflow-x: auto; }
.owner-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.owner-table th, .owner-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: start; white-space: nowrap; }
.owner-table input { min-height: 40px; width: 104px; max-width: none; padding: 6px 10px; }
.owner-savebar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--white); border-top: 1px solid var(--line); padding: 12px 20px; box-shadow: 0 -6px 20px rgba(15, 42, 68, .08);
}
.owner-history { list-style: none; display: grid; gap: 8px; }
.owner-history li { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; font-size: .92rem; }
.btn-sm { min-height: 36px; padding: 4px 14px; font-size: .9rem; }
.btn-danger { background: var(--err); color: var(--white); }
.btn-danger:hover { background: #8F1C13; color: var(--white); }
.txt-ok { color: var(--ok); }
.txt-err { color: var(--err); }
