/* One stylesheet for every page of motexpenses.app. No build step, no framework and no web fonts: the site is the
   address the stores, Volvo and the app link to, and it has to load on a phone in a car park. The CSP allows
   styles from this origin only, so nothing here may move into a style attribute. */

:root {
    --ground: #ffffff;
    --surface: #f4f6fa;
    --raised: #ffffff;
    --ink: #121a26;
    --muted: #586476;
    --line: #e2e7ee;
    --brand: #1E3A5F;
    --brand-ink: #1E3A5F;
    --accent: #F2A33C;
    --accent-soft: #fdf1df;
    --link: #1f5fa8;
    --tint: #e8eef6;
    --shadow: 0 1px 2px rgba(18, 26, 38, 0.06), 0 8px 24px rgba(18, 26, 38, 0.08);
    --shadow-lg: 0 2px 6px rgba(18, 26, 38, 0.08), 0 30px 60px -12px rgba(18, 26, 38, 0.28);
    --radius: 16px;
    --header: rgba(255, 255, 255, 0.78);
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ground: #0c1219;
        --surface: #131c27;
        --raised: #18232f;
        --ink: #e8edf3;
        --muted: #9aa7b7;
        --line: #253241;
        --brand-ink: #9cc0ea;
        --accent-soft: #3a2a12;
        --link: #8fbaf0;
        --tint: #1a2838;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.4), 0 30px 60px -12px rgba(0, 0, 0, 0.6);
        --header: rgba(12, 18, 25, 0.78);
    }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--link); text-underline-offset: 0.15em; }
img { max-width: 100%; }

.wrap {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 640px) {
    .wrap { padding: 0 24px; }
}

h1, h2, h3 { letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.08; margin: 0 0 1rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.15; margin: 0 0 0.75rem; }
h3 { font-size: 1.1rem; line-height: 1.3; margin: 1.5rem 0 0.35rem; }

.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 1.75rem; max-width: 36rem; }
.meta { color: var(--muted); font-size: 0.92rem; }

/* Header */

header.top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--header);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1rem;
    min-height: 4rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-right: auto;
    color: var(--ink);
    font-weight: 750;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand img { width: 34px; height: 34px; border-radius: 9px; }

.links { display: flex; gap: 0.25rem; }

.links a {
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 550;
    text-decoration: none;
    white-space: nowrap;
}

.links a:hover { color: var(--ink); background: var(--surface); }
.links a[aria-current="page"] { color: var(--ink); background: var(--tint); }

@media (max-width: 639px) {
    .bar { padding-top: 0.5rem; }
    .links {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        margin: 0 -0.5rem;
    }
}

/* Language menu: a <details>, so it opens without script; lang.js only closes it on an outside click or Escape.
   The list scrolls, ready for many more languages than two. */

.flag {
    width: 22px;
    height: 16px;
    flex: none;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.lang { position: relative; }

.lang summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--raised);
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 550;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.lang summary::-webkit-details-marker { display: none; }

.lang summary::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    margin: -0.2rem 0.1rem 0 0.1rem;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.15s;
}

.lang[open] summary::after { transform: rotate(-135deg); margin-top: 0.2rem; }
.lang summary:hover { border-color: var(--muted); }

.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    min-width: 12rem;
    max-height: min(60vh, 24rem);
    overflow-y: auto;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    background: var(--raised);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.lang-menu a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.95rem;
}

.lang-menu a:hover { background: var(--surface); }
.lang-menu a[aria-current="true"] { font-weight: 650; }

.lang-menu a[aria-current="true"]::after {
    content: "";
    width: 0.35rem;
    height: 0.7rem;
    margin-left: auto;
    border-right: 2px solid var(--link);
    border-bottom: 2px solid var(--link);
    transform: rotate(45deg) translateY(-2px);
}

/* Buttons and small pieces */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.35rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 650;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px -6px rgba(30, 58, 95, 0.6); }
.btn-primary:hover { box-shadow: 0 10px 24px -8px rgba(30, 58, 95, 0.7); }
.btn-ghost { background: var(--raised); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-accent { background: var(--accent); color: #1b1305; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (prefers-color-scheme: dark) {
    .btn-primary { background: #2c5486; }
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
    padding: 0.35rem 0.85rem 0.35rem 0.6rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 550;
}

.pill::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(242, 163, 60, 0.25);
}

.ico {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.eyebrow {
    margin: 0 0 0.5rem;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Home: hero */

.hero {
    position: relative;
    padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem);
    background:
        radial-gradient(60rem 30rem at 85% -10%, rgba(242, 163, 60, 0.16), transparent 60%),
        radial-gradient(50rem 30rem at -10% 10%, rgba(30, 58, 95, 0.14), transparent 60%),
        linear-gradient(var(--ground), var(--surface));
    border-bottom: 1px solid var(--line);
}

.hero-grid {
    display: grid;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 900px) {
    .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}

.hero h1 .accent {
    background: linear-gradient(90deg, #e08a16, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.platforms li {
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--raised);
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 550;
}

/* Home: the phone drawn in the hero. Decorative and hidden from screen readers; its figures are an example. */

.phone {
    position: relative;
    width: min(100%, 19rem);
    margin: 0 auto;
    padding: 0.7rem;
    border-radius: 2.6rem;
    background: linear-gradient(145deg, #2a3a50, #0d141d);
    box-shadow: var(--shadow-lg);
}

.phone::before {
    content: "";
    position: absolute;
    top: 1.25rem;
    left: 50%;
    width: 5rem;
    height: 1.4rem;
    margin-left: -2.5rem;
    border-radius: 999px;
    background: #05080c;
    z-index: 1;
}

.screen {
    padding: 3rem 1rem 1.25rem;
    border-radius: 2rem;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.85rem;
    line-height: 1.4;
}

.figure-card {
    padding: 1rem;
    border-radius: 1rem;
    background: linear-gradient(150deg, #24476f, var(--brand));
    color: #fff;
}

.figure-card small { display: block; opacity: 0.75; font-size: 0.75rem; }
.figure-card strong { display: block; font-size: 2rem; letter-spacing: -0.02em; line-height: 1.2; }
.figure-card strong span { font-size: 0.95rem; font-weight: 600; opacity: 0.8; }

.bars {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    height: 3.5rem;
    margin-top: 0.75rem;
}

.bars i {
    flex: 1;
    border-radius: 4px 4px 2px 2px;
    background: rgba(255, 255, 255, 0.28);
}

.bars i:nth-child(1) { height: 55%; }
.bars i:nth-child(2) { height: 72%; }
.bars i:nth-child(3) { height: 40%; }
.bars i:nth-child(4) { height: 85%; }
.bars i:nth-child(5) { height: 62%; }
.bars i:nth-child(6) { height: 48%; }
.bars i:nth-child(7) { height: 100%; background: var(--accent); }

.rows { margin: 0.75rem 0 0; padding: 0; list-style: none; }

.rows li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.5rem;
    padding: 0.6rem 0.7rem;
    border-radius: 0.8rem;
    background: var(--raised);
    box-shadow: 0 1px 2px rgba(18, 26, 38, 0.06);
}

.rows .ico { width: 18px; height: 18px; }

.rows .dot {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex: none;
    border-radius: 0.6rem;
    background: var(--tint);
    color: var(--brand-ink);
}

.rows .dot.warn { background: var(--accent-soft); color: #c27613; }
.rows div { flex: 1; min-width: 0; }
.rows b { display: block; font-weight: 650; }
.rows small { color: var(--muted); }
.rows em { font-style: normal; font-weight: 650; white-space: nowrap; }

/* Home: sections */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.features li {
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--raised);
    color: var(--muted);
    font-size: 0.97rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.features li:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }

.ico-box {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: var(--tint);
    color: var(--brand-ink);
}

.features strong { display: block; margin-bottom: 0.3rem; color: var(--ink); font-size: 1.05rem; }

.privacy-band {
    background: linear-gradient(150deg, #1a3354, #0f1f35);
    color: #e8edf3;
}

.privacy-band h2 { color: #fff; }
.privacy-band .section-head p { color: #b8c6d8; }
.privacy-band a { color: #ffc876; }

.points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.points li {
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.05);
    color: #b8c6d8;
}

.points .ico { width: 28px; height: 28px; margin-bottom: 0.75rem; color: var(--accent); }
.points strong { display: block; margin-bottom: 0.3rem; color: #fff; font-size: 1.05rem; }

.cta {
    display: grid;
    gap: 1.5rem;
    align-items: center;
    padding: clamp(1.75rem, 5vw, 3rem);
    border-radius: 24px;
    background:
        radial-gradient(30rem 15rem at 100% 0%, rgba(242, 163, 60, 0.22), transparent 70%),
        var(--surface);
    border: 1px solid var(--line);
}

@media (min-width: 800px) {
    .cta { grid-template-columns: 1fr auto; }
}

.cta h2 { margin-bottom: 0.4rem; }
.cta p { margin: 0; color: var(--muted); font-size: 1.1rem; }

/* Companies */

.hero-compact { padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.hero-compact .lead { max-width: 44rem; }

.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
    gap: 1rem;
}

.split article {
    padding: clamp(1.5rem, 4vw, 2.25rem);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--raised);
}

.split h3 { margin-top: 0.75rem; font-size: 1.3rem; }
.split p { color: var(--muted); margin: 0.25rem 0 0; }

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    position: relative;
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.97rem;
    counter-increment: step;
}

.steps li::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 750;
}

@media (prefers-color-scheme: dark) {
    .steps li::before { background: #2c5486; }
}

.steps strong { display: block; margin-bottom: 0.3rem; color: var(--ink); font-size: 1.05rem; }

.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.alt .features li,
.alt .steps li { background: var(--raised); border: 1px solid var(--line); }

/* Six cards read better as two rows of three than as four and two. */
.features.three { grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); }

.checks {
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.features .checks li,
.checks li {
    position: relative;
    margin: 0.4rem 0 0;
    padding: 0 0 0 1.4rem;
    border: 0;
    background: none;
    font-size: 0.95rem;
    transition: none;
}

.features .checks li:hover { transform: none; box-shadow: none; }

.checks li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.45em;
    width: 0.35rem;
    height: 0.65rem;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
}

.points .checks li { padding: 0 0 0 1.4rem; border: 0; background: none; }

/* Pages of text: support, privacy, terms, 404 */

.doc {
    max-width: 48rem;
    padding-top: clamp(2rem, 6vw, 3.5rem);
    padding-bottom: 4rem;
}

.doc h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin-bottom: 0.5rem; }
.doc h2 {
    font-size: 1.4rem;
    margin: 2.75rem 0 0.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
}

.doc li { margin: 0.3rem 0; }
.doc li::marker { color: var(--muted); }

.doc.center { text-align: center; padding-top: 5rem; padding-bottom: 6rem; }

.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
}

th, td {
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
    padding: 0.65rem 0.85rem;
}

tr:last-child td { border-bottom: 0; }
th { background: var(--surface); color: var(--muted); font-weight: 650; }

/* Footer */

footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.92rem;
    padding: 3rem 0 2.5rem;
}

.foot-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
}

@media (min-width: 800px) {
    .foot-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.foot-grid .brand { margin-bottom: 0.5rem; color: var(--ink); }
.foot-grid h4 { margin: 0 0 0.6rem; color: var(--ink); font-size: 0.9rem; }
.foot-grid ul { margin: 0; padding: 0; list-style: none; }
.foot-grid li { margin: 0.35rem 0; }
.foot-grid a { color: var(--muted); text-decoration: none; }
.foot-grid a:hover { color: var(--ink); }
.foot-grid p { margin: 0; max-width: 24rem; }

.legal {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
}

.legal p { margin: 0.2rem 0; }
.legal a { color: var(--muted); }

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

/* The note about cookies: a bar fixed to the foot of the window, shown by notice.js until it is closed. */
.cookie-note {
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    padding: 0.9rem max(1rem, env(safe-area-inset-right, 0px)) calc(0.9rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
    border-top: 1px solid var(--line);
    background: var(--raised);
    color: var(--muted);
    box-shadow: var(--shadow-lg);
    font-size: 0.92rem;
}

.cookie-note[hidden] { display: none; }
.cookie-note p { margin: 0; max-width: 46rem; }
.cookie-note a { color: var(--link); }
.cookie-note .btn { padding: 0.5rem 1.1rem; font-size: 0.92rem; }
