:root {
  color-scheme: light;
  /* EN-15 (1.1.0): HippoJar's brand palette (doc "HippoJar brand palette", decided Nov 28, 2026). */
  --hippo-purple: #8b7aa8;
  --muzzle-lilac: #a796c2;
  --deep-plum: #4a3d63;
  --ear-pink: #e9a8ba;
  --button-purple: #5e4d82;
  --cadmium-yellow: #fcc900;
  --pale-cadmium: #feeca6;
  --oat: #f3efe6;
  --lavender: #cbb8e6;
  --bg: #f3efe6;
  --ink: #1e1a16;
  --muted: #6d645b;
  --panel: #fffdf8;
  --line: #e2d8c8;
  --accent: var(--button-purple);
  --accent-ink: #ffffff;
  --accent-hover: var(--deep-plum);
  /* The one obvious next click (Cadmium Yellow), and a Save that has nothing to save yet (black and lilac). */
  --next-bg: var(--cadmium-yellow);
  --next-ink: var(--deep-plum);
  --quiet-bg: #1b1916;
  --quiet-ink: var(--muzzle-lilac);
  --info-bg: color-mix(in srgb, var(--lavender) 35%, #ffffff);
  --danger: #8d2f2f;
  --shadow: 0 1px 2px rgba(40, 28, 16, 0.08);
  --tab-size: 0.95rem;
  --ok-green: #2e7d32;
}

html.dark {
  color-scheme: dark;
  --bg: #1b1916;
  --ink: #f3efe6;
  --muted: #b5aa9d;
  --panel: #26231f;
  --line: #3a342c;
  --accent: var(--muzzle-lilac);
  --accent-ink: #1b1916;
  --accent-hover: #b9a8d8;
  --next-ink: #1b1916;
  --info-bg: color-mix(in srgb, var(--lavender) 22%, #26231f);
  --danger: #f0a3a3;
  --shadow: none;
  --ok-green: #7fd18b;
}

@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/lato-regular-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/lato-regular.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Candara, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.4;
}

body.title-size-small { --tab-size: 0.82rem; }
body.title-size-medium { --tab-size: 0.95rem; }
body.title-size-large { --tab-size: 1.15rem; }

a { color: inherit; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a,
button,
summary,
label,
select,
input[type="checkbox"],
input[type="radio"],
input[type="color"],
.tab,
.dash-tab {
  cursor: pointer;
}
input[type="text"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="email"],
input[type="number"],
textarea {
  cursor: text;
}
button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
}

.mast {
  background: #27262b;
  color: #d7d7d7;
  font-family: Arial, "Segoe UI", sans-serif;
}

.mast-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 2.6rem;
  padding: 0.35rem 0.9rem;
}

/* STAGE marker: only on stage.hippojar.com (config is_stage).
   It sits between the name and the menu; the auto margins center it in that space, so it never covers either. */
.stage-mark {
  margin: 0 auto;
  padding: 0.12rem 0.65rem;
  border-radius: 4px;
  background: #c62828;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.4;
  white-space: nowrap;
  cursor: default;
}

.mast-id {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #f3f3f3;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.welcome {
  color: #c4c4c4;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}

.toolbar, .tab-tools, .inline, .form-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.topnav a, .nav-menu summary {
  color: #d0d0d0;
  background: transparent;
  border: 0;
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.topnav a.is-current, .topnav a:hover, .nav-menu summary:hover { color: #fff; }

/* Light or dark: the sun/moon button at the end of the menu bar. */
.mode-toggle { display: inline-flex; margin: 0 0 0 0.25rem; }
.mode-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: #d0d0d0; cursor: pointer;
}
.mode-btn:hover, .mode-btn:focus-visible { color: #fff; background: rgba(255, 255, 255, 0.1); }
.mode-btn .icon { width: 1.15rem; height: 1.15rem; }
/* Keep the menu on one line on wider screens: "Welcome, …" shortens instead of the menu wrapping. */
@media (min-width: 1100px) { .topnav { flex-wrap: nowrap; } .topnav > * { flex-shrink: 0; } }
html.dark .mode-btn .mode-moon, html:not(.dark) .mode-btn .mode-sun { display: none; }

.nav-menu { color: #d0d0d0; }
.nav-menu summary { list-style: none; }
.nav-menu .menu-panel { top: calc(100% + 0.35rem); }
.nav-menu .menu-panel a { display: block; color: inherit; padding: 0.35rem 0.15rem; }
.nav-menu summary.is-current { color: #fff; }
.nav-menu button {
  background: transparent;
  color: inherit;
  border: 0;
  border-radius: 0;
  padding: 0.35rem 0.15rem;
  text-align: left;
}

main { padding: 1rem 1.25rem 2rem; }
main:has(.dash-chrome) { padding-top: 0; }

.dash-chrome { margin: 0 -1.25rem 1rem; color: #d5d5d5; font-family: Arial, "Segoe UI", sans-serif; }

.dash-tabs {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.1rem;
  background: #1b1b1b;
  padding: 0 0.35rem;
}

.dash-tab {
  color: #c8c8c8;
  text-decoration: none;
  padding: 0.55rem 0.8rem 0.4rem;
  border-bottom: 2px solid transparent;
  font-size: var(--tab-size);
}

/* HJ-65 (Dave's choice): the selected tab is bold, with a thick gold bar under it that shows on any tab color.
   The bar is drawn inside the tab, so the tab bar keeps its height. */
.dash-tab.is-active { color: #fff; font-weight: 700; border-bottom-color: transparent; box-shadow: inset 0 -4px 0 #f2c94c; }
.dash-tab:hover { color: #fff; }

/* HJ-78: "+N more" lists the tabs past Maximum tabs to show. It looks like a tab but isn't one (drag ignores it). */
.dash-more { display: flex; }
.dash-more-toggle {
  color: #c8c8c8;
  padding: 0.55rem 0.8rem 0.4rem;
  border-bottom: 2px solid transparent;
  font-size: var(--tab-size);
  white-space: nowrap;
}
.dash-more-toggle::after {
  content: "";
  display: inline-block;
  margin-left: 0.35rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  vertical-align: middle;
}
.dash-more-toggle:hover, .dash-more[open] > .dash-more-toggle { color: #fff; }
.dash-more .menu-panel { top: 100%; left: 0; right: auto; max-height: 22rem; overflow: auto; font-family: "Segoe UI", Candara, sans-serif; }
.dash-more .menu-panel a { color: var(--ink); padding: 0.25rem 0.15rem; }
.dash-more .menu-panel a:hover { color: var(--accent); }

.dash-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: #27262b;
  padding: 0.45rem 0.85rem;
}

.dash-links { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.dash-links summary { color: #9eb4bc; padding: 0.2rem 0.45rem; }
.dash-links summary:hover { color: #d7e7ee; }
.dash-links .menu-panel { left: 0; right: auto; max-height: 18rem; overflow: auto; }

.has-caret summary::after, .nav-menu summary::after {
  content: "";
  display: inline-block;
  margin-left: 0.35rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  vertical-align: 0.1rem;
}

.dash-search { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.dash-search input {
  width: 12.5rem;
  margin: 0;
  padding: 0.35rem 0.5rem;
  border: 1px solid #5c5c5e;
  border-radius: 2px;
  background: #3a3a3c;
  color: #f2f2f2;
}
.dash-search input::placeholder { color: #a3a3a3; }
button.refresh-icons {
  margin: 0;
  padding: 0.35rem 0.55rem;
  border: 1px solid #5c5c5e;
  border-radius: 2px;
  background: #3a3a3c;
  color: #f2f2f2;
  font-family: Arial, "Segoe UI", sans-serif;
  font-size: 13px;
  white-space: nowrap;
}
button.refresh-icons:disabled { opacity: 0.65; }
#create-bookmark:disabled { opacity: 0.45; }
a.bookmarklet {
  display: inline-block;
  margin: 0.4rem 0;
  padding: 0.45rem 0.7rem;
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
}

.panel, .category, .tab {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel { padding: 1rem 1.25rem; border-radius: 8px; }
.panel.narrow, .settings { max-width: 40rem; }
.settings label, .panel.narrow label { display: block; margin: 0.8rem 0; }
.settings-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.settings-board .settings { max-width: none; }
.settings-board h1 { margin: 0 0 0.45rem; font-size: 1.35rem; }
.settings-board p { margin: 0 0 0.6rem; }
.settings-board .settings label { margin: 0.35rem 0; }
.settings-split {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(16rem, 1.1fr);
  gap: 0.25rem 1.5rem;
  align-items: start;
}
.settings-fields { display: contents; }
.settings-checks { grid-column: 1; grid-row: 1; }
.mode-form { grid-column: 1; grid-row: 2; margin-top: 0.8rem; }
.mode-choices { display: flex; gap: 0.4rem; }
.mode-choices button {
  flex: 0 0 auto;
  width: auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}
.mode-choices button.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.settings-groups { grid-column: 2; grid-row: 1 / span 2; }
.settings-split .files-settings { grid-column: 1; grid-row: 2; margin-top: 0.8rem; }
.settings-save {
  grid-column: 1 / -1;
  margin-top: 0.15rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.settings-split fieldset { margin: 0 0 0.7rem; }
/* Save settings: dull until something on the page changes, then the usual bright button (settings-leave.js). */
.settings-save button { transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.settings-save button:not(.is-pending) { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.settings-save button:not(.is-pending):hover { color: var(--ink); border-color: var(--muted); }
[hidden] { display: none !important; }
.choice-line { display: flex; align-items: flex-end; gap: 0.45rem; }
.choice-line label { flex: 1; min-width: 0; }
#move-category .add-choice { margin-bottom: 0.15rem; }
#move-category h2 { margin: 0 0 0.8rem; font-size: 1.2rem; }
.add-choice {
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  margin-bottom: 0.8rem;
  padding: 0;
  border-radius: 4px;
  background: #2f8f3a;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
}
.add-choice[aria-pressed="true"] { background: #1f6b28; }
.add-choice:disabled { opacity: 0.45; }
body.is-popup { overflow: hidden; }
body.is-popup main { padding: 0.75rem 0.85rem 0.85rem; }
body.is-popup .panel { margin: 0; }
body.is-popup .panel.narrow { max-width: none; }
body.is-popup h1 { margin: 0 0 0.35rem; font-size: 1.45rem; }
body.is-popup .panel.narrow label,
body.is-popup .add-choice { margin-top: 0.4rem; margin-bottom: 0.4rem; }
.hint, .meta, .empty { color: var(--muted); }
.hint { display: block; font-size: 0.85rem; }

input, select, textarea {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
}

.inline input, .finder input, .toolbar input, .toolbar select { width: auto; margin-top: 0; }
.check input { width: auto; margin-right: 0.4rem; }
.color-line { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.25rem; }
.color-line input { width: auto; margin: 0; }
.color-line .hint { margin: 0; }
.color-line input.color-pick {
  width: 2.75rem;
  height: 2rem;
  flex: 0 0 2.75rem;
  padding: 0.15rem;
}
.color-line input.color-pick::-webkit-color-swatch-wrapper { padding: 0; }
.color-line input.color-pick::-webkit-color-swatch {
  border: 1px solid var(--line);
  border-radius: 3px;
}

button, .form-actions a {
  border: 0;
  border-radius: 4px;
  padding: 0.45rem 0.7rem;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
}

button.danger, .text.danger { background: transparent; color: var(--danger); }
#confirm-dialog,
#move-category,
#leave-dialog,
#helper-warning {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
}
.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.confirm-box {
  position: relative;
  width: min(28rem, calc(100% - 2rem));
  padding: 1.15rem 1.25rem;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.confirm-box p { margin: 0; }
#leave-dialog .leave-error { margin-top: 0.6rem; }
/* EN-04: "Before you install the HippoJar Helper" (Settings step 3). */
.helper-warning-box { width: min(40rem, calc(100% - 2rem)); max-height: calc(100vh - 2rem); overflow-y: auto; }
.helper-warning-box h2 { margin: 0 0 0.6rem; font-size: 1.2rem; }
.helper-warning-box p { margin: 0 0 0.7rem; line-height: 1.45; }
.helper-warning-steps { margin: 0 0 0.7rem; padding-left: 1.3rem; }
.helper-warning-steps li { margin: 0 0 0.8rem; line-height: 1.45; }
.helper-warning-pic { display: block; max-width: 100%; height: auto; margin: 0.45rem 0 0; border: 1px solid var(--line); border-radius: 6px; }
.helper-warning-box .confirm-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.helper-warning-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 0.45rem; }
.helper-warning-pair figure { margin: 0; }
.helper-warning-pair .helper-warning-pic { margin-top: 0; }
.helper-warning-pair figcaption { margin-top: 0.3rem; font-size: 0.88rem; color: var(--muted); text-align: center; }
@media (max-width: 560px) { .helper-warning-pair { grid-template-columns: 1fr; } }
.confirm-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.confirm-actions button.danger { background: #8d2f2f; color: #fff; }
/* Cancel is plain, so the button that acts stands out (HJ-42). */
.confirm-actions button.cancel,
.confirm-actions [data-confirm-cancel],
.confirm-actions [data-bulk-cancel],
.confirm-actions [data-dup-cancel],
.confirm-actions [data-save-cancel],
.confirm-actions > a {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.45rem 0.7rem;
  text-decoration: none;
}
.confirm-actions button.cancel:hover,
.confirm-actions [data-confirm-cancel]:hover,
.confirm-actions [data-bulk-cancel]:hover,
.confirm-actions [data-dup-cancel]:hover,
.confirm-actions [data-save-cancel]:hover,
.confirm-actions > a:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
button.text { padding: 0.15rem 0.3rem; }

.error a { text-decoration: underline; }
.flash, .error {
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  background: #efe2c2;
}
html.dark .flash, html.dark .error { background: #3d3424; }
/* Messages float over the page near the top and fade away, so nothing on the page moves (HJ-04). */
.flash, .lc-notice.is-floating {
  position: fixed;
  top: 0.6rem;
  left: 50%;
  z-index: 60;
  width: max-content;
  max-width: min(44rem, calc(100vw - 2rem));
  margin: 0;
  transform: translateX(-50%);
  border: 1px solid #d9c48f;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
  transition: opacity 0.35s ease, transform 0.35s ease;
  animation: flash-in 0.25s ease-out;
}
html.dark .flash { border-color: #6b5a33; }
.flash.is-leaving { opacity: 0; transform: translate(-50%, -0.5rem); }
@keyframes flash-in { from { opacity: 0; transform: translate(-50%, -0.5rem); } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; transition: none; } }
.error { background: #f3d6d2; }
html.dark .error { background: #4a2a28; }

.toolbar, .tab-tools { margin-bottom: 0.8rem; }
.finder { color: var(--muted); font-size: 0.9rem; }

.tabs { display: flex; gap: 0.4rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 0.8rem; }
.tab {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  font-size: var(--tab-size);
}
.tab.is-active { background: var(--accent); color: var(--accent-ink); }
.count {
  min-width: 1.4rem;
  text-align: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  font-size: 0.75rem;
  padding: 0.05rem 0.35rem;
}

.board {
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  min-height: 3rem;
  padding-bottom: 2.75rem;
}
.board[data-drag="1"] .category-header { cursor: move; }
.board[data-drag="1"] .category-header :is(button, a, summary) { cursor: pointer; }
.category.is-dragging { opacity: 0.45; }
.tile-slot {
  height: 2.6rem;
  border: 2px dashed var(--accent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  flex: 0 0 auto;
}
.bookmark-slot {
  height: 0;
  margin: 0.15rem 0;
  border-top: 2px dashed var(--accent);
  pointer-events: none;
}

.category { border-radius: 8px; overflow: visible; }
.category.is-hidden, .bookmark.is-hidden { display: none; }
.category-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
  background-color: #355c7d;
  background-color: var(--header, #355c7d);
  color: #fff;
  border-radius: 8px 8px 0 0;
}
.header-action {
  color: inherit;
  text-decoration: none;
  border: 0;
  background: transparent;
  padding: 0.1rem;
}
.category-header h2 { margin: 0; font-size: 0.92rem; font-weight: 650; flex: 1; min-width: 0; }
.category-header.ink-dark,
.category-header.ink-dark .header-action,
.category-header.ink-dark button,
.category-header.ink-dark summary { color: #1e1a16; }
.category-header .header-action { color: #fff; }
.category-header button, .category-header summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  border: 0;
  padding: 0.1rem 0.35rem;
}
.category-body { padding: 0.35rem; min-height: 2.2rem; }
.category-body.drop-target { outline: 2px dashed var(--accent); }

.bookmark {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 4px;
  border-radius: 2px;
  font-family: Lato, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 16px;
}
.bookmark.is-highlighted { background: var(--highlight); color: #1e1a16; }
.bookmark.is-highlighted.ink-light { color: #fff; }
.bookmark a:first-of-type,
.bookmark a:first-of-type:visited {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  color: var(--mark-ink, inherit);
  background: var(--mark-bg, transparent);
}
.bookmark a.has-mark-bg {
  padding: 0 0.25rem;
  border-radius: 2px;
}
.bookmark a:first-of-type:hover { text-decoration: underline; }
.empty-tab-hint { margin: 1rem 0; padding: 0.75rem 1rem; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); }
.search-results .search-all { display: block; padding: 0.45rem 0.6rem; border-top: 1px solid var(--line); font-size: 0.9rem; text-decoration: underline; }
.favicon { flex: 0 0 16px; width: 16px; height: 16px; background: transparent; }
img.favicon:not([src]) { visibility: hidden; }
.favicon.fallback {
  display: inline-grid;
  place-items: center;
  border-radius: 3px;
  background: var(--line);
  font-size: 0.65rem;
}
/* On a highlighted row the stand-in letter takes the row's own ink, so it never turns into a dark block in dark mode (HJ-46). */
.bookmark.is-highlighted .favicon.fallback { background: rgba(0, 0, 0, 0.12); color: inherit; }
.bookmark.is-highlighted.ink-light .favicon.fallback { background: rgba(255, 255, 255, 0.28); }
.icon { width: 14px; height: 14px; display: block; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  flex: 0 0 auto;
  line-height: 0;
  text-decoration: none;
}
button.icon-btn.danger,
a.icon-btn.danger { background: transparent; color: var(--danger); }
.bookmark .icon-btn { color: inherit; opacity: 0.72; }
.bookmark .icon-btn:hover { opacity: 1; }
.menu-panel button.icon-btn { width: 100%; justify-content: flex-start; padding: 0.35rem 0.15rem; }
.toolbar .icon-btn { width: 2rem; height: 2rem; }

.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute;
  right: 0;
  z-index: 5;
  min-width: 14rem;
  padding: 0.6rem;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 0.45rem;
}
.menu-panel a { text-decoration: none; }
.menu-panel button, .menu-panel input { width: 100%; }
.menu-panel button.save-changes,
.menu-panel button.open-all,
.menu-panel button.move-tab,
.menu-panel button.delete-category {
  box-sizing: border-box;
  height: 2.25rem;
  padding: 0 0.7rem;
  border-radius: 4px;
  line-height: 1;
}
/* Open all sits in a category's gear menu, inside the colored header: without this it took the header's white text. */
.menu-panel button.open-all,
.menu-panel button.move-tab,
.menu-panel button.delete-category {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}
.menu-panel button.save-changes {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}
.menu-panel input[type="color"] {
  width: 2.75rem;
  height: 2rem;
  padding: 0.15rem;
}
.menu-panel input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.menu-panel input[type="color"]::-webkit-color-swatch {
  border: 1px solid var(--line);
  border-radius: 3px;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 1rem 0;
}

.catalog {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.catalog > * { min-width: 0; }
.tag-list {
  max-height: 70vh;
  overflow: auto;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.tag-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  text-decoration: none;
  padding: 0.3rem 0.15rem;
  border-bottom: 1px solid var(--line);
}
.tag-list a span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.tag-list .count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tag-list a.is-selected { background: var(--accent); color: var(--accent-ink); }
.tag-list a.is-selected .count { color: inherit; }
.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.2rem 0 0.7rem;
}
.tag-chip, .clear-tags {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}
.tag-chip { background: var(--accent); color: var(--accent-ink); }
.clear-tags { border: 1px solid var(--line); }
.catalog-table { width: 100%; border-collapse: collapse; }
.catalog-table th, .catalog-table td {
  text-align: left;
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.catalog-table td.url, .catalog-table td.title {
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pager { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
@media (max-width: 900px) {
  .settings-board, .settings-split { grid-template-columns: 1fr; }
  .settings-checks, .settings-groups, .mode-form, .settings-split .files-settings { grid-column: auto; grid-row: auto; }
}
@media (max-width: 720px) {
  .board, .catalog { grid-template-columns: 1fr; }
  .mast-bar, .dash-actions { align-items: flex-start; flex-direction: column; }
  /* On a phone the bar stacks, so the marker sits at the top instead of floating over the menu. */
  .stage-mark { order: -1; margin: 0; }
}

/* Tab colors chosen in the Tabs menu */
.dash-tab.has-bg { background: var(--tab-bg); }
.dash-tab.has-ink,
.dash-tab.has-ink:hover,
.dash-tab.has-ink.is-active { color: var(--tab-ink); }
.dash-tab.has-ink.is-active { border-bottom-color: transparent; }
.dash-tab.has-bg:not(.is-active) { opacity: 0.85; }
.dash-tab.has-bg:hover { opacity: 1; }
.dash-tab.is-dragging { opacity: 0.4; }
.dash-tabs[data-drag="1"] .dash-tab { user-select: none; }
.tab-settings { display: grid; gap: 0.45rem; }
.tab-colors { display: flex; gap: 0.75rem; }
.tab-colors label { display: flex; align-items: center; gap: 0.4rem; }
.menu-panel .tab-colors input[type="color"] { width: 2.75rem; }

/* Search Bookmarks: results from every tab */
.search-box { position: relative; }
.search-results {
  position: absolute;
  top: calc(100% + 0.3rem);
  right: 0;
  z-index: 20;
  width: min(30rem, 92vw);
  max-height: 24rem;
  overflow: auto;
  padding: 0.3rem;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  font-family: "Segoe UI", Candara, sans-serif;
}
.search-results[hidden] { display: none; }
.search-hit {
  display: grid;
  gap: 0.1rem;
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  text-decoration: none;
}
.search-hit:hover, .search-hit:focus { background: var(--line); outline: none; }
.search-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-place { color: var(--muted); font-size: 0.82rem; }
.search-note { margin: 0.4rem 0.5rem; color: var(--muted); font-size: 0.85rem; }

/* My Bookmarks: click a column heading to sort */
.catalog-table th a.sort-head, table.admin-users th a.sort-head { color: inherit; text-decoration: none; white-space: nowrap; }
.catalog-table th a.sort-head:hover, table.admin-users th a.sort-head:hover { text-decoration: underline; }
.catalog-table th a.sort-head.is-sorted, table.admin-users th a.sort-head.is-sorted { color: var(--accent); }
.catalog-table th a.sort-head span, table.admin-users th a.sort-head span { font-size: 0.7em; }

/* ---------- HippoJar: accounts, admin, public pages ---------- */
.brand img { display: block; }
a.button {
  display: inline-block;
  border-radius: 4px;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 600;
}
/* The same size and weight as the buttons in the Users table (Email password reset). */
a.button.small-button { font-size: 0.82rem; padding: 0.3rem 0.55rem; font-weight: normal; white-space: nowrap; }
.panel h2 { font-size: 1.1rem; margin: 0.25rem 0 0.6rem; }
.panel.narrow label { display: block; margin: 0.6rem 0; }
.panel.narrow + .panel.narrow, .account-page .panel + .panel { margin-top: 1rem; }
.account-page, .admin-page { max-width: 64rem; }
.account-page h1, .admin-page h1 { margin: 0.25rem 0 1rem; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
button.danger { border: 1px solid var(--danger); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.captcha { margin: 0.75rem 0; }
.captcha img { display: block; border: 1px solid var(--line); border-radius: 4px; background: #f6f3ec; }
.captcha label { margin-top: 0.5rem; }
.captcha a.hint { margin-top: 0.25rem; }
.admin-stats-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin: 1rem 0; }
.admin-stats-row .admin-stats { margin: 0; }
.admin-stats { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; color: var(--muted); }
.admin-stats strong { color: var(--ink); font-size: 1.15rem; }
.admin-page > .panel { margin-bottom: 1rem; }
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table.admin-users { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
table.admin-users th, table.admin-users td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 0.92rem; }
table.admin-users th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: flex-start; }
.admin-actions form { margin: 0; }
/* Admin → Email previews (EN-12). */
.email-meta { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0 0 0.75rem; }
.email-meta dt { color: var(--muted); }
.email-meta dd { margin: 0; }
.email-frame { display: block; width: 100%; max-width: 46rem; height: 70rem; border: 1px solid var(--line); border-radius: 8px; background: #f3efe6; }
.email-text { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 46rem; padding: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; font-size: 0.88rem; }
.email-plain { margin-top: 1rem; }
.email-plain summary { cursor: pointer; }
table.email-list td .button { white-space: nowrap; }
.admin-actions button, .admin-actions summary { font-size: 0.82rem; padding: 0.3rem 0.55rem; }
.admin-actions details.menu { position: relative; }
.admin-actions summary { cursor: pointer; color: var(--danger); list-style: none; border: 1px solid var(--danger); border-radius: 4px; }
.admin-actions .menu-panel { position: absolute; right: 0; z-index: 5; width: 18rem; padding: 0.75rem; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); }
.admin-actions .menu-panel label { display: block; margin: 0.4rem 0; }
.badge { display: inline-block; font-size: 0.72rem; padding: 0.05rem 0.4rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); vertical-align: middle; }
.status { display: inline-block; font-size: 0.8rem; padding: 0.1rem 0.5rem; border-radius: 999px; border: 1px solid var(--line); }
.status-active { background: #22c55e; color: #052e16; border-color: #16a34a; font-weight: 600; }
.status-invited { background: #e3ecf8; color: #23426b; border-color: #c3d4ec; }
.status-suspended { background: #f6dcdc; color: #6b2323; border-color: #e7baba; }
.admin-actions .link-menu summary { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
/* Users page pop-ups (Delete…, Re-send onboarding e-mail…) open as centered dialogs, so the table's scroll box can't cut them off. */
.admin-actions .menu-panel { position: fixed; left: 50%; top: 50%; right: auto; transform: translate(-50%, -50%); z-index: 60; width: min(26rem, calc(100vw - 2rem)); padding: 1.1rem 1.2rem; gap: 0.7rem; white-space: normal; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.45), 0 12px 30px rgba(0, 0, 0, 0.3); }
.admin-actions .menu-panel.link-panel { width: min(34rem, calc(100vw - 2rem)); }
.admin-actions .menu-panel p { margin: 0; padding-right: 1.2rem; }
.admin-actions .menu-panel .link-close { position: absolute; top: 0.4rem; right: 0.5rem; width: auto; background: transparent; color: var(--muted); font-size: 1.3rem; line-height: 1; padding: 0.2rem 0.4rem; }
.link-panel p { margin: 0; }
.link-panel .copy-row { display: flex; gap: 0.4rem; }
.link-panel .copy-field { flex: 1; min-width: 0; width: auto; font-family: Consolas, monospace; font-size: 0.8rem; }
.link-panel .copy-row button { width: auto; }
.link-panel form button { width: 100%; }
.link-panel form button.text { width: auto; background: transparent; color: var(--accent); text-decoration: underline; padding: 0; }
.plain-list { padding-left: 1.1rem; }
.plain-list li { margin: 0.3rem 0; }
.checklist { margin-top: 1rem; }
.checklist summary { cursor: pointer; font-weight: 600; }
.checklist li { margin: 0.45rem 0; }
.hint-list { color: var(--muted); font-size: 0.92rem; }
.import-result { margin: 0.75rem 0 1rem; padding: 0.75rem 1rem; border-radius: 6px; background: color-mix(in srgb, var(--accent) 8%, var(--panel)); border: 1px solid var(--line); }
a.bookmarklet { display: inline-block; padding: 0.3rem 0.7rem; border-radius: 999px; background: #8b7aa8; color: #fff; text-decoration: none; font-weight: 600; cursor: grab; }
kbd { font-family: inherit; font-size: 0.85em; padding: 0.05rem 0.35rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--panel); }
.landing { max-width: 46rem; margin: 2rem auto 1rem; text-align: center; }
.landing h1 { font-size: 2.6rem; margin: 0.5rem 0; }
.landing-lead { font-size: 1.2rem; color: var(--muted); max-width: 34rem; margin: 0 auto 1.5rem; }
.landing-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin-top: 2rem; text-align: left; }
.landing-points div { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.1rem; }
.landing-points h2 { font-size: 1.05rem; margin: 0 0 0.35rem; }
.landing-points p { margin: 0; color: var(--muted); }
.legal { max-width: 48rem; line-height: 1.55; }
.legal h2 { margin-top: 1.4rem; }
.legal li { margin: 0.35rem 0; }
.site-foot { text-align: center; padding: 1.5rem 1rem 2rem; color: var(--muted); font-size: 0.85rem; }
.site-foot a { color: var(--muted); }
body.is-popup .site-foot { display: none; }

/* HippoJar color panel (assets/color-picker.js) */
.color-panel {
  position: fixed;
  z-index: 1000;
  width: 15.5rem;
  max-width: calc(100vw - 16px);
  padding: 0.6rem;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.color-panel[hidden] { display: none; }
.color-panel-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.3rem; }
.menu-panel .color-panel button.color-panel-swatch,
.color-panel button.color-panel-swatch {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 3px;
  cursor: pointer;
}
.color-panel button.color-panel-swatch.is-selected { outline: 2px solid var(--accent); outline-offset: 1px; }
.color-panel-row { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.55rem; }
.color-panel-preview { flex: 0 0 1.9rem; height: 1.9rem; border: 1px solid var(--line); border-radius: 3px; }
.menu-panel .color-panel input.color-panel-hex,
.color-panel input.color-panel-hex { flex: 1 1 auto; width: 5.5rem; min-width: 0; margin: 0; font-family: ui-monospace, monospace; }
.menu-panel .color-panel button.color-panel-more,
.color-panel button.color-panel-more { width: auto; flex: 0 0 auto; padding: 0.35rem 0.5rem; background: transparent; color: var(--ink); border: 1px solid var(--line); font-size: 0.8rem; }
.color-panel-actions { display: flex; justify-content: flex-end; gap: 0.4rem; margin-top: 0.6rem; }
.menu-panel .color-panel .color-panel-actions button,
.color-panel .color-panel-actions button { width: auto; }
.color-panel button.color-panel-cancel { background: transparent; color: var(--ink); border: 1px solid var(--line); }
/* HJ-75: inside a category's colored header, Done took the header's white text on a transparent button and vanished. */
.menu-panel .color-panel button.color-panel-done,
.color-panel button.color-panel-done { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }

/* Show/hide password button (assets/password-toggle.js) */
.pw-wrap { display: flex; align-items: stretch; gap: 0.35rem; margin-top: 0.25rem; }
.pw-wrap input { flex: 1 1 auto; min-width: 0; margin-top: 0; }
button.pw-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  padding: 0;
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
}
button.pw-toggle:hover, button.pw-toggle[aria-pressed="true"] { color: var(--ink); }

/* Dead links: My Bookmarks panel, move dialog, and Dead Links tabs */
.dead-panel { margin-bottom: 0.8rem; border: 1px solid var(--line); background: var(--panel); }
.dead-panel p { margin: 0 0 0.6rem; }
.dead-panel .toolbar { margin-bottom: 0.4rem; }
.dead-panel progress { display: block; width: 100%; height: 0.6rem; margin: 0.2rem 0 0.6rem; accent-color: var(--accent); }
.dead-panel progress[hidden] { display: none; }
.dead-status { color: var(--muted); font-size: 0.9rem; }
.dead-filter { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.dead-filter a {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  font-size: 0.88rem;
}
.dead-filter a.is-current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
/* Dead Links Results fits at about 1280 px (HJ-43): the Problem column wraps, the date shows without its time. */
.dead-table td.problem { white-space: normal; min-width: 13rem; }
.dead-table td.problem .fine-btn { white-space: nowrap; }
.dead-table td.url, .dead-table td.title { max-width: 14rem; }
.dead-table .when-time { display: none; }
.catalog-table td.date { white-space: nowrap; }
.badge {
  display: inline-block;
  padding: 0 0.4rem;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 650;
}
.badge.is-dead { background: #8d2f2f; color: #fff; }
.badge.is-maybe { background: #b5834a; color: #1e1a16; }
.problem-detail { color: var(--muted); font-size: 0.85rem; }
button.fine-btn { font-size: 0.82rem; margin-left: 0.25rem; }
.dead-move-box h2 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.dead-move-box fieldset { margin: 0.6rem 0; padding: 0.4rem 0.75rem 0.6rem; }
.dead-move-box legend { font-weight: 650; padding: 0 0.25rem; }
.dead-move-box label.check { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem; margin: 0.3rem 0; }
.dead-move-box select { width: auto; margin: 0; }
.dead-move-box p { margin: 0.4rem 0; }
#dead-move:not([hidden]) { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; }

.dead-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin: 0 0 1rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--ok-green);
  border-radius: 6px;
  background: var(--panel);
}
.dead-bar p { margin: 0; flex: 1 1 22rem; }
.dead-bar button { margin: 0; }
.bookmark .icon-btn.put-back { color: var(--ok-green); opacity: 1; }
.bookmark.is-highlighted .icon-btn.put-back { color: inherit; }
.bookmark .icon-btn.put-back.is-unavailable { color: var(--muted); opacity: 0.45; cursor: not-allowed; }

/* Dead Links Results heading, the background-check note and the finished notice */
.dead-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0 0 0.6rem; }
.dead-heading h1 { margin: 0; font-size: 1.6rem; }
.dead-heading a { font-size: 0.92rem; }
.dead-panel .hint { margin-top: -0.3rem; }
.dead-table tr.is-new td { animation: lc-new 2.5s ease-out; }
@keyframes lc-new { from { background: color-mix(in srgb, var(--accent) 22%, transparent); } to { background: transparent; } }
a.lc-running {
  margin-left: 0.6rem;
  padding: 0.12rem 0.55rem;
  border: 1px solid #5c5c5e;
  border-radius: 999px;
  color: #d0d0d0;
  font-size: 0.8rem;
  text-decoration: none;
  white-space: nowrap;
}
a.lc-running::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: #7fd18b;
  animation: lc-pulse 1.4s ease-in-out infinite;
}
a.lc-running:hover { color: #fff; border-color: #8a8a8c; }
@keyframes lc-pulse { 50% { opacity: 0.25; } }
.lc-notice {
  position: relative;
  padding: 0.6rem 2.6rem 0.6rem 0.75rem;
  border-radius: 6px;
  border-left: 4px solid var(--ok-green);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.lc-notice a { margin-left: 0.25rem; }
.lc-notice .lc-dismiss {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  padding: 0 0.45rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
}
main:has(.dash-chrome) > .lc-notice { margin: 0.75rem 0; }
@media (prefers-reduced-motion: reduce) {
  a.lc-running::before, .dead-table tr.is-new td { animation: none; }
}

/* Dead Links Results: "Show these problems" checkboxes */
.dead-reasons fieldset { margin: 0.4rem 0 0; padding: 0.4rem 0.75rem 0.5rem; }
.dead-reasons legend { font-weight: 650; padding: 0 0.25rem; }
.reason-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.1rem 1rem; }
.reason-grid label.check { display: flex; align-items: center; margin: 0.2rem 0; font-size: 0.92rem; cursor: pointer; }
.reason-grid small { color: var(--muted); font-size: 0.78rem; }
.reason-grid .reason-count { color: var(--muted); font-size: 0.85rem; }
.reason-grid label.is-empty { color: var(--muted); }
.dead-reasons .hint { margin: 0.4rem 0 0; }
.dead-reasons .reason-reset { margin: 0.3rem 0 0; font-size: 0.88rem; }
.badge.is-blocked { background: var(--line); color: var(--ink); }

/* Batch 1: Trash and Undo, bulk actions, tag tools, duplicates, private notes */
.flash.has-undo { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.9rem; }
.flash.has-undo form { margin: 0; }
.flash.has-undo button { padding: 0.2rem 0.8rem; }
.modal:not([hidden]) { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; }
.bulk-box h2, .dup-box h2 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.bulk-box .bulk-count { margin: 0 0 0.6rem; color: var(--muted); }
.bulk-box select, .bulk-box input[name="tags"] { width: 100%; }
.list-actions .selection-note { color: var(--muted); font-size: 0.9rem; }
.select-all-matching { margin: -0.4rem 0 0.6rem; padding: 0.4rem 0.6rem; border-radius: 6px; background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.select-all-matching button.text { color: var(--accent); background: transparent; border: 0; text-decoration: underline; padding: 0 0.2rem; }
.tag-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem 0.8rem; margin: 0.6rem 0 0.2rem; }
.tag-tools .hide-imports { margin: 0; }
.tag-tools label.check { margin: 0; font-size: 0.9rem; }
.tag-tools .count { color: var(--muted); font-size: 0.82rem; }
a.button-link {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  font-size: 0.9rem;
}
a.button-link:hover { border-color: var(--accent); color: var(--accent); }
.tag-merge { display: grid; gap: 0.35rem; margin: 0 0 0.6rem; }
.tag-merge input { margin-top: 0.2rem; }
.tag-list.is-managing .tag-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.1rem;
  border-bottom: 1px solid var(--line);
}
.tag-list.is-managing .tag-row label.check { flex: 1; min-width: 0; margin: 0; display: flex; align-items: baseline; gap: 0.35rem; }
.tag-list.is-managing .tag-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tag-list.is-managing .tag-row form { margin: 0; }
.tag-list.is-managing .icon-btn { width: 1.6rem; height: 1.6rem; }
.dup-table tr.dup-head td { padding-top: 0.9rem; background: color-mix(in srgb, var(--accent) 7%, transparent); border-bottom: 1px solid var(--line); }
.dup-table tr.dup-head .dup-url { color: var(--muted); overflow-wrap: anywhere; }
.dup-table tr.dup-head button { margin-left: 0.5rem; padding: 0.15rem 0.7rem; font-size: 0.85rem; }
.dup-table tr.dup-row td:first-child { border-left: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.dup-box { width: min(34rem, calc(100% - 2rem)); }
.dup-box .dup-dialog-url { margin: 0 0 0.5rem; color: var(--muted); overflow-wrap: anywhere; font-size: 0.9rem; }
.dup-box fieldset { margin: 0.4rem 0; padding: 0.3rem 0.75rem 0.5rem; max-height: 45vh; overflow: auto; }
.dup-choice { display: flex; align-items: flex-start; gap: 0.5rem; margin: 0.45rem 0; }
.dup-choice input { margin-top: 0.25rem; }
.dup-choice strong { display: block; }
.dup-meta { display: block; color: var(--muted); font-size: 0.85rem; }
.notes-field { display: grid; gap: 0.3rem; margin: 0.6rem 0; }
.notes-field textarea { margin-top: 0; }
.notes-field button.show-note { justify-self: start; }
.notes-field label.check { margin: 0; }
.trash-page .toolbar { margin-top: 0.6rem; }
.trash-page .trash-empty { margin-top: 1rem; }


/* Batch 2: edit pop-up, Favorites, Open all, views, keyboard shortcuts */
.frame-modal .frame-box {
  position: relative;
  width: min(36rem, calc(100% - 1.5rem));
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.frame-modal iframe { display: block; width: 100%; height: min(36rem, calc(100vh - 3rem)); border: 0; border-radius: 8px; background: var(--panel); }
.frame-modal .frame-close {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  z-index: 1;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
}
.frame-modal .frame-close:hover { color: var(--ink); }
body.has-frame-modal { overflow: hidden; }
body.is-modal { overflow: auto; background: var(--panel); }
body.is-modal .mast, body.is-modal .site-foot { display: none; }
body.is-modal main { padding: 0.9rem 1.1rem 1rem; }
body.is-modal .panel { border: 0; box-shadow: none; padding: 0; background: transparent; }
body.is-modal h1 { padding-right: 2rem; }
body.is-modal .form-actions button.text { background: transparent; border: 0; color: var(--accent); text-decoration: underline; }

/* HJ-64: the star always shows, faint until you point at the bookmark, so people can find it without hovering. */
.bookmark .fav-toggle:not(.is-on) { opacity: 0.4; }
.bookmark:hover .fav-toggle, .bookmark:focus-within .fav-toggle, .bookmark .fav-toggle:focus-visible { opacity: 1; }
.fav-toggle.is-on { color: #c99400; opacity: 1; }
.bookmark .icon-btn.fav-toggle.is-on { color: #c99400; opacity: 1; }
html.dark .fav-toggle.is-on, html.dark .bookmark .icon-btn.fav-toggle.is-on { color: #f2c94c; }
.catalog-table td.title .fav-toggle { vertical-align: middle; margin-right: 0.2rem; }
.catalog-table td.title .fav-toggle:not(.is-on) { opacity: 0.45; }
.catalog-table td.title .fav-toggle:not(.is-on):hover { opacity: 1; }

.fav-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.4rem;
  margin: 0.5rem 0 0.6rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  font-family: Lato, "Segoe UI", sans-serif;
  font-size: 12px;
}
.fav-strip .fav-label { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--muted); margin-right: 0.2rem; }
.fav-strip .fav-label .icon { color: #c99400; }
html.dark .fav-strip .fav-label .icon { color: #f2c94c; }
.fav-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 16rem;
  padding: 0.15rem 0.2rem 0.15rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}
.fav-chip a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; text-decoration: none; }
.fav-chip a:hover { text-decoration: underline; }
/* HJ-64: the × always shows, and is big enough to hit. */
.fav-chip .fav-remove {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
}
.fav-chip .fav-remove:hover { background: var(--line); color: var(--ink); }

.views { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; margin: -0.3rem 0 0.7rem; font-size: 0.9rem; }
.views > span:first-child { color: var(--muted); }
.views a { display: inline-flex; align-items: center; gap: 0.2rem; padding: 0.15rem 0.55rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: inherit; }
.views a:hover { border-color: var(--accent); }
.views a.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.views .hint { flex-basis: 100%; margin: 0; }

kbd {
  display: inline-block;
  min-width: 1.4em;
  padding: 0.05em 0.4em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--bg);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85em;
  text-align: center;
}
.shortcuts-help h2 { margin: 0 0 0.6rem; font-size: 1.1rem; }
.shortcuts-help dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1rem; margin: 0 0 0.6rem; align-items: baseline; }
.shortcuts-help dt, .shortcuts-help dd { margin: 0; }
#open-all-note h2 { margin: 0 0 0.5rem; font-size: 1.1rem; }
#open-all-note .hint { margin-top: 0.6rem; }

/* Batch 3: Inbox, Read later and reminders, saved page copies, one-click save */
.topnav .nav-count {
  display: inline-block;
  min-width: 1.25rem;
  margin-left: 0.3rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #4a4a4a;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.25rem;
  text-align: center;
}
.topnav .nav-count.is-due { background: #c0392b; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button.secondary { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
button.text.danger-text, .danger-text { background: transparent; border: 0; color: var(--danger); text-decoration: underline; }

.due-bar { display: grid; gap: 0.35rem; margin: 0.75rem 0; padding: 0.5rem 0.75rem; border: 1px solid #e3b341; border-left-width: 4px; border-radius: 6px; background: color-mix(in srgb, #f6e7a8 45%, var(--panel)); }
html.dark .due-bar { background: color-mix(in srgb, #8a6d1a 30%, var(--panel)); }
.due-item { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; }
.due-item .due-label { font-weight: 600; }
.due-item > a { color: inherit; overflow-wrap: anywhere; }
.due-item form { display: inline-flex; gap: 0.4rem; margin: 0; }
.due-item button { padding: 0.1rem 0.6rem; font-size: 0.85rem; }
.due-item button.text { background: transparent; border: 0; color: var(--accent); text-decoration: underline; }
.due-more { font-size: 0.88rem; }

.later-page h2, .inbox-page h2 { margin: 1.1rem 0 0.4rem; font-size: 1.05rem; }
.later-list, .inbox-list { list-style: none; margin: 0; padding: 0; }
.later-row, .inbox-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; padding: 0.55rem 0.2rem; border-bottom: 1px solid var(--line); }
.later-list.is-due .later-row { border-left: 3px solid #e3b341; padding-left: 0.5rem; }
.later-main, .inbox-main { flex: 1 1 18rem; min-width: 0; display: grid; gap: 0.1rem; }
.later-title, .inbox-title { font-weight: 600; overflow-wrap: anywhere; color: inherit; }
.later-meta, .inbox-meta, .inbox-note { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.later-actions, .inbox-file { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.snooze-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0; }
.snooze-form button { padding: 0.2rem 0.7rem; }
.snooze-form button.text { background: transparent; border: 0; color: var(--accent); text-decoration: underline; }
.snooze-form select { max-width: 14rem; }
.inbox-file select { max-width: 11rem; }
.inbox-actions { margin: 0.5rem 0; }
.inbox-actions .selection-note { color: var(--muted); font-size: 0.9rem; }
.bulk-box .bulk-error { margin: 0.4rem 0 0; color: var(--danger); font-size: 0.9rem; }
.inbox-actions select { max-width: 18rem; }
.remind-field { display: grid; gap: 0.25rem; margin: 0.4rem 0; }
.remind-field label { margin: 0; }

.catalog-table td.title .saved-copy { display: inline-flex; vertical-align: middle; color: inherit; } /* HJ-118: same colour as the title */
.catalog-table td.title .saved-copy:hover { background: var(--line); }
.page-snippet { display: block; margin-top: 0.15rem; color: var(--muted); font-size: 0.82rem; white-space: normal; }
mark { background: #f6e08a; color: #1e1a16; border-radius: 2px; padding: 0 0.1em; }
.bookmark .icon-btn.saved-copy { opacity: 0.85; }

.snapshot-page { max-width: 46rem; margin: 0 auto; }
.snapshot-kicker { margin: 0; color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.snapshot-page h1 { margin: 0.15rem 0 0.4rem; overflow-wrap: anywhere; }
.snapshot-links { margin: 0 0 0.5rem; font-size: 0.92rem; }
.snapshot-update { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.snapshot-update .hint { margin: 0; }
.snapshot-text { margin-top: 1rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.02rem; line-height: 1.6; overflow-wrap: anywhere; }
.snapshot-text p { margin: 0 0 0.9rem; }
.delete-copies { margin-top: 0.4rem; }

body.quick-save .quick-tick { color: var(--ok-green); }
body.quick-save .quick-form h1 { font-size: 1.3rem; }
body.quick-save .quick-where { margin: 0 0 0.5rem; }
body.quick-save .quick-form textarea { min-height: 3.2rem; }
body.quick-save .quick-form select { width: 100%; }
body.quick-save .form-actions button.text { background: transparent; border: 0; }
body.quick-save .quick-again { margin: 0.3rem 0.85rem; }
body.quick-save .quick-again button { background: transparent; border: 0; color: var(--accent); text-decoration: underline; padding: 0; }
body.quick-save { overflow: auto; }
.inbox-row > input[type="checkbox"] { width: auto; flex: 0 0 auto; margin: 0; }
.inbox-file { flex-wrap: nowrap; }
.inbox-file select, .inbox-actions select, .snooze-form select, .later-actions select { width: auto; }
.snooze-form input[type="datetime-local"] { width: auto; }
.inbox-actions label { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; }

/* Batch 4: saved-search categories, share links */
.category.is-smart .category-header h2 { display: flex; align-items: center; gap: 0.3rem; }
.category .smart-mark { display: inline-flex; opacity: 0.85; }
.category .smart-mark .icon { width: 13px; height: 13px; }
.category-body .smart-more { display: block; margin: 0.25rem 4px 0.1rem; font-size: 11px; color: var(--muted); }
.menu-panel .smart-about { margin: 0.2rem 0 0.4rem; font-size: 0.82rem; color: var(--muted); max-width: 16rem; }
.menu-panel a.menu-link { display: block; padding: 0.35rem 0.15rem; color: inherit; }
.save-search-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin: -0.2rem 0 0.8rem; }
.save-search-bar .hint { margin: 0; }
.save-search-bar.is-editing { padding: 0.5rem 0.75rem; border: 1px solid var(--accent); border-radius: 6px; background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.save-search-bar input[type="number"], .bulk-box input[type="number"] { width: 5rem; display: inline-block; }
.shares-page h2 { display: flex; align-items: center; gap: 0.4rem; margin: 1.2rem 0 0.5rem; font-size: 1.1rem; }
.share-box { padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.share-box h2 { margin-top: 0; }
.share-link { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.share-link input { flex: 1 1 22rem; width: auto; margin: 0; font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; }
.share-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.share-actions form { margin: 0; }
.shares-table td form { margin: 0; }
.share-public { max-width: 44rem; margin: 0 auto; }
.share-public h1 { margin: 0.15rem 0 0.8rem; overflow-wrap: anywhere; }
.share-public h2 { margin: 1.2rem 0 0.3rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); padding-bottom: 0.2rem; }
.share-list { margin: 0; padding-left: 1.1rem; }
.share-list li { margin: 0.3rem 0; overflow-wrap: anywhere; }
.share-host { color: var(--muted); font-size: 0.85rem; }
.share-foot { margin-top: 1.4rem; }

/* Save-from-browser window: compact, so it fits the 520 x 640 window without scrolling */
body.quick-save .mast { display: none; }
body.quick-save main { padding: 0.55rem 0.75rem 0.5rem; }
body.quick-save .panel { padding: 0.6rem 0.8rem 0.5rem; }
body.quick-save .quick-form h1, body.quick-save .quick-done h1 { margin: 0 0 0.35rem; font-size: 1.15rem; }
body.quick-save .quick-form [hidden] { display: none !important; }
body.quick-save .quick-form .error { margin: 0 0 0.35rem; }
body.quick-save .quick-where { margin: 0 0 0.35rem; font-size: 0.88rem; }
.qf-choice { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; margin: 0 0 0.45rem; padding: 0.35rem 0.55rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.qf-choice label { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0; font-weight: 600; }
.qf-choice input { width: auto; margin: 0; }
.qf-grid { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); align-items: center; gap: 0.32rem 0.5rem; }
.qf-grid > label, .qf-grid > span { margin: 0; font-size: 0.9rem; color: var(--muted); }
.qf-grid input, .qf-grid select, .qf-grid textarea { margin: 0; padding: 0.3rem 0.45rem; }
.qf-grid textarea { min-height: 0; resize: vertical; }
.qf-pick { display: flex; gap: 0.35rem; align-items: center; }
.qf-pick select, .qf-pick input { flex: 1 1 auto; min-width: 0; }
.qf-pick .add-choice { flex: 0 0 auto; margin: 0; width: 2rem; height: 2rem; padding: 0; }
.qf-pick .add-choice[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.qf-note { margin: -0.15rem 0 0; font-size: 0.8rem; color: var(--muted); }
.qf-later { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; margin: 0; }
.qf-later label.check { margin: 0; white-space: nowrap; }
.qf-later select { flex: 1 1 10rem; width: auto; }
.qf-later .remind-custom { flex-basis: 100%; margin: 0; }
body.quick-save .quick-form .form-actions { margin: 0.55rem 0 0; gap: 0.6rem; }
body.quick-save .quick-form .form-actions .hint { margin: 0 0 0 auto; font-size: 0.8rem; }
body.quick-save .quick-again { margin: 0.25rem 0.8rem 0; }

/* Admin: add someone directly */
.admin-forms { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.admin-forms .panel.narrow { flex: 1 1 22rem; margin: 0; }
.admin-forms .hint { margin-top: 0.5rem; }
.login-details { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 0.8rem; align-items: center; margin: 0.5rem 0; }
.login-details dt { color: var(--muted); }
.login-details dd { margin: 0; overflow-wrap: anywhere; }
.login-details .copy-field { margin: 0; max-width: 20rem; }

/* Welcome: a pre-registered person creates their first password */
.welcome-box { width: min(26rem, calc(100% - 2rem)); }
.welcome-box h2 { margin: 0 0 0.3rem; font-size: 1.3rem; }
.welcome-box label { display: block; margin: 0.5rem 0; }
.welcome-box .confirm-actions { align-items: center; }
.pw-checks { list-style: none; margin: 0.6rem 0; padding: 0; display: grid; gap: 0.2rem; font-size: 0.92rem; }
.pw-checks li { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); }
.pw-checks .pw-mark { flex: 0 0 1.1rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2px solid var(--line); display: inline-grid; place-items: center; font-size: 0.75rem; line-height: 1; }
.pw-checks li.is-ok { color: var(--ink); }
.pw-checks li.is-ok .pw-mark { background: var(--ok-green); border-color: var(--ok-green); color: #fff; }
.pw-checks li.is-ok .pw-mark::before { content: "\2713"; }
.login-lead { margin: 0 0 0.6rem; color: var(--muted); }
.login-change { margin: 0.2rem 0 0.4rem; }
input[readonly][name="email"] { background: var(--bg); }
.login-notice { margin: 0 0 0.7rem; padding: 0.5rem 0.7rem; border: 1px solid #e3b341; border-left-width: 4px; border-radius: 6px; background: color-mix(in srgb, #f6e7a8 45%, var(--panel)); }
html.dark .login-notice { background: color-mix(in srgb, #8a6d1a 30%, var(--panel)); }
.login-switch { margin-top: 0.8rem; }
.landing-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
a.button.secondary { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }

/* Home page for visitors: splash, Log in / Sign up buttons and dialogs */
main:has(.splash) { padding: 0; }
.splash { text-align: center; overflow: hidden; }
.splash-hero {
  position: relative;
  padding: 3.2rem 1.25rem 4.2rem;
  background:
    radial-gradient(60rem 28rem at 50% -10%, #ffe9b8 0%, rgba(255, 233, 184, 0) 70%),
    linear-gradient(180deg, #fbe6cf 0%, #f3efe6 100%);
  isolation: isolate;
}
.splash-hero > * { position: relative; z-index: 1; }
.splash .blob { position: absolute; z-index: 0; border-radius: 50%; filter: blur(2px); opacity: 0.55; }
.splash .blob-a { width: 15rem; height: 15rem; left: -4rem; top: 3rem; background: #f6c7a8; }
.splash .blob-b { width: 11rem; height: 11rem; right: -2rem; top: 1rem; background: #cbb8e6; }
.splash .blob-c { width: 9rem; height: 9rem; right: 14%; bottom: -3rem; background: #bfe3d2; }
.splash .floater { position: absolute; z-index: 0; font-size: 2rem; opacity: 0.9; animation: splash-float 6s ease-in-out infinite; }
.splash .f1 { left: 12%; top: 22%; }
.splash .f2 { right: 14%; top: 36%; animation-delay: -2s; }
.splash .f3 { left: 20%; bottom: 14%; animation-delay: -4s; font-size: 1.7rem; }
.splash .f4 { right: 24%; bottom: 20%; animation-delay: -1s; font-size: 1.6rem; }
.splash-logo { display: block; margin: 0 auto; filter: drop-shadow(0 10px 14px rgba(70, 40, 20, 0.25)); animation: splash-bob 4s ease-in-out infinite; }
.splash h1 { margin: 0.4rem 0 0.2rem; font-size: clamp(2.6rem, 8vw, 4.2rem); letter-spacing: -0.02em; color: var(--deep-plum); }
.splash-tagline { margin: 0 auto 1.6rem; max-width: 26rem; font-size: clamp(1.2rem, 3.6vw, 1.6rem); line-height: 1.35; color: var(--deep-plum); }
.splash-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin: 0 0 0.9rem; }
.big-btn {
  display: inline-block;
  min-width: 10rem;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.big-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 rgba(0, 0, 0, 0.18); }
.big-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18); }
.big-primary, a.big-primary:visited { background: var(--button-purple); color: #fff; }
.big-fun, a.big-fun:visited { background: #fff; color: var(--button-purple); border: 3px solid var(--button-purple); padding: calc(0.85rem - 3px) calc(2rem - 3px); }
.splash-note { margin: 0; color: var(--deep-plum); font-size: 0.95rem; }
.splash-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; max-width: 62rem; margin: -1.6rem auto 0; padding: 0 1.25rem 2.5rem; position: relative; z-index: 2; text-align: left; }
.splash .point { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.2rem; box-shadow: 0 6px 14px rgba(70, 40, 20, 0.08); }
.splash .point-icon { display: block; font-size: 1.9rem; margin-bottom: 0.2rem; }
.splash .point h2 { margin: 0 0 0.3rem; font-size: 1.1rem; }
.splash .point p { margin: 0; color: var(--muted); }
.splash-shots { max-width: 62rem; margin: 0 auto; padding: 0 1.25rem 3rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 1.4rem; align-items: start; text-align: left; }
.splash-shots .shots-title { grid-column: 1 / -1; text-align: center; margin: 0.5rem 0 0; font-size: 1.6rem; }
.splash-shots .shot { margin: 0; }
.splash-shots .shot-wide { grid-column: 1 / -1; }
.splash-shots .shot img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 10px 24px rgba(70, 40, 20, 0.14); background: var(--panel); }
.splash-shots .shot-tall img { max-width: 26rem; margin: 0 auto; }
.splash-shots figcaption { margin-top: 0.6rem; color: var(--muted); line-height: 1.45; }
.splash-shots figcaption strong { display: block; color: var(--text, inherit); font-size: 1.05rem; }
.splash-shots .shot-tall { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 26rem) 1fr; gap: 1.4rem; align-items: center; }
.splash-shots .shot-tall figcaption { margin: 0; font-size: 1.05rem; }
@media (max-width: 640px) { .splash-shots .shot-tall { grid-template-columns: 1fr; } }
@keyframes splash-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
@keyframes splash-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) { .splash-logo, .splash .floater { animation: none; } .big-btn { transition: none; } }
@media (max-width: 560px) { .splash .floater { display: none; } .splash-hero { padding-top: 2rem; } }

.auth-box { width: min(24rem, calc(100% - 2rem)); padding: 1.3rem 1.4rem 1.2rem; }
.auth-box h1 { margin: 0 0 0.6rem; font-size: 1.6rem; }
.auth-box label { display: block; margin: 0.6rem 0; }
.auth-box button[type="submit"] { width: 100%; margin-top: 0.4rem; padding: 0.6rem 1rem; font-size: 1.05rem; }
.auth-box .hint { margin: 0.6rem 0 0; text-align: center; }
.auth-close { position: absolute; top: 0.4rem; right: 0.5rem; width: 2rem; height: 2rem; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 1.6rem; line-height: 1; }
.auth-close:hover { color: var(--ink); }

/* Ask for an invitation */
.splash-ask { margin: 0.5rem 0 0; font-size: 1.05rem; }
.splash-ask a { color: var(--button-purple); font-weight: 600; }
.splash-help { margin: 0.35rem 0 0; font-size: 0.95rem; }
.splash-help a { color: #6d645b; }
.invite-box textarea { width: 100%; min-height: 4.5rem; }
.invite-thanks { text-align: center; padding: 0.4rem 0 0.2rem; }
.invite-thanks h1 { margin: 0 0 0.5rem; font-size: 1.6rem; }
.invite-party { margin: 0; font-size: 3rem; line-height: 1; animation: splash-bob 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .invite-party { animation: none; } }
.admin-requests .heard { max-width: 26rem; overflow-wrap: anywhere; }
.admin-page h2 { margin: 1.2rem 0 0.5rem; font-size: 1.15rem; }
.status-asking { background: #fde9c9; color: #7a4a05; }
html.dark .status-asking { background: #5b4015; color: #fde9c9; }
.asking-row td { background: color-mix(in srgb, #f6e7a8 28%, var(--panel)); border-bottom: 0; }
html.dark .asking-row td, html.dark .asking-count strong { color: #b8620a; }

/* Users page: never wrap. It uses the full width of the screen, one line per person. */
.admin-page { max-width: none; }
table.admin-users th, table.admin-users td { white-space: nowrap; }
.admin-actions { flex-wrap: nowrap; }
table.admin-users td.referral { max-width: 36rem; overflow: hidden; text-overflow: ellipsis; }
.admin-forms .panel.narrow { flex: 0 1 30rem; }
.req { color: #d32f2f; font-weight: 700; font-size: 1.25rem; line-height: 1; }
.req-row { display: flex; align-items: flex-start; gap: 0.45rem; }
.req-row > input, .req-row > textarea { flex: 1 1 auto; width: auto; min-width: 0; }
.req-row > .req { flex: 0 0 auto; margin-top: 0.7rem; }
.req-note { margin: 0.5rem 0 0.2rem; font-size: 0.9rem; color: var(--muted); }
.invite-box { max-height: calc(100vh - 2rem); overflow-y: auto; }
.invite-box .captcha { margin: 0.6rem 0 0.2rem; }

.log-search { margin: 0.4rem 0 0.6rem; }
.log-search input[type="search"] { width: 22rem; max-width: 100%; margin: 0; }

/* Onboarding: Welcome link page, Accepted / Rejected labels on the Users page */
.status-accepted { background: #dff3e4; color: #1f5130; border-color: #b6dbbe; }
.status-rejected { background: #ececec; color: #555; border-color: #d4d4d4; }
html.dark .status-rejected { background: #3a3a3a; color: #ddd; }
.rejected-row td { color: var(--muted); }
.welcome-invalid h1 { font-size: 1.4rem; }
.welcome-invalid .fresh-link { margin: 0.8rem 0; }
.welcome-invalid .welcome-or { margin-top: 1.2rem; }


/* Phones (HJ-08): wide tables (My Bookmarks, Dead Links Results, Trash) scroll inside their own box instead of the whole page,
   and lists never get wider than the screen. */
select { max-width: 100%; }
@media (max-width: 720px) {
  .catalog-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 560px) {
  .inbox-actions label:not(.check) { display: block; flex: 1 1 100%; }
  .inbox-actions select { display: block; width: 100%; max-width: 100%; margin-top: 0.2rem; }
}

/* EN-04: bookmarks for files on the member's computer (assets/files.js). */
.file-icon { display: inline-flex; align-items: center; justify-content: center; }
.file-icon svg { display: block; }
a.file-link.is-off { color: #9a958c; cursor: default; }
.file-off .file-icon { opacity: 0.45; }
.dark a.file-link.is-off { color: #77736b; }
.file-menu {
  position: fixed;
  z-index: 1000;
  min-width: 14rem;
  max-width: min(26rem, calc(100vw - 16px));
  padding: 0.35rem 0;
  border: 1px solid #d8d1c2;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  font-size: 0.92rem;
}
.file-menu p { margin: 0; padding: 0.2rem 0.85rem; }
.file-menu-where { color: #6b665d; font-weight: 600; }
.file-menu-path { color: #6b665d; font-size: 0.82rem; overflow-wrap: anywhere; padding-bottom: 0.45rem !important; border-bottom: 1px solid #ece6d9; margin-bottom: 0.25rem !important; }
.file-menu-why { color: #8e3f28; font-size: 0.85rem; border-top: 1px solid #ece6d9; margin-top: 0.25rem !important; padding-top: 0.45rem !important; }
.file-menu button {
  display: block;
  width: 100%;
  padding: 0.4rem 0.85rem;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.file-menu button:hover:not(:disabled), .file-menu button:focus-visible { background: #f1ead9; }
.file-menu button:disabled { color: #aaa49a; cursor: default; }
.dark .file-menu { background: #2c2b30; border-color: #45434a; color: #e6e3dc; }
.dark .file-menu-where, .dark .file-menu-path { color: #b5b1a8; }
.dark .file-menu-path, .dark .file-menu-why { border-color: #45434a; }
.dark .file-menu button:hover:not(:disabled), .dark .file-menu button:focus-visible { background: #3a3940; }
.file-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; margin: -0.3rem 0 0.6rem; }
.file-pick[hidden] { display: none; }
.files-settings .files-about { margin-top: 0; }
.files-status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; margin: 0.4rem 0 0.6rem; }
.files-line { font-weight: 600; }
.files-name { margin-bottom: 0.6rem; }
.files-name input { max-width: 18rem; }
.files-sub { margin: 0.6rem 0 0.2rem; font-weight: 600; }
.files-computers ul { margin: 0; padding-left: 1.1rem; }
.files-computers li { margin: 0.15rem 0; }
.files-this { font-size: 0.8rem; padding: 0.05rem 0.4rem; border-radius: 999px; background: #e7efe2; color: #2e6b2f; }
.files-check h2 { margin-top: 0; }
.files-check-list { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.files-check-list li { margin: 0.6rem 0; }
.files-check-why { margin: 0.15rem 0; color: #8e3f28; }
.files-settings button.text, .file-pick button.text {
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.92rem;
  text-decoration: underline;
  cursor: pointer;
}
.files-computers .hint { display: inline; margin: 0; }
.files-computers li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.5rem; }
/* EN-04: the numbered setup list in Settings → Files on your computer. */
.files-steps { list-style: none; margin: 0.5rem 0 0.4rem; padding: 0; }
.files-step { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.6rem 0; border-top: 1px solid var(--line, #e3dccd); }
.files-step:first-child { border-top: 0; }
.files-step-mark {
  flex: 0 0 1.7rem; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
  border: 2px solid currentColor; color: var(--accent);
}
.files-step.is-done .files-step-mark { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.files-step.is-locked { opacity: 0.5; }
.files-step.is-locked .files-step-mark { color: inherit; }
.files-step-body { flex: 1 1 auto; min-width: 0; }
.files-step-body p { margin: 0; }
.files-step-title { font-weight: 600; margin-bottom: 0.3rem !important; }
.files-step-done { color: #2e7d32; }
html.dark .files-step-done { color: #81c784; }
.files-step-action { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; }
.files-step-action .hint { flex: 1 1 100%; margin: 0; }
.files-step-name input { max-width: 18rem; }
.files-step-name .error { flex: 1 1 100%; }
.files-step-choice { display: block; }
.files-step-choice label.check { display: block; margin: 0.15rem 0; }
.files-step-choice .hint { margin: 0.25rem 0 0.45rem; }
.files-wait { color: var(--muted, #6b665d); }
.files-dots { display: inline-block; width: 1.4em; text-align: left; }
.files-dots::after { content: "…"; display: inline-block; overflow: hidden; vertical-align: bottom; width: 0; animation: files-dots 1.2s steps(4, end) infinite; }
@keyframes files-dots { to { width: 1.25em; } }
/* The dots are a progress signal, so they show even with Windows animations turned off (they don't move anything). */
.files-allset { margin: 0.4rem 0 0.2rem; padding: 0.5rem 0.7rem; border-radius: 6px; background: #e7f3e7; color: #1f5d22; font-weight: 600; }
html.dark .files-allset { background: #1f3a21; color: #a5d6a7; }

/* EN-47: the version line at the bottom of My account. */
.app-version { text-align: center; color: var(--muted); font-size: 0.85rem; margin: 1.5rem 0 0.5rem; }
/* EN-46: the dated notice at the top of the Privacy page. */
.privacy-notice { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; padding: 0.55rem 0.8rem; }
/* EN-22: the web error code after a problem's name in Dead Links' "Show these problems". */
.reason-code { display: inline-block; font-size: 0.72rem; line-height: 1.3; padding: 0 0.3rem; border-radius: 4px; background: var(--line); color: var(--muted); font-variant-numeric: tabular-nums; vertical-align: 0.08em; cursor: help; }
/* EN-44: Admin → Stage tools (stage only). */
.stage-jobs .stage-job { margin: 0 0 0.9rem; }
.stage-jobs .stage-job-status { margin-left: 0.4rem; }
.stage-reminder-to input { width: 18rem; max-width: 100%; }
.stage-mail { margin: 0 0 0.5rem; padding: 0.5rem 0.8rem; }
.stage-mail pre { white-space: pre-wrap; font-size: 0.85rem; margin: 0.6rem 0 0; }
/* EN-40: the stopwatch while a saved copy is on its way. */
.copy-coming { display: inline-flex; vertical-align: middle; color: var(--muted); opacity: 0.75; cursor: help; }
.copy-coming .icon { width: 1em; height: 1em; }
.saved-copy-line .copy-coming { margin-right: 0.15rem; }
/* EN-38: the save window's buttons. Done is the bright one until something changes; then Save changes is. */
.quick-already { margin: -0.2rem 0 0.8rem; color: var(--muted); }
.quick-actions .qf-save:disabled { background: transparent; color: var(--muted); border: 1px solid var(--line); cursor: default; opacity: 1; }
.quick-actions .qf-done.is-quiet { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.quick-actions .qf-done.is-quiet:hover { color: var(--ink); border-color: var(--muted); }
/* EN-43: the Tags panel. Each row: the tag (click to filter) and a ⋯ menu (Rename, Merge into…, Delete). */
.tag-list .tag-row { display: flex; align-items: center; gap: 0.2rem; border-bottom: 1px solid var(--line); }
.tag-list .tag-row[hidden] { display: none; }
.tag-list .tag-row .tag-link { flex: 1; min-width: 0; border-bottom: 0; }
.tag-list .tag-name { min-width: 0; white-space: normal; overflow-wrap: break-word; }
.tag-menu summary { cursor: pointer; padding: 0 0.4rem; border-radius: 4px; color: var(--muted); font-weight: 700; line-height: 1.6; }
.tag-menu summary:hover, .tag-menu[open] summary { background: var(--line); color: var(--ink); }
/* HJ-119: the tag menu button always shows (it used to appear only on pointing). */
.tag-menu .menu-panel, .col-menu .menu-panel { min-width: 9rem; padding: 0.35rem; }
.tag-menu .menu-panel button { display: block; background: transparent; color: var(--ink); border: 0; text-align: left; padding: 0.35rem 0.4rem; font-weight: normal; }
.tag-menu .menu-panel button:hover { background: var(--line); }
.tag-menu .menu-panel form { margin: 0; }
.tag-menu .menu-panel .danger-text { color: #b3261e; }
.tag-row.is-renaming .tag-link, .tag-row.is-renaming .tag-menu { display: none; }
.tag-rename-inline { display: flex; flex: 1; gap: 0.3rem; align-items: center; padding: 0.25rem 0; }
.tag-rename-inline input { flex: 1; min-width: 0; }
.tag-rename-inline .tag-rename-cancel { font-size: 1.2rem; padding: 0 0.3rem; text-decoration: none; }
aside .hide-imports { margin: 0.7rem 0 0; }
aside .hide-imports label.check { font-size: 0.9rem; }
/* EN-18: the last column's ▾ menu. */
.catalog-table th.last-col { white-space: nowrap; }
.col-menu { display: inline-block; vertical-align: baseline; }
.col-menu summary { cursor: pointer; padding: 0 0.3rem; border-radius: 4px; color: var(--muted); }
.col-menu summary:hover, .col-menu[open] summary { background: var(--line); color: var(--ink); }
.col-menu .menu-panel a { display: block; padding: 0.35rem 0.4rem; color: var(--ink); font-weight: normal; text-transform: none; letter-spacing: 0; }
.col-menu .menu-panel a[aria-current] { font-weight: 700; }
/* EN-21: the row's pencil, its tags, and the place link. */
.catalog-table td.title .row-edit { vertical-align: middle; color: inherit; width: 1.5rem; height: 1.5rem; } /* HJ-118: same colour as the title */
.catalog-table td.title .row-edit:hover, .catalog-table td.title .row-edit:focus-visible { background: var(--line); }
.catalog-table td.title .row-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0.2rem 0 0 1.6rem; white-space: normal; }
.row-tags .tag-chip { background: transparent; color: var(--muted); border: 1px solid var(--line); font-size: 0.78rem; padding: 0 0.45rem; }
.row-tags .tag-chip:hover { border-color: var(--accent); color: var(--ink); }
.catalog-table td.place a { color: inherit; }
/* EN-21: a bookmark lit up on the Dashboard after "show it" from My Bookmarks. */
.bookmark.is-found { outline: 3px solid var(--accent); outline-offset: 1px; border-radius: 4px; transition: outline-color 1.2s; }
/* EN-13: icons shown when pointing at a bookmark appear over the end of its title, on a soft background, so titles
   use the full width the rest of the time. Keyboard focus shows them too. Phones and tablets always show them. */
.bookmark { position: relative; --row-bg: var(--panel); }
.bookmark.is-highlighted { --row-bg: var(--highlight); }
.bm-hover { position: relative; flex: 0 0 0; width: 0; align-self: stretch; }
.bm-hover-inner {
  position: absolute; right: 0; top: 0; bottom: 0; display: flex; align-items: center; gap: 2px;
  padding-left: 0.6rem; background: var(--row-bg);
  box-shadow: -10px 0 8px -2px var(--row-bg);
  opacity: 0; pointer-events: none; transition: opacity 0.12s;
}
.bookmark:hover .bm-hover-inner, .bookmark:focus-within .bm-hover-inner { opacity: 1; pointer-events: auto; }
.bm-hover-inner form { margin: 0; display: inline-flex; }
@media (hover: none) {
  .bm-hover { flex: 0 0 auto; width: auto; }
  .bm-hover-inner { position: static; opacity: 1; pointer-events: auto; padding-left: 0; background: none; box-shadow: none; }
}
.bookmark .copy-coming .icon { width: 12px; height: 12px; }
/* EN-13: the Dashboard's right-click menu uses the same look as the file menu. */
.bm-menu hr { border: 0; border-top: 1px solid #ece6d9; margin: 0.25rem 0; }
.bm-menu button.is-danger { color: #b3261e; }
html.dark .file-menu { background: #2a2723; border-color: #4a453d; color: #eee; }
html.dark .file-menu-where, html.dark .file-menu-path { color: #b9b2a6; }
/* EN-13: Settings, Icons beside each bookmark. */
.icon-choices .icon-choice { display: grid; grid-template-columns: minmax(9rem, 1fr) auto; align-items: center; gap: 0.5rem; margin: 0.3rem 0; }
.icon-choices .icon-choice select { width: auto; }
/* EN-17: tags shown on a Dashboard search result that was found by its tag. */
.search-hit .search-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.15rem; }
.search-hit .search-tags .tag-chip { background: transparent; color: var(--muted); border: 1px solid var(--line); font-size: 0.75rem; padding: 0 0.4rem; }
/* EN-42: Copy bookmarks (category gear) and Copy this tab's bookmarks (Tabs menu): the same quiet look as Open all. */
.menu-panel button.copy-category,
.menu-panel button.copy-tab {
  box-sizing: border-box;
  height: 2.25rem;
  padding: 0 0.7rem;
  border-radius: 4px;
  line-height: 1;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

/* ---------- EN-15 (1.1.0): the new colours ---------- */
/* Everyday buttons and links are Button Purple (Muzzle Lilac in dark mode); pointing darkens them to Deep Plum. */
button:not(:disabled):hover, .form-actions a:hover, a.button:hover { background-color: var(--accent-hover); }
button.secondary:hover, button.text:hover, button.danger:hover, button.icon-btn:hover, .mode-btn:hover,
button.refresh-icons:hover, .menu-panel button:hover, .file-menu button:hover, .category-header button:hover,
.nav-menu summary:hover, .auth-close:hover { background-color: transparent; }
.menu-panel button.save-changes:hover { background-color: var(--accent-hover); }
/* Save-type buttons that wait for a change: Cadmium Yellow once there's something to save; black with a lilac
   outline (and can't be clicked) while there's nothing to save yet. */
.save-type:not(:disabled), .settings-save button.save-type.is-pending,
.quick-actions .qf-done:not(.is-quiet) {
  background: var(--next-bg); color: var(--next-ink); border: 1px solid var(--next-bg); font-weight: 600;
}
.save-type:not(:disabled):hover, .quick-actions .qf-done:not(.is-quiet):hover { background: #e8b900; border-color: #e8b900; }
.save-type:disabled, .settings-save button.save-type:disabled, .quick-actions .qf-save:disabled,
.quick-actions .qf-done.is-quiet {
  background: var(--quiet-bg); color: var(--quiet-ink); border: 1px solid var(--quiet-ink); opacity: 1;
}
.save-type:disabled, .quick-actions .qf-save:disabled { cursor: not-allowed; }
.quick-actions .qf-done.is-quiet:hover { background: #2a2622; }
/* The Files setup's current step: its button is the next click. */
.files-step:not(.is-done):not(.is-locked) .files-step-body button:not(.text):not(.secondary) {
  background: var(--next-bg); color: var(--next-ink); border: 1px solid var(--next-bg); font-weight: 600;
}
/* Favorites star: Cadmium Yellow. */
.bookmark .icon-btn.fav-toggle.is-on, .fav-toggle.is-on, html.dark .fav-toggle.is-on,
html.dark .bookmark .icon-btn.fav-toggle.is-on { color: var(--cadmium-yellow); }
.fav-toggle.is-on svg path { stroke: #a88600; stroke-width: 0.6px; }
/* Ear Pink: small accents only, such as the counts on the menu bar (due reminders stay red). */
.topnav .nav-count { background: var(--ear-pink); color: var(--deep-plum); font-weight: 600; }
.topnav .nav-count.is-due { background: #c0392b; color: #fff; }
/* EN-53: filled red = new (Inbox) or due (Read later); grey outline = still waiting. */
.topnav .nav-count.is-new { background: #c0392b; color: #fff; }
.topnav .nav-count.is-quiet { background: transparent; color: #cfc8da; box-shadow: inset 0 0 0 1.5px #9b94a8; font-weight: 600; }
/* Information messages: a pale Lavender tint. */
.flash, .lc-notice { background: var(--info-bg); color: var(--ink); }
html.dark .flash { background: var(--info-bg); }
.privacy-notice { border-left-color: var(--hippo-purple); }
.tag-chip { background: var(--accent); color: var(--accent-ink); }
/* The × that takes a bookmark off the Favorites bar shares the star's "on" class; it stays grey, not yellow. */
.fav-remove.fav-toggle.is-on, html.dark .fav-remove.fav-toggle.is-on { color: var(--muted); }
.fav-remove.fav-toggle.is-on:hover { color: var(--ink); }
