/* Shared design ---------------------------------------------------------
   The same block opens styles.css in Hide-My-Email, inventory-serverless-aws
   and wiki-serverless-aws; change it in all three. Below it each project
   styles its own page with these variables only. */

:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --ink: #16181d;
  --muted: #5f6673;
  --line: #e1e4e9;
  --line-strong: #cbd0d8;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-ink: #ffffff;
  --accent-soft: #eef0fe;
  --accent-text: #4338ca;
  --danger: #c0262d;
  --danger-soft: #fdecec;
  --ok: #157347;
  --ok-soft: #e2f4e9;
  --warn: #855600;
  --warn-soft: #fdf3d7;
  --overlay: rgb(15 18 25 / 50%);
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 6%);
  --shadow-lg: 0 12px 32px rgb(16 24 40 / 14%), 0 2px 6px rgb(16 24 40 / 6%);
  --radius: 8px;
  --radius-lg: 12px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a20;
    --surface-2: #20242c;
    --ink: #e6e8ec;
    --muted: #9aa1ad;
    --line: #2a2f38;
    --line-strong: #3b414c;
    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --accent-ink: #11132b;
    --accent-soft: #23264a;
    --accent-text: #a5b4fc;
    --danger: #f2867f;
    --danger-soft: #3a1d1d;
    --ok: #63d394;
    --ok-soft: #14301f;
    --warn: #e8c060;
    --warn-soft: #332a10;
    --overlay: rgb(0 0 0 / 60%);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow-lg: 0 12px 32px rgb(0 0 0 / 50%);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.55; cursor: default; }

.hidden { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a { color: var(--accent-text); }

h1, h2, h3, h4 { font-weight: 650; line-height: 1.25; letter-spacing: -0.01em; }

/* Fields */

input:not([type=checkbox], [type=radio], [type=file]), textarea, select {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 10px;
}
input:not([type=checkbox], [type=radio], [type=file]), textarea { width: 100%; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:not([type=checkbox], [type=radio], [type=file]):focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
textarea { line-height: 1.5; resize: vertical; }

label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
form { display: grid; gap: 12px; }

.check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; color: var(--ink); }

/* Buttons */

/* Buttons without a class in a dialog look like .ghost. */
.primary, .ghost, .danger, .dialog button:not([class]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
}
.primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.ghost, .dialog button:not([class]) { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.ghost:hover:not(:disabled), .dialog button:not([class]):hover:not(:disabled) { background: var(--surface-2); }
.danger { background: transparent; border-color: var(--line-strong); color: var(--danger); }
.danger:hover:not(:disabled) { background: var(--danger-soft); border-color: var(--danger); }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  padding: 6px 8px;
  font-size: 14px;
}
.icon-button:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }

.link-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* A switch of views, e.g. list and photos. */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.seg button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 5px 12px;
  font-size: 14px;
  font-weight: 500;
}
.seg button:hover { color: var(--ink); }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Text */

.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.45; }
.mono { font-family: var(--mono); }
.error { color: var(--danger); min-height: 1.2em; margin: 0; font-size: 14px; }
.hint { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.lede { margin: 0; color: var(--muted); line-height: 1.5; }

.demo-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 14px;
  line-height: 1.45;
}

/* Top bar */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 8px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand strong { font-size: 16px; font-weight: 650; white-space: nowrap; }
.brand span { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who { color: var(--muted); font-size: 13px; }

/* Sign-in */

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.login-card {
  width: min(400px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.login-mark { width: 40px; height: 40px; }
.login-card h1 { margin: 0; font-size: 22px; }
.login-card h1 + .lede { margin-top: -10px; }
.login-card .primary { width: 100%; padding-block: 9px; }
.login-card > .link-button { justify-self: start; }
/* Room for an error only once there is one. */
.login-card .error:empty { display: none; }
.login-lang { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
.login-lang a { color: var(--muted); }
.login-lang select { margin-left: auto; }
.lang-select { width: auto; font-size: 13px; padding: 4px 8px; }

/* Dialogs */

.dialog-wrap {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--overlay);
}
.dialog, dialog.modal {
  width: min(440px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 20px 24px 24px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.dialog.wide { width: min(760px, 100%); }
dialog.modal::backdrop { background: var(--overlay); }
.dialog h2, .dialog h3 { margin: 0 0 8px; }
.dialog h2 { font-size: 18px; }
.dialog h3 { font-size: 15px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.dialog-head h2 { margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.dialog-actions.start { justify-content: flex-start; }

.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab {
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--accent); }

/* Settings */

.settings-body { display: grid; gap: 12px; }
.settings-body > p { margin: 0; }
.settings-body .lang-select { justify-self: start; min-width: 200px; font-size: 14px; padding: 7px 10px; }

fieldset.languages { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
fieldset.languages legend { font-weight: 600; margin-bottom: 8px; padding: 0; }

.totp-status, .totp-steps { margin: 0; }
.totp-steps { padding-left: 20px; display: grid; gap: 6px; }
.qr { display: block; width: 200px; height: 200px; border-radius: var(--radius); border: 1px solid var(--line); }
.totp-secret, .secret-note code {
  font-family: var(--mono);
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink);
  user-select: all;
  word-break: break-all;
}
.secret-note {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-size: 14px;
}
.secret-note p { margin: 0 0 6px; }
.secret-note p:last-child { margin: 0; }

.invite { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.invite input[type=email] { flex: 1; min-width: 220px; width: auto; }

.table-wrap { overflow-x: auto; }
table.users { border-collapse: collapse; width: 100%; font-size: 14px; }
table.users th, table.users td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: middle; }
table.users th { color: var(--muted); font-size: 13px; font-weight: 600; }
table.users tr.disabled td { color: var(--muted); }
.admin-toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 13px; font-weight: 400; }
.narrow-only { display: none; }
.user-actions, td.row-actions { white-space: nowrap; text-align: right; }
.dialog :is(.user-actions, td.row-actions) button { margin-left: 4px; padding: 3px 10px; font-size: 13px; }

@media (max-width: 640px) {
  table.users thead { display: none; }
  table.users tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.users td { border: 0; padding: 0; }
  .narrow-only { display: inline; }
  .user-actions, td.row-actions { grid-column: 1 / -1; text-align: left; white-space: normal; padding-top: 6px; }
  .dialog :is(.user-actions, td.row-actions) button { margin: 4px 4px 0 0; }
}

/* Badges */

.badge {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 500;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
p > .badge { margin-right: 6px; }

/* Settings → Version: the version and the releases that came after it */

.version-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 16px;
  margin: 0 0 12px;
  font-size: 14px;
}
.version-facts dt { color: var(--muted); }
.version-facts dd { margin: 0; overflow-wrap: anywhere; }
.releases { list-style: none; margin: 8px 0 0; padding: 0; }
.releases li { padding: 10px 0; border-top: 1px solid var(--line); }
.releases .muted { font-size: 13px; }
.release-notes { margin: 6px 0 0; white-space: pre-line; font-size: 13px; color: var(--muted); }

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 40;
  transform: translateX(-50%);
  max-width: min(520px, calc(100% - 32px));
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* End of the shared design ---------------------------------------------- */

/* Address book ------------------------------------------------------------ */

h1, h2, h3 { margin: 0 0 12px; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }

.app { min-height: 100vh; display: flex; flex-direction: column; }
.top .brand { margin-right: auto; }
.who { display: flex; gap: 4px; align-items: center; min-width: 0; }
.who span { margin-right: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px 24px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.note {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 14px;
}

.actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
.actions.start { justify-content: flex-start; }

/* The list on the left, the card on the right; a phone shows one of them. */
.panes {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 48px;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.list-pane {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 96px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.list-tools {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.list-tools .check { font-size: 13px; color: var(--muted); }
.list-actions { display: flex; gap: 8px; align-items: center; }
.list-actions .filter { flex: 1; min-width: 0; padding: 6px 8px; font-size: 14px; }
.list-actions .primary { padding: 6px 12px; }
.found { margin: 8px 12px 0; }
.empty { padding: 16px 12px; }
.empty p { margin: 0 0 12px; }

/* "More": import, export and the deleted cards. */
.menu { position: relative; }
.menu summary { list-style: none; font-size: 18px; line-height: 1; padding: 6px 10px; }
.menu summary::-webkit-details-marker { display: none; }
.menu-items {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 3;
  display: grid;
  min-width: 220px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.menu-items button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 8px 10px;
  text-align: left;
  font-size: 14px;
}
.menu-items button:hover { background: var(--surface-2); }

.contacts { list-style: none; margin: 0; padding: 4px 0; }
.contacts .letter {
  padding: 8px 14px 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.contact-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  margin: 0 4px;
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}
.contact-row:hover { background: var(--surface-2); }
.contact-row.active { background: var(--accent-soft); }
.row-main { display: grid; min-width: 0; }
.row-title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.star-mark { color: var(--warn); }
.history-found { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.history-found h3 { margin: 0 12px 4px; }
.history-found > p { margin: 0 12px; }

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--surface-2);
}
.avatar.small { width: 34px; height: 34px; }
.avatar.large { width: 88px; height: 88px; }
.avatar.initials {
  display: inline-grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 14px;
  user-select: none;
}
.avatar.initials.large { font-size: 32px; }

.placeholder { padding: 48px 16px; text-align: center; }
.back { display: none; justify-self: start; margin: -8px 0 0 -8px; }

/* A card. */
.card-head { display: flex; align-items: center; gap: 18px; }
.card-title h2 { margin: 0; font-size: 24px; overflow-wrap: anywhere; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.card-title p { margin: 4px 0 0; }
.star { font-size: 22px; padding: 2px 6px; color: var(--muted); }
.star.on { color: var(--warn); }
.card-section { border-top: 1px solid var(--line); padding-top: 12px; }
.card-section h3 { margin-bottom: 6px; }
.values {
  display: grid;
  grid-template-columns: minmax(110px, max-content) minmax(0, 1fr);
  gap: 6px 16px;
  margin: 0;
}
.values dt { color: var(--muted); font-size: 14px; }
.values dd { margin: 0; overflow-wrap: anywhere; display: grid; gap: 2px; justify-items: start; }
.address, .notes { white-space: pre-line; }
.notes { margin: 0; overflow-wrap: anywhere; }
.stamps { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  padding: 3px 12px;
  font-size: 13px;
}
.chip:hover { background: var(--surface-2); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.group-add { display: inline-flex; gap: 6px; align-items: center; }
.group-add input { width: 160px; padding: 4px 8px; font-size: 13px; }
.group-add .ghost { padding: 4px 10px; font-size: 13px; }

/* The editor. */
.editor { gap: 0; }
.edit-section { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.edit-section:first-child { border-top: 0; padding-top: 0; }
.edit-section h3 { margin: 0; }
.photo-edit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.fields .wide { grid-column: 1 / -1; }
.lists { display: grid; }
.list-rows { display: grid; gap: 8px; }
.list-row {
  display: grid;
  grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}
.row-label { display: grid; gap: 6px; }
.row-label select, .row-label input { width: 100%; padding: 7px 8px; font-size: 14px; }
.row-inputs { display: grid; gap: 6px; }
.address-row .row-inputs { grid-template-columns: 1fr 1fr; }
.address-row .row-inputs > :is(textarea, .row-more) { grid-column: 1 / -1; }
.row-more { display: flex; gap: 12px; flex-wrap: wrap; }
.remove { font-size: 20px; line-height: 1; padding: 6px 10px; }
.remove:hover:not(:disabled) { color: var(--danger); }
.add-row { justify-self: start; font-size: 14px; }
.add-field { justify-self: start; width: auto; }
.date-input { display: flex; gap: 6px; flex-wrap: wrap; }
.date-input .day { width: 72px; }
.date-input .year { width: 96px; }
.date-input select { width: auto; }
.sticky-actions {
  position: sticky;
  bottom: 0;
  margin: 0 -24px -24px;
  padding: 12px 24px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.sticky-actions .error { margin-right: auto; }

/* History: a version per row, its changes when opened. */
.revisions { list-style: none; margin: 0; padding: 0; }
.revisions > li { border-top: 1px solid var(--line); }
.revisions > li.highlight { background: var(--accent-soft); border-radius: var(--radius); }
.revisions details { padding: 10px 8px; }
.revisions summary { cursor: pointer; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; font-size: 14px; }
.revision-body { display: grid; gap: 12px; padding: 12px 0 4px; }
table.diff { border-collapse: collapse; width: 100%; font-size: 14px; }
table.diff th, table.diff td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
table.diff th { width: 30%; color: var(--muted); font-weight: 500; }
table.diff td { display: grid; gap: 4px; justify-items: start; }
table.diff del, table.diff ins { white-space: pre-line; border-radius: 4px; padding: 1px 6px; text-decoration: none; overflow-wrap: anywhere; }
table.diff del { background: var(--danger-soft); color: var(--danger); text-decoration: line-through; }
table.diff ins { background: var(--ok-soft); color: var(--ok); }

.deleted { list-style: none; margin: 0; padding: 0; }
.deleted li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.deleted .ghost, .deleted .danger { padding: 4px 10px; font-size: 13px; }

/* Dialogs: the head stays on top while the body scrolls. */
dialog.modal { width: min(560px, calc(100% - 24px)); padding: 0; }
.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-head .close { font-size: 20px; line-height: 1; padding: 2px 10px; }
.modal-body { display: grid; gap: 14px; padding: 18px 24px 24px; }
.modal-body p { margin: 0; }
.import-progress { display: grid; gap: 8px; }
.import-progress progress { width: 100%; accent-color: var(--accent); }
.errors { margin: 0; padding: 0 0 0 18px; font-size: 13px; color: var(--warn); }
.table-wrap { overflow-x: auto; }

/* Settings */
.settings-body p { margin: 0; }
fieldset.group { border: 1px solid var(--line); border-radius: var(--radius); margin: 0; padding: 10px 12px; display: grid; gap: 8px; }
fieldset.group legend { padding: 0 4px; font-size: 13px; font-weight: 500; color: var(--muted); }
.pair { display: grid; gap: 10px; }
.qr { width: auto; height: auto; justify-self: start; image-rendering: pixelated; }
.secret { font-size: 13px; letter-spacing: 0.05em; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .panes { grid-template-columns: minmax(0, 1fr); padding: 12px 12px 32px; }
  .list-pane { position: static; max-height: none; }
  .detail-open .list-pane { display: none; }
  .app:not(.detail-open) .detail-pane { display: none; }
  .back { display: inline-flex; }
  .card { padding: 16px; }
  .sticky-actions { margin: 0 -16px -16px; padding: 10px 16px; }
  .fields, .address-row .row-inputs { grid-template-columns: 1fr; }
  .list-row { grid-template-columns: minmax(0, 1fr) auto; }
  .list-row .row-label { grid-column: 1 / -1; grid-row: 1; }
  .list-row .row-inputs { grid-column: 1; }
  .values { grid-template-columns: minmax(0, 1fr); gap: 0 0; }
  .values dd { margin-bottom: 8px; }
  .card-head { gap: 12px; }
  .avatar.large { width: 64px; height: 64px; }
  .avatar.initials.large { font-size: 24px; }
  .top { flex-wrap: wrap; padding: 8px 14px; }
  .brand span, .who span { display: none; }
}

/* The sort beside "search the history", drafts, duplicates. */
.list-options { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.list-options .sort { width: auto; padding: 4px 8px; font-size: 13px; }
.draft-mark { margin-left: 6px; font-weight: 500; }
.new-draft { margin: 4px 4px 0; }
.dup-group { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.dup-group .contacts { padding: 0; }
.merge-preview { font-size: 14px; }
fieldset.group .check .avatar { margin: 0 2px; }
.list-options .check { flex: 1; min-width: 0; }
.list-options .sort { flex: none; }

/* Settings → Sync: the app passwords and how to set up each client. */
.howto summary { cursor: pointer; font-weight: 500; }
.howto ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; }
.invite input[type=text] { flex: 1; min-width: 200px; width: auto; }
.row-main .link-button { justify-self: start; text-align: left; }
