/* ── MAR platform: shared header, app launcher, and the preview pages ──
   Tokens carry a --mar- prefix so they sit beside each app's own. Page
   rules are scoped to body.mar-page, so an app that only borrows the
   launcher (Rentals) keeps its own look. */
:root{
  --mar-red:#C8102E; --mar-red-text:#A80D26; --mar-red-tint:#FBEAEC;
  --mar-header-bg:#121212; --mar-header-hover:#2E2E2E;
  --mar-surface:#FFFFFF; --mar-page-bg:#F4F3F1; --mar-hover:#F2F1EF;
  --mar-border:#E4E2DF; --mar-input-border:#C9C6C1;
  --mar-text:#1B1B1B; --mar-text-muted:#5F5B57; --mar-pill-bg:#EFEDEA;
  --mar-ui:Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --mar-display:Archivo,Inter,system-ui,sans-serif;
}
.mar-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ── launcher button ── */
.mar-waffle{width:48px;height:48px;flex:none;border:0;padding:0;margin:0;cursor:pointer;display:grid;place-items:center;
  transition:background-color .12s}
.mar-waffle--header{background:var(--mar-header-bg);color:#FFFFFF}
.mar-waffle--header:hover{background:var(--mar-header-hover)}
.mar-waffle--header:focus-visible{outline:2px solid #FFFFFF;outline-offset:-4px}
.mar-waffle--header.is-open{background:var(--mar-red)}
/* on a light surface it sits like the other icon buttons there */
.mar-waffle--light{width:36px;height:36px;border-radius:8px;background:transparent;color:#3D4350}
.mar-waffle--light:hover{background:#EFF1F4;color:#1F2430}
.mar-waffle--light:focus-visible{outline:2px solid var(--mar-red);outline-offset:2px}
.mar-waffle--light.is-open{background:var(--mar-red);color:#FFFFFF}

/* ── launcher panel ── */
.mar-launcher{position:fixed;z-index:300;width:400px;max-width:calc(100vw - 16px);box-sizing:border-box;
  background:var(--mar-surface);color:var(--mar-text);font:14px/1.4 var(--mar-ui);
  box-shadow:0 10px 32px rgba(0,0,0,.18),0 1px 3px rgba(0,0,0,.08);
  padding:20px;display:flex;flex-direction:column;gap:18px;animation:mar-drop .14s ease-out}
.mar-launcher--header{border-radius:0 0 10px 10px}
.mar-launcher--light{border-radius:10px;border:1px solid var(--mar-border)}
.mar-launcher.is-wide{width:100vw;max-width:none;border-radius:0 0 10px 10px}
@keyframes mar-drop{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.mar-launcher{animation:none}}
.mar-lsearch{height:36px;border:1px solid var(--mar-input-border);border-radius:6px;display:flex;align-items:center;gap:8px;
  padding:0 10px;color:var(--mar-text-muted)}
.mar-lsearch:focus-within{outline:2px solid var(--mar-red);outline-offset:2px}
.mar-lsearch input{flex:1;min-width:0;border:0;outline:none;background:transparent;font:inherit;color:var(--mar-text)}
.mar-lsearch input::placeholder{color:var(--mar-text-muted)}
.mar-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.mar-tile{min-height:100px;border:0;border-radius:8px;padding:12px 4px 10px;margin:0;box-sizing:border-box;
  display:flex;flex-direction:column;align-items:center;gap:7px;background:transparent;font:inherit;color:var(--mar-text);
  text-decoration:none;cursor:pointer;transition:background-color .12s}
.mar-tile[hidden]{display:none}
.mar-tile:hover{background:var(--mar-hover)}
.mar-tile:focus-visible{outline:2px solid var(--mar-red);outline-offset:2px}
.mar-tile-icon{width:44px;height:44px;border-radius:10px;display:grid;place-items:center;flex:none}
.mar-tile-name{font-size:13px;line-height:1.25;font-weight:500;text-align:center}
.mar-tile.is-current{background:var(--mar-red-tint);cursor:default}
.mar-tile.is-current .mar-tile-name{color:var(--mar-red-text);font-weight:600}
.mar-tile-bar{width:18px;height:3px;border-radius:2px;background:var(--mar-red)}
.mar-tile.is-soon{cursor:default}
.mar-tile.is-soon:hover{background:transparent}
.mar-tile.is-soon .mar-tile-icon{opacity:.42}
.mar-tile.is-soon .mar-tile-name{color:var(--mar-text-muted)}
.mar-pill{font-size:10.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--mar-text-muted);
  background:var(--mar-pill-bg);border-radius:999px;padding:2px 7px;line-height:1.3}
.mar-empty{margin:-6px 0 0;font-size:13px;color:var(--mar-text-muted);text-align:center}

/* ── shared header ── */
.mar-header{position:sticky;top:0;z-index:200;height:48px;background:var(--mar-header-bg);display:flex;align-items:center;
  gap:12px;padding-right:12px;font-family:var(--mar-ui)}
.mar-brand{display:flex;align-items:center;gap:10px;text-decoration:none;flex:none;border-radius:4px}
.mar-brand:focus-visible{outline:2px solid #FFFFFF;outline-offset:3px}
.mar-wordmark{display:inline-flex;align-items:center;height:26px;padding:0 7px;background:var(--mar-red);color:#FFFFFF;
  font:italic 900 17px/1 var(--mar-display);letter-spacing:.02em}
.mar-appname{font:600 17px/1 var(--mar-display);color:#FFFFFF;white-space:nowrap}
.mar-hsearch-wrap{flex:1 1 120px;min-width:0;display:flex;justify-content:center}
.mar-hsearch{width:100%;max-width:460px;height:32px;background:#FFFFFF;border-radius:4px;display:flex;align-items:center;gap:8px;
  padding:0 10px;box-sizing:border-box;color:var(--mar-text-muted)}
.mar-hsearch:focus-within{outline:2px solid var(--mar-red);outline-offset:2px}
.mar-hsearch input{flex:1;min-width:0;border:0;outline:none;background:transparent;font:14px var(--mar-ui);color:var(--mar-text)}
.mar-hsearch input::placeholder{color:var(--mar-text-muted)}
.mar-hsearch:has(input:disabled){background:#D9D7D3}
.mar-hsearch input:disabled{cursor:not-allowed}
.mar-iconbtn{width:44px;height:44px;flex:none;border:0;border-radius:4px;background:transparent;color:#FFFFFF;
  display:grid;place-items:center;cursor:pointer}
.mar-iconbtn:hover{background:var(--mar-header-hover)}
.mar-iconbtn:focus-visible{outline:2px solid #FFFFFF;outline-offset:-4px}
.mar-iconbtn[aria-disabled="true"]{cursor:default}
.mar-avatar{width:30px;height:30px;border-radius:50%;background:#3A3A3A;display:grid;place-items:center}
@media(max-width:767px){
  .mar-header{gap:8px;padding-right:4px}
  .mar-hsearch-wrap{display:none}
  .mar-brand{margin-right:auto}
}

/* ── preview pages ── */
body.mar-page{margin:0;min-height:100vh;background:var(--mar-page-bg);color:var(--mar-text);font:15px/1.5 var(--mar-ui)}
.mar-page *{box-sizing:border-box}
.mar-main{width:100%;max-width:1120px;margin:0 auto;padding:28px 24px 64px;display:flex;flex-direction:column;gap:24px}
.mar-page h1,.mar-page h2,.mar-page h3{font-family:var(--mar-display);margin:0;color:var(--mar-text)}
.mar-page h1{font-size:30px;font-weight:700;letter-spacing:-.01em}
.mar-page code{font:13px ui-monospace,SFMono-Regular,Consolas,monospace;background:var(--mar-pill-bg);padding:1px 5px;border-radius:4px;word-break:break-all}
.mar-banner{margin:0;padding:10px 14px;border-radius:8px;background:var(--mar-surface);border:1px solid var(--mar-border);
  font-size:14px;color:var(--mar-text-muted)}
.mar-banner b{color:var(--mar-text)}
.mar-pagehead{display:flex;flex-direction:column;gap:4px}
.mar-pagehead p{margin:0;color:var(--mar-text-muted)}
.mar-back{align-self:flex-start;display:inline-flex;align-items:center;gap:4px;min-height:44px;padding-right:8px;
  color:var(--mar-red-text);font-weight:600;text-decoration:none;border-radius:6px;margin:-12px 0 -8px}
.mar-back:hover{text-decoration:underline}
.mar-back:focus-visible{outline:2px solid var(--mar-red);outline-offset:2px}
.mar-section{display:flex;flex-direction:column;gap:12px}
.mar-section h2{font-size:18px;font-weight:700}
.mar-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.mar-cards--2{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.mar-card{background:var(--mar-surface);border:1px solid var(--mar-border);border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:12px}
.mar-card[hidden]{display:none}
.mar-card-icon{width:44px;height:44px;border-radius:10px;display:grid;place-items:center;flex:none}
.mar-card-icon--sm{width:32px;height:32px;border-radius:8px}
.mar-card-body{display:flex;flex-direction:column;gap:2px;flex:1}
.mar-card-body h3{font-size:16px;font-weight:700}
.mar-card-body p{margin:0;font-size:14px;color:var(--mar-text-muted)}
.mar-card-foot{display:flex;align-items:center;justify-content:space-between;gap:8px}
.mar-status{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;border-radius:999px;padding:3px 8px;
  background:var(--mar-pill-bg);color:var(--mar-text-muted)}
.mar-status--live{background:#E3F1E6;color:#1F5130}
.mar-btn{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 16px;border-radius:6px;
  border:1px solid var(--mar-input-border);background:var(--mar-surface);color:var(--mar-text);font-weight:600;font-size:14px;
  text-decoration:none;align-self:flex-start}
.mar-btn:hover{background:var(--mar-hover)}
.mar-btn--primary{background:var(--mar-red);border-color:var(--mar-red);color:#FFFFFF}
.mar-btn--primary:hover{background:var(--mar-red-text)}
.mar-btn:focus-visible,.mar-createlink:focus-visible,.mar-action:focus-visible{outline:2px solid var(--mar-red);outline-offset:2px}
.mar-card-foot .mar-btn{align-self:auto}
.mar-createlink{flex-direction:row;align-items:center;gap:14px;text-decoration:none;color:inherit;transition:border-color .12s}
.mar-createlink:hover{border-color:var(--mar-input-border);background:#FCFCFB}
.mar-chevron{color:var(--mar-text-muted);display:grid}
.mar-empty-line{margin:0;color:var(--mar-text-muted)}

.mar-cgroups{display:flex;flex-direction:column;gap:14px}
.mar-cgroup{background:var(--mar-surface);border:1px solid var(--mar-border);border-radius:10px;padding:16px}
.mar-cgroup:not(:has(.mar-action:not([hidden]))){display:none}
.mar-cgroup-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.mar-cgroup-head h2{font-size:16px;font-weight:700;flex:1}
.mar-actions{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:8px}
.mar-action{display:flex;align-items:center;gap:12px;min-height:56px;padding:10px 12px;border:1px solid var(--mar-border);
  border-radius:8px;background:var(--mar-surface);color:var(--mar-text);text-decoration:none;font:inherit;text-align:left;cursor:pointer;
  transition:background-color .12s,border-color .12s}
.mar-action[hidden]{display:none}
.mar-action:hover{background:var(--mar-hover)}
.mar-action-plus{width:28px;height:28px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--mar-red-tint);color:var(--mar-red-text)}
.mar-action-text{display:flex;flex-direction:column;min-width:0}
.mar-action-text b{font-weight:600;font-size:14px}
.mar-action-text span{font-size:13px;color:var(--mar-text-muted)}
.mar-action.is-soon{cursor:default}
.mar-action.is-soon:hover{background:var(--mar-surface)}
.mar-action.is-soon .mar-action-plus{background:var(--mar-pill-bg);color:var(--mar-text-muted)}

.mar-apphero{display:flex;align-items:center;gap:18px}
.mar-apphero-icon{width:72px;height:72px;border-radius:16px;display:grid;place-items:center;flex:none}
.mar-eyebrow{margin:0 0 2px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--mar-text-muted)}
.mar-role{margin:2px 0 0;font-size:16px;color:var(--mar-text-muted)}
.mar-infocard h2{font-size:16px;font-weight:700}
.mar-infocard p{margin:0;font-size:14px;color:var(--mar-text-muted)}
.mar-placeholder{border:1.5px dashed var(--mar-input-border);border-radius:10px;min-height:220px;display:grid;place-items:center;padding:24px;text-align:center}
.mar-placeholder p{margin:0;color:var(--mar-text-muted)}
@media(max-width:767px){
  .mar-main{padding:20px 16px 48px;gap:20px}
  .mar-page h1{font-size:26px}
  .mar-apphero{align-items:flex-start}
  .mar-apphero-icon{width:56px;height:56px;border-radius:12px}
}
