/* ─────────────────────────────────────────────────────────────────────────────
   ADI Graduation - editorial / institutional style.
   Sakkal Majalla, flat surfaces, hairline rules, green as accent.
   All colors from brand-kit/tokens/colors.css.
   ───────────────────────────────────────────────────────────────────────────── */
@import "brand-kit/tokens/colors.css";

/* Sakkal Majalla (brand font): one regular + one bold file; light weights map to regular. */
@font-face { font-family: "Majalla"; src: url("fonts/majalla.ttf") format("truetype"); font-weight: 100 500; font-display: swap; ascent-override: 90%; descent-override: 38%; line-gap-override: 0%; }
@font-face { font-family: "Majalla"; src: url("fonts/majallab.ttf") format("truetype"); font-weight: 600 900; font-display: swap; ascent-override: 90%; descent-override: 38%; line-gap-override: 0%; }

:root {
  --font-family: "Majalla", "Sakkal Majalla", "Segoe UI", Tahoma, Arial, sans-serif;
  --line: var(--color-grey-600);
  --line-strong: var(--color-black-200);
  --ink: var(--color-black-600);
  --paper: #FCFCFB;
}

*, *::before, *::after { box-sizing: border-box; }
/* Majalla draws small for its size: raise the base so text reads like before. */
html { -webkit-text-size-adjust: 100%; font-size: 125%; }
/* Letter-spacing breaks the joins of Arabic letters. */
[dir="rtl"] body * { letter-spacing: 0 !important; }

body {
  margin: 0;
  font-family: var(--font-family);
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body, h1, h2, h3, p, a, span, label,
button, input, select, textarea { font-family: var(--font-family); }

h1, h2, h3 { font-weight: 300; line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -0.02em; }
p { margin: 0 0 1rem; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.icon { display: inline-block; vertical-align: middle; }
[dir="rtl"] .icon-dir { transform: scaleX(-1); }

.container { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 1.5rem; }
main { flex: 1 0 auto; padding: 0 0 4rem; }
.muted { color: var(--color-text-muted); }
.hidden { display: none !important; }
.motif { background: none; }

/* fixed brand rule across the top */
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 3px;
  background: var(--color-primary); z-index: 200;
}

.kicker, .tagline {
  display: inline-block; font-size: .74rem; font-weight: 300;
  text-transform: uppercase; letter-spacing: .2em; color: var(--color-beige-900);
}

/* ── Accessibility ────────────────────────────────────────────────────────── */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--color-focus-ring); outline-offset: 2px; border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
.skip-link {
  position: absolute; left: 50%; top: .5rem; transform: translateX(-50%) translateY(-160%);
  z-index: 2000; background: var(--color-primary); color: #fff; padding: .6rem 1rem;
  border-radius: 2px; text-decoration: none; transition: transform 150ms ease-out;
}
.skip-link:focus { transform: translateX(-50%) translateY(0); }

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 70px; padding: 0 1.5rem; max-width: 1120px; margin: 0 auto; width: 100%;
  border-bottom: 1px solid var(--line-strong);
}
.site-header .brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.site-header .brand img { height: 34px; width: auto; display: block; }
.header-actions { display: flex; align-items: center; gap: .5rem; }

.lang-toggle {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  border-radius: 2px; padding: 0 .9rem; font-size: .84rem; font-weight: 300; cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}
.lang-toggle:hover { background: var(--ink); color: #fff; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  border-radius: 2px; cursor: pointer; transition: background-color 150ms ease-out, color 150ms ease-out;
}
.icon-btn:hover { background: var(--ink); color: #fff; }
.link-home { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; color: var(--color-text-muted); font-weight: 300; }

/* ── Hero / masthead (light, editorial) ───────────────────────────────────── */
.hero { background: var(--paper); border-bottom: 1px solid var(--line); }
.hero-inner { padding: 2.25rem 0 1.75rem; }
.hero .tagline { display: block; margin-bottom: 1.3rem; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.2; letter-spacing: -0.035em; color: var(--ink); max-width: 28ch; margin-bottom: .8rem; }
.hero p { font-size: 1.1rem; color: var(--color-text-muted); max-width: 50ch; line-height: 1.7; }
.ceremony-facts { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; color: var(--ink); font-weight: 600; }
.ceremony-facts li { display: inline-flex; align-items: center; gap: .5rem; }
.ceremony-facts .icon { color: var(--color-primary, currentColor); flex: none; }

/* page heading (apply/view/admin) */
main > .container > h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 2.75rem 0 .4rem; letter-spacing: -0.025em; }
main > .container > p.muted { margin-bottom: 2rem; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 44px; padding: 0 1.4rem; border: 1.5px solid transparent; border-radius: 2px;
  font: inherit; font-weight: 300; letter-spacing: .02em; cursor: pointer; text-decoration: none;
  color: var(--ink); background: var(--color-bg-muted);
  transition: background-color 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out;
}
.btn:hover { text-decoration: none; }
.btn-label { display: inline-flex; align-items: center; }
.btn-arrow { display: inline-flex; align-items: center; background: transparent !important; padding: 0; opacity: .85; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-ghost, .btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover, .btn-outline:hover { background: var(--ink); color: #fff; }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: var(--color-danger-hover); }
.btn-block { display: inline-flex; width: 100%; }
.btn-sm { min-height: 36px; padding: 0 .9rem; font-size: .9rem; gap: .4rem; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* ── Landing action panels ────────────────────────────────────────────────── */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin: 2.5rem 0; }
@media (max-width: 640px) { .actions { grid-template-columns: 1fr; } }
.action-card {
  background: #fff; border: 1px solid var(--line-strong); border-radius: 3px; padding: 2rem;
  display: flex; flex-direction: column; gap: 1rem; text-decoration: none; color: var(--ink);
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out;
}
.action-card:hover { border-color: var(--color-primary); box-shadow: 0 14px 40px -28px rgba(26,86,50,.55); text-decoration: none; }
.action-card .ac-icon {
  width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center; color: var(--color-primary);
}
.action-card h3 { margin: 0; font-size: 1.4rem; }

/* ── Cards / panels ───────────────────────────────────────────────────────── */
.card {
  background: #fff; border: 1px solid var(--line-strong); border-radius: 3px;
  padding: 1.75rem; margin-bottom: 1.25rem;
}
.card h2 { font-size: 1.5rem; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.field { margin-bottom: 1.1rem; }
.field > label { display: block; font-size: .76rem; font-weight: 300; text-transform: uppercase; letter-spacing: .1em; color: var(--color-text-muted); margin-bottom: .45rem; }
.req { color: var(--color-danger); margin-inline-start: .15rem; }

input[type="text"], input[type="tel"], input[type="email"],
input[type="number"], input[type="date"], input[type="password"],
select, textarea {
  width: 100%; padding: .5rem .75rem; border: 1px solid var(--line-strong); border-radius: 2px;
  background: #fff; color: var(--ink); font: inherit;
  transition: border-color 150ms ease-out;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); }

.check-group { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.check { display: flex; align-items: center; gap: .65rem; padding: .8rem .2rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--color-primary); }
.hint { font-size: .82rem; color: var(--color-text-muted); margin: .5rem 0 0; }

.form-error { color: var(--color-danger); background: var(--color-danger-subtle); border: 1px solid var(--color-danger-muted); border-radius: 2px; padding: .7rem .85rem; margin-bottom: 1rem; }
.form-ok { color: var(--color-primary); background: var(--color-primary-subtle); border: 1px solid var(--color-primary-muted); border-radius: 2px; padding: .7rem .85rem; margin-bottom: 1rem; }

/* ── Status / chips ───────────────────────────────────────────────────────── */
.status-card { border: 1px solid var(--line-strong); border-top: 3px solid var(--line-strong); border-radius: 3px; background: #fff; padding: 1.25rem; margin-bottom: 1rem; }
.status-pending  { border-top-color: var(--color-warning); }
.status-approved { border-top-color: var(--color-primary); }
.status-rejected { border-top-color: var(--color-danger); }
.badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 300; text-transform: uppercase; letter-spacing: .1em; padding: .3rem .7rem; border-radius: 2px; }
.badge-pending  { background: var(--color-warning); color: var(--color-beige-950); }
.badge-approved { background: var(--color-primary); color: #fff; }
.badge-rejected { background: var(--color-danger); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .25rem 0 .5rem; }
.chip { background: var(--color-grey-100); border: 1px solid var(--line-strong); border-radius: 2px; padding: .25rem .7rem; font-size: .9rem; }
.kv { margin: .15rem 0; }
.kv .k { color: var(--color-text-muted); }

/* ── Gate-pass card (View) ────────────────────────────────────────────────── */
.pass-card { max-width: 460px; margin: 0 auto 1.25rem; background: #fff; border: 1.5px solid var(--ink); border-radius: 3px; overflow: hidden; }
.pass-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1.5px solid var(--ink); }
.pass-head .pass-logo { height: 28px; width: auto; }
.pass-head .pass-title { font-size: .95rem; letter-spacing: .04em; flex: 1; }
.pass-body { padding: 1.25rem; }
/* inline, start-aligned, comma-separated events */
.pass-events { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; text-align: start; padding: .25rem 0 1rem; border-bottom: 1px dashed var(--line-strong); margin-bottom: 1rem; }
.pass-events-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--color-text-muted); }
.pass-events-list { font-size: 1.05rem; color: var(--ink); }
.pass-identity { display: flex; flex-direction: column; }
.pass-kv { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; padding: .6rem 0; border-bottom: 1px solid var(--line); text-align: start; }
.pass-kv:last-child { border-bottom: none; }
.pass-k { color: var(--color-text-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.pass-v { text-align: start; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line-strong); margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab { background: none; border: none; font: inherit; font-weight: 300; padding: .7rem 1rem; min-height: 44px; cursor: pointer; color: var(--color-text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: .4rem; transition: color 150ms ease-out, border-color 150ms ease-out; }
.tab[aria-selected="true"] { color: var(--color-primary); border-bottom-color: var(--color-primary); }

.toolbar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.auto-accept { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--ink); cursor: pointer; }
.auto-accept input { width: 18px; height: 18px; margin: 0; accent-color: var(--color-primary); }
.inbox-row { cursor: pointer; }
.toolbar select { width: auto; }
.row-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }

/* ── Admin inbox table ────────────────────────────────────────────────────── */
.table-wrap { border: 1px solid var(--line-strong); border-radius: 3px; overflow-x: auto; background: #fff; }
.inbox-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.inbox-table thead th { text-align: start; font-size: .7rem; font-weight: 300; text-transform: uppercase; letter-spacing: .1em; color: var(--color-text-muted); padding: .85rem 1rem; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.inbox-table td { padding: .8rem 1rem; vertical-align: middle; }
.inbox-row { border-top: 1px solid var(--line); cursor: pointer; transition: background-color 140ms ease-out; }
.inbox-table tbody tr:first-child { border-top: none; }
.inbox-row:hover, .inbox-row.is-open { background: var(--color-grey-50); }
.inbox-row .cell-name { white-space: nowrap; }
.inbox-row .cell-mobile { font-variant-numeric: tabular-nums; white-space: nowrap; }
.inbox-row .cell-date { color: var(--color-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.inbox-row .chips { margin: 0; }
.ta-actions { text-align: end; white-space: nowrap; }
.ta-actions .row-actions { justify-content: flex-end; flex-wrap: nowrap; }
[dir="rtl"] .ta-actions .row-actions { justify-content: flex-start; }
.inbox-detail td { background: var(--color-grey-50); border-top: 1px dashed var(--line-strong); padding: 1rem 1.1rem; }

.icon-action { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 2px; background: #fff; color: var(--ink); cursor: pointer; transition: background-color 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out; }
.icon-action:hover { background: var(--color-grey-100); }
.icon-action.act-approve { color: var(--color-primary); }
.icon-action.act-approve:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.icon-action.act-reject { color: var(--color-danger); }
.icon-action.act-reject:hover { background: var(--color-danger); color: #fff; border-color: var(--color-danger); }
.icon-action.act-del:hover { background: var(--color-danger-subtle); color: var(--color-danger); border-color: var(--color-brick-300); }

/* admins + builder */
.list-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; border: 1px solid var(--line-strong); border-radius: 2px; padding: .75rem 1rem; margin-bottom: .6rem; background: #fff; }
.builder-field { border: 1px solid var(--line-strong); border-radius: 2px; padding: 1rem; margin-bottom: .9rem; background: #fff; }
.builder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 640px) { .builder-grid { grid-template-columns: 1fr; } }
.locked-field { background: var(--color-grey-100); border-style: dashed; }
.locked-tag { font-size: .8rem; color: var(--color-text-muted); display: inline-flex; align-items: center; gap: .3rem; }
.req-item { border: 1px solid var(--line-strong); border-radius: 3px; padding: 1rem 1.1rem; margin-bottom: .9rem; background: #fff; }
.req-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* ── Dialog ───────────────────────────────────────────────────────────────── */
dialog { border: 1px solid var(--ink); border-radius: 3px; padding: 0; width: min(440px, 92vw); color: var(--ink); }
#pass-dialog { width: min(490px, 94vw); }
#edit-dialog { width: min(520px, 94vw); }
#edit-dialog .dialog-body { max-height: 80vh; overflow-y: auto; }
#pass-preview .pass-card { max-width: 100%; margin: 0; border: none; }
dialog::backdrop { background: rgba(10,10,10,.5); }
.dialog-body { padding: 1.5rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer { background: var(--color-black-600); color: var(--color-grey-700); padding: 1.75rem 0; margin-top: auto; border-top: 3px solid var(--color-primary); }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: var(--color-green-300); text-decoration: none; display: inline-flex; align-items: center; min-height: 40px; transition: color 150ms ease-out; }
.site-footer a:hover { color: #fff; }
.site-footer .foot-brand { color: #fff; font-size: .9rem; }
.footer-links { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }

/* ── Auth gate ────────────────────────────────────────────────────────────── */
.center-narrow { max-width: 420px; margin: 0 auto; }
.spinner { text-align: center; color: var(--color-text-muted); padding: 3rem 0; }

/* ── Invitation badges (rendered by card.js) ──────────────────────────────── */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; margin: 1.5rem 0; }
.badge-item { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.badge-item img { width: 100%; max-width: 320px; height: auto; border-radius: 14px; box-shadow: 0 10px 28px rgba(10, 10, 10, .14); }
.badge-item .btn { gap: .4rem; }
#pass-dialog { width: min(980px, 94vw); max-width: none; }
.decline-wrap { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.decline-ask { margin-top: .5rem; }
.name-edit { margin-top: 1rem; }

/* ── Inbox inline editors ─────────────────────────────────────────────────── */
.inline-tag { display: flex; gap: .35rem; flex-wrap: wrap; min-width: 150px; }
.inline-tag select, .inline-tag input { min-height: 34px; padding: .2rem .5rem; font-size: .85rem; }
.num-input { width: 6.5rem; min-height: 34px; padding: .2rem .5rem; font-size: .9rem; text-align: center; }
.companion-row td { border-top: none; background: rgba(205, 167, 135, .07); }
.companion-row .cell-name { padding-inline-start: 1.6rem; color: var(--color-text-muted); }
.companion-mark { color: var(--color-gold, #CDA787); }
.inbox-row.dup .num-input { border-color: var(--color-danger); background: rgba(163, 58, 43, .06); }
.link-btn { background: none; border: none; padding: 0; font: inherit; color: var(--color-primary); cursor: pointer; text-align: start; }
.link-btn:hover { text-decoration: underline; }
.badge-invited { background: var(--color-grey-200, #EDEDEC); color: var(--ink); }
.import-list { max-height: 180px; overflow: auto; margin: .25rem 0 1rem; padding-inline-start: 1.2rem; font-size: .85rem; }
#import-dialog { width: min(560px, 94vw); }
.inbox-table td { padding-top: .45rem; padding-bottom: .45rem; vertical-align: middle; }
.inbox-table .inline-tag select, .inbox-table .inline-tag input, .inbox-table .num-input { height: 36px; min-height: 36px; padding-block: 0; width: auto; }
.inbox-table .inline-tag select { width: 9.5rem; }
.inbox-table .inline-tag input { width: 9.5rem; }
.inbox-table .num-input { width: 6rem; }

/* Admin page: as wide as the header; toolbar buttons on one line. */
.container.container-wide { max-width: 1120px; }
#panel-inbox .toolbar { flex-wrap: wrap; gap: .5rem .6rem; }
#panel-inbox .toolbar .btn-sm { padding: 0 .75rem; white-space: nowrap; }
#panel-inbox .toolbar .tool-buttons { display: flex; gap: .5rem; flex-wrap: wrap; margin-inline-start: auto; }

/* ── Support ──────────────────────────────────────────────────────────────── */
.support-link { font-size: .9em; margin-inline-start: .35rem; text-decoration: underline; }
#support-dialog { width: min(480px, 94vw); }
.tab-count { color: var(--color-danger); font-weight: 700; }
.sup-card { margin-bottom: .9rem; }
.sup-card.sup-done { opacity: .65; }
.sup-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin-bottom: .5rem; }
.sup-text { white-space: pre-wrap; margin: .25rem 0 .5rem; }
.sup-meta { display: flex; flex-direction: column; gap: .15rem; font-size: .85rem; margin-bottom: .5rem; }
.inbox-table th, .inbox-table td { padding-inline: .55rem; }
.inbox-table .inline-tag select, .inbox-table .inline-tag input { width: 8.5rem; }
.inbox-table .num-input { width: 5.5rem; }
.inbox-table .cell-date { white-space: nowrap; }

/* ── Compact layout (phones first) ─────────────────────────────────────────── */
/* 1. Landing: each choice is one tappable row (icon · name + who it is for · arrow) */
.actions { gap: .9rem; margin: 1.75rem 0; }
.action-card { flex-direction: row; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; }
.action-card .ac-text { flex: 1; display: flex; flex-direction: column; gap: .15rem; }
.action-card h3 { font-size: 1.25rem; }
.action-card .ac-desc { font-size: .85rem; color: var(--color-text-muted); }
.action-card .ac-go { flex: none; display: inline-flex; }
.action-card.primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.action-card.primary .ac-desc { color: rgba(255,255,255,.8); }
.action-card.primary .ac-icon { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); color: #fff; }
.action-card.primary:hover { background: var(--color-primary-hover); }

/* 4. Ceremony details as icon lines */
.cer-name { font-weight: 700; margin: 0 0 .5rem; }
.cer-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.cer-facts li { display: flex; align-items: center; gap: .55rem; }
.cer-facts .icon { color: var(--color-primary); flex: none; }

/* 5. Once a card is shown, the lookup shrinks to one line */
.has-result main > .container > h1 { font-size: 1.5rem; margin-top: 1.25rem; }
.has-result main > .container > p.muted { display: none; }
.has-result #lookup-card { padding: .6rem .75rem; }
.has-result #lookup-card .toolbar { margin: 0; }

/* 6. Slimmer footer, links on one line */
.site-footer { padding: .7rem 0; }
.site-footer .footer-links { display: inline-flex; gap: 1rem; flex-wrap: wrap; }
.site-footer a { min-height: 32px; }

@media (max-width: 640px) {
  .container { padding: 0 1rem; }
  /* 3. Thinner header, smaller page title */
  .site-header { height: 56px; padding: 0 1rem; }
  .site-header .brand img { height: 28px; }
  .icon-btn, .lang-toggle { height: 36px; min-height: 36px; }
  .icon-btn { width: 36px; }
  main > .container > h1 { font-size: 1.75rem; margin: 1.25rem 0 .25rem; }
  main > .container > p.muted { margin-bottom: 1rem; font-size: .92rem; }
  .hero-inner { padding: 1.5rem 0 1.25rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero .tagline { margin-bottom: .6rem; }
  .ceremony-facts { margin-top: .9rem; gap: .35rem 1rem; }
  /* 2. Forms use the full width: no frame inside the page frame */
  .card { border: none; padding: 0; background: transparent; margin-bottom: 1rem; }
  .has-result #lookup-card { padding: 0; }
  .site-footer .container { gap: .25rem .75rem; }
  .site-footer .foot-brand { font-size: .8rem; }
  .site-footer a { font-size: .85rem; }
}
