/* Rapid Squares — shared styles for the mockup screens */
:root {
  --ink: #1B2630;
  --ink-2: #3E4A54;
  --muted: #56616B;
  --navy: #16222C;
  --navy-2: #2A3A47;
  --ground: #F3F1EC;
  --paper: #FFFFFF;
  --paper-2: #FBFAF7;
  --line: #DEDAD1;
  --line-2: #EDEAE3;
  --field: #C9CDD1;
  --accent: #B03A0A;
  --accent-dark: #7C2906;
  --accent-soft: #FCF1EA;
  --accent-light: #F08A4B;
  --danger: #A1260F;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 15px;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; }

.display { font-family: 'Archivo', sans-serif; }
.mono { font-family: 'IBM Plex Mono', monospace; }
.hint { font-size: 12px; color: var(--muted); }
.sr { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header + nav */
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 28px; background: var(--navy); color: var(--ground);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-name { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 19px; letter-spacing: 0.01em; }
.brand-sub { font-size: 13px; color: #AEB8C1; padding-left: 12px; border-left: 1px solid #3A4854; }
.topnav { display: flex; flex-wrap: wrap; gap: 4px; }
.topnav a {
  color: #D3DAE0; text-decoration: none; padding: 12px 14px; border-radius: 6px; font-size: 14px;
}
.topnav a:hover { color: #FFFFFF; background: #22313D; }
.topnav a[aria-current="page"] { color: #FFFFFF; background: var(--navy-2); font-weight: 600; }

/* Page scaffolding */
.page { margin: 0 auto; padding: 32px 28px 56px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.page-head > div { display: flex; flex-direction: column; gap: 6px; }
.page-head > .actions { flex-direction: row; gap: 10px; }
.eyebrow { margin: 0; font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0; font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 34px; line-height: 1.1; }
.lede { margin: 0; font-size: 15px; color: var(--muted); max-width: 640px; }
.row { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Cards */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 24px; display: flex; flex-direction: column; gap: 18px;
}
.card h2 { margin: 0; font-family: 'Archivo', sans-serif; font-size: 20px; font-weight: 700; }
.card-title { display: flex; align-items: baseline; gap: 10px; }
.card-title .num { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--accent); }
.split { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 6px; font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; border: 1px solid var(--field); background: var(--paper); color: var(--ink);
}
.btn-primary { border: 0; background: var(--accent); color: #FFFFFF; }
.btn-primary:hover { background: var(--accent-dark); color: #FFFFFF; }
.btn-dark { border: 0; background: var(--navy); color: #FFFFFF; }
.btn-outline { border: 1px solid var(--ink); background: transparent; }
.btn:disabled { background: #ECEAE5; color: var(--muted); border-color: #D6D3CC; cursor: not-allowed; }
.btn:focus-visible, .linkbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.linkbtn { display: inline-block; padding: 12px 8px; font-size: 13px; font-weight: 600; }
.linkbtn.danger { color: var(--danger); }

/* Form fields */
.grid-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld label, .fld .label { font-size: 13px; font-weight: 600; color: var(--ink); }
.fld input, .fld select {
  height: 44px; padding: 0 12px; border: 1px solid var(--field); border-radius: 6px;
  font: inherit; font-size: 15px; color: var(--ink); background: var(--paper); width: 100%;
}
.fld input:focus, .fld select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.fld input:disabled {
  background: #ECEAE5; color: var(--muted); -webkit-text-fill-color: var(--muted);
  border-color: #D6D3CC; cursor: not-allowed; opacity: 1;
}
.locked { position: relative; }
.locked input { padding-right: 44px; }
.locked svg { position: absolute; right: 14px; top: 13px; }

/* Upload drop zones */
.drop {
  border: 2px dashed var(--field); border-radius: 8px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; padding: 20px; cursor: pointer; text-align: center;
}
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop strong { font-size: 14px; }

/* Checkbox rows */
.perm {
  display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 12px 0;
  border-bottom: 1px solid var(--line-2); cursor: pointer;
}
.perm input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: 0 0 20px; }
.perm span { display: flex; flex-direction: column; gap: 2px; }
.perm b { font-size: 14px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 12px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
td { padding: 14px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; text-align: right; white-space: nowrap; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ready, .pill.active { color: #1F6B3A; background: #E3F1E7; }
.pill.processing, .pill.pending { color: #8A4B00; background: #FBEBD3; }
.pill.ordered { color: #2E4A62; background: #E3EAF1; }
.pill.needs { color: var(--danger); background: #F8E1DC; }

/* Filter tabs / segmented buttons */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab {
  height: 44px; padding: 0 14px; border-radius: 6px; font: inherit; font-size: 14px; cursor: pointer;
  border: 1px solid var(--field); background: var(--paper); color: var(--ink);
}
.tab[aria-selected="true"] { border-color: var(--navy); background: var(--navy); color: #FFFFFF; font-weight: 600; }
.tab .count { font-family: 'IBM Plex Mono', monospace; font-size: 12px; opacity: 0.85; margin-left: 4px; }

.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.role {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 72px;
  padding: 12px 14px; border-radius: 8px; text-align: left; font: inherit; cursor: pointer;
  border: 1px solid var(--field); background: var(--paper); color: var(--ink);
}
.role b { font-size: 14px; }
.role small { font-size: 12px; line-height: 1.35; }
.role[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }

/* Placeholder thumbs */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.thumb-empty {
  aspect-ratio: 4 / 3; border-radius: 6px; background: var(--line-2); display: flex; align-items: center;
  justify-content: center; font-size: 12px; color: var(--muted); text-align: center; padding: 8px;
}
.thumbs figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.thumbs figcaption { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Section nav (account page) */
.sidenav { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; }
.sidenav a { text-decoration: none; color: var(--ink-2); font-size: 14px; padding: 12px 14px; border-radius: 6px; }
.sidenav a:hover, .sidenav a.current { background: var(--paper); color: var(--ink); }
.sidenav a.current { font-weight: 600; border: 1px solid var(--line); }

/* Team member cell */
.member { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: var(--line-2);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--ink-2);
}

.hidden { display: none !important; }

/* Bottom tab bar — only shown on phones */
.tabbar { display: none; }

/* =========================================================
   Phone layout (≤ 720px)
   ========================================================= */
@media (max-width: 720px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

  /* Header: brand only, nav moves to the bottom tab bar */
  .topbar { padding: 12px 16px; position: sticky; top: 0; z-index: 20; }
  .topnav, .brand-sub { display: none; }
  .brand-name { font-size: 17px; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--navy); border-top: 1px solid #2A3A47;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 60px; padding: 6px 2px; color: #AEB8C1; text-decoration: none; font-size: 11px; font-weight: 500; text-align: center; line-height: 1.2;
  }
  .tabbar a[aria-current="page"] { color: #FFFFFF; font-weight: 600; }
  .tabbar a[aria-current="page"] svg { stroke: var(--accent-light); }
  .tabbar a:focus-visible { outline: 2px solid var(--accent-light); outline-offset: -4px; }

  /* Page scaffolding */
  .page { padding: 20px 16px 32px; }
  .page-head { margin-bottom: 20px; gap: 14px; }
  h1 { font-size: 26px; }
  .lede { font-size: 14px; }
  .page-head .actions, .page-head > .btn { width: 100%; }
  .page-head .actions .btn, .page-head > .btn { flex: 1 1 0; }
  .row { gap: 16px; }
  .col-main, .col-side { flex-basis: 100% !important; }
  .card { padding: 18px 16px; gap: 16px; border-radius: 12px; }
  .grid-fields { grid-template-columns: minmax(0, 1fr) !important; }

  /* 16px inputs stop iOS from zooming on focus */
  .fld input, .fld select { font-size: 16px; height: 48px; }
  .btn { height: 48px; }

  /* Horizontal-scrolling chip rows */
  .tabs, .sidenav {
    flex-direction: row; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 -16px; padding: 0 16px; gap: 6px;
  }
  .tabs::-webkit-scrollbar, .sidenav::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; }
  .sidenav { flex: 1 1 100%; }
  .sidenav a { flex: 0 0 auto; white-space: nowrap; border: 1px solid var(--line); background: var(--paper); }
  .sidenav a.current { border-color: var(--navy); background: var(--navy); color: #FFFFFF; }
  .search-box { flex: 1 1 100% !important; }

  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Tables turn into stacked cards */
  table.stack { min-width: 0 !important; }
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
  table.stack td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 4px 0 !important; border: 0 !important; text-align: right !important; white-space: normal;
  }
  table.stack td::before {
    content: attr(data-label); font-size: 12px; color: var(--muted); text-align: left; flex: 0 0 auto;
  }
  table.stack td.lead { display: block; text-align: left !important; padding-bottom: 8px !important; }
  table.stack td.lead::before { content: none; }
  table.stack td.row-actions { justify-content: flex-start; gap: 16px; margin-top: 4px; }
  table.stack td.row-actions .linkbtn { padding-left: 0; padding-right: 0; }
  table.stack td.row-actions::before { content: none; }
  table.stack td.row-actions:empty { display: none; }
  .table-wrap { overflow: visible; }
  .card > .table-wrap { margin: 0; }

}


/* =========================================================
   New sketch — address lookup + aerial view
   ========================================================= */
.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 20px;
  border-radius: 8px; background: #FBEBD3; color: #5C3300; font-size: 14px; border: 1px solid #F1D3A6;
}
.notice svg { flex: 0 0 auto; margin-top: 1px; }
.notice code { font-family: 'IBM Plex Mono', monospace; font-size: 13px; background: rgba(255,255,255,0.6); padding: 1px 5px; border-radius: 4px; }

.lookup { display: flex; gap: 12px; align-items: flex-end; }
.lookup-field { flex: 1 1 auto; }
.lookup-btn { flex: 0 0 auto; height: 48px; padding: 0 24px; }
.combo { position: relative; }
.combo-icon { position: absolute; left: 14px; top: 15px; pointer-events: none; }
.combo input { padding-left: 42px; height: 48px; font-size: 16px; }
.suggestions {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; margin: 0; padding: 6px;
  list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(22, 34, 44, 0.14); max-height: 320px; overflow-y: auto;
}
.suggestions li {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; min-height: 44px; justify-content: center;
  border-radius: 6px; cursor: pointer;
}
.suggestions li b { font-size: 14px; }
.suggestions li span { font-size: 12px; color: var(--muted); }
.suggestions li:hover, .suggestions li[aria-selected="true"] { background: var(--accent-soft); }
#lookup-status.error { color: var(--danger); font-weight: 600; }

.map-wrap { position: relative; height: 560px; background: #1F2A33; }
#map { position: absolute; inset: 0; }
.map-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 24px; background: #E7E4DD; color: var(--ink);
}
.map-credit { margin: 0; padding: 8px 14px; border-top: 1px solid var(--line); }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.facts div { display: flex; flex-direction: column; gap: 2px; }
.facts dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.facts dd { margin: 0; font-size: 13px; }

@media (max-width: 720px) {
  .lookup { flex-direction: column; align-items: stretch; gap: 10px; }
  .lookup-btn { width: 100%; }
  .map-wrap { height: 380px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =========================================================
   Live data: stats, errors, notifications, sample-data switcher
   ========================================================= */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stats > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.stats b { font-family: 'Archivo', sans-serif; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

.form-error { margin: 0; color: var(--danger); font-size: 13px; font-weight: 600; flex-basis: 100%; }
.loading-row td { padding: 24px !important; text-align: left !important; }
.btn[aria-busy="true"] { opacity: 0.65; pointer-events: none; }
.no-access { max-width: 560px; }

.toast-wrap {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(520px, calc(100% - 32px)); pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between;
  padding: 12px 14px; border-radius: 8px; background: var(--navy); color: #FFFFFF; font-size: 14px;
  box-shadow: 0 8px 24px rgba(22, 34, 44, 0.25);
}
.toast.error { background: #7F1D0E; }
.toast a { color: #FFD2B8; font-weight: 600; }
.toast button { flex: 0 0 auto; background: transparent; border: 0; color: #FFFFFF; font: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; min-width: 24px; min-height: 24px; }

.demo { position: relative; }
.demo summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px;
  border: 1px dashed #5B6B78; border-radius: 6px; color: #D3DAE0; font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
}
.demo summary::-webkit-details-marker { display: none; }
.demo summary:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.demo[open] summary { border-style: solid; color: #FFFFFF; }
.demo-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 280px; padding: 14px; border-radius: 10px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(22, 34, 44, 0.2);
  display: flex; flex-direction: column; gap: 10px;
}
.demo-panel p { margin: 0; font-size: 12px; color: var(--muted); }
.demo-panel .btn { height: 40px; font-size: 13px; }
.topbar .brand { flex: 1 1 auto; }

@media (max-width: 720px) {
  .toast-wrap { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .demo-panel { right: -4px; width: min(300px, calc(100vw - 32px)); }
  .stats b { font-size: 20px; }
}

button.linkbtn { background: none; border: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: underline; cursor: pointer; min-height: 44px; }
button.linkbtn:hover { color: var(--accent-dark); }
button.linkbtn.danger { color: var(--danger); }
.pill.failed { color: var(--danger); background: #F8E1DC; }
.pill.cancelled { color: var(--ink-2); background: var(--line-2); }
img.avatar { object-fit: cover; padding: 0; }
#order-msg.error { color: var(--danger); font-weight: 600; }

/* Invite links (shown when email isn't connected yet) */
.invite-links { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.invite-links h3 { margin: 0; font-family: 'Archivo', sans-serif; font-size: 16px; }
.invite-links .hint { margin: 0; }
.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; min-width: 0; font-family: 'IBM Plex Mono', monospace; font-size: 13px; }

/* Sign-in page */
.auth-page { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; color: var(--ink); }
.auth-brand b { font-family: 'Archivo', sans-serif; font-size: 20px; font-weight: 800; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; }
.auth-card .btn { width: 100%; }
.auth-switch { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
.auth-switch button { font-weight: 600; }
.auth-invite { margin: 0; padding: 12px 14px; border-radius: 8px; background: var(--ground); font-size: 14px; }
.form-ok { margin: 0; padding: 12px 14px; border-radius: 8px; background: #E6F2EA; color: #1F5B36; font-size: 14px; }

/* Order dialog (Place order page) */
dialog.modal {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 12px;
  background: var(--paper); color: var(--ink); box-shadow: 0 24px 60px rgba(22, 34, 44, 0.28);
}
dialog.modal::backdrop { background: rgba(22, 34, 44, 0.55); }
.modal-body { display: flex; flex-direction: column; gap: 16px; padding: 22px 24px 24px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0; font-family: 'Archivo', sans-serif; font-size: 22px; font-weight: 800; }
.modal-x { width: 44px; height: 44px; margin: -8px -10px 0 0; border: 0; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; }
.modal-x:hover { background: var(--ground); }
.modal-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.report-opts { border: 0; margin: 0; padding: 0; }
#od-options { display: flex; flex-direction: column; gap: 10px; }
.opt-card { border: 1px solid var(--field); border-radius: 8px; background: var(--paper); }
.opt-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.opt-card.off { background: var(--paper-2); }
.opt { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; cursor: pointer; border-radius: 8px; }
.opt input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: 0 0 20px; }
.opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.opt-card.off .opt { cursor: not-allowed; }
.opt-card.off b, .opt-card.off .opt-price { color: var(--muted); }
.opt-more { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; margin: -8px 0 6px 40px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.opt-more:hover { color: var(--accent-dark); text-decoration: underline; }
.opt-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.opt-more svg { transition: transform 0.15s; }
.opt-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.opt-details { margin: 0 16px 14px 48px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.opt-details[hidden] { display: none; }
.opt-details ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.opt-prices { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.opt-prices div { display: flex; justify-content: space-between; gap: 12px; }
.opt-prices dt { color: var(--muted); }
.opt-prices dd { margin: 0; font-family: 'IBM Plex Mono', monospace; font-size: 13px; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .opt-more svg { transition: none; } }
.opt-main { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.opt-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.opt-top b { font-size: 15px; }
.opt-price { font-family: 'IBM Plex Mono', monospace; font-size: 14px; font-weight: 500; white-space: nowrap; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.opt-sub { font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 12px; font-weight: 400; color: var(--muted); }
.esx-line { flex: 1; flex-direction: row !important; justify-content: space-between; align-items: baseline; gap: 12px; }
.opt-details p { margin: 0; }
.opt-price s { color: var(--muted); margin-right: 6px; }
.opt-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #ECEAE5; color: var(--ink-2); margin-left: 6px; vertical-align: 1px; }
.opt-tag.free { background: #E3F1E7; color: #1F6B3A; }
#od-esx-row.off { opacity: 0.55; }
.od-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 15px; }
.od-total b { font-family: 'IBM Plex Mono', monospace; font-size: 20px; }
.modal-actions { justify-content: flex-end; }
@media (max-width: 720px) {
  dialog.modal { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 14px 14px 0 0; }
  .modal-body { padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; height: 48px; }
}
#order-dialog .perm { border-bottom: 0; padding: 0; }
