
/* The same warm palette as the report (report.CSS): light by default whatever the system
   setting, dark only when chosen from the Profile menu (data-theme, set before first
   paint by report.THEME_SCRIPT in the head). */
:root{
  color-scheme:light;
  --paper:#F6F2EA; --card:#FFFDF8; --rule:#E3DACB; --rule-soft:#EEE7DB;
  --ink:#1E1A15; --ink-soft:#574F45; --ink-faint:#887F72;
  --accent:#1F6F6B; --accent-soft:#E4EEE8; --accent-ink:#165450;
  --good:#2F7D4F; --good-soft:#E6EFE1;
  --caution:#9A6A15; --caution-soft:#F4EAD4;
  --critical:#A83E2B; --critical-soft:#F5E2DA;
  --neutral:#776E62; --neutral-soft:#EEE8DE;
  --shadow:0 1px 2px rgba(60,45,20,.05), 0 8px 24px -18px rgba(60,45,20,.35);
  /* Every input box on the site is exactly this tall. Fixed, not derived from padding
     and line-height, so the boxes cannot drift apart as fonts or padding change. */
  --field-h:45px;
  /* One bright, distinct tint per board column -- brighter than the --*-soft chip
     tints above on purpose, since a whole column of pale near-white did not read as
     "its own colour" the way a single chip does. Cards keep --card (white) on top of
     these, so the colour identifies the column, not the text sitting on it. */
  --col-preview:#DCEEFB; --col-applied:#E8E0FB; --col-viewing:#D3F0EA;
  --col-bidding:#FDECC8; --col-sale-agreed:#DDF3E4; --col-declined:#F6E0EA;
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --paper:#0F161D; --card:#18212B; --rule:#2A3644; --rule-soft:#212C38;
  --ink:#E7ECEF; --ink-soft:#A8B4BF; --ink-faint:#7A8794;
  --accent:#5FBDB4; --accent-soft:#15302E; --accent-ink:#8FD6CE;
  --good:#6FC28E; --good-soft:#162C21;
  --caution:#DCAB58; --caution-soft:#2E2718;
  --critical:#E38168; --critical-soft:#331E19;
  --neutral:#8B98A5; --neutral-soft:#212B36;
  --shadow:0 1px 2px rgba(0,0,0,.35), 0 10px 28px -20px rgba(0,0,0,.9);
  --col-preview:#16283A; --col-applied:#241C3A; --col-viewing:#122E28;
  --col-bidding:#332711; --col-sale-agreed:#132A1D; --col-declined:#2E1725;
}
*{box-sizing:border-box}
/* A belt-and-braces backstop, not the fix itself: wide content (the list's table, the
   board's columns) is meant to scroll inside its own container, never the page. This
   just stops the whole page panning sideways if something wide slips past that. */
body{margin:0; overflow-x:hidden; background:var(--paper); color:var(--ink);
  font:400 15px/1.55 "Public Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing:antialiased}
h1,h2{font-family:"Newsreader", Georgia, serif; font-weight:500; letter-spacing:-.01em; margin:0}
a{color:var(--accent-ink); text-underline-offset:3px}
.mono{font-family:"IBM Plex Mono", ui-monospace, Menlo, monospace}
.wrap{--wrap-pad-x:40px; max-width:1320px; margin:0 auto; padding:28px var(--wrap-pad-x) 72px}
/* For content that already manages its own width (report_view_page's iframe) -- drops
   the cap and the side padding so it isn't squeezed inside a second, narrower column
   on top of its own. Vertical padding stays: still wants breathing room above/below. */
.wrap.wrap-full{max-width:none; padding-left:0; padding-right:0}

/* ---- report tabs: rendered client-side from localStorage, see _TAB_STRIP_SCRIPT ----
   A sibling of .wrap, not nested inside it: .wrap's own padding/max-width varies per
   page (report_view_page drops both via .wrap-full), which made the tab strip visibly
   jump left/right depending on which page you were on. Its own fixed padding here
   means it always sits in the same spot, and the border-bottom reads as a distinct bar
   the way a browser's own tab strip does, rather than blending into the content below
   it (or above it, on pages that had a heading right where the tabs now sit). */
.tab-strip{display:flex; align-items:center; gap:6px; position:relative;
  padding:14px 22px; border-bottom:1px solid var(--rule)}
/* One row that scrolls sideways (no scrollbar: the wheel, a swipe, or "+N" move it). */
.tab-list{display:flex; align-items:center; gap:6px; flex:1; min-width:0; overflow-x:auto;
  scrollbar-width:none; -webkit-overflow-scrolling:touch}
.tab-list::-webkit-scrollbar{display:none}
.tab-strip .tab{flex:none}
.tab-more{flex:none; height:auto; padding:6px 10px; border-radius:8px; font:600 12.5px/1 "IBM Plex Mono",monospace;
  background:var(--accent-soft); color:var(--accent-ink); border:1px solid var(--rule); cursor:pointer}
.tab-more[hidden]{display:none}
.tab-more-menu{position:absolute; right:16px; top:calc(100% - 6px); z-index:180; min-width:200px;
  max-height:60vh; overflow-y:auto; display:flex; flex-direction:column; gap:2px; padding:6px;
  background:var(--card); border:1px solid var(--rule); border-radius:10px; box-shadow:var(--shadow)}
.tab-more-menu[hidden]{display:none}
.tab-more-menu a{display:block; padding:9px 10px; border-radius:8px; color:var(--ink);
  text-decoration:none; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.tab-more-menu a:hover{background:var(--rule-soft)}
.tab-more-menu a.active{color:var(--accent-ink); font-weight:600}
.tab-strip[hidden]{display:none}
.tab-strip .tab{display:flex; align-items:center; gap:2px; background:var(--card);
  border:1px solid var(--rule); border-radius:8px; padding:6px 4px 6px 12px; font-size:13px;
  cursor:grab}
.tab-strip .tab.active{border-color:var(--accent)}
.tab-strip .tab a{color:var(--ink-soft); text-decoration:none; max-width:220px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.tab-strip .tab.active a{color:var(--accent-ink); font-weight:500}
.tab-strip .tab-close{background:none; border:none; color:var(--ink-faint);
  font-size:16px; line-height:1; cursor:pointer; padding:3px 6px; border-radius:5px}
.tab-strip .tab-close:hover{background:var(--rule-soft); color:var(--ink)}
/* Dragging one tab over another to reorder them (see _TAB_STRIP_SCRIPT) -- the
   dragged tab dims in place rather than a browser's own ghost image being the only
   feedback, and the tab under the cursor gets a visible edge to show which side it
   would land on. */
.tab-strip .tab.dragging{opacity:.4}
.tab-strip .tab.drag-over-before{box-shadow:-2px 0 0 var(--accent)}
.tab-strip .tab.drag-over-after{box-shadow:2px 0 0 var(--accent)}

/* ---- app shell: a persistent left sidebar instead of a top bar, so the nav is
   always on screen (no scrolling past it) and never needs re-finding after following
   a link -- the same reasoning as report.py's own back-nav strip, one level up. ---- */
.app-shell{display:flex; align-items:flex-start; min-height:100vh}
.sidebar{position:sticky; top:0; align-self:flex-start; height:100vh; overflow-y:auto;
  flex:none; width:184px; box-sizing:border-box; display:flex; flex-direction:column;
  gap:2px; padding:26px 16px; border-right:1px solid var(--rule)}
/* A link to the landing page (the board), not a bare span -- reset everything the
   generic `.sidebar a` nav-item rule would otherwise give it (mono, uppercase, padding).
   Hidden entirely on phones (see the 700px block): the nav items are the wayfinding there
   and the page <title> already says where you are. */
.sidebar a.brand{font:400 21px/1.2 "Newsreader",Georgia,serif; letter-spacing:normal;
  text-transform:none; color:var(--ink); padding:0; border-radius:0; margin:0 8px 22px}
.sidebar a.brand:hover{background:none; color:var(--accent)}
.sidebar a{font:500 12px/1 "IBM Plex Mono",monospace; letter-spacing:.1em;
  text-transform:uppercase; color:var(--ink-faint); text-decoration:none;
  padding:11px 9px; border-radius:8px}
.sidebar a:hover{background:var(--rule-soft); color:var(--ink)}
.sidebar a.on{background:var(--accent-soft); color:var(--accent-ink)}
/* Pushed to the bottom of the sidebar's own flex column (margin-top:auto), so Profile
   reads as "account-level, always in the same spot" the way it would in any
   sidebar-first app -- rather than just another item in the list above it. Collapsed
   to a single tab that expands into its sub-pages on *click* (.sidebar-profile-menu
   below, opened by _PROFILE_MENU_SCRIPT) -- a flyout positioned to the *side* of a
   184px-wide rail would have nowhere to go but over the main content, but opening
   *upward* from a tab already pinned to the bottom stays fully inside the sidebar's own
   column the whole time. Click-driven at every width, not hover on desktop and
   something else on a phone: touch has no hover, and a hover-only menu fails keyboard
   users too. */
.sidebar-profile{margin-top:auto; padding-top:10px; border-top:1px solid var(--rule-soft);
  position:relative}
/* Notifications: a sibling of the Profile toggle inside .sidebar-profile, deliberately
   *not* a child of .sidebar-profile-menu -- that flyout is where things were unreachable
   on a phone, and an invite should not depend on it. */
.sidebar-notif{display:flex; align-items:center; justify-content:space-between; gap:8px;
  width:100%; height:auto; font:500 12px/1 "IBM Plex Mono",monospace; letter-spacing:.1em;
  text-transform:uppercase; color:var(--ink-faint); background:none; border:0;
  border-radius:8px; padding:11px 9px; cursor:pointer; text-align:left}
.sidebar-notif:hover{background:var(--rule-soft); color:var(--ink)}
.sidebar-notif[hidden]{display:none}
.sidebar-notif-badge{min-width:18px; height:18px; padding:0 5px; border-radius:9px;
  background:var(--accent); color:#fff; font:700 11px/18px "IBM Plex Mono",monospace;
  letter-spacing:0; text-align:center}
.sidebar-notif-badge:empty{display:none}
.notif-panel{position:fixed; z-index:150; left:196px; bottom:16px; width:380px;
  max-width:calc(100vw - 32px); max-height:70vh; overflow-y:auto; background:var(--card);
  border:1px solid var(--rule); border-radius:12px; box-shadow:var(--shadow);
  padding:12px 16px}
.notif-panel[hidden]{display:none}
.notif-head{font:600 11px/1 "IBM Plex Mono",monospace; letter-spacing:.08em;
  text-transform:uppercase; color:var(--ink-faint); margin-bottom:6px}
.notif-item{padding:10px 0; border-top:1px solid var(--rule-soft); font-size:13.5px;
  line-height:1.4}
.notif-item:first-of-type{border-top:0}
.notif-ago{color:var(--ink-faint); font-size:12px}
.notif-actions{display:flex; gap:8px; margin-top:8px}
.notif-actions button{height:auto; padding:6px 14px; font-size:12.5px}
.notif-error{margin-top:6px; color:var(--critical); font-size:12.5px}
.sidebar-profile-toggle{display:block; width:100%; height:auto; text-align:left;
  background:none; border:0; cursor:pointer; font:500 12px/1 "IBM Plex Mono",monospace;
  letter-spacing:.1em; text-transform:uppercase; color:var(--ink-faint);
  text-decoration:none; padding:11px 9px; border-radius:8px}
.sidebar-profile-toggle:hover{background:var(--rule-soft); color:var(--ink)}
.sidebar-profile-toggle.on{background:var(--accent-soft); color:var(--accent-ink)}
.sidebar-profile.open .sidebar-profile-toggle{background:var(--rule-soft); color:var(--ink)}
.sidebar-profile.open .sidebar-profile-toggle.on{background:var(--accent-soft);
  color:var(--accent-ink)}
.sidebar-profile-menu{position:absolute; bottom:100%; left:0; right:0; min-width:250px; z-index:1;
  background:var(--card); border:1px solid var(--rule); border-radius:10px;
  padding:6px; box-shadow:var(--shadow); display:none; flex-direction:column; gap:2px}
.sidebar-profile.open .sidebar-profile-menu{display:flex}
/* On a wide screen the menu is wider than the 184px sidebar, whose overflow would cut it off
   (the name and email are the point of the header), so it is fixed to the window instead --
   the way the notifications panel is. _PROFILE_MENU_SCRIPT puts it just above the toggle. */
@media (min-width:701px){
  .sidebar-profile-menu{position:fixed; left:16px; right:auto; bottom:auto; width:250px}
}
/* The Profile menu, top to bottom: who you are (avatar, name, email), the four Profile pages,
   Send feedback, Log out -- each group set off by a divider. .profile-help is only the
   welcome tour's hook on the feedback group. */
.pm-head{display:flex; align-items:center; gap:10px; padding:8px 9px 10px; margin-bottom:2px;
  border-bottom:1px solid var(--rule-soft); min-width:0}
.pm-avatar{flex:none; width:34px; height:34px; border-radius:50%; object-fit:cover}
.pm-initial{display:flex; align-items:center; justify-content:center; background:var(--accent-soft);
  color:var(--accent-ink); font:600 15px/1 "Public Sans",sans-serif}
.pm-who{display:flex; flex-direction:column; min-width:0; line-height:1.3}
.pm-name{font:600 13.5px/1.3 "Public Sans",sans-serif; color:var(--ink); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap}
.pm-email{font:400 12px/1.3 "Public Sans",sans-serif; color:var(--ink-soft); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap}
.pm-group{display:flex; flex-direction:column; gap:2px}
.pm-group + .pm-group{margin-top:2px; padding-top:2px; border-top:1px solid var(--rule-soft)}
.sidebar-admin{display:block}
.sidebar-admin[hidden]{display:none}
.sidebar-menu-btn{display:block; width:100%; height:auto; text-align:left; padding:9px; border:0; border-radius:8px;
  background:none; font:500 13px/1.2 "Public Sans",sans-serif; color:var(--ink-faint); cursor:pointer}
.sidebar-menu-btn:hover{background:var(--rule-soft); color:var(--ink)}
.sidebar-profile-menu a{display:block; padding:9px; border-radius:8px;
  text-transform:none; letter-spacing:normal; font:500 13px/1.2 "Public Sans",sans-serif;
  color:var(--ink-faint); text-decoration:none}
/* An author rule setting `display` beats the browser's own [hidden]{display:none} --
   same reasoning .edit-modal-overlay[hidden]/.eq-row[hidden] already need elsewhere --
   so without this, #sidebarAdminLink's own `hidden` attribute (set server-side, only
   ever cleared by _ACCOUNT_WIDGET_SCRIPT once /api/auth/me confirms is_admin) did
   nothing at all: the rule above's display:block always won, showing Admin to every
   signed-in user regardless of role. */
.sidebar-profile-menu a[hidden]{display:none}
.sidebar-profile-menu a:hover{background:var(--rule-soft); color:var(--ink)}
.sidebar-profile-menu a.on{background:var(--accent-soft); color:var(--accent-ink)}
.content{flex:1; min-width:0; box-sizing:border-box;
  padding-bottom:env(safe-area-inset-bottom)}
/* iOS: viewport-fit=cover (the viewport meta) hands the notch/status-bar strip and the
   Safari toolbar area to the page, so the env() insets below keep the nav clear of the
   status bar and the content clear of the toolbar. All zero on a desktop browser. */
.sidebar{padding-top:calc(26px + env(safe-area-inset-top))}
/* Privacy / Terms / Refunds: on every page, public ones included, since Google's OAuth
   review and Stripe both look for them there -- but as quiet as possible: one small
   line at the very bottom of the rail, below Profile, and a footer line under the
   content on a phone, where the rail becomes a top bar with no room left. One line,
   not a list: they are fine print, not navigation, so they must not read as three
   more nav items. */
.sidebar-legal{display:block; white-space:nowrap; padding:10px 0 0 9px;
  font:400 10.5px/1.3 "Public Sans",sans-serif; color:var(--ink-faint)}
.sidebar .sidebar-legal a, .site-foot a{display:inline; font:inherit; letter-spacing:normal;
  text-transform:none; padding:0; border:0; border-radius:0; color:var(--ink-faint);
  text-decoration:none}
.sidebar .sidebar-legal a:hover, .site-foot a:hover{background:none; color:var(--ink);
  text-decoration:underline}
.site-foot{display:none}
/* Signed out (shell(signed_out=True)): no rail, a wordmark bar, the footer always shown. */
.app-shell.signed-out{display:block}
.public-top{padding:18px 24px; padding-top:calc(18px + env(safe-area-inset-top));
  border-bottom:1px solid var(--rule-soft)}
.public-top .brand{font:400 21px/1.2 "Newsreader",Georgia,serif; color:var(--ink);
  text-decoration:none}
.public-top .brand:hover{color:var(--accent)}
.app-shell.signed-out .site-foot{display:block; text-align:center; padding:24px 16px 18px;
  font:400 11.5px/1.3 "Public Sans",sans-serif; color:var(--ink-faint)}
@media (max-width:700px){ .public-top{padding:14px 16px} }
@media (max-width:700px){
  .sidebar-legal{display:none}
  .site-foot{display:block; text-align:center; padding:24px 16px 18px;
    font:400 11px/1.3 "Public Sans",sans-serif; color:var(--ink-faint)}
}
/* Below ~700px there is no room for a 184px rail beside real content -- reverts to a
   non-sticky top bar, wrapping onto a second row rather than scrolling sideways (an
   overflow container would clip the Profile dropdown). The wordmark is dropped. The
   Profile menu is the same click-driven one as on desktop, just opening *downward* from
   the bar as an absolutely-positioned dropdown -- the account row and every sub-page live
   inside it, so nothing is unreachable on touch. Notifications stays a sibling of the
   Profile toggle, outside the menu, so an invite never depends on it being open. */
@media (max-width:700px){
  .app-shell{display:block; min-height:0}
  .sidebar{position:static; height:auto; overflow-y:visible; width:auto;
    flex-direction:row; align-items:baseline; gap:10px 22px; flex-wrap:wrap;
    border-right:none; border-bottom:2px solid var(--ink); padding:16px 22px;
    padding-top:calc(16px + env(safe-area-inset-top));
    padding-left:calc(22px + env(safe-area-inset-left));
    padding-right:calc(22px + env(safe-area-inset-right))}
  .content{padding-bottom:calc(24px + env(safe-area-inset-bottom))}
  .sidebar a.brand{display:none}
  .sidebar a{padding:0 0 3px; border-radius:0; border-bottom:2px solid transparent}
  .sidebar a:hover{background:none}
  .sidebar a.on{background:none; border-bottom-color:var(--accent)}
  .sidebar-profile{margin-top:0; margin-left:auto; padding-top:0; border-top:none;
    display:flex; align-items:baseline; gap:16px}
  .sidebar-notif{width:auto; padding:0 0 3px; border-radius:0}
  .notif-panel{left:16px; right:16px; bottom:16px; width:auto}
  .sidebar-profile-toggle{width:auto; padding:0 0 3px; border-radius:0;
    border-bottom:2px solid transparent}
  .sidebar-profile-toggle:hover, .sidebar-profile.open .sidebar-profile-toggle{
    background:none; color:var(--ink)}
  .sidebar-profile-toggle.on, .sidebar-profile.open .sidebar-profile-toggle.on{
    background:none; border-bottom-color:var(--accent); color:var(--accent)}
  .sidebar-profile-menu{top:100%; bottom:auto; left:auto; right:0; margin-top:10px;
    min-width:230px; z-index:160}
  .sidebar-profile-menu a, .sidebar-menu-btn{border-bottom:0; padding:9px}
  .sidebar-profile-menu a.on{background:var(--accent-soft)}
}

.card{background:var(--card); border:1px solid var(--rule); border-radius:12px;
  padding:20px; box-shadow:var(--shadow)}
.muted{color:var(--ink-soft)}
.faint{color:var(--ink-faint); font-size:13px}

/* ---- the tour popover (tours.py, _TOUR_SCRIPT) ---- */
.tour-proxy{position:fixed; pointer-events:none}
.driver-popover.tour-pop{background:var(--card); color:var(--ink); border-radius:12px;
  box-shadow:var(--shadow); padding:16px 18px 14px; max-width:340px; font-family:"Public Sans",sans-serif}
.driver-popover.tour-pop .driver-popover-title{font:600 16px/1.3 "Public Sans",sans-serif; color:var(--ink)}
.driver-popover.tour-pop .driver-popover-description{font-size:14.5px; line-height:1.5; color:var(--ink-soft); margin-top:6px}
.driver-popover.tour-pop .driver-popover-arrow-side-top{border-top-color:var(--card)}
.driver-popover.tour-pop .driver-popover-arrow-side-bottom{border-bottom-color:var(--card)}
.driver-popover.tour-pop .driver-popover-arrow-side-left{border-left-color:var(--card)}
.driver-popover.tour-pop .driver-popover-arrow-side-right{border-right-color:var(--card)}
.driver-popover.tour-pop .driver-popover-close-btn{color:var(--ink-faint); width:36px; height:36px; font-size:20px}
.driver-popover.tour-pop .driver-popover-footer{display:flex; align-items:center; gap:10px; margin-top:14px; flex-wrap:wrap}
.driver-popover.tour-pop .driver-popover-navigation-btns{margin-left:auto; display:flex; gap:8px}
.driver-popover.tour-pop .driver-popover-navigation-btns button{text-shadow:none; height:36px;
  padding:0 14px; border-radius:8px; font:600 13.5px/1 "Public Sans",sans-serif;
  border:1px solid var(--rule); background:transparent; color:var(--ink)}
.driver-popover.tour-pop .driver-popover-navigation-btns .driver-popover-next-btn{background:var(--accent);
  border-color:var(--accent); color:#fff}
.driver-popover.tour-pop .driver-popover-navigation-btns button:focus-visible{outline:2px solid var(--accent); outline-offset:1px}
.driver-popover.tour-pop .driver-popover-navigation-btns button.driver-popover-btn-disabled{opacity:.35; pointer-events:none}
.tour-skip{height:auto; padding:6px 2px; background:transparent; color:var(--ink-faint);
  font:500 13px/1 "Public Sans",sans-serif; text-decoration:underline}
.tour-skip:hover{background:transparent; color:var(--ink)}
.tour-dots{display:inline-flex; gap:5px}
.tour-dots i{width:6px; height:6px; border-radius:50%; background:var(--rule)}
.tour-dots i.on{background:var(--accent)}
/* Phones: the popover docks along the bottom edge rather than floating by its target. */
@media (max-width:700px){
  .driver-popover.tour-pop{position:fixed !important; left:10px !important; right:10px !important;
    top:auto !important; bottom:calc(10px + env(safe-area-inset-bottom)) !important;
    max-width:none !important; min-width:0 !important; width:auto !important}
  .driver-popover.tour-pop .driver-popover-arrow{display:none}
}

.tours-list{list-style:none; margin:0 0 14px; padding:0}
.tours-list li{display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:9px 0; border-bottom:1px solid var(--rule-soft); font-size:14.5px}
.tour-replay{color:var(--accent-ink); font-weight:600; text-decoration:none; font-size:14px}
.tour-replay:hover{text-decoration:underline}
.tours-reset{height:34px; padding:0 12px; font-size:13px}

/* ---- Profile: four sub-pages behind one segmented control (profile_tabs_html) ---- */
.profile-tabs{display:flex; gap:4px; padding:4px; margin:0 0 22px; max-width:620px;
  background:var(--rule-soft); border-radius:12px}
.profile-tab{flex:1 1 0; min-width:0; display:flex; align-items:center; justify-content:center;
  text-align:center; padding:9px 4px; border-radius:9px;
  font:600 13.5px/1.2 "Public Sans",sans-serif; color:var(--ink-soft); text-decoration:none}
/* "Priorities & places" is the long one: it takes a larger share and wraps onto two
   lines on a phone, where the other three stay on one. */
.profile-tab[data-tab="priorities"]{flex-grow:1.7}
@media (max-width:420px){.profile-tab{font-size:12.5px; padding:9px 2px}}
.profile-tab:hover{color:var(--ink)}
.profile-tab.on{background:var(--card); color:var(--ink); box-shadow:var(--shadow)}
.profile-tab:focus-visible{outline:2px solid var(--accent); outline-offset:1px}
.settings-stack{display:flex; flex-direction:column; gap:18px; max-width:560px}
.settings-stack h2{font-size:19px; margin:0 0 10px}
.theme-choice{display:flex; gap:8px}
.theme-choice button{flex:1; height:40px; border-radius:9px; border:1px solid var(--rule);
  background:transparent; color:var(--ink); font:600 13.5px/1 "Public Sans",sans-serif}
.theme-choice button:hover{background:var(--rule-soft)}
.theme-choice button[aria-pressed="true"]{background:var(--accent-soft); border-color:var(--accent);
  color:var(--accent-ink)}
.legal-list{display:flex; gap:16px; flex-wrap:wrap; font-size:14px}
.legal-list a{color:var(--accent-ink)}

/* ---- the app's one dialog (_DIALOG_HTML) ---- */
.ui-dlg-overlay{position:fixed; inset:0; z-index:300; background:rgba(22,32,42,.45); display:flex;
  align-items:center; justify-content:center; padding:16px}
.ui-dlg-overlay[hidden]{display:none}
body.ui-dlg-open{overflow:hidden}
.ui-dlg{background:var(--card); color:var(--ink); border-radius:14px; box-shadow:var(--shadow);
  width:min(400px, 100%); box-sizing:border-box; padding:20px 20px 16px}
.ui-dlg h3{font:600 17px/1.3 "Public Sans",sans-serif; margin:0 0 8px}
.ui-dlg p{margin:0 0 14px; font-size:14.5px; line-height:1.5; color:var(--ink-soft)}
.ui-dlg-field{display:flex; flex-direction:column; gap:6px; margin:4px 0 14px; font-size:13px; color:var(--ink-soft)}
.ui-dlg-field[hidden], .ui-dlg [hidden]{display:none}
/* More specific than the page-wide input[type=text] rule (flex:1 1 320px), whose basis
   would otherwise become this column's height. */
.ui-dlg .ui-dlg-field input{flex:none; width:100%; box-sizing:border-box}
.ui-dlg-actions{display:flex; justify-content:flex-end; gap:8px}
.ui-dlg-actions button{height:40px; padding:0 16px; border-radius:9px; font:600 14px/1 "Public Sans",sans-serif}
.ui-dlg-cancel{background:transparent; color:var(--ink); border:1px solid var(--rule)}
.ui-dlg-cancel:hover{background:var(--rule-soft)}
.ui-dlg-ok{background:var(--accent); color:#fff; border:0}
.ui-dlg-ok.danger{background:var(--critical)}
.ui-dlg-ok.danger:hover{filter:brightness(.92); background:var(--critical)}
.ui-dlg-actions button:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
@media (max-width:700px){
  .ui-dlg-overlay{align-items:flex-end; padding:0}
  .ui-dlg{width:100%; border-radius:16px 16px 0 0; padding:20px 16px calc(16px + env(safe-area-inset-bottom))}
  .ui-dlg-actions button{flex:1; height:46px}
}

/* ---- "Report a problem" (_FEEDBACK_HTML), on the app dialog's look ---- */
.fb-form{width:min(460px, 100%)}
.fb-kinds{display:grid; grid-template-columns:1fr 1fr; gap:6px 12px; margin:4px 0 12px; font-size:14px}
.fb-kinds label{display:flex; align-items:center; gap:6px}
.fb-form textarea{width:100%; box-sizing:border-box; font:400 15px/1.45 "Public Sans",sans-serif;
  padding:10px 12px; border:1px solid var(--rule); border-radius:9px; background:var(--paper); color:var(--ink);
  resize:vertical}
.fb-contact{display:flex; align-items:center; gap:8px; font-size:14px; margin:0 0 10px}
.fb-sent{font-size:13px; color:var(--ink-soft); margin:0 0 12px}
.fb-sent summary{cursor:pointer; color:var(--accent-ink)}
.fb-sent ul{margin:6px 0 0; padding-left:18px; overflow-wrap:anywhere}
.fb-error{color:var(--critical); font-size:14px; margin:0 0 10px}
.fb-error[hidden]{display:none}
@media (max-width:700px){ .fb-kinds{grid-template-columns:1fr} }
.tell-us{background:transparent; color:var(--accent-ink); height:auto; padding:4px 6px; font-size:13px;
  text-decoration:underline}
.tell-us:hover{background:transparent; color:var(--ink)}

/* ---- add home ---- */
.add-home{max-width:620px}
.add-title{font-size:29px; margin-bottom:18px}
form.submit{display:flex; gap:24px; flex-wrap:wrap}
/* The box and what it says about itself stay together; the form's own parts -- that block,
   Details, the button -- sit 24px apart. Empty status rows take no space (a flex gap would
   otherwise count each one). */
.src-group{flex:1 1 100%; min-width:0; display:flex; flex-direction:column; gap:8px}
.src-group .row:empty{display:none}
input[type=text],input[type=url]{flex:1 1 320px; min-width:0; height:var(--field-h);
  padding:0 14px; font:400 16px/1.2 "IBM Plex Mono",monospace; letter-spacing:.03em;
  color:var(--ink); background:var(--paper); border:1px solid var(--rule);
  border-radius:9px; overflow:hidden}
input[type=text]:focus,input[type=url]:focus{outline:2px solid var(--accent);
  outline-offset:1px}
/* One block: the label, the one box (link or Eircode), what it was read as, the
   status/found/Eircode-fallback/dupe lines, the collapsed Details, then the button. type=url is named in the shared input rule above
   because it does not match input[type=text]. */
form.submit .row{flex:1 1 100%; min-width:0}
form.submit #src{flex:1 1 100%}
.src-kind{font-size:12.5px; color:var(--ink-faint)}
.src-kind:empty{display:none}
.src-kind.link,.src-kind.eircode{color:var(--good)}
.src-kind.address{color:var(--caution)}
.gen-slot #gen{min-width:200px}
.gen-slot{display:flex; flex-wrap:wrap; gap:8px}
.gen-slot .gen-progress{flex:1 1 100%}
.run-again{height:var(--field-h); padding:0 18px}
.gen-progress{margin:0}
.gen-progress .top{min-height:22px}
.job-actions{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.job-actions:empty{display:none}
.job .job-actions{margin-top:10px}
/* The report counter: a muted line under the button, in the form's card, not a card of its own. */
.add-home .billing-widget.plain{margin-top:12px}
.add-home .billing-widget.plain .billing-usage{color:var(--ink-faint); font-size:13px}
/* The run's block: its own heading, 32px under the form. The progress bar stays in the form
   (genSlot) while it runs; this card carries what the run is and where it ended. */
.latest{margin-top:32px}
.latest-title{font:600 13px/1.2 "Public Sans",sans-serif; color:var(--ink-soft); margin:0 0 10px}
.job-row{display:flex; align-items:center; justify-content:space-between; gap:10px 14px; flex-wrap:wrap}
.job-main{flex:1 1 180px; min-width:0}
.job-id{display:flex; flex-direction:column; gap:2px; min-width:0}
.job-addr{font-size:13.5px; color:var(--ink-soft); overflow-wrap:anywhere}
.job-state{margin-top:6px; font-size:13px; color:var(--ink-faint)}
.job-state.result{color:var(--ink); font-size:14px}
.job-state.result b{font-family:"IBM Plex Mono",monospace; font-size:16px; margin-right:6px}
.job-row .job-actions{margin:0 0 0 auto}
.gen-state{margin-top:8px; font-size:13px; color:var(--ink-faint)}
.open-report{display:inline-flex; align-items:center; height:38px; padding:0 16px;
  border-radius:9px; background:var(--accent); color:#fff; font-weight:600; font-size:14px;
  text-decoration:none}
.open-report:hover{background:var(--accent-ink)}
@media (max-width:700px){
  .gen-slot #gen, .gen-slot .run-again{width:100%}
  .open-report{flex:1; justify-content:center; height:44px}
}
form.submit label.row{font-size:13px; color:var(--ink-soft)}
form.submit summary{cursor:pointer; color:var(--ink-soft); font-size:13px; padding:2px 0}
form.submit summary:hover{color:var(--ink)}
/* `flex:none; width:100%` for the same reason as ever: the shared input rule's
   flex-basis would otherwise land on the height inside a column flex container. */
form.submit details input#q{flex:none; width:100%; margin-top:8px}
form.submit details .specs{margin-top:10px}
form.submit .found{padding:9px 12px; border-radius:9px; font-size:13.5px;
  background:var(--accent-soft); color:var(--accent-ink);
  font-family:"IBM Plex Mono",monospace}
#prefillStatus:empty{display:none}
/* Same caution treatment as .dupe-note: a failed lookup is the one thing on this form
   that needs the user to do something next (enter an Eircode), so it should not read
   like the faint "Looking up..." line it replaces. */
#prefillStatus.warn{padding:9px 12px; border-radius:9px; font-size:13.5px; font-weight:600;
  background:var(--caution-soft); color:var(--caution); border-left:3px solid var(--caution)}
/* The advert's own details: a full-width row of small equal fields. Same `flex:none`
   caveat as everything else here -- these labels are column flex containers, so an
   inherited flex-basis would land on the height. */
/* Three tracks (two rows of six fields), not auto-fit: auto-fit sized tracks to the
   120px minimum and left extra ones empty, so the row stopped short of the card's
   width. Three rather than the original six because this form now normally lives in
   the narrower left column of `.run-grid`, not the full page width -- six tracks
   there left each field too tight for its content. `align-items:end` bottom-aligns
   the labels, which is what actually lines the inputs up -- "Price" and "Area" carry
   a unit hint that wraps to a second line, and without this their inputs sat 25px
   below the rest. */
form.submit .specs{flex:1 1 100%; display:grid; gap:10px 14px; margin-top:6px;
  grid-template-columns:repeat(3,1fr); align-items:end}
.dupe-note{margin-top:2px; padding:9px 12px; border-radius:9px; font-size:13.5px;
  background:var(--caution-soft); color:var(--caution);
  border-left:3px solid var(--caution)}
.dupe-note b{font-family:"IBM Plex Mono",monospace}
.dupe-note a{margin-left:6px; color:var(--caution); text-decoration:underline}
/* The Eircode fallback, shown only when a listing gave no Eircode. */
form.submit .eircode-row{display:flex; flex-direction:column; gap:5px; margin-top:4px}
form.submit .eircode-row[hidden],form.submit [hidden]{display:none}
form.submit .eircode-row label{font-size:13px; color:var(--ink-soft)}
form.submit .eircode-row input{flex:none; width:100%; max-width:260px}
.eircode-hint{margin-left:6px; font-size:12px; color:var(--ink-faint)}
.eircode-hint.good{color:var(--good)}
.eircode-hint.warn{color:var(--caution)}
form.submit .specs label{display:flex; flex-direction:column; justify-content:flex-end;
  gap:5px; min-width:0; font-size:13px; color:var(--ink-soft); white-space:nowrap}
form.submit .specs input{flex:none; width:100%; height:var(--field-h); font-size:14px}
@media (max-width:480px){form.submit .specs{grid-template-columns:1fr 1fr}}
button{padding:12px 20px; font:500 14px/1.2 "Public Sans",sans-serif; color:#fff;
  background:var(--accent); border:0; border-radius:9px; cursor:pointer}
/* The form's button matches the input boxes exactly. Scoped to the form so the
   compact Re-run/Delete buttons in the reports table keep their own smaller size. */
form.submit button{height:var(--field-h); padding:0 20px}
button:hover{background:var(--accent-ink)}
button:disabled{background:var(--neutral-soft); color:var(--ink-faint); cursor:not-allowed}
button:disabled:hover{background:var(--neutral-soft)}
button.ghost{background:transparent; color:var(--ink-soft); border:1px solid var(--rule)}
button.ghost:hover{background:var(--neutral-soft); color:var(--ink)}
/* ---- billing: report-credit top-ups, shared by the Add home page and Account
   (auth_templates.account_page) so buying more looks and behaves identically
   wherever it appears. ---- */
/* Its own small panel under the form card, not a strip inside it: how many reports are
   left is account information, not one of the form's fields. */
.billing-widget{margin-top:14px; padding:12px 16px; border:1px solid var(--rule);
  border-radius:12px; background:var(--card)}
.billing-widget .billing-usage{margin-bottom:0}
/* The Account tab's search card: a plain line, no box of its own. */
.billing-widget.plain{margin-top:12px; padding:0; border:0; background:none}
.billing-widget.plain .billing-usage{font-size:13.5px; margin-bottom:6px}
.billing-widget.plain .billing-toggle{border:0; padding:0; height:auto; background:none; font-size:13.5px;
  text-decoration:underline}
.billing-widget .billing-status:empty{display:none}
/* The same widget, styled as a warning banner and placed above the form instead of
   below it -- rendered instead of (not alongside) the usual one when a workspace is
   actually out of reports, so the "Buy more" button is right where the message
   already is rather than needing a scroll down to the quieter, always-there one. */
.billing-widget.exceeded{margin:0 0 20px; padding:12px 16px; border-top:0;
  border-radius:10px; background:var(--critical-soft)}
.billing-widget.exceeded .billing-usage{color:var(--critical); font-weight:600;
  margin-bottom:0; display:flex; align-items:center; gap:12px; flex-wrap:wrap}
.billing-usage{font-size:13px; color:var(--ink-soft); margin-bottom:10px}
.billing-toggle{background:transparent; color:var(--accent); border:1.5px solid var(--accent);
  padding:9px 18px; border-radius:9px; font:600 13.5px/1 "Public Sans",sans-serif;
  cursor:pointer}
.billing-toggle:hover{background:var(--accent-soft)}
.billing-tiers{display:none; gap:12px; margin-top:14px; flex-wrap:wrap}
.billing-tiers.open{display:flex}
.billing-tier{flex:1 1 130px; border:1px solid var(--rule); border-radius:12px;
  padding:16px 14px; text-align:center; background:var(--card)}
.billing-tier-reports{font-size:13px; color:var(--ink-soft); margin-bottom:8px}
.billing-tier-price{font-size:24px; font-weight:700; margin-bottom:12px}
.billing-tier-pay{width:100%; height:38px; border-radius:8px; font-size:13.5px}
.billing-status{margin-top:12px; font-size:13px}
.billing-status-ok{padding:9px 12px; border-radius:8px; background:var(--good-soft);
  color:var(--good)}
.billing-status-err{padding:9px 12px; border-radius:8px; background:var(--critical-soft);
  color:var(--critical)}
@media (max-width:480px){.billing-tiers{flex-direction:column}}
/* ---- chips + tones ---- */
.chip{display:inline-flex; align-items:center; gap:6px; padding:3px 9px; border-radius:999px;
  font:500 11.5px/1.5 "Public Sans",sans-serif; white-space:nowrap}
.chip.good{background:var(--good-soft); color:var(--good)}
.chip.caution{background:var(--caution-soft); color:var(--caution)}
.chip.critical{background:var(--critical-soft); color:var(--critical)}
.chip.neutral{background:var(--neutral-soft); color:var(--neutral)}

/* ---- jobs ---- */
#jobs{margin-top:18px; display:flex; flex-direction:column; gap:10px}
#jobs:not(:empty)::before{content:"Recent runs"; font:500 11px/1 "IBM Plex Mono",monospace;
  letter-spacing:.08em; text-transform:uppercase; color:var(--ink-faint); margin-top:6px}
.job{background:var(--card); border:1px solid var(--rule); border-left:3px solid var(--neutral);
  border-radius:10px; padding:13px 16px}
.job.running{border-left-color:var(--accent)}
/* The live report's one progress bar, above the frame. */
/* Same horizontal padding as .report-toolbar: .wrap-full zeroes .wrap's own. The label
   wraps rather than running off a phone's edge. */
.live-progress{padding:12px 22px; flex:none}
.live-progress-top #liveLabel{min-width:0; overflow-wrap:anywhere}
.live-progress-top{display:flex; justify-content:space-between; gap:12px; font-size:13px;
  color:var(--ink-soft)}
.live-progress-top #livePct{font:500 12.5px/1.4 "IBM Plex Mono",monospace; color:var(--ink)}
.live-progress .bar{margin-top:7px; height:6px}
.live-stall{margin-top:8px; font-size:12.5px; color:var(--caution); display:flex;
  align-items:center; gap:8px; flex-wrap:wrap}
.live-stall[hidden]{display:none}
.live-stall button{padding:3px 9px; font-size:12.5px}
.live-progress.critical .live-progress-top{color:var(--critical)}
.live-progress.critical .bar i{background:var(--critical)}
.live-progress.caution .live-progress-top{color:var(--caution)}
.job.done{border-left-color:var(--good)}
.job.failed{border-left-color:var(--critical)}
.job .top{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.job .name{font-family:"IBM Plex Mono",monospace; font-weight:500}
.job .state{margin-left:auto; font:400 12px/1 "IBM Plex Mono",monospace; color:var(--ink-faint)}
.bar{height:5px; background:var(--rule-soft); border-radius:99px; overflow:hidden; margin-top:10px}
.bar i{display:block; height:100%; background:var(--accent); transition:width .4s ease}
.job .err{margin-top:9px; font-size:13.5px; color:var(--critical)}
.job .log{margin-top:9px; font:400 11.5px/1.5 "IBM Plex Mono",monospace;
  color:var(--ink-faint); white-space:pre-wrap; word-break:break-word}
.job .slow{margin-top:9px; font-size:13px; color:var(--caution)}

/* ---- table ---- */
table{width:100%; border-collapse:collapse; margin-top:6px}
/* The Houses table scrolls sideways inside its own card on a narrow screen, instead of
   making the whole page wider than the phone -- which also pushed the List/Map toggle
   off the right edge, since it sits in the same page width. */
#listView{overflow-x:auto; -webkit-overflow-scrolling:touch; max-width:100%}
.m-meta{display:none}
/* Phones: each row is a card -- photo on the left; score and menu, then the address,
   chips and one wrapping line of status/price/bed-bath/listing on the right; the note
   full width underneath. The wide-screen columns those came from are hidden, so nothing
   runs off the edge and there is no sideways scrolling. */
@media (max-width:700px){
  #t thead{display:none}
  #t, #t tbody{display:block; width:100%}
  /* Compact: a 56px thumb, then one line each for score, Eircode, address (truncated),
     concern chips and status/price -- every chip still there (no "+N"), on one line that
     scrolls sideways inside the row instead of wrapping the row taller. */
  #t tr{display:grid; grid-template-columns:56px minmax(0,1fr) auto;
    grid-template-areas:"photo score menu" "photo loc loc" "notes notes notes";
    gap:2px 10px; padding:10px 4px; border-bottom:1px solid var(--rule-soft)}
  #t tr[hidden]{display:none}
  #t tr[data-key]:not(:has(.list-thumb)){grid-template-areas:"score score menu" "loc loc loc" "notes notes notes"}
  #t tr[data-key]:not(:has(.list-thumb)) td.photo-cell{display:none}
  #t td{display:block; border:0; padding:0; min-width:0; width:auto}
  #t td.photo-cell{grid-area:photo; padding:2px 0 0}
  #t td.photo-cell .list-thumb{width:56px; height:56px}
  #t td.score{grid-area:score; font-size:15px; align-self:center}
  #t td.loc{grid-area:loc; min-width:0}
  #t td.loc .addr{white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:12.5px;
    overflow-wrap:normal}
  #t td.c-menu{grid-area:menu; display:flex; align-items:center; gap:2px}
  #t td.notes{grid-area:notes; min-width:0; display:none; padding-top:6px}
  #t tr.m-open td.notes{display:block}
  #t td.c-status, #t td.c-price, #t td.c-bb, #t td.c-gen, #t td.c-daft{display:none}
  .m-meta{display:flex; flex-wrap:nowrap; align-items:center; gap:10px; margin-top:4px;
    font-size:12.5px; white-space:nowrap; overflow:hidden}
  #t .flags{display:flex; flex-wrap:nowrap; gap:4px; overflow-x:auto; margin-top:4px;
    scrollbar-width:none; -webkit-overflow-scrolling:touch}
  #t .flags .chip, #t td.loc > .chip{flex:none; white-space:nowrap}
  #t td.loc > .chip{margin-top:4px}
}
/* Declined houses: their own collapsed group at the bottom of the list (see list_page),
   so ruled-out homes stop sharing the ranking with live ones but stay one tap away. */
#t tr.group-head td{padding:10px 6px; border-bottom:1px solid var(--rule-soft); background:none}
#t tr.group-head:hover{background:none}
.group-toggle{display:inline-flex; align-items:center; gap:8px; padding:6px 10px; height:auto;
  background:transparent; color:var(--ink-soft); border:1px solid var(--rule); border-radius:8px;
  font:600 11px/1 "IBM Plex Mono",monospace; letter-spacing:.06em; text-transform:uppercase}
.group-toggle:hover{background:var(--rule-soft); color:var(--ink)}
.group-toggle .board-chev{margin:0; transition:transform .15s}
#t tbody.declined-collapsed .group-toggle .board-chev{transform:rotate(-90deg)}
#t tbody.declined-collapsed tr.declined-row{display:none}
@media (max-width:700px){#t tr.group-head{display:block} #t tr.group-head td{display:block}}
/* 8px rather than 12px: three more columns (Status/Price/B.B) arrived since this was
   set, and getting all nine to fit the page's normal 1040px width -- rather than
   widening just this one page -- meant trimming padding here first. */
th,td{text-align:left; padding:10px 8px; border-bottom:1px solid var(--rule-soft);
  vertical-align:top}
th{font:500 11px/1.4 "IBM Plex Mono",monospace; letter-spacing:.12em;
  text-transform:uppercase; color:var(--ink-faint); border-bottom:1px solid var(--rule);
  cursor:pointer; user-select:none; white-space:nowrap}
th:hover{color:var(--ink)}
th[aria-sort] .arrow{color:var(--accent)}
tbody tr:hover{background:var(--rule-soft)}
td.score{font:600 17px/1.2 "IBM Plex Mono",monospace; white-space:nowrap}
/* Rating word primary, number faint beside it -- the same pairing everywhere a score is
   shown. The colour (score_hex, the gradient) still drives the word, so colour and word
   say the same thing twice -- colour alone must never carry the judgement. Sorting
   stays on the number (data-score). */
.score-word{font:600 13.5px/1.2 "Public Sans",sans-serif}
.score-num{font:400 12px/1 "IBM Plex Mono",monospace; color:var(--ink-faint); margin-left:6px}
td.score.good{color:var(--good)} td.score.caution{color:var(--caution)}
td.score.critical{color:var(--critical)} td.score.neutral{color:var(--neutral)}
/* The widest column: the whole matched address, shown in full (wrapped, not clipped).
   min-width keeps it from being squeezed thin on a narrow window while leaving room
   for Status/Price/B.B without widening the page. */
td.loc{min-width:220px; width:30%}
/* A column of its own rather than floated into .loc: a plain <td> is what makes the
   column independently sortable-feeling (in line with every other column) and keeps
   a missing photo from shifting where the address column's own text starts. */
td.photo-cell{width:52px; padding-left:8px; padding-right:2px}
.list-thumb{display:block; width:42px; height:42px; object-fit:cover; border-radius:7px;
  border:1px solid var(--rule); background:var(--card); transition:opacity .15s}
/* The photo, Eircode and score open the report (list_page/_board_card). Hover: the
   photo dims and zooms a touch; keyboard focus gets a visible ring on every one. */
.photo-link{cursor:pointer}
.photo-link img{transition:opacity .15s, transform .25s ease}
/* The list thumb zooms inside its own rounded box; the board photo bleeds to the card's
   edges with negative margins, so it only dims (a zoom would spill past the card). */
td.photo-cell .photo-link{display:block; overflow:hidden; border-radius:7px}
.sv-slot[hidden]{display:none !important}
@media (hover:hover){
  .photo-link:hover img{opacity:.85}
  td.photo-cell .photo-link:hover img{transform:scale(1.06)}
}
@media (prefers-reduced-motion:reduce){.photo-link img{transition:none} td.photo-cell .photo-link:hover img{transform:none}}
.photo-link:focus-visible,.score-link:focus-visible,.eircode:focus-visible,
.bcard-open:focus-visible,.row-open:focus-visible{outline:2px solid var(--accent);
  outline-offset:2px; border-radius:6px}
a.score-link{text-decoration:none; color:inherit}
a.score-link:hover .score-word,a.score.score-link:hover{text-decoration:underline}
.bcard-open{display:inline-block; margin-top:4px; font-size:13px; font-weight:600;
  color:var(--accent-ink); text-decoration:none}
.bcard-open:hover{text-decoration:underline}
/* The compact row's way in: a chevron at its right edge (beside the menu). */
.row-open{display:inline-flex; align-items:center; justify-content:center; width:28px;
  height:30px; margin-left:2px; font-size:24px; line-height:1; color:var(--ink-faint);
  text-decoration:none; border-radius:6px}
.row-open:hover{color:var(--accent-ink); background:var(--rule-soft)}
td .eircode{display:inline; font-family:"IBM Plex Mono",monospace; font-weight:500;
  letter-spacing:.04em; color:var(--ink); text-decoration:none}
td .eircode:hover{color:var(--accent-ink); text-decoration:underline}
button.copy{font:500 10px/1 "IBM Plex Mono",monospace; letter-spacing:.04em;
  text-transform:uppercase; color:var(--ink-faint); background:transparent;
  border:1px solid var(--rule); border-radius:4px; padding:2px 5px; cursor:pointer;
  margin-left:8px; vertical-align:1px}
button.copy:hover{border-color:var(--accent); color:var(--accent-ink)}
td .addr{color:var(--ink-soft); font-size:13.5px; margin-top:2px;
  white-space:normal; overflow-wrap:anywhere}
.flags{display:flex; flex-wrap:wrap; gap:5px; margin-top:5px}
/* Flags and status notes run long (the radon one is a full sentence). Inside the
   location cell they wrap to as many lines as they need within the column's width,
   rather than staying on one nowrap line and pushing the table sideways. The pill
   radius relaxes to a rounded rectangle, which is what multi-line text wants. */
td.loc .chip{white-space:normal; max-width:100%; text-align:left; border-radius:9px}
td .daftlink{font-size:13px; white-space:nowrap; text-decoration:none;
  color:var(--accent-ink)}
td .daftlink:hover{text-decoration:underline}
/* ---- "..." menu: one place for Edit details / Re-run / Archive / Delete, shared by
   a list row and a board card (see _row_menu). Click-toggled, not hover -- there are
   many of these on a page, and a hover menu that reappears every time the pointer
   passes over one on the way to something else would be constant noise. */
.rowmenu{position:relative; display:inline-block}
.rowmenu-btn{font:700 15px/1 "Public Sans",sans-serif; padding:4px 7px;
  border-radius:6px; border:1px solid transparent; background:transparent;
  color:var(--ink-faint); cursor:pointer}
.rowmenu-btn:hover{border-color:var(--rule); color:var(--ink)}
.rowmenu-panel{position:absolute; right:0; top:100%; margin-top:4px;
  background:var(--card); border:1px solid var(--rule); border-radius:9px;
  box-shadow:var(--shadow); padding:6px; min-width:150px; z-index:30}
.rowmenu-item{display:block; width:100%; text-align:left; font:500 13px/1.2
  "Public Sans",sans-serif; padding:8px 10px; border:none; border-radius:6px;
  background:transparent; color:var(--ink); cursor:pointer; white-space:nowrap}
.rowmenu-item:hover{background:var(--rule-soft)}
.rowmenu-item.danger{color:var(--critical)}
.rowmenu-item.danger:hover{background:var(--critical-soft)}
/* ---- Edit details modal, opened from a row/card's "..." menu. Own "edit-modal-*"
   names, not the board's existing "modal-overlay"/"modal-box"/"modal-actions" (the
   Viewing date/time picker) -- those toggle via inline style="display:none" rather
   than the `hidden` attribute this one uses, and reusing the same class names would
   have let one page's rules silently override the other's. ---- */
.edit-modal-overlay{position:fixed; inset:0; background:rgba(20,20,22,.45); display:flex;
  align-items:center; justify-content:center; z-index:100; padding:16px}
/* An author rule setting `display` beats the browser's own [hidden]{display:none}
   default no matter the source order -- without this, the overlay's own display:flex
   above silently overrode the `hidden` attribute set in the HTML, so the modal never
   actually stayed hidden. */
.edit-modal-overlay[hidden]{display:none}
.edit-modal{background:var(--card); border-radius:14px; box-shadow:var(--shadow);
  width:100%; max-width:380px}
.edit-modal-head{display:flex; align-items:center; justify-content:space-between;
  padding:16px 20px; border-bottom:1px solid var(--rule-soft)}
.edit-modal-head h3{font-size:17px; margin:0}
.edit-modal-close{font:400 20px/1 "Public Sans",sans-serif; border:none;
  background:transparent; color:var(--ink-faint); cursor:pointer; padding:2px 6px}
.edit-modal-close:hover{color:var(--ink)}
.edit-modal-body{padding:18px 20px; display:flex; flex-direction:column; gap:14px}
.edit-modal-field{display:flex; flex-direction:column; gap:5px; font-size:12.5px;
  color:var(--ink-soft)}
/* flex:none overrides the page-wide input[type=text]{flex:1 1 320px} rule -- inside
   this field's own flex-direction:column, that 320px flex-basis lands on the vertical
   (main) axis instead of the horizontal one it was written for, stretching the input
   to ~320px tall. Same fix already used by the submit form's own stacked inputs
   (form.submit .specs input). */
.edit-modal-field input{flex:none; height:var(--field-h); padding:0 10px;
  border-radius:8px; border:1px solid var(--rule); background:var(--paper);
  color:var(--ink); font:400 14px/1.2 "Public Sans",sans-serif}
.edit-modal-actions{display:flex; justify-content:flex-end; gap:8px; padding:14px 20px;
  border-top:1px solid var(--rule-soft)}
.edit-modal-cancel{font:500 13px/1 "Public Sans",sans-serif; padding:9px 14px;
  border-radius:8px; border:1px solid var(--rule); background:transparent;
  color:var(--ink-soft); cursor:pointer}
.edit-modal-cancel:hover{border-color:var(--accent); color:var(--accent-ink)}
.edit-modal-save{font:600 13px/1 "Public Sans",sans-serif; padding:9px 16px;
  border-radius:8px; border:none; background:var(--accent); color:#fff; cursor:pointer}
.edit-modal-save:hover{opacity:.9}
/* Viewing checklist modal reuses every .edit-modal-* rule above (same overlay, head,
   actions) -- only the body's contents differ, so it needs its own width (a fixed
   17-item checklist is far too tall as a 380px-wide column) and a checkbox row style. */
.edit-modal.wide{max-width:460px}
.checklist-body{max-height:60vh; overflow-y:auto}
.checklist-row{display:flex; align-items:center; gap:10px; padding:6px 0;
  font:400 14px/1.3 "Public Sans",sans-serif; color:var(--ink)}
.checklist-row input{flex:none; width:17px; height:17px; margin:0}
/* ---- first-run setup (_onboarding_modal_html): a two-step wizard. The body scrolls,
   the footer (Back / Skip / Next and "change this later") stays in view, and the
   whole thing fits a 390px phone with the overlay's own 16px gutter. ---- */
.edit-modal.onb{max-width:560px; max-height:min(88vh, 760px); display:flex;
  flex-direction:column}
.onb-body{overflow-y:auto; padding:22px 22px 8px; flex:1 1 auto; min-height:0}
.onb-count{font:500 11.5px/1 "IBM Plex Mono",monospace; letter-spacing:.08em;
  text-transform:uppercase; color:var(--ink-faint); margin-bottom:10px}
.onb h3{position:relative; font-size:20px; margin:0 0 4px; display:flex;
  align-items:center; gap:8px}
.onb-sub{margin:0 0 16px; color:var(--ink-soft); font-size:14px}
.onb-presets{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px}
@media (max-width:480px){ .onb-presets{grid-template-columns:minmax(0, 1fr)} }
.onb-preset{display:flex; flex-direction:column; align-items:flex-start; gap:4px;
  text-align:left; padding:13px 14px; border-radius:10px; border:1.5px solid var(--rule);
  background:var(--paper); color:var(--ink); cursor:pointer; min-height:64px;
  font:400 13px/1.35 "Public Sans",sans-serif}
.onb-preset b{font-size:15px; font-weight:600}
.onb-preset span{color:var(--ink-soft)}
.onb-preset:hover{border-color:var(--accent)}
.onb-preset.on{border-color:var(--accent); background:var(--accent-soft)}
.onb-preset.on b{color:var(--accent-ink)}
.onb-link{background:none; border:0; padding:6px 0; margin-top:12px; cursor:pointer;
  color:var(--accent-ink); font:600 13.5px/1.2 "Public Sans",sans-serif}
.onb-link:hover{text-decoration:underline}
#onbSliders{margin-top:8px}
.onb-err{color:var(--critical); font-size:13px; margin-top:8px}
.onb-err:empty{display:none}
.onb-place{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px}
.onb-place input{flex:1 1 150px; min-width:0; height:var(--field-h); padding:0 12px;
  border-radius:8px; border:1px solid var(--rule); background:var(--paper);
  color:var(--ink); font:400 15px/1.2 "Public Sans",sans-serif}
.onb-place .onb-err{flex-basis:100%; margin-top:0}
.onb-remove{flex:none; padding:0 12px; height:var(--field-h)}
.onb-remove[hidden]{display:none}
/* "Do you have a car?" (travel_mode_html): two radio pills. */
.tm-choice{display:flex; flex-wrap:wrap; gap:8px; margin:0 0 6px; padding:0; border:0}
.tm-choice label{display:inline-flex; align-items:center; gap:7px; padding:8px 13px;
  border-radius:999px; border:1.5px solid var(--rule); background:var(--paper); cursor:pointer;
  font:500 14px/1.2 "Public Sans",sans-serif; color:var(--ink)}
.tm-choice label:has(input:checked){border-color:var(--accent); background:var(--accent-soft);
  color:var(--accent-ink)}
.tm-choice input{margin:0; accent-color:var(--accent)}
.onb-mode{margin-bottom:20px}
.onb-suggest{display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:4px 0 10px;
  font-size:13px; color:var(--ink-soft)}
.onb-suggest button{padding:6px 11px; border-radius:999px; font-size:13.5px; max-width:100%;
  overflow-wrap:anywhere; text-align:left}
.onb-foot{border-top:1px solid var(--rule-soft); padding:12px 22px 14px; flex:none}
.onb-actions{display:flex; align-items:center; gap:8px}
.onb-actions button{min-height:40px; padding:9px 16px}
.onb-spacer{flex:1}
.onb-later{margin-top:8px; font-size:12px; color:var(--ink-faint); text-align:center}
/* An (i) beside a heading (info_tip_html): the explanation the page leaves out. */
.info-tip{display:inline-flex; position:static}
.info-tip-btn{width:20px; height:20px; border-radius:50%; border:1px solid var(--rule);
  background:var(--paper); color:var(--ink-soft); padding:0; cursor:help;
  font:600 11.5px/1 "Newsreader",Georgia,serif; font-style:italic; flex:none}
.info-tip-btn:hover, .info-tip.open .info-tip-btn{border-color:var(--accent); color:var(--accent-ink)}
.info-tip-text{display:none; position:absolute; left:0; right:0; top:calc(100% + 6px);
  z-index:20; padding:10px 12px; border-radius:9px; background:var(--ink); color:var(--paper);
  font:400 13px/1.45 "Public Sans",sans-serif; box-shadow:var(--shadow)}
.info-tip:hover .info-tip-text, .info-tip-btn:focus-visible + .info-tip-text,
.info-tip.open .info-tip-text{display:block}
/* ---- Mortgage calculator (Profile > Mortgage Calculator). Its own "mc-*" names,
   plain page not a modal, so none of the edit-modal-* rules above apply here. ---- */
/* A container, not just a card: .mc-form's own breakpoints below need to react to
   *this card's* width, not the page's. .mc-grid's left column is a fraction of
   whatever .wrap has, which does not track the page's viewport width in any fixed
   way -- a plain @media breakpoint stayed at 4 columns (needing >= 654px, see
   .mc-form below) at real page widths from ~950px to beyond 1300px, where this card
   itself was only ~350-550px wide, and both the form and the mode toggle overflowed
   its edge. */
.mc-grid .card:first-child{container-type:inline-size}
/* A grid, not the earlier flexbox row: with align-items:flex-end, the rate field's
   extra hint line pushed every field's own bottom edge down by a different amount,
   throwing the input boxes out of alignment with each other. align-items:start on a
   grid instead pins every field's label+input to the top of its row regardless of a
   taller sibling, and fixed column tracks keep Monthly/Term lined up under Price/Rate
   on the row below the mode toggle. Three columns -- price/deposit/rate above the mode
   toggle, payment/term/fee below it -- so both rows are full. minmax(140px,...) needs
   3*140+2*18 = 456px; the two @container breakpoints below step down before that stops
   fitting rather than after. */
/* Fields come in pairs that belong together -- Price+Deposit, Rate+Fee, then
   Monthly+Term beside the toggle that decides which of those two is the input -- so a
   phone shows two per row instead of seven full-width rows. Four columns where the card has
   room (4*130+3*14 = 562px), two below; never one -- two 130px fields fit a 320px phone. */
.mc-form{display:grid; grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px; align-items:start; margin-bottom:18px; padding-bottom:18px;
  border-bottom:1px solid var(--rule-soft)}
.mc-form .mc-mode{grid-column:span 2; align-self:end; margin:0}
@container (max-width:580px){
  .mc-form{grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px}
  .mc-form .mc-mode{grid-column:1/-1}
}
.mc-short{display:none}
@container (max-width:580px){.mc-long{display:none} .mc-short{display:inline}}
.mc-field{display:flex; flex-direction:column; gap:5px; font-size:12.5px;
  color:var(--ink-soft)}
/* flex:none is load-bearing, same reason as .edit-modal-field input above: the four
   money fields switched from type=number to type=text for comma-grouping, so they
   started matching the page-wide input[type=text]{flex:1 1 320px} rule -- inside this
   field's own flex-direction:column, that 320px flex-basis lands on the vertical
   (main) axis instead of the horizontal one it was written for, stretching the input
   to ~320px tall. */
.mc-field input{flex:none; height:var(--field-h); padding:0 10px; border-radius:8px;
  border:1px solid var(--rule); background:var(--paper); color:var(--ink);
  font:400 14px/1.2 "Public Sans",sans-serif}
.mc-field.mc-disabled{opacity:.4}
.mc-field.mc-disabled input{pointer-events:none}
/* A segmented toggle, not a visible radio pair: still two real <input type=radio>
   underneath (so the existing querySelector('input[name=mcMode]:checked') logic and
   its native keyboard/label semantics need no change), just visually a single pill
   split in two rather than two long sentences to read and compare. */
/* flex, not inline-flex, and the segments flex:1 rather than sized to their own label
   -- inline-flex sized this to its two labels' natural (unwrapped) width, which is
   wider than .mc-form's own available width whenever the row above has dropped to
   fewer columns (see the @container breakpoints above); flex:1 on each label instead
   guarantees the pill itself never exceeds its grid area; the labels wrap onto a
   second line at the very narrowest widths rather than pushing the pill wider. */
.mc-mode{display:flex; width:100%; gap:2px; padding:3px;
  background:var(--paper); border:1px solid var(--rule); border-radius:9px;
  box-sizing:border-box; min-height:var(--field-h)}
.mc-mode label{flex:1; display:flex; align-items:center; justify-content:center;
  text-align:center; cursor:pointer; padding:7px 10px; border-radius:6px;
  font-size:12.5px; font-weight:500; color:var(--ink-faint)}
.mc-mode label:has(input:checked){background:var(--card); color:var(--ink);
  box-shadow:var(--shadow)}
.mc-mode input{position:absolute; opacity:0; pointer-events:none}
/* A fixed 5-up grid, not auto-fit: auto-fit's minmax(120px,...) tracks meant five
   items only fit one to a row when the card was wide enough, and wrapped the fifth
   onto its own line otherwise -- exactly the "looks like an afterthought" problem
   this was meant to avoid. minmax(0, 1fr) keeps five equal columns on one row and
   shrinks them as the card narrows, but "shrinks" has a floor -- past a certain
   point five columns is not five narrow columns, it is five overlapping ones, hence
   the @container fallback to two-and-a-bit rows below. */
.mc-results{display:grid; grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:16px 20px; padding-top:16px}
@container (max-width:560px){
  .mc-results{grid-template-columns:repeat(2, minmax(0, 1fr))}
  /* Five items in two columns: the last (the highlighted total) takes the full width
     rather than sitting alone in the left half. The fee row below is four items, so it
     is a clean 2x2. */
  #mcResults > :last-child{grid-column:1/-1}
}
/* The fee row (only present when a fee is typed) lines up under the mortgage row's
   five columns: fee/month under Loan, outlay under Monthly payment, fee-over-term under
   Total interest, total cost under Total paid. Column 3 is deliberately empty. */
.mc-fee-row{padding-top:10px}
.mc-fee-row:empty{display:none}
.mc-fee-a{grid-column:1} .mc-fee-b{grid-column:2} .mc-fee-c{grid-column:4} .mc-fee-d{grid-column:5}
@container (max-width:560px){
  .mc-fee-a,.mc-fee-b,.mc-fee-c,.mc-fee-d{grid-column:auto}
}
/* flex-start, not flex-end: bottom-anchoring left the numbers themselves at different
   heights across the row whenever one item's label happened to wrap onto a second
   line ("Monthly payment", "Total paid to the bank") and a neighbour's didn't -- top-
   anchoring keeps every number on the same line regardless of how many lines its own
   label needs underneath it. */
.mc-result-item{display:flex; flex-direction:column; gap:2px; justify-content:flex-start}
.mc-result-item .mc-num{font:600 21px/1.1 "IBM Plex Mono",monospace; color:var(--ink)}
.mc-result-item .mc-label{font-size:11.5px; color:var(--ink-soft);
  text-transform:uppercase; letter-spacing:.03em}
/* The true cost of the mortgage -- the one number here worth more visual weight than
   the rest, still in the same row as the other four rather than set apart from them. */
.mc-result-highlight{background:var(--accent-soft); border-radius:10px;
  padding:10px 12px; margin:-6px -4px}
.mc-result-highlight .mc-num{font-size:21px; color:var(--accent-ink)}
.mc-hint{font-size:11px; color:var(--ink-faint)}
.mc-optional{font-size:11px; color:var(--ink-faint)}
.mc-trend{font-size:12.5px; color:var(--ink-soft); margin:0 0 10px}
/* One grid for all four cards, not two stacked side-by-side grids -- two independent
   grids each choosing their own column widths only line up by coincidence (even
   matching fr-ratios round to slightly different pixel widths). Named areas place the calculator
   above sensitivity in the wide left column and rate distribution above deposit in
   the narrower right one, so those two are genuinely one continuous column each, not
   four independently-sized cards that happen to look similar. 1.7fr/1fr: the
   calculator's own four-field form wants more room than the rate-distribution card's
   two-column table does. minmax(0, ...), not a bare fr: a grid track's default
   minimum is auto (its content's own min-content width), so a wide table inside
   either card could otherwise force its whole track -- and with it the page -- wider
   than .wrap and scroll horizontally instead of the table itself wrapping/eliding the
   way a narrower track was meant to make it. */
.mc-grid{display:grid; grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);
  grid-template-areas:"calc rate" "sens deposit"; gap:18px; align-items:start}
@media (max-width:820px){
  .mc-grid{grid-template-columns:minmax(0,1fr);
    grid-template-areas:"calc" "rate" "sens" "deposit"}
}
/* A <table> won't shrink below its own columns' min-content width just because its
   grid track did (minmax(0,...) above stops the *track* forcing the page wider, but
   width:100% on a table is only ever a floor under table-layout:auto, not a ceiling) --
   the sensitivity table's six numeric columns are exactly wide enough on a real number
   ("€233,400") to hit this. Scrolling inside the card beats the whole page gaining a
   horizontal scrollbar over one table in one corner of it. */
.mc-table-scroll{overflow-x:auto}
/* .eq-breakdown th's own colour (--ink-faint, shared with every other page that uses
   this table style) reads as the same tier as a caption -- fine when a table has no
   caption sitting right next to it to compare against, but this page's tables and
   .mc-hint's captions are both on screen together, so here specifically a header
   should read as closer to a field label than a footnote. Scoped to this page's own
   tables rather than changed globally, since .eq-breakdown is shared with the
   Priority Profiles page. */
.mc-grid .eq-breakdown th{color:var(--ink-soft)}
/* Mortgage Calculator tabs: one per home, each its own set of inputs. */
/* Pinned to the top while scrolling on a phone: the tabs are how you get from one home's
   numbers to the next, and with the form and four cards stacked they were otherwise a
   long scroll back up. */
.mc-tabs{display:flex; align-items:center; gap:6px; overflow-x:auto; margin:0 0 14px;
  padding-bottom:2px; -webkit-overflow-scrolling:touch}
@media (max-width:820px){
  .mc-tabs{position:sticky; top:0; z-index:20; background:var(--paper);
    margin:0 -16px 12px; padding:8px 16px}
}
.mc-tab-compare{flex:none; height:34px; padding:0 12px; border:1px solid var(--rule);
  border-radius:9px; background:transparent; color:var(--ink-soft);
  font:500 13px/1 "Public Sans",sans-serif; cursor:pointer}
.mc-tab-compare:hover{background:transparent; color:var(--accent-ink); border-color:var(--accent)}
.mc-tab-compare.on{background:var(--accent-soft); color:var(--accent-ink); border-color:var(--accent)}
/* Compare: up to three tabs side by side. A row whose values differ is set in bold and
   its best outcome (lowest cost, shortest term) in green; identical rows stay quiet,
   so what actually differs between two homes is what the eye lands on. */
.mc-compare{margin:0 0 18px}
.mc-compare-pick{display:flex; flex-wrap:wrap; gap:6px; margin:0 0 10px}
.mc-compare-pick label{display:inline-flex; align-items:center; gap:6px; font-size:12.5px;
  padding:5px 10px; border:1px solid var(--rule); border-radius:999px; cursor:pointer;
  color:var(--ink-soft); max-width:100%}
.mc-compare-pick label:has(input:checked){border-color:var(--accent); color:var(--ink);
  background:var(--accent-soft)}
.mc-compare-pick input{margin:0; accent-color:var(--accent)}
.mc-compare-pick span{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.mc-compare table{width:100%; max-width:760px; border-collapse:collapse; table-layout:fixed}
.mc-compare th, .mc-compare td{padding:8px 6px; font-size:13px; text-align:right;
  border-bottom:1px solid var(--rule-soft); overflow:hidden; text-overflow:ellipsis}
.mc-compare th{font:600 12px/1.3 "Public Sans",sans-serif; color:var(--ink); text-transform:none;
  letter-spacing:normal; white-space:normal; overflow-wrap:anywhere; vertical-align:bottom}
.mc-compare .mc-sub{display:block; font-size:11px; color:var(--ink-faint); font-weight:400}
.mc-compare th:first-child, .mc-compare td:first-child{text-align:left; color:var(--ink-soft);
  font-weight:400; width:34%}
.mc-compare td:not(:first-child){font-family:"IBM Plex Mono",monospace; white-space:nowrap}
.mc-compare tr.diff td:not(:first-child){font-weight:600; color:var(--ink)}
.mc-compare tr.diff td.best{color:var(--good)}
.mc-compare tr:not(.diff) td:not(:first-child){color:var(--ink-faint)}
@media (max-width:480px){.mc-compare th, .mc-compare td{font-size:12px; padding:7px 3px}}
/* The four numbers that answer "can we afford it", pinned to the bottom of a phone
   screen so they stay visible while a field higher up is being edited -- the in-card
   results are a scroll away there. visualViewport (see the script) lifts it above the
   on-screen keyboard, which a plain position:fixed bottom sits behind on iOS. */
.mc-dock{display:none}
@media (max-width:820px){
  .mc-dock{position:fixed; left:0; right:0; bottom:0; z-index:60; display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr)); gap:6px; background:var(--card);
    border-top:1px solid var(--rule); box-shadow:0 -4px 16px rgba(0,0,0,.12);
    padding:10px calc(14px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom))
      calc(14px + env(safe-area-inset-left))}
  .mc-dock[hidden]{display:none}
  .mc-dock .mc-num{display:block; font:600 14.5px/1.15 "IBM Plex Mono",monospace;
    color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
  .mc-dock .mc-label{display:block; font-size:10.5px; color:var(--ink-soft); margin-top:2px;
    text-transform:uppercase; letter-spacing:.03em; white-space:nowrap}
  .mc-dock > div:last-child .mc-num{color:var(--accent-ink)}
  body.has-mc-dock .content{padding-bottom:calc(84px + env(safe-area-inset-bottom))}
}
.mc-tab{flex:none; display:inline-flex; align-items:center; gap:2px; height:34px;
  padding:0 4px 0 12px; border:1px solid var(--rule); border-radius:9px; background:var(--card);
  color:var(--ink-soft); font:500 13px/1 "Public Sans",sans-serif; cursor:pointer; white-space:nowrap}
.mc-tab:hover{color:var(--ink); border-color:var(--ink-faint)}
.mc-tab.on{background:var(--accent-soft); color:var(--accent-ink); border-color:var(--accent)}
.mc-tab .mc-tab-label{padding-right:6px}
.mc-tab-act{display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px;
  padding:0; border:0; border-radius:5px; background:transparent; color:inherit; opacity:.6;
  font-size:13px; cursor:pointer}
.mc-tab-act:hover{opacity:1; background:var(--rule-soft)}
.mc-tab-new{flex:none; height:34px; padding:0 12px; border:1px dashed var(--rule); border-radius:9px;
  background:transparent; color:var(--ink-soft); font:500 13px/1 "Public Sans",sans-serif; cursor:pointer}
.mc-tab-new:hover{color:var(--accent-ink); border-color:var(--accent)}
/* A little more room per row, plus zebra striping, so a five-column number row (the
   sensitivity table especially) can be traced left to right without losing the row --
   the default .eq-breakdown padding was tuned for shorter, sparser tables elsewhere. */
.mc-grid .eq-breakdown td, .mc-grid .eq-breakdown th{padding:10px 8px}
.mc-grid .eq-breakdown tbody tr:nth-child(even){background:var(--rule-soft)}
.mc-bar-row{display:flex; align-items:center; gap:8px; margin:6px 0; font-size:12px}
.mc-bar-label{width:56px; flex:none; color:var(--ink-soft)}
.mc-bar-track{flex:1; height:10px; background:var(--rule-soft); border-radius:5px;
  overflow:hidden}
.mc-bar-fill{height:100%; background:var(--accent); border-radius:5px}
.mc-bar-value{width:50px; flex:none; text-align:right; color:var(--ink);
  font-family:"IBM Plex Mono",monospace}
/* A <textarea> so a longer note wraps onto as many rows as it needs, rather than a
   single-line input clipping or scrolling it sideways. `autosize()` in the script
   below grows it to fit its content instead of leaving a fixed number of rows with a
   scrollbar; `resize:vertical` is a fallback if JS is off, not the primary mechanism. */
/* The current bid, shown as a second, smaller line under the list page's own asking
   price for any row in the Bidding column -- see the Price cell's own comment. */
.bid-note{font-size:11px; color:var(--accent-ink); margin-top:2px}
td.notes{min-width:140px}
.notes-input{flex:none; display:block; width:100%; min-height:30px; padding:6px 8px;
  font:400 13px/1.4 inherit; color:var(--ink); background:var(--card);
  border:1px solid var(--rule); border-radius:6px; resize:vertical; overflow:hidden;
  transition:border-color .3s}
.notes-input:focus{outline:2px solid var(--accent); outline-offset:1px}
.notes-input.saved{border-color:var(--good)}

/* ---- list filter ---- */
.filter-input{flex:none; width:100%; max-width:340px; height:36px; padding:0 12px;
  font:400 14px/1 "Public Sans",sans-serif; color:var(--ink); background:var(--card);
  border:1px solid var(--rule); border-radius:8px; margin-bottom:10px}
.filter-input:focus{outline:2px solid var(--accent); outline-offset:1px}
.filter-empty{padding:24px; text-align:center; color:var(--ink-faint)}

/* ---- map ---- */
/* The status layers: unchecking one drops it from the map without moving the view or
   refetching -- renderMarkers() just redraws from the same fetched rows. */
.status-filters{display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px;
  margin:0 0 14px}
/* Filters grouped by kind (see _filter_bar_html): a SCOPE narrows the whole set (search,
   starred-only), a FACET picks among the mutually exclusive values of one field
   (status). Putting a scope toggle in a row of status chips read as "a seventh status". */
.filters{margin:0 0 14px}
.filter-scope{display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px}
.filter-scope .filter-input{margin-bottom:0}
/* Status: one dropdown in the filter row (see _filter_bar_html). */
.status-dd{position:relative}
.status-dd-btn{list-style:none; display:inline-flex; align-items:center; gap:5px; height:36px;
  padding:0 12px; border:1px solid var(--rule); border-radius:8px; background:var(--card);
  font-size:13px; color:var(--ink-soft); cursor:pointer; user-select:none; white-space:nowrap}
.status-dd-btn::-webkit-details-marker{display:none}
.status-dd-btn::after{content:"▾"; font-size:11px; color:var(--ink-faint)}
.status-dd-btn b{font-weight:600; color:var(--ink)}
.status-dd[open] .status-dd-btn{border-color:var(--accent)}
.status-dd-panel{position:absolute; z-index:20; top:calc(100% + 6px); left:0; width:260px;
  padding:8px; background:var(--card); border:1px solid var(--rule); border-radius:10px;
  box-shadow:var(--shadow)}
.status-dd-item{display:flex; align-items:flex-start; gap:8px; padding:6px; border-radius:6px;
  cursor:pointer; font-size:13px; color:var(--ink)}
.status-dd-item:hover{background:var(--rule-soft)}
.status-dd-item input{margin-top:2px; cursor:pointer}
.status-dd-item b{font-weight:500; display:block}
.status-dd-item small{display:block; color:var(--ink-faint); font-size:11.5px; margin-top:1px}
.status-dd-actions{display:flex; gap:6px; padding:8px 6px 2px; border-top:1px solid var(--rule-soft);
  margin-top:4px}
/* Phones: the whole block hides behind one "Filter (n)" button -- filters were the biggest
   thing on the top of a phone screen. Collapsed it is one line; opened it takes the room
   it needs. The count is the number of narrowing controls in use (search, starred,
   any unticked status), so a filtered view never looks like the full set. */
.filter-toggle{display:none}
@media (max-width:700px){
  .filter-toggle{display:inline-flex; align-items:center; height:34px; padding:0 14px;
    font-size:13px; background:transparent; color:var(--ink-soft);
    border:1px solid var(--rule)}
  .filter-toggle:hover{background:var(--neutral-soft); color:var(--ink)}
  .filters.open .filter-toggle{margin-bottom:10px}
  .filter-body{display:none}
  .filters.open .filter-body{display:block}
  .tab-strip{padding:8px 12px}
  .tab-more{padding:5px 8px}
  .tab-more-menu{right:8px}
  .tab-strip .tab{flex:none; padding:4px 2px 4px 9px; font-size:12.5px}
  .tab-strip .tab a{max-width:120px}
}
/* Phones, the board: the Scoring chip and Filter share one row under the title, rather
   than a row each. Done by layout, not by moving markup -- the chip is one element with
   an id its script finds, and on wider screens it stays beside the title. The two
   wrappers step aside (display:contents) so the title, chip, Filter button and the
   opened filters all line up in .board-head's own flex row, and wrap where needed. */
@media (max-width:700px){
  .board-head{display:flex; flex-wrap:wrap; align-items:center; gap:10px 8px; margin-bottom:14px}
  .board-head > .page-title, .board-head > .filters{display:contents}
  .board-head h1{flex-basis:100%; margin:0}
  /* Basis 0, so a long profile name shortens with an ellipsis instead of pushing
     Filter onto a row of its own; fit-content keeps a short one from stretching. */
  .board-head .scoring-chip{flex:1 1 0; max-width:fit-content; min-width:0}
  .board-head .scoring-chip b{white-space:nowrap; min-width:0}
  .board-head .filter-head{flex:none; margin:0 0 0 auto}
  .board-head .filters.open .filter-head{margin-bottom:0}
  .board-head .active-filters, .board-head .filter-body{flex-basis:100%; margin-top:0}
}
/* Phones: List|Map and Filter share one row (see _filter_bar_html's lead_html), and the
   title row's own copy of the toggle steps aside. */
.filter-head{display:none}
.active-filters{display:none}
@media (min-width:701px){.view-toggle.m-only{display:none}}
@media (max-width:700px){
  .view-toggle.d-only{display:none}
  .filter-head{display:flex; align-items:center; gap:8px}
  .filter-head .view-toggle .view-btn{display:inline-flex; align-items:center; height:32px; padding:0 12px}
  .filters.open .filter-head{margin-bottom:10px}
  .filters.open .filter-toggle{margin-bottom:0}
  .active-filters{display:flex; gap:6px; overflow-x:auto; margin-top:8px; padding-bottom:2px;
    -webkit-overflow-scrolling:touch; scrollbar-width:none}
  .active-filters:empty{display:none}
  .af-chip{flex:none; height:28px; padding:0 10px; border-radius:999px; font:500 12px/1 "Public Sans",sans-serif;
    background:var(--accent-soft); color:var(--accent-ink); border:1px solid var(--accent); white-space:nowrap}
  .af-chip:hover{background:var(--accent-soft)}
}
/* Phones: a Houses row shows its note only once expanded -- the ▾ button, a tap on
   the row's body, or "Note" in the ⋮ menu (a board card has its own "Add note"). A
   saved note still shows as one truncated line (.m-note) so it is never invisible. */
.m-expand, .m-note{display:none}
@media (min-width:701px){.rowmenu-item.m-only{display:none}}
@media (max-width:700px){
  .m-expand{display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px;
    padding:0; border-radius:7px; background:transparent; color:var(--ink-faint);
    border:1px solid transparent; font-size:13px; transition:transform .15s}
  .m-expand:hover{background:var(--rule-soft); color:var(--ink)}
  .m-open .m-expand{transform:rotate(180deg)}
  .m-note{display:block; font-size:12px; color:var(--ink-soft); margin-top:4px;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-style:italic}
  .m-open .m-note{display:none}
}
.page-title{display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 14px}
/* Phones: Board, Houses and Admin drop their big title -- the top navigation already
   underlines the page you are on, and the title cost ~60px of the first screen. It
   stays in the page for screen readers (visually hidden, not display:none). */
@media (max-width:700px){
  .m-sr-title{position:absolute !important; width:1px; height:1px; margin:-1px; padding:0;
    overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; border:0}
}
.scoring-by{font-size:13px; color:var(--ink-faint)}
.scoring-chip{display:inline-flex; align-items:center; gap:5px; height:30px; padding:0 12px;
  border-radius:999px; background:transparent; color:var(--ink-soft); border:1px solid var(--rule);
  font:400 13px/1 "Public Sans",sans-serif; max-width:100%; align-self:center}
.scoring-chip b{font-weight:600; color:var(--ink); overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap; max-width:180px}
.scoring-chip span{font-size:10px; color:var(--ink-faint)}
.scoring-chip:hover{background:var(--rule-soft); color:var(--ink); border-color:var(--accent)}
/* The profile sheet: a bottom sheet on a phone (thumb reach, like a native picker), a
   centred dialog on a wide screen. */
.sheet-overlay{position:fixed; inset:0; z-index:200; background:rgba(22,32,42,.45);
  display:flex; align-items:center; justify-content:center; padding:16px}
.sheet-overlay[hidden]{display:none}
.sheet{background:var(--card); border-radius:14px; box-shadow:var(--shadow); width:100%;
  max-width:420px; max-height:80vh; display:flex; flex-direction:column; overflow:hidden}
.sheet-grip{display:none}
.sheet-head{display:flex; align-items:center; justify-content:space-between; padding:14px 18px 8px}
.sheet-head h3{margin:0; font-size:17px}
.sheet-list{overflow-y:auto; padding:4px 10px; display:flex; flex-direction:column; gap:6px}
.sheet-item{display:flex; flex-direction:column; align-items:flex-start; gap:4px; width:100%;
  text-align:left; padding:12px 14px; min-height:56px; border-radius:10px; background:transparent;
  color:var(--ink); border:1px solid var(--rule); font:inherit; cursor:pointer}
.sheet-item:hover{background:var(--rule-soft)}
.sheet-item.on{border:2px solid var(--accent); padding:11px 13px; background:var(--accent-soft)}
.sheet-item.busy{opacity:.6}
.sheet-item:disabled{background:transparent; color:var(--ink)}
.sheet-item-name{font-weight:600; font-size:14.5px; display:flex; align-items:center; gap:8px}
.sheet-item-sub{font-size:12.5px; color:var(--ink-soft); line-height:1.35}
.sheet-foot{display:flex; gap:8px; padding:12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top:1px solid var(--rule-soft); margin-top:8px}
.sheet-btn{flex:1; display:inline-flex; align-items:center; justify-content:center; height:44px;
  border-radius:9px; border:1px solid var(--rule); color:var(--ink); text-decoration:none;
  font-weight:500; font-size:14px}
.sheet-btn:hover{background:var(--rule-soft)}
.sheet-btn.primary{background:var(--accent); border-color:var(--accent); color:#fff}
.sheet-btn.primary:hover{background:var(--accent-ink)}
@media (max-width:700px){
  .sheet-overlay{align-items:flex-end; padding:0}
  .sheet{max-width:none; border-radius:16px 16px 0 0; max-height:85vh}
  .sheet-grip{display:block; width:40px; height:4px; border-radius:2px; background:var(--rule);
    margin:8px auto 0}
  body.sheet-open{overflow:hidden}
}
.status-filter{display:inline-flex; align-items:center; gap:5px; font-size:13px;
  color:var(--ink-soft); cursor:pointer; user-select:none}
.status-filter input{cursor:pointer}
.status-filter-btn{font:500 11px/1 "IBM Plex Mono",monospace; letter-spacing:.06em;
  text-transform:uppercase; color:var(--ink-faint); background:transparent;
  border:1px solid var(--rule); border-radius:6px; padding:5px 9px; cursor:pointer}
.status-filter-btn:hover{border-color:var(--accent); color:var(--accent-ink)}
/* isolation: Leaflet stacks its panes and controls at z-index 400-1000, which put
   them over the filters' Status dropdown (z-index 20) wherever that opens above the
   map -- on a phone its list ended under the tiles. Its own stacking context keeps
   those numbers inside the map. */
#map{height:min(74vh,760px); border:1px solid var(--rule); border-radius:12px;
  isolation:isolate}
/* List and Map are one page (list_page): the same filtered rows, two renderings. The
   .view-map/.view-list class on the .fill region picks which card shows; ids outrank
   body.fit's .fill > .card rule. */
.fill.view-list > #mapView, .fill.view-map > #listView{display:none}
.fill.view-map > #mapView{display:flex}
#mapView{flex-direction:column; overflow:hidden; padding:0}
#mapView #map{flex:1 1 auto; min-height:320px; height:auto; border:0; border-radius:0}
.map-legend{display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; padding:8px 12px}
.map-count{font-weight:600; color:var(--ink)}
.map-count.filtered{color:var(--accent-ink)}
.map-legend .grad{flex:0 0 160px; height:10px; border-radius:5px;
  box-shadow:inset 0 0 0 1px var(--rule)}
.view-toggle{display:inline-flex; border:1px solid var(--rule); border-radius:8px; overflow:hidden}
.view-btn{padding:6px 14px; font:500 13px/1 "Public Sans",sans-serif; color:var(--ink-faint);
  text-decoration:none}
.view-btn[aria-current=true]{background:var(--accent); color:#fff}
.leaflet-container{background:var(--paper); font-family:"Public Sans",sans-serif}
.pin{border-radius:50%; border:2px solid #fff; box-shadow:0 1px 5px rgba(0,0,0,.4)}
/* The label is allowed to overflow the icon box: Leaflet anchors the box on the
   coordinate, and the dot has to stay there rather than being shifted by the text. */
.pin-wrap{position:relative; width:100%; height:100%}
/* Tiles and popups are always light, so everything drawn over them keeps literal
   dark ink rather than var(--ink) — the token flips to near-white in dark mode and
   the label disappears against its own white pill. */
.pin-price{position:absolute; top:100%; left:50%; transform:translateX(-50%);
  margin-top:3px; padding:1px 5px; border-radius:5px; white-space:nowrap;
  font:700 12px/1.5 "IBM Plex Mono",monospace; color:#16202A;
  background:rgba(255,255,255,.97); border:1px solid rgba(22,32,42,.25);
  box-shadow:0 1px 3px rgba(0,0,0,.35)}
.pop{color:#16202A}
.pop-photo{display:block; width:100%; max-width:220px; height:110px; object-fit:cover;
  border-radius:7px; margin-bottom:8px}
.pop b{font-family:"IBM Plex Mono",monospace; letter-spacing:.04em; color:#16202A}
.pop .s{font:600 20px/1.2 "IBM Plex Mono",monospace}
.pop .pop-price{margin-left:10px; padding-left:10px; border-left:1px solid rgba(22,32,42,.2);
  font:600 15px/1.2 "IBM Plex Mono",monospace; color:#16202A}

/* ---- board ---- */
/* Six equal tracks that share out whatever width .wrap gives them, rather than a
   fixed per-column width -- the point raised was fitting the whole board on screen at
   once, not scrolling to see the later columns. Below 700px six tracks get too
   narrow for a card to be legible, so that breakpoint falls back to the old
   horizontal-scrolling layout instead of squeezing further. */
/* align-items left at its grid default (stretch), deliberately: every column then
   matches the height of the tallest one, so a short or empty column is still a
   full-height drop target down to the bottom of the board -- rather than just the
   height of its own one or two cards -- which is what made dropping onto it fiddly.
   `grid-auto-rows` is what makes "the tallest one" true: the board is a fixed-height
   scroller, and with the default `auto` row the columns were cut to that height while
   their cards ran on for screens below, so each column's tint ended a few cards in.
   minmax(min-content, 1fr) is "as tall as the cards need, and at least the board". */
.board{display:grid; grid-template-columns:repeat(var(--cols, 6), minmax(0,1fr));
  grid-auto-rows:minmax(min-content, 1fr); gap:10px; padding:4px 2px 14px}
/* On a phone: one status at a time, exactly one screen wide, and a swipe moves to the
   next. The board breaks out of .wrap's side padding (negative margin, same variable) so
   a column can be the full screen minus a small gutter, and `scroll-snap-stop: always`
   stops a hard flick from sailing past a status -- one swipe, one column. The status
   strip above says where you are, so no sliver of the next column is needed to hint
   that it scrolls. Each column scrolls *itself* vertically and the board only
   sideways, so the tint is always the full visible height and the header (sticky)
   stays pinned however long the column is. */
@media (max-width:700px){
  body.fit .fill > .board{display:flex; gap:10px; overflow-x:auto; overflow-y:hidden;
    margin-inline:calc(-1 * var(--wrap-pad-x)); padding:4px 10px 14px;
    scroll-snap-type:x mandatory; scroll-padding-inline:10px}
  .board-col{flex:0 0 100%; scroll-snap-align:start; scroll-snap-stop:always;
    overflow-y:auto; overscroll-behavior-y:contain}
  .board-col.collapsed{flex:0 0 56px; overflow:hidden}
  /* The header sits in the column's own padding, so pull it flush to the top edge: sticky
     is measured from the scrollport, and left alone it would hang 10px below the top with
     cards visible in the gap above it. */
  .board-col-head{top:-10px; margin-top:-10px; padding-top:12px}
  .board-strip{display:flex; gap:6px; overflow-x:auto; margin:0 0 10px; padding-bottom:2px}
  .status-filters{flex-wrap:nowrap; overflow-x:auto; white-space:nowrap}
  .status-filter{flex:none}
}
/* Status strip above the board, phones only: each chip carries its column's own tint and
   count, and taps scroll that column into view -- direct navigation instead of swiping
   blindly through six of them. */
/* Desktop only, and *inside* a media query on purpose: written as a bare rule here, it sat
   after the phone block above with equal specificity and won, so the strip stayed hidden
   on exactly the screens it exists for. */
@media (min-width:701px){.board-strip{display:none}}
.board-chip{flex:none; height:auto; padding:6px 11px; border-radius:99px; color:var(--ink);
  border:1px solid var(--rule); font:600 11px/1.2 "IBM Plex Mono",monospace;
  letter-spacing:.04em; text-transform:uppercase; cursor:pointer;
  display:inline-flex; align-items:center; text-decoration:none}
.board-chip b{font-weight:400; margin-left:4px}
.board-chip.on{outline:2px solid var(--accent); outline-offset:1px}
.board-chip[data-status="preview"]{background:var(--col-preview)}
.board-chip[data-status="applied"]{background:var(--col-applied)}
.board-chip[data-status="viewing"]{background:var(--col-viewing)}
.board-chip[data-status="bidding"]{background:var(--col-bidding)}
.board-chip[data-status="sale_agreed"]{background:var(--col-sale-agreed)}
.board-chip[data-status="declined"]{background:var(--col-declined)}
.board-col{border:1px solid var(--rule); border-radius:12px; padding:10px;
  min-height:60px; min-width:0; transition:border-color .15s, box-shadow .15s}
/* One bright tint per column (the --col-* tokens), not the tone system used
   elsewhere -- there is no good/caution/critical judgement being made here, just
   six distinct places a card can sit, and each should be easy to tell apart at a
   glance while scanning the whole board. */
.board-col[data-status="preview"]{background:var(--col-preview)}
.board-col[data-status="applied"]{background:var(--col-applied)}
.board-col[data-status="viewing"]{background:var(--col-viewing)}
.board-col[data-status="bidding"]{background:var(--col-bidding)}
.board-col[data-status="sale_agreed"]{background:var(--col-sale-agreed)}
.board-col[data-status="declined"]{background:var(--col-declined)}
/* Same six colours as the board's columns, on the list page's own Status chip -- one
   glance ties a row here to the column it sits in over there. */
.status-chip{display:inline-block; font:500 10.5px/1 "IBM Plex Mono",monospace;
  letter-spacing:.02em; padding:3px 6px; border-radius:6px; white-space:nowrap}
.status-chip[data-status="preview"]{background:var(--col-preview)}
.status-chip[data-status="applied"]{background:var(--col-applied)}
.status-chip[data-status="viewing"]{background:var(--col-viewing)}
.status-chip[data-status="bidding"]{background:var(--col-bidding)}
.status-chip[data-status="sale_agreed"]{background:var(--col-sale-agreed)}
.status-chip[data-status="declined"]{background:var(--col-declined)}
/* Houses: the chip is a button that opens the status picker. */
button.status-pick{border:0; cursor:pointer; font:inherit; display:inline-flex; align-items:center;
  gap:5px; height:auto; color:inherit; white-space:nowrap}
button.status-pick:hover{filter:brightness(.96); background-color:inherit}
button.status-pick:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
.status-caret{width:0; height:0; border-left:4px solid transparent; border-right:4px solid transparent;
  border-top:5px solid currentColor; opacity:.6}
.status-picker-overlay{position:fixed; inset:0; z-index:250}
.status-picker-overlay[hidden]{display:none}
.status-picker{position:fixed; min-width:190px; padding:6px; background:var(--card);
  border:1px solid var(--rule); border-radius:10px; box-shadow:var(--shadow);
  display:flex; flex-direction:column; gap:2px}
.status-picker-head{font:500 11px/1 "IBM Plex Mono",monospace; letter-spacing:.08em;
  text-transform:uppercase; color:var(--ink-faint); padding:8px 8px 6px}
.status-opt{display:flex; align-items:center; height:auto; padding:7px 8px; border-radius:8px;
  background:transparent; color:var(--ink); text-align:left}
.status-opt:hover, .status-opt:focus-visible{background:var(--rule-soft); outline:none}
.status-opt[aria-selected="true"]{box-shadow:inset 3px 0 0 var(--accent)}
@media (max-width:700px){
  .status-picker-overlay{background:rgba(22,32,42,.45)}
  body.status-picker-open{overflow:hidden}
  .status-picker{left:0; right:0; bottom:0; top:auto; border-radius:16px 16px 0 0;
    padding:10px 12px calc(12px + env(safe-area-inset-bottom))}
  .status-opt{padding:12px 8px}
}
/* A ring rather than swapping the background: the column's own colour is its identity
   and should stay visible while something is dragged over it, not flash to a generic
   "active" colour that could belong to any column. */
.board-col.dragover{box-shadow:0 0 0 2px var(--accent); border-color:var(--accent)}
/* Pinned inside its own column (the board scrolls under it), so the status you're
   looking at stays on screen however long the column is. background:inherit takes the
   column's own tint, so cards don't show through. */
/* The star: a buyer's own "still thinking about this one" mark -- independent of status,
   so it sits left of the score on every surface. Hollow and faint when off, filled and
   accent when on (the glyph itself swaps, see toggleStar). Reset from the global
   button style; draggable="false" in the markup so grabbing it never starts a card drag. */
.star-btn{background:none; border:0; padding:0 4px 0 0; height:auto; font-size:17px;
  line-height:1; color:var(--ink-faint); cursor:pointer; vertical-align:middle}
.star-btn:hover{background:none; color:var(--accent)}
.star-btn.on{color:var(--accent)}
.board-col-head{display:flex; justify-content:space-between; align-items:baseline;
  font:600 11px/1.4 "IBM Plex Mono",monospace; text-transform:uppercase;
  letter-spacing:.06em; color:var(--ink-soft); padding:2px 4px 10px;
  position:sticky; top:0; z-index:2; background:inherit}
.board-count{font-weight:400}
/* A column's header collapses it (click or Enter/Space) -- the board's own answer to
   "hide Declined", in place of a status filter row duplicating the axis the page is built
   on. A collapsed column keeps its tint and stays a valid drop target; its cards just
   fold away and its track shrinks (see the board script). */
.board-col-head{cursor:pointer; user-select:none}
.board-chev{color:var(--ink-faint); margin-left:6px}
.board-col.collapsed .board-col-body{display:none}
.board-col.collapsed{padding:10px 4px}
.board-col.collapsed .board-col-head{writing-mode:vertical-rl; padding:2px 0; gap:8px;
  justify-content:flex-end}
.board-col.collapsed .board-chev{transform:rotate(-90deg)}
.board-col-body{display:flex; flex-direction:column; gap:8px; min-height:20px}
.bcard{background:var(--card); border:1px solid var(--rule); border-radius:9px;
  padding:10px 11px; box-shadow:var(--shadow); cursor:grab}
.bcard:active{cursor:grabbing}
/* Negative-margins out to the card's own padding edge, rather than restructuring the
   card to put padding on an inner wrapper instead -- every other .bcard-* rule below
   already assumes it can rely on the card's own padding. */
.bcard-photo{display:block; width:calc(100% + 22px); height:86px; object-fit:cover;
  margin:-10px -11px 9px; border-radius:8px 8px 0 0; transition:opacity .15s}
.bcard-top{display:flex; justify-content:space-between; align-items:center; gap:8px}
.bcard-top-left{display:flex; align-items:center; min-width:0}
.bcard-top-right{display:flex; align-items:center; flex-shrink:0}
.bcard-top-right .star-btn{padding:0}
/* Two lines, not one: Eircode (+ copy) and the star share the first, the rating word and
   the "..." menu the second. A single row carried star + a nine-character word ("Very
   good") + menu against the Eircode and copy button, which fit when the score was two
   digits and did not once it became a word -- the crowding came from those two changes
   meeting in one row, so the row was split rather than the word shortened. */
.bcard-rate-row{display:flex; justify-content:space-between; align-items:center; gap:8px;
  margin-top:3px}
.bcard-top .eircode{font-family:"IBM Plex Mono",monospace; font-weight:500;
  letter-spacing:.03em; color:var(--ink); text-decoration:none; font-size:13.5px}
.bcard-top .eircode:hover{color:var(--accent-ink); text-decoration:underline}
.bcard-top button.copy{margin-left:6px}
.bcard-rate-row .score{font:600 13px/1 "Public Sans",sans-serif; white-space:nowrap}
.bcard-actions{display:inline-flex; align-items:center; gap:2px}
/* Two lines, then an ellipsis: a kanban card is narrow by design, and the full address
   is one click away on the report page -- the list page is where it is shown in full. */
.bcard-addr{font-size:12px; color:var(--ink-soft); margin-top:4px; line-height:1.35;
  overflow:hidden; text-overflow:ellipsis; display:-webkit-box;
  -webkit-line-clamp:2; -webkit-box-orient:vertical}
/* Price, Daft link (or the +link button) and any warning chips share one line --
   flex-wrap so a long flag list still drops to a second line rather than overflowing
   the card. */
.bcard-meta-row{display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px;
  margin-top:4px}
.bcard-meta-row .flags{margin-top:0}
/* Re-run progress, shown in place on the card itself rather than only on the Add home
   page -- see board_page's rerun()/pollBoard(). Same bar-with-an-<i> shape as the
   Add home page's own .job .bar, just narrower and quieter to fit a kanban card. */
.bcard-progress{margin-top:6px}
.bcard-progress-bar{height:4px; border-radius:2px; background:var(--rule-soft); overflow:hidden}
.bcard-progress-bar i{display:block; height:100%; width:0; background:var(--accent);
  transition:width .3s}
.bcard-progress-text{display:block; font-size:11px; color:var(--ink-faint); margin-top:3px}
.bcard-progress.failed .bcard-progress-bar{background:var(--critical-soft)}
.bcard-progress.failed .bcard-progress-bar i{background:var(--critical)}
.bcard-progress.failed .bcard-progress-text{color:var(--critical)}
.bcard-price{font-size:12.5px; color:var(--ink-faint); font-family:"IBM Plex Mono",monospace}
.bcard-daft{font-size:12.5px; text-decoration:none; color:var(--accent-ink)}
.bcard-daft:hover{text-decoration:underline}
.bcard-detail{font-size:12.5px; color:var(--accent-ink); margin-top:4px}
/* Shared by both the Viewing date/time and the Bidding amount details -- both open a
   picker/prompt in place instead of only being editable by dragging the card away
   and back into the same column. */
.bcard-clickable{cursor:pointer}
.bcard-clickable:hover{text-decoration:underline}
.bcard-ics{margin-left:6px; text-decoration:none !important; cursor:pointer}
.bcard-notes{margin-top:8px; font-size:12.5px; min-height:26px; padding:5px 7px}
/* The card's own controls (_board_card): the status pill, in the stage's colour, and
   on phones "Add note". The pill is a real <select> with its arrow drawn beside it, so
   tapping it opens the phone's own picker. */
.bcard-act{display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-top:8px}
.bcard-status{position:relative; display:inline-flex; max-width:100%; border-radius:999px;
  border:1px solid var(--rule)}
.bcard-status[data-status="preview"]{background:var(--col-preview)}
.bcard-status[data-status="applied"]{background:var(--col-applied)}
.bcard-status[data-status="viewing"]{background:var(--col-viewing)}
.bcard-status[data-status="bidding"]{background:var(--col-bidding)}
.bcard-status[data-status="sale_agreed"]{background:var(--col-sale-agreed)}
.bcard-status[data-status="declined"]{background:var(--col-declined)}
.bcard-status-select{-webkit-appearance:none; appearance:none; background:transparent;
  border:0; border-radius:999px; color:var(--ink); cursor:pointer; max-width:100%;
  font:600 12.5px/1.2 "Public Sans",sans-serif; padding:6px 26px 6px 11px; min-height:30px}
.bcard-status-select:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
.bcard-status-caret{position:absolute; right:10px; top:50%; transform:translateY(-50%);
  pointer-events:none; font-size:13px; line-height:1; color:var(--ink-soft)}
.bcard-note-btn{display:none}
.bcard[hidden]{display:none}
@media (max-width:700px){
  /* Thumb-sized: these are the two things done most on a phone. */
  .bcard-status-select{min-height:36px; font-size:13.5px; padding:8px 30px 8px 13px}
  .bcard-status-caret{font-size:15px; right:12px}
  .bcard-note-btn{display:inline-flex; align-items:center; gap:4px; min-height:38px;
    padding:0 13px; border-radius:999px; border:1px solid var(--rule); background:var(--paper);
    color:var(--ink-soft); font:500 13.5px/1 "Public Sans",sans-serif; cursor:pointer}
  .bcard-note-btn[aria-expanded="true"]{color:var(--accent-ink); border-color:var(--accent)}
  .bcard > .bcard-act{grid-column:1 / -1}
  /* Compact card: a 56px thumbnail beside the text instead of a full-width photo, a
     one-line address, and the note box only once opened (.m-open: "Add note", "Note"
     in the menu, or a tap on the card), when the photo also goes back to full width. */
  .bcard{display:grid; grid-template-columns:56px minmax(0,1fr); column-gap:10px;
    padding:9px 10px; align-items:start}
  .bcard > *{grid-column:2; min-width:0}
  .bcard > .photo-link, .bcard > img.bcard-photo{grid-column:1; grid-row:1 / span 4}
  .bcard .bcard-photo{width:56px; height:56px; margin:0; border-radius:7px}
  .bcard.m-open > *, .bcard:not(:has(.bcard-photo)) > *{grid-column:1 / -1}
  .bcard.m-open > .photo-link, .bcard.m-open > img.bcard-photo{grid-column:1 / -1; grid-row:auto}
  .bcard.m-open .bcard-photo{width:calc(100% + 20px); height:120px; margin:-9px -10px 8px;
    border-radius:8px 8px 0 0}
  .bcard-addr{-webkit-line-clamp:1}
  .bcard-top .eircode, #t td.loc .eircode{display:inline-block; max-width:calc(100% - 56px);
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; vertical-align:bottom}
  .bcard-top-left{flex:1}
  .bcard-meta-row{flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; white-space:nowrap}
  .bcard-meta-row .flags{flex-wrap:nowrap}
  .bcard-meta-row .chip{flex:none}
  .bcard .bcard-notes{display:none}
  .bcard.m-open .bcard-notes{display:block; grid-column:1 / -1}
  .bcard-rate-row .rowmenu{display:inline-flex; align-items:center}
}

/* ---- the pin sheet (Add home, area-level match) ----
   Its own layer, not .modal-overlay: that one centres a box with no overflow
   handling, and on an Android screen shorter than this dialog its buttons sat below
   the edge of a fixed layer nothing could scroll. Here the sheet is always at most the
   screen, the map takes whatever is left, and the layer scrolls if even that fails. */
.pin-overlay{position:fixed; inset:0; z-index:60; background:rgba(22,32,42,.45);
  display:flex; align-items:center; justify-content:center; padding:16px;
  overflow-y:auto; overscroll-behavior:contain}
.pin-overlay[hidden]{display:none}
body.pin-open{overflow:hidden}
.pin-sheet{background:var(--card); border-radius:14px; box-shadow:var(--shadow);
  width:min(640px, 100%); box-sizing:border-box; display:flex; flex-direction:column; gap:10px;
  padding:16px 20px 18px; height:min(620px, calc(100vh - 32px)); height:min(620px, calc(100dvh - 32px))}
.pin-head{display:flex; align-items:center; gap:10px}
.pin-head h3{font-size:17px; margin:0; flex:1}
.pin-close{flex:none; width:40px; height:40px; padding:0; border-radius:50%; font-size:24px;
  line-height:1; background:var(--rule-soft); color:var(--ink)}
.pin-close:hover{background:var(--rule)}
.pin-msg{margin:0; font-size:14px; color:var(--ink-soft); line-height:1.45}
.pin-eircode{display:flex; gap:8px}
.pin-eircode input{flex:1 1 auto; height:40px}
.pin-eircode button{flex:none; height:40px; padding:0 14px}
.pin-map-wrap{position:relative; flex:1 1 auto; min-height:150px}
#pinMap{position:absolute; inset:0; border-radius:10px; border:1px solid var(--rule)}
.pin-gesture{position:absolute; inset:0; z-index:500; display:flex; align-items:center;
  justify-content:center; border-radius:10px; background:rgba(22,32,42,.55); color:#fff;
  font-size:15px; font-weight:600; pointer-events:none; text-align:center; padding:20px}
.pin-gesture[hidden]{display:none}
.pin-tip{margin:0; font-size:12.5px; color:var(--ink-faint)}
.pin-actions{display:flex; gap:10px; align-items:center; justify-content:flex-end; flex-wrap:wrap}
.pin-actions #pinUse{height:44px; padding:0 22px}
.pin-anyway{background:transparent; color:var(--ink-soft); padding:8px 4px; font-size:13px;
  text-decoration:underline}
.pin-anyway:hover{background:transparent; color:var(--ink)}
@media (max-width:700px){
  .pin-overlay{align-items:flex-end; padding:0}
  .pin-sheet{width:100%; border-radius:16px 16px 0 0; gap:8px;
    padding:12px 16px calc(12px + env(safe-area-inset-bottom));
    height:max(62vh, min(460px, 88vh)); height:max(62dvh, min(460px, 88dvh))}
  .pin-actions{flex-direction:column-reverse; align-items:stretch; gap:4px}
  .pin-actions #pinUse{width:100%}
}

/* ---- the Viewing column's date/time modal ---- */
.modal-overlay{position:fixed; inset:0; background:rgba(22,32,42,.45);
  align-items:center; justify-content:center; z-index:50}
.modal-box{background:var(--card); border-radius:12px; padding:22px 24px;
  box-shadow:var(--shadow); min-width:320px}
.modal-box h3{font-size:17px; margin:0 0 14px}
/* 240px clipped flatpickr's altInput mid-string ("Thu 10 Sep 2026 a...") -- the
   full "D j M Y 	 H:i" format needs more like 210px of text at this font size,
   plus padding/border, before the box-sizing:border-box width even starts helping. */
.modal-box input[type=text]{width:100%; padding:8px 10px; font-size:15px}
.modal-actions{display:flex; justify-content:flex-end; gap:10px; margin-top:18px}

/* ---- full-height pages: nav/heading stay put, one region scrolls ---- */
html, body{height:100%}
body.fit{overflow:hidden}
/* min-height:100vh (the general case, letting the shell grow with a tall page) becomes
   an exact height here, so .content's own height:100% below has something concrete to
   resolve against instead of growing unbounded. */
body.fit .app-shell{height:100vh}
body.fit .content{height:100%; display:flex; flex-direction:column; overflow:hidden}
/* .tab-strip is .content's other flex child now (a sibling of .wrap, see shell()) --
   fixed to its own natural height so .wrap gets the rest, same "one fixed header, one
   flexible body" shape as .wrap's own children just below. */
body.fit .content > .tab-strip{flex:none}
/* width:100% matters here specifically: .content is a column flex container, which
   makes .wrap a flex item -- and a flex item's width:auto shrinks to fit its content
   instead of filling the container the way a plain block's width:auto would, so the
   margin:0 auto it inherits from the base .wrap rule centred it at a tiny shrink-to-fit
   width instead of the intended "fill, then clamp by max-width, then centre the
   remainder". Restores that by giving it something to actually fill first. flex:1 1
   auto + min-height:0 (rather than height:100%) is what lets it share .content's
   height with the tab strip instead of claiming all of it and overflowing. */
body.fit .wrap{width:100%; flex:1 1 auto; min-height:0; display:flex;
  flex-direction:column; padding-bottom:16px}
body.fit .wrap > .banner,
body.fit .wrap > .report-toolbar,
body.fit .wrap > h1{flex:none}
/* min-width:0 on both: a flex item's default min-width is auto (its content's
   intrinsic width), which on a phone made the wide table refuse to shrink and push
   .wrap -- and with it the nav above -- wider than the viewport instead of scrolling
   inside .card as intended. Without this, the whole page pans sideways rather than
   just the table. */
body.fit .wrap > .fill{flex:1 1 auto; min-height:0; min-width:0; display:flex;
  flex-direction:column}
body.fit .fill > .card{flex:1 1 auto; min-height:0; min-width:0; overflow:auto; padding:0}
/* Anything in .wrap other than the flexible .fill region keeps its natural height. */
body.fit .wrap > :not(.fill){flex:none}
/* board_page: the board is the one scroller (columns, their sticky heads and the
   sideways swipe on phones all live inside it). */
body.fit .fill > .board{flex:1 1 auto; min-height:0; min-width:0; overflow:auto}
body.fit table{margin-top:0}
body.fit thead th{position:sticky; top:0; background:var(--card); z-index:1}
/* /view/{key}: a saved report's own standalone HTML, framed by the sidebar rather than
   duplicated inside it -- report.py's file is unchanged, this is the only place that
   wraps it. Same flex:1 1 auto as .fill > .card above, just an iframe instead of a
   scrolling table. */
body.fit .fill > .report-frame{flex:1 1 auto; min-height:0; min-width:0}
.report-frame{width:100%; height:100%; border:none; display:block;
  border-radius:12px; background:var(--card)}
/* The "..." menu (edit/re-run/delete) above the iframe -- the same _row_menu
   component List/Board use, just with nothing else in the row to line up against, so
   it and the re-run progress bar (which grows to fill the space beside it while
   running) get a row of their own instead of sharing one with a title. */
/* Explicit horizontal padding rather than inheriting .wrap's own: .wrap-full (see
   above) zeroes that out so the iframe itself can go edge-to-edge, but the toolbar's
   own button still wants the same breathing room the tab strip above it already has. */
.report-toolbar{display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:14px 22px 0}
/* Phones, the report page: 12px under the tab strip, 12px over the report (which adds
   12px of its own when framed -- report.py's html.framed), and the whole row tucks
   away while the report scrolls down (report_view_page's script). While it is tucked
   the nav is compact too, so the fixed header stays near 13% of a 390px screen. */
@media (max-width:700px){
  body.fit .wrap.wrap-full{padding-top:0; padding-bottom:env(safe-area-inset-bottom)}
  .report-toolbar{padding:12px 16px; max-height:240px;
    transition:max-height .2s ease, padding .2s ease, opacity .15s ease}
  body.toolbar-tucked .report-toolbar{max-height:0; padding-top:0; padding-bottom:0; opacity:0;
    overflow:hidden; pointer-events:none}
  .sidebar{transition:padding .2s ease}
  body.toolbar-tucked .sidebar{padding-top:calc(9px + env(safe-area-inset-top)); padding-bottom:9px}
  body.toolbar-tucked .tab-strip{padding-top:5px; padding-bottom:5px}
}
@media (max-width:700px) and (prefers-reduced-motion:reduce){
  .report-toolbar, .sidebar{transition:none}
}
.report-toolbar #reportProgress{flex:1; margin-top:0}
.retry-btn{height:30px; padding:0 12px; font-size:13px; margin-left:8px}
#reportProgress{transition:opacity .4s ease}
#reportProgress.fading{opacity:0}
#reportProgress.updated .bcard-progress-text{color:var(--good)}
#reportProgress.updated .bcard-progress-bar i{background:var(--good)}
#reportProgress.failed .bcard-progress-text{color:var(--critical)}
#reportProgress.stalled .bcard-progress-text{color:var(--caution)}
/* The "Note" button: a dot, or the note's first few words, when something is written --
   so you can tell at a glance without opening it. The editor itself drops down inline
   below the toolbar and saves on blur, same as the list page's own notes field. */
.report-toolbar .note-btn{height:34px; padding:0 12px; font-size:13px; max-width:240px;
  background:transparent; color:var(--ink-soft); border:1px solid var(--rule);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.report-toolbar .note-btn:hover{background:var(--neutral-soft); color:var(--ink)}
.report-toolbar .note-btn .note-preview{color:var(--ink-faint); margin-left:6px}
.report-toolbar .note-btn.has-note::before{content:"\25CF"; color:var(--accent);
  margin-right:6px; font-size:10px; vertical-align:1px}
.note-panel{padding:8px 22px 0}
.note-panel[hidden]{display:none}
.report-toolbar .status-control{display:flex; align-items:center; gap:8px; font-size:13px;
  color:var(--ink-soft)}
.report-toolbar .status-control select{height:34px; padding:0 8px; border-radius:8px;
  border:1px solid var(--rule); background:var(--paper); color:var(--ink);
  font:500 13px/1 "Public Sans",sans-serif}
.report-toolbar .rowmenu{margin-left:auto}

.empty{text-align:center; padding:54px 20px; color:var(--ink-faint)}
.empty h2{font-size:21px; color:var(--ink-soft); margin-bottom:8px}
.banner{background:var(--critical-soft); color:var(--critical); border-radius:10px;
  padding:12px 16px; margin-bottom:20px; font-size:14px}
.banner.notice{background:var(--good-soft); color:var(--good)}
.verify-banner{display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px}
.verify-banner button{padding:6px 12px}
#gen:disabled{opacity:.55; cursor:not-allowed}

/* ---- Equalizer ---- */
.eq-layout{display:grid; grid-template-columns:1.3fr 1fr; gap:22px; align-items:start}
@media (max-width:820px){.eq-layout{grid-template-columns:1fr}}
/* The preview stays in view beside the (long) slider column on a wide screen; on a
   phone it sits below them and .eq-mini-score in the sticky budget bar carries it. */
@media (min-width:821px){.eq-layout > .card + .card{position:sticky; top:20px}}
/* One metric per block: name and numbers on one line, the slider full width under it.
   (A multi-column grid squeezes the range input to a ~40px pill on a phone.) The
   input itself is 44px tall (the touch target) with a 6px visible track whose filled
   part follows --fill, set by _EQ_SLIDER_JS's updateBudget() -- a bare accent-color
   range draws a near-invisible track on iOS. */
.eq-row{padding:10px 0 6px; border-bottom:1px solid var(--rule-soft)}
.eq-row:last-child{border-bottom:none}
.eq-row-head{display:flex; align-items:baseline; justify-content:space-between; gap:12px}
.eq-row label{font-size:14px; font-weight:500}
.eq-nums{display:flex; align-items:baseline; gap:10px; flex:none}
.eq-row .eq-value{font:600 14px/1 "IBM Plex Mono",monospace; text-align:right}
.eq-row input[type=range]{-webkit-appearance:none; appearance:none; display:block;
  width:100%; height:44px; margin:0; padding:0; background:transparent; cursor:pointer;
  touch-action:pan-y; --fill:50%}
.eq-row input[type=range]:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
.eq-row input[type=range]::-webkit-slider-runnable-track{height:6px; border-radius:3px;
  background:linear-gradient(to right, var(--accent) var(--fill), var(--rule) var(--fill))}
.eq-row input[type=range]::-moz-range-track{height:6px; border-radius:3px; background:var(--rule)}
.eq-row input[type=range]::-moz-range-progress{height:6px; border-radius:3px; background:var(--accent)}
.eq-row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none; width:26px; height:26px;
  margin-top:-10px; border-radius:50%; background:var(--card); border:2px solid var(--accent);
  box-shadow:0 1px 3px rgba(0,0,0,.25)}
.eq-row input[type=range]::-moz-range-thumb{width:22px; height:22px; border-radius:50%;
  background:var(--card); border:2px solid var(--accent); box-shadow:0 1px 3px rgba(0,0,0,.25)}
.eq-ticks{display:flex; justify-content:space-between; margin:-8px 4px 0;
  font:400 10.5px/1 "IBM Plex Mono",monospace; color:var(--ink-faint)}
/* The metric's live weight next to its raw points -- deliberately the quieter of the
   two numbers: it is derived (slider / sum of all sliders, see _EQ_SLIDER_JS), and a
   report's own preview weight can differ from it once a metric with no score for that
   report is dropped and the rest renormalised. */
.eq-row .eq-pct{font:400 12px/1 "IBM Plex Mono",monospace; color:var(--ink-faint);
  text-align:right}
.eq-group{margin-bottom:4px}
.eq-group-title{font:700 12px/1 "IBM Plex Mono",monospace; letter-spacing:.08em;
  text-transform:uppercase; color:var(--accent); padding:18px 0 6px;
  border-bottom:1px solid var(--rule-soft); margin-bottom:4px}
.eq-group:first-child .eq-group-title{padding-top:0}
.eq-expand-btn{font-size:11px; font-weight:600; padding:3px 9px; border-radius:6px;
  background:none; border:1px solid var(--rule); color:var(--ink-soft)}
.eq-expand-btn:hover{border-color:var(--accent); color:var(--accent)}
/* Green while points are still free, amber once all are spent (the sliders refuse to go
   past that, so this is the state to notice -- a brand-new profile starts here), red
   only for an over-cap set loaded from somewhere the clamp never saw. Matches
   score_hex's own good/caution/critical vocabulary rather than inventing a fourth
   colour scheme just for this one number. */
.eq-budget{font:600 13px/1.3 "IBM Plex Mono",monospace; padding:9px 12px;
  border-radius:8px; margin:0 0 10px}
/* The budget stays pinned to the top of whatever scrolls (the page, or the onboarding
   modal's own body) -- with eleven sliders the over/under state is otherwise off-screen
   exactly while the slider that changed it is being dragged. Opaque so rows slide
   under it cleanly. */
.eq-sticky{position:sticky; top:0; z-index:5; background:var(--card); padding:8px 0 2px;
  margin-top:-8px; display:flex; gap:8px; align-items:stretch}
.eq-sticky .eq-budget{flex:1; margin:0 0 6px}
.eq-mini-score{font:700 15px/1 "IBM Plex Mono",monospace; padding:0 12px; border-radius:8px;
  background:var(--rule-soft); display:flex; align-items:center; margin:0 0 6px;
  white-space:nowrap}
.eq-mini-score:empty{display:none}
@media (min-width:821px){.eq-mini-score{display:none}}
.eq-budget.good{background:var(--good-soft); color:var(--good)}
.eq-budget.caution{background:var(--caution-soft); color:var(--caution)}
.eq-budget.critical{background:var(--critical-soft); color:var(--critical)}
/* ---- Profile page: saved profiles as cards above the tuning panel ---- */
/* ---- Profile > Priorities & places: profiles on the left, how you travel on the right
   from 1024px; one column (profiles, travel mode, places) below. ---- */
.pp-layout{display:grid; grid-template-columns:minmax(0,1fr); gap:30px; align-items:start; max-width:1200px}
@media (min-width:1024px){.pp-layout{grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:40px}}
.pp-col{min-width:0}
.pp-help{margin:0 0 12px; color:var(--ink-soft); font-size:13.5px}
.pp-card{margin-bottom:16px}
.pp-h3{display:flex; align-items:center; gap:8px; margin:0 0 12px; font-size:15px; font-weight:600}
.prof-section{font:600 19px/1.2 "Newsreader",Georgia,serif; margin:0 0 10px; display:flex; align-items:center; gap:8px}
.prof-grid{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px}
.prof-card{position:relative; display:block; text-align:left; width:100%; min-width:0; min-height:86px;
  background:var(--card); border:1px solid var(--rule); border-radius:12px; padding:13px 14px;
  color:var(--ink); cursor:pointer; font:inherit}
.prof-card:hover{border-color:var(--accent); background:var(--card)}
.prof-card.active{border:2px solid var(--accent); padding:12px 13px}
.prof-card:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
.prof-card-head{display:flex; align-items:flex-start; justify-content:space-between; gap:6px}
.prof-card-title{display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; min-width:0}
.prof-card-name{font-weight:600; font-size:15px; overflow-wrap:anywhere}
.prof-card .kmenu{margin:-6px -8px 0 0}
.prof-top{margin-top:6px; font-size:12.5px; color:var(--ink-soft); line-height:1.35}
.prof-card.new{display:flex; align-items:center; justify-content:center; border-style:dashed;
  color:var(--accent-ink); font-weight:600; font-size:14px; background:transparent}
.prof-card.new:hover{background:var(--accent-soft)}
/* The selected profile's weights, directly under the cards. A preset shows bars (the
   sliders, disabled, without a thumb); a custom profile shows the sliders. Two columns of
   groups from 1024px so twelve metrics do not make a tall page. */
.pw-panel{margin-top:18px; padding:16px 18px}
.pw-head{display:flex; align-items:center; justify-content:space-between; gap:10px 12px; flex-wrap:wrap}
.pw-head h3{margin:0; font-size:17px}
.pw-head .eq-budget{margin:0; padding:6px 10px}
/* A custom profile's points counter stays in view while the sliders below it are dragged. */
.pw-panel:not(.pw-readonly) .pw-head{position:sticky; top:0; z-index:5; background:var(--card);
  padding:6px 0 8px; margin-bottom:2px}
.pw-body{margin-top:4px}
.pw-body .eq-group{break-inside:avoid}
.pw-body .eq-ticks{display:none}
@media (min-width:1024px){.pw-body{column-count:2; column-gap:30px}}
.pw-foot{display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap;
  margin-top:12px; padding-top:12px; border-top:1px solid var(--rule-soft)}
.pw-msg{flex:1; min-width:0; font-size:13px; color:var(--ink-soft)}
.pw-readonly .eq-budget, .pw-readonly #pwCancel, .pw-readonly #pwSave,
.pw-panel:not(.pw-readonly) #pwCopy{display:none}
.pw-readonly .eq-row input[type=range]{pointer-events:none}
.pw-readonly .eq-row input[type=range]::-webkit-slider-thumb{width:0; height:0; box-shadow:none; border:0}
.pw-readonly .eq-row input[type=range]::-moz-range-thumb{width:0; height:0; border:0}
/* Bars, not sliders: no thumb to leave room for, so the rows can be much shorter. */
.pw-readonly .eq-row{padding:8px 0 6px}
.pw-readonly .eq-row input[type=range]{height:10px; margin-top:6px}
.pw-readonly .eq-group-title{padding-top:14px}
.eq-actions{display:flex; flex-wrap:wrap; gap:8px; margin-top:16px}
@media (max-width:480px){.eq-actions button{flex:1 1 100%}}
.eq-score{text-align:center; padding:22px 10px}
/* The rating word under the big number -- the primary read, number secondary. */
.eq-rating{font:600 15px/1 "Newsreader",Georgia,serif; color:var(--ink-soft); margin-top:4px}
.rating-word{font:600 12px/1 "Public Sans",sans-serif; color:var(--ink-soft); margin-right:4px}
.eq-score .num{font:700 52px/1 "IBM Plex Mono",monospace}
.eq-score .label{color:var(--ink-faint); font-size:13px; margin-top:6px}
.eq-breakdown{width:100%; border-collapse:collapse; margin-top:14px}
.eq-breakdown th, .eq-breakdown td{text-align:left; padding:7px 8px; font-size:13px;
  border-bottom:1px solid var(--rule-soft)}
.eq-breakdown th{color:var(--ink-faint); font-weight:500; text-transform:uppercase;
  font-size:11px; letter-spacing:.06em}
.eq-breakdown td.num, .eq-breakdown th.num{text-align:right; font-family:"IBM Plex Mono",monospace}
.eq-note{color:var(--ink-faint); font-size:13px; margin-top:10px}
/* The score preview's own breakdown: one row per group by default (see
   renderBreakdown()), a member's own row only shown once its group is expanded. */
.eq-breakdown-sub td:first-child{padding-left:22px; color:var(--ink-soft); font-weight:400}
.eq-basis{font-size:12.5px; font-weight:400; color:var(--ink-faint); margin-top:2px; line-height:1.35;
  overflow-wrap:anywhere}
.eq-breakdown-group .eq-expand-btn{margin-left:8px}
.install-hint{display:flex; align-items:center; gap:12px}.install-hint[hidden]{display:none}.install-hint span{flex:1}.install-hint-close{background:none; border:0; color:inherit; font-size:20px; line-height:1; padding:2px 6px; cursor:pointer}