/*
 * Muster Roll marketing site.
 *
 * Every link in these pages is relative, and nothing here knows it is being
 * served under /main — so moving the whole folder onto its own domain is a
 * server-block change and nothing else.
 *
 * ---------------------------------------------------------------------------
 * The design comes out of the product's own mark: four tally strokes with a
 * gold slash through them, which is what a muster roll is — a count of who is
 * present. So the page is built as a register rather than as a stack of
 * cards. Hairline rules instead of borders, entries numbered because a
 * register's entries are numbered, figures set in tabular numerals, and the
 * gold of the slash used as the one accent against the petrol and teal.
 *
 * The masthead is deep petrol, the same bar the system itself wears, so the
 * site and the product do not look like two different companies. Everything
 * below it is paper.
 * ---------------------------------------------------------------------------
 */

:root {
    /* Petrol — the masthead, and the product's own header gradient. */
    --petrol-1: #14303f;
    --petrol-2: #0f5259;
    --petrol-deep: #0c2029;

    --brand: #0f7a6d;
    --brand-deep: #0b5d53;
    --brand-light: #e3f0ed;
    --accent: #16a394;

    /* The slash through the tally. The only non-teal in the mark, so it is the
       only non-teal here: index numbers, rules under headings, the one figure
       in a row that matters. Never a background — it earns its weight by
       being rare. */
    --gold: #e0b24f;
    --gold-deep: #a97d22;

    --ink: #0b1a1f;
    --ink-soft: #465c58;
    --ink-faint: #7b918d;
    --ground: #f4f7f6;
    --paper: #ffffff;
    --rule: #dfe8e5;
    --rule-strong: #c2d4d0;

    /* On petrol. */
    --on-dark: #eaf4f2;
    --on-dark-soft: #a9c6c4;
    --on-dark-rule: rgba(255, 255, 255, .14);

    --display: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
    --sans: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
    --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

    --wrap: 70rem;
    --header-h: 64px;

    --lift-1: 0 1px 2px rgba(11, 26, 31, .05), 0 1px 3px rgba(11, 26, 31, .06);
    --lift-2: 0 2px 6px rgba(11, 26, 31, .06), 0 14px 32px -14px rgba(11, 26, 31, .24);
    --lift-3: 0 18px 46px -16px rgba(11, 26, 31, .34), 0 2px 10px rgba(11, 26, 31, .08);
    --bevel: inset 0 1px 0 rgba(255, 255, 255, .26), inset 0 -2px 0 rgba(0, 0, 0, .15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    /* Backstop against sideways scroll. `clip`, not `hidden`: hidden turns the
       body into a scroll container and kills the sticky header. */
    overflow-x: clip;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.85;
    -webkit-text-size-adjust: 100%;
}

img, svg { max-width: 100%; }
a { color: var(--brand-deep); }

/* Sections the nav links to stop below the sticky bar, not under it. */
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding-inline: 22px;
}

/* ===========================================================================
   Masthead — the header bar and the hero are one dark block
   =========================================================================== */

.masthead {
    position: relative;
    isolation: isolate;
    background: linear-gradient(135deg, var(--petrol-1) 0%, var(--petrol-2) 58%, #0a3f49 100%);
    color: var(--on-dark);
    /* The gold slash of the mark, drawn once across the whole block. */
    border-bottom: 3px solid var(--gold);
}

/* Faint vertical rules across the masthead — the tally strokes, at the scale
   of the page. Repeating-linear-gradient rather than markup: it is texture,
   and texture should not be in the document. */
.masthead::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        repeating-linear-gradient(90deg,
            rgba(255, 255, 255, .05) 0 1px,
            transparent 1px 84px),
        radial-gradient(48rem 30rem at 78% -10%, rgba(22, 163, 148, .34), transparent 60%);
    pointer-events: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    /* The same petrol as the masthead it sits above, so at rest the two read
       as one block and the bar only separates itself once the page has
       scrolled under it. */
    background: linear-gradient(120deg, var(--petrol-1), #12414e);
    border-bottom: 1px solid var(--on-dark-rule);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding-block: 13px;
    min-height: var(--header-h);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: #fff;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.08rem;
    letter-spacing: -0.01em;
    margin-inline-end: auto;
}

.brand img { width: 36px; height: 36px; flex: none; }

.brand small {
    display: block;
    font-family: var(--sans);
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--on-dark-soft);
    line-height: 1.2;
}

.site-nav { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }

.site-nav > a {
    text-decoration: none;
    color: var(--on-dark-soft);
    font-size: 0.92rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color .15s ease, background-color .15s ease;
}

.site-nav > a:hover { background: rgba(255, 255, 255, .09); color: #fff; }

.site-nav > a:focus-visible,
.lang-toggle a:focus-visible,
.btn:focus-visible,
.faq summary:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ---------- language switch ---------- */

/* Both languages shown at once with the current one filled — the same shape
   as the toggle inside the product. A single "English" link had to be read to
   be understood; two named halves are recognised without reading. */
.lang-toggle {
    display: inline-flex;
    margin-inline-start: 6px;
    padding: 3px;
    border: 1px solid var(--on-dark-rule);
    border-radius: 999px;
    background: rgba(0, 0, 0, .18);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.lang-toggle > * {
    display: grid;
    place-items: center;
    padding: 7px 13px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--on-dark-soft);
    transition: color .15s ease, background-color .15s ease;
}

.lang-toggle a:hover { color: #fff; background: rgba(255, 255, 255, .1); }

.lang-toggle .is-active {
    background: var(--accent);
    color: #04231f;
    box-shadow: var(--bevel);
    cursor: default;
}

/* ---------- hero ---------- */

/* Two columns: the claim, and a specimen of the thing being claimed. The
   specimen is the point — a page selling a register should show one. */
.hero { padding-block: 60px 72px; }

.hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 48px;
    align-items: center;
}

@media (max-width: 940px) {
    .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}

/* A hero with a claim and no specimen beside it — the pricing page. One
   column, and the measure held by the text itself rather than by a grid. */
.hero-simple .wrap { grid-template-columns: minmax(0, 1fr); }
.hero-simple h1 { max-width: 18ch; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 18px;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    flex: none;
}

.hero h1 {
    font-family: var(--display);
    font-size: clamp(2.05rem, 4.6vw, 3.1rem);
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -0.022em;
    text-wrap: balance;
    margin: 0 0 20px;
    color: #fff;
}

.hero p.lede {
    font-size: 1.06rem;
    color: var(--on-dark);
    max-width: 46ch;
    margin: 0 0 14px;
    text-wrap: pretty;
}

.hero p.sub {
    font-size: 0.97rem;
    color: var(--on-dark-soft);
    max-width: 46ch;
    margin: 0 0 30px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.hero-note { margin: 16px 0 0; color: var(--on-dark-soft); font-size: 0.9rem; }

/* ---------- the specimen register ---------- */

.specimen {
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--on-dark-rule);
    border-radius: 14px;
    padding: 6px 6px 0;
    box-shadow: var(--lift-3);
    backdrop-filter: blur(6px);
}

.specimen-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 13px;
    font-size: 0.76rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--on-dark-soft);
    font-family: var(--display);
    font-weight: 600;
}

.specimen-head span:last-child { color: var(--gold); letter-spacing: 0; text-transform: none; }

.specimen table { width: 100%; border-collapse: collapse; background: none; box-shadow: none; border: 0; }

.specimen th {
    background: rgba(0, 0, 0, .22);
    color: var(--on-dark-soft);
    font-family: var(--display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 9px 14px;
    border: 0;
}

.specimen td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--on-dark-rule);
    font-size: 0.88rem;
    color: var(--on-dark);
}

.specimen tr:last-child td { border-bottom: 0; }
.specimen tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .03); }
.specimen .num { font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 0.84rem; }

.pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 600;
    white-space: nowrap;
}
.pill.ok   { background: rgba(46, 201, 184, .18); color: #7fe6d6; }
.pill.late { background: rgba(224, 178, 79, .18);  color: var(--gold); }
.pill.off  { background: rgba(255, 255, 255, .1);  color: var(--on-dark-soft); }

.specimen-foot {
    padding: 11px 14px 13px;
    font-size: 0.76rem;
    color: var(--on-dark-soft);
    border-top: 1px solid var(--on-dark-rule);
}

/* ---------- the count strip ---------- */

/* Four facts separated by vertical hairlines — the tally, at the scale of the
   page. Sits directly under the masthead so the first thing after the claim
   is something countable. */
.counts {
    background: var(--petrol-deep);
    color: var(--on-dark);
}

.counts .wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--on-dark-rule);
    padding: 0;
    max-width: var(--wrap);
}

.count {
    background: var(--petrol-deep);
    padding: 22px 20px;
    text-align: center;
}

.count b {
    display: block;
    font-family: var(--display);
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.count span { font-size: 0.82rem; color: var(--on-dark-soft); }

@media (max-width: 720px) {
    .counts .wrap { grid-template-columns: repeat(2, 1fr); }
    .count { padding: 18px 14px; }
    .count b { font-size: 1.35rem; }
}

/* ===========================================================================
   Buttons
   =========================================================================== */

/* Dimensional, not flat: a vertical gradient, a lit top edge, a bevel beneath
   and a 1px press. The product's own control language — a page selling it
   should not look flatter than it does. */
.btn {
    display: inline-block;
    text-decoration: none;
    font-family: var(--display);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 13px 26px;
    border-radius: 11px;
    border: 1px solid transparent;
    transition: transform .08s ease, box-shadow .18s ease, background .18s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(180deg, var(--gold), #c9992f);
    color: #2a1f05;
    box-shadow: var(--bevel), var(--lift-2);
}
.btn-primary:hover { background: linear-gradient(180deg, #ecc268, #b98a26); box-shadow: var(--bevel), var(--lift-3); }

.btn-ghost {
    background: rgba(255, 255, 255, .07);
    color: #fff;
    border-color: rgba(255, 255, 255, .28);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .45); }

/* On paper the ghost button has to invert — white on white is nothing. */
section .btn-ghost,
.cta .btn-ghost {
    background: linear-gradient(180deg, var(--paper), var(--ground));
    color: var(--brand-deep);
    border-color: var(--rule-strong);
    box-shadow: var(--lift-1);
}
section .btn-ghost:hover,
.cta .btn-ghost:hover { background: var(--brand-light); border-color: var(--brand); box-shadow: var(--lift-2); }

section .btn-primary,
.cta .btn-primary {
    background: linear-gradient(180deg, var(--accent), var(--brand-deep));
    color: #fff;
}
section .btn-primary:hover,
.cta .btn-primary:hover { background: linear-gradient(180deg, #18b3a2, #0a5d53); }

/* Inside a petrol panel the ground is dark again, so the call to action goes
   back to gold — the same button the masthead carries, and the only thing on
   a petrol block that should outrank the heading. */
.panel .btn-primary {
    background: linear-gradient(180deg, var(--gold), #c9992f);
    color: #2a1f05;
}
.panel .btn-primary:hover { background: linear-gradient(180deg, #ecc268, #b98a26); }

/* ===========================================================================
   Sections
   =========================================================================== */

section { padding-block: 78px; }
.alt { background: var(--paper); border-block: 1px solid var(--rule); }

.section-head { margin-bottom: 40px; max-width: 62ch; }

section > .wrap > h2,
.section-head h2 {
    font-family: var(--display);
    font-size: clamp(1.5rem, 3.3vw, 2.05rem);
    font-weight: 600;
    line-height: 1.32;
    letter-spacing: -0.018em;
    margin: 0 0 12px;
    text-wrap: balance;
}

.section-head .eyebrow { color: var(--brand); }
.section-head .eyebrow::before { background: var(--gold); }

.section-lede { color: var(--ink-soft); margin: 0; text-wrap: pretty; }

/* ===========================================================================
   The index of capabilities — a register, not twelve cards
   =========================================================================== */

/* Hairline grid lines rather than a border and a radius on each cell. Twelve
   identical rounded cards is the shape every generated landing page takes;
   a ruled index is the shape this product's own subject takes. */
.index {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--lift-1);
}

.entry {
    position: relative;
    background: var(--paper);
    padding: 26px 24px 24px;
    transition: background .18s ease;
}

.alt .index { background: var(--rule); }
.alt .entry { background: var(--ground); }

.entry:hover { background: var(--brand-light); }

.entry-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

/* The entry number. Honest structure: a register numbers its entries, and
   these are the twelve things the system does. Gold, tabular, and the only
   place on the page a number is set this large. */
.entry-no {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--gold-deep);
    font-variant-numeric: tabular-nums;
    flex: none;
}

.entry-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: var(--brand-light);
    color: var(--brand-deep);
    flex: none;
    transition: background .18s ease, color .18s ease;
}

.entry:hover .entry-icon { background: var(--brand); color: #fff; }

.entry h3 {
    font-family: var(--display);
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    margin: 0;
}

.entry p { margin: 0; font-size: 0.93rem; color: var(--ink-soft); line-height: 1.75; }

/* ===========================================================================
   The filled petrol block
   =========================================================================== */

/* Two columns, because at one column the text sat in a 62ch measure inside a
   70rem box and left most of the block empty. The claim on one side, what
   backs it on the other. */
.panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(135deg, var(--petrol-1), var(--petrol-2) 62%, #0a3f49);
    color: var(--on-dark);
    border-radius: 18px;
    box-shadow: var(--lift-3);
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: 0;
}

.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 72px);
    pointer-events: none;
}

.panel-main { padding: 40px 38px; }
.panel-side {
    padding: 40px 34px;
    border-inline-start: 1px solid var(--on-dark-rule);
    background: rgba(0, 0, 0, .16);
}

@media (max-width: 880px) {
    .panel { grid-template-columns: minmax(0, 1fr); }
    .panel-side { border-inline-start: 0; border-block-start: 1px solid var(--on-dark-rule); }
    .panel-main, .panel-side { padding: 30px 24px; }
}

.panel h2 {
    font-family: var(--display);
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    font-weight: 600;
    line-height: 1.34;
    margin: 0 0 16px;
    color: #fff;
    text-wrap: balance;
}

.panel p { margin: 0 0 14px; color: var(--on-dark); }
.panel p:last-child { margin-bottom: 0; }
.panel strong { color: #fff; }
.panel .muted { color: var(--on-dark-soft); font-size: 0.93rem; }

.panel-side h3 {
    font-family: var(--display);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 16px;
}

/* A ruled list: one claim per row, separated by a hairline, the way a
   register separates entries. */
.ruled { list-style: none; margin: 0; padding: 0; }
.ruled li {
    padding-block: 11px;
    border-block-end: 1px solid var(--on-dark-rule);
    font-size: 0.93rem;
    color: var(--on-dark);
    display: flex;
    gap: 12px;
    align-items: baseline;
}
.ruled li:last-child { border-block-end: 0; padding-block-end: 0; }
.ruled li::before {
    content: "";
    width: 7px; height: 7px;
    flex: none;
    border-radius: 2px;
    background: var(--gold);
    transform: translateY(-1px);
}
.ruled b { color: #fff; font-weight: 600; }

/* Figures inside the panel — the demo's contents, the countable facts. */
.figures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--on-dark-rule); border: 1px solid var(--on-dark-rule); border-radius: 12px; overflow: hidden; }
.figure { background: rgba(0, 0, 0, .22); padding: 16px 16px 14px; }
.figure b {
    display: block;
    font-family: var(--display);
    font-size: 1.45rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.figure span { font-size: 0.78rem; color: var(--on-dark-soft); }

/* The demo credentials. */
.creds {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    width: fit-content;
    max-width: 100%;
    margin: 20px 0 18px;
    padding: 16px 20px;
    border: 1px solid var(--on-dark-rule);
    border-radius: 12px;
    background: rgba(0, 0, 0, .22);
}
.creds > div { display: flex; flex-direction: column; gap: 3px; }
.creds .k { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-soft); line-height: 1.3; }
.creds code {
    /* Retyped off the screen by hand, so l/1 and O/0 have to be distinct. */
    font-family: var(--mono);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: .04em;
    user-select: all;
}

/* ===========================================================================
   Pricing
   =========================================================================== */

.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 20px; align-items: stretch; }

.tier {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 15px;
    padding: 28px 26px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--lift-1);
    transition: transform .18s ease, box-shadow .18s ease;
}
.tier:hover { transform: translateY(-3px); box-shadow: var(--lift-2); }

.tier.featured { border-color: transparent; box-shadow: 0 0 0 2px var(--brand), var(--lift-3); }
.tier.featured:hover { box-shadow: 0 0 0 2px var(--brand), var(--lift-3); }

@media (min-width: 820px) {
    /* transform paints outside the layout: a scaled card grows past the top
       and bottom of its own grid row without the row knowing, and the extra
       height came out over the paragraph above it. The row is given the space
       the scale needs — half the growth at each end, plus the 3px the hover
       lifts, plus room for the card to grow taller than it is today without
       this becoming a bug again. */
    .tiers { padding-block: 26px; }
    .tier.featured { transform: scale(1.035); }
    .tier.featured:hover { transform: scale(1.035) translateY(-3px); }
}

.tier-tag {
    display: inline-block;
    align-self: flex-start;
    font-family: var(--display);
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin: 0 0 12px;
}
.tier.featured .tier-tag {
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--gold);
    color: #2a1f05;
    box-shadow: var(--bevel);
}

.tier h3 { font-family: var(--display); font-size: 1.2rem; font-weight: 600; margin: 0 0 4px; }
.tier .band { color: var(--ink-faint); font-size: 0.88rem; margin: 0 0 18px; }

.tier .price {
    font-family: var(--display);
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.028em;
    font-variant-numeric: tabular-nums;
}
.tier .price small { font-size: 0.88rem; font-weight: 400; color: var(--ink-faint); }
.tier .per { color: var(--ink-soft); font-size: 0.89rem; margin: 7px 0 22px; }

.tier ul { list-style: none; margin: 0 0 24px; padding: 0; flex: 1; }
.tier li { font-size: 0.93rem; color: var(--ink-soft); padding-inline-start: 25px; position: relative; margin-bottom: 10px; }
.tier li::before {
    content: "✓";
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 4px;
    width: 16px; height: 16px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
}

/* ---------- calculator ---------- */

.calc {
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    border-radius: 16px;
    padding: 30px 28px;
    box-shadow: var(--lift-2);
    margin-top: 36px;
}
.calc h3 { font-family: var(--display); font-size: 1.1rem; font-weight: 600; margin: 0 0 18px; }
.calc-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.calc label { font-size: 0.95rem; color: var(--ink-soft); }
.calc input[type="number"] {
    font-family: var(--mono);
    font-size: 1.05rem;
    padding: 11px 14px;
    border: 1px solid var(--rule-strong);
    border-radius: 9px;
    width: 9rem;
    background: var(--ground);
    color: var(--ink);
}
.calc input[type="number"]:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

.calc-out {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 11px;
    overflow: hidden;
}
.calc-cell { background: var(--paper); padding: 17px 18px; }
.calc-cell .k { font-size: 0.76rem; color: var(--ink-faint); display: block; letter-spacing: .04em; }
.calc-cell .v { font-family: var(--display); font-size: 1.55rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-cell.highlight { background: linear-gradient(170deg, #fdf6e6, #f7ebd0); }
.calc-cell.highlight .v { color: var(--gold-deep); }
.calc-note { font-size: 0.86rem; color: var(--ink-faint); margin: 16px 0 0; }

/* ===========================================================================
   The quote form
   =========================================================================== */

.quote-form {
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    border-radius: 16px;
    padding: 34px 32px;
    box-shadow: var(--lift-2);
    max-width: 52rem;
}

/* Two columns on a desktop, one on a phone. Company and email lead because
   they are the two we cannot answer an enquiry without. */
.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px 22px;
}

.field { margin: 0 0 18px; display: flex; flex-direction: column; gap: 7px; }
.field-grid .field { margin: 0; }

/* The two size questions are hidden together on a privacy or refund request,
   so they need one element around them — but that element must not become a
   grid cell of its own, or the two would stack in a single column while every
   other field sits beside its neighbour. display:contents keeps them in the
   parent's grid; the [hidden] rule has to be spelled out because an author
   display wins over the browser's own "[hidden] { display: none }". */
.field-pair { display: contents; }
.field-pair[hidden] { display: none; }

.field label {
    font-family: var(--display);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
    font-family: var(--sans);
    font-size: 1rem;
    padding: 12px 14px;
    border: 1px solid var(--rule-strong);
    border-radius: 10px;
    background: var(--ground);
    color: var(--ink);
    width: 100%;
    transition: border-color .15s ease, background-color .15s ease;
}

.field input[type="number"] { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.field textarea { resize: vertical; min-height: 6rem; line-height: 1.7; }

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
    background: var(--paper);
    border-color: var(--brand);
}

/* Off-screen rather than display:none — something that submits every input it
   finds will skip a field it can tell is hidden. */
.honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 26px; }
.form-actions .btn { border: 1px solid transparent; cursor: pointer; font-family: var(--display); }

.form-note { margin: 18px 0 0; font-size: 0.86rem; color: var(--ink-faint); }

.form-error {
    margin: 0 0 22px;
    padding: 13px 18px;
    border-radius: 10px;
    border: 1px solid #e8c9c2;
    border-inline-start: 3px solid #9a3226;
    background: #fbeeeb;
    color: #7a271c;
    font-size: 0.93rem;
}

@media (max-width: 680px) {
    .quote-form { padding: 24px 20px; border-radius: 14px; }
}

/* ===========================================================================
   Tables
   =========================================================================== */

.scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--paper);
    font-size: 0.94rem;
    border: 1px solid var(--rule);
    border-radius: 12px;
    overflow: hidden;
    min-width: 21rem;
    box-shadow: var(--lift-1);
}
th, td { text-align: start; padding: 14px 17px; border-bottom: 1px solid var(--rule); }
thead th {
    background: var(--petrol-1);
    font-family: var(--display);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--on-dark);
}
tbody tr:nth-child(even) td { background: var(--ground); background: color-mix(in srgb, var(--ground) 60%, transparent); }
tbody tr:last-child td { border-bottom: none; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; font-family: var(--mono); font-size: 0.88rem; }
/* Same emphasis, but for a cell holding words rather than digits — the
   monospace face has no real Arabic and spaces its letters apart. */
td.tight { white-space: nowrap; font-weight: 600; }

/* ===========================================================================
   Questions
   =========================================================================== */

.faq { border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: var(--paper); box-shadow: var(--lift-1); }
.alt .faq { background: var(--ground); }
.alt .faq summary:hover { background: var(--paper); }

.faq details { position: relative; border-block-end: 1px solid var(--rule); }
.faq details:last-child { border-block-end: 0; }

/* The rail marking the open row. Inline-start, so it is on the right in
   Arabic and the left in English without a second rule. */
.faq details::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 3px;
    background: var(--gold);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform .22s ease;
}
.faq details[open]::before { transform: scaleY(1); }

.faq summary {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    cursor: pointer;
    padding: 18px 24px;
    list-style: none;
    transition: background-color .15s ease, color .15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--brand-light); background: color-mix(in srgb, var(--brand-light) 55%, transparent); }
.faq details[open] summary { color: var(--brand-deep); border-block-end: 1px solid var(--rule); }

/* One element, rotated — no icon request, and it turns cleanly on open. */
.faq summary::after {
    content: "";
    flex: none;
    width: 9px; height: 9px;
    margin-inline-start: auto;
    margin-block-start: -4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    border-radius: 1px;
    color: var(--ink-faint);
    transform: rotate(45deg);
    transition: transform .22s ease, color .15s ease;
}
.faq summary:hover::after { color: var(--gold-deep); }
.faq details[open] summary::after { color: var(--gold-deep); transform: rotate(225deg); margin-block-start: 3px; }

.faq details p { margin: 0; padding: 18px 24px 22px; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.85; max-width: 72ch; }

/* Animated where the browser can animate to a content-sized height; elsewhere
   the panel simply appears, which is what <details> has always done. */
@supports (interpolate-size: allow-keywords) {
    :root { interpolate-size: allow-keywords; }
    .faq details::details-content { block-size: 0; overflow: hidden; transition: block-size .26s ease, content-visibility .26s allow-discrete; }
    .faq details[open]::details-content { block-size: auto; }
}

/* ===========================================================================
   Closing call to action
   =========================================================================== */

.cta {
    background: linear-gradient(170deg, var(--paper), var(--ground));
    border: 1px solid var(--rule-strong);
    border-radius: 18px;
    padding: 48px 36px;
    text-align: center;
    box-shadow: var(--lift-2);
}
.cta h2 { margin-top: 0; }
.cta p { color: var(--ink-soft); max-width: 52ch; margin: 0 auto 24px; }

/* ===========================================================================
   Legal pages
   =========================================================================== */

.legal { max-width: 46rem; padding-block: 56px 72px; }
.legal h1 { font-family: var(--display); font-size: clamp(1.7rem, 5vw, 2.3rem); font-weight: 600; margin: 0 0 8px; }
.legal h2 {
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 38px 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold);
    display: inline-block;
}
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-inline-start: 1.2rem; }
.legal li { margin-bottom: 8px; }

/* ===========================================================================
   Footer — petrol again, so the page is bookended
   =========================================================================== */

.site-footer {
    background: linear-gradient(135deg, var(--petrol-1), var(--petrol-2));
    border-top: 3px solid var(--gold);
    padding-block: 34px;
    margin-top: 0;
    font-size: 0.9rem;
    color: var(--on-dark-soft);
}
.site-footer .wrap { display: flex; gap: 14px 28px; flex-wrap: wrap; align-items: center; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; margin-inline-start: auto; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ===========================================================================
   Narrow screens
   =========================================================================== */

@media (max-width: 680px) {
    /* Nothing is hidden — a visitor on a phone gets the same menu — it is set
       tighter so the header takes two rows rather than three. */
    .site-header .wrap { padding-block: 11px; gap: 10px; }
    .site-nav > a { font-size: 0.86rem; padding: 6px 9px; }
    .lang-toggle { margin-inline-start: 2px; font-size: 0.78rem; }
    .lang-toggle > * { padding: 6px 11px; }

    .hero { padding-block: 44px 54px; }
    section { padding-block: 58px; }
    .brand small { display: none; }

    .panel { border-radius: 14px; }
    .cta { padding: 34px 22px; }
    .calc { padding: 24px 20px; }
    .tier.featured { transform: none; }
    .figures { grid-template-columns: 1fr; }

    .faq summary { padding: 16px 18px; font-size: 0.95rem; }
    .faq details p { padding: 16px 18px 20px; }
    .entry { padding: 22px 20px; }

    /* The specimen's four columns are tight on a phone; the padding goes
       before the type size, so the figures stay legible. */
    .specimen th, .specimen td { padding-inline: 10px; }
    .specimen td { font-size: 0.84rem; }
    .specimen-head { padding-inline: 11px; }
}

/* ---------- WhatsApp ---------- */

/* Appended by the snippet at the foot of every page, and only when a number
   is configured there — so these rules match nothing until that happens. */
.wa-button {
    position: fixed;
    inset-block-end: calc(22px + env(safe-area-inset-bottom, 0px));
    inset-inline-end: 22px;
    z-index: 40;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(180deg, #37c24a, #1da038);
    color: #fff;
    box-shadow: var(--bevel), var(--lift-3);
    transition: transform .15s ease, box-shadow .18s ease;
}

.wa-button:hover { transform: translateY(-2px); box-shadow: var(--bevel), 0 20px 46px -14px rgba(11, 26, 31, .45); }
.wa-button:active { transform: translateY(0); }

@media (max-width: 680px) {
    .wa-button { width: 50px; height: 50px; inset-inline-end: 16px; }
}

/* ---------------------------------------------------------------------------
   Free-trial signup (trial.html, trial-thanks.html)
   --------------------------------------------------------------------------- */

/* The one field whose value becomes an address, so the one that needs a line
   under it saying what it is for. */
.field-help {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--ink-faint);
}

/* Numbered because the content is a sequence with real dependencies — each
   step needs the one above it to have happened. */
.trial-steps {
    counter-reset: step;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 18px;
    max-width: 62rem;
}

.trial-steps li {
    counter-increment: step;
    position: relative;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 14px;
    padding: 20px 20px 20px 20px;
    padding-inline-start: 58px;
    line-height: 1.65;
    color: var(--ink-soft);
}

.trial-steps li::before {
    content: counter(step);
    position: absolute;
    inset-inline-start: 18px;
    top: 18px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--brand-light);
    color: var(--brand-deep);
    font-weight: 700;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}
