/* Public CGU page — readable on a phone (a driver opens this from the app login) and printable.
   Standalone: the page sets Layout = null, so it carries its own chrome. */

body {
    background: var(--em-bg);
    color: var(--em-ink);
    font-family: var(--em-font-body, "Inter", system-ui, sans-serif);
    margin: 0;
    -webkit-text-size-adjust: 100%;
}

/* ── Top bar ─────────────────────────────────────────────────────────── */
.em-cgu__top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--em-line);
}

.em-cgu__top-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.em-cgu__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.em-cgu__brand-tile {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--em-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.em-cgu__brand-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.em-cgu__brand-text {
    font-family: var(--em-font-display);
    font-weight: 700;
    letter-spacing: -.3px;
}

.em-cgu__back {
    color: var(--em-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
}

.em-cgu__back:hover { color: var(--em-ink); }

/* ── Document ────────────────────────────────────────────────────────── */
.em-cgu {
    max-width: 820px;
    margin: 0 auto;
    padding: 32px 20px 64px;
    line-height: 1.68;
    font-size: 15px;
}

.em-cgu__head h1 {
    font-family: var(--em-font-display);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.9px;
    margin: 0 0 6px;
}

.em-cgu__meta {
    color: var(--em-muted);
    font-size: 13px;
    margin: 0 0 18px;
}

.em-cgu__lead {
    font-size: 16px;
    color: var(--em-ink);
    background: var(--em-surface);
    border-radius: 14px;
    padding: 16px 18px;
    margin: 0 0 8px;
}

/* ── Table of contents ───────────────────────────────────────────────── */
.em-cgu__toc {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 18px;
    margin: 26px 0 8px;
    padding: 16px 18px;
    border: 1px solid var(--em-line);
    border-radius: 14px;
}

.em-cgu__toc a {
    color: var(--em-muted);
    text-decoration: none;
    font-size: 13.5px;
    padding: 3px 0;
}

.em-cgu__toc a:hover {
    color: var(--em-blue);
}

/* ── Sections ────────────────────────────────────────────────────────── */
.em-cgu section {
    /* Sticky header would otherwise cover the heading on an anchor jump. */
    scroll-margin-top: 70px;
    padding-top: 26px;
}

.em-cgu h2 {
    font-family: var(--em-font-display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.3px;
    margin: 0 0 10px;
}

.em-cgu p { margin: 0 0 12px; }

.em-cgu ul {
    margin: 0 0 14px;
    padding-left: 20px;
}

.em-cgu li { margin-bottom: 5px; }

/* The clauses that carry the weight — visually separated so nobody can claim they were buried. */
.em-cgu__callout {
    background: var(--em-blue-soft);
    border-left: 3px solid var(--em-blue);
    border-radius: 0 12px 12px 0;
    padding: 14px 16px;
    margin: 14px 0 16px !important;
}

/* ── Definitions ─────────────────────────────────────────────────────── */
.em-cgu__dl { margin: 0; }

.em-cgu__dl dt {
    font-weight: 600;
    margin-top: 12px;
}

.em-cgu__dl dd {
    margin: 2px 0 0;
    color: var(--em-muted);
}

/* ── Roles table ─────────────────────────────────────────────────────── */
.em-cgu__table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0 14px;
    font-size: 14px;
}

.em-cgu__table th,
.em-cgu__table td {
    text-align: left;
    vertical-align: top;
    padding: 11px 12px;
    border-bottom: 1px solid var(--em-line);
}

.em-cgu__table th {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--em-muted);
    font-weight: 600;
    border-bottom-color: var(--em-line-strong);
}

.em-cgu__table td:first-child {
    font-weight: 600;
    white-space: nowrap;
}

/* ── Prohibited-goods grid ───────────────────────────────────────────── */
.em-cgu__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.em-cgu__foot {
    margin-top: 40px;
    padding-top: 18px;
    border-top: 1px solid var(--em-line);
    color: var(--em-muted);
    font-size: 13px;
}

/* ── Phone ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .em-cgu { font-size: 15.5px; padding: 24px 18px 56px; }
    .em-cgu__head h1 { font-size: 25px; }
    .em-cgu__toc,
    .em-cgu__grid { grid-template-columns: 1fr; }

    /* A role table cannot shrink below readable — let it scroll instead of wrapping to mush. */
    .em-cgu__table { display: block; overflow-x: auto; white-space: nowrap; }
    .em-cgu__table td { white-space: normal; min-width: 210px; }
}

/* ── Print ───────────────────────────────────────────────────────────── */
@media print {
    .em-cgu__top,
    .em-cgu__toc { display: none; }

    .em-cgu { max-width: none; padding: 0; font-size: 11pt; }
    .em-cgu section { page-break-inside: avoid; padding-top: 14px; }
    .em-cgu__callout { border-left-color: #000; background: #f4f4f4; }
}
