:root {
  --navy: #0b1f3a;
  --navy-mid: #153056;
  --blue: #4da3ff;
  --blue-soft: #a8d4ff;
  --blue-wash: #e8f3ff;
  --white: #ffffff;
  --off: #f7fafc;
  --ink: #0b1f3a;
  --muted: #5a6b7d;
  --line: #d7e3f0;
  --text-navy: #0b1f3a;
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --navy: #f4f8fc;
  --navy-mid: #d6e8f8;
  --blue: #9fd4ff;
  --blue-soft: #b9dcff;
  --blue-wash: #14365f;
  --white: #0e2c57;
  --off: #071a33;
  --ink: #f4f8fc;
  --muted: #d6e8f8;
  --line: #7eafd4;
  --text-navy: #f4f8fc;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background: var(--off);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
}

.top,
.sheet {
  padding: 1.1rem 1.25rem;
}

.top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.brand,
.company,
.quiet,
.item p,
.package,
.tagline,
.welcome p,
.empty-home p,
.empty-project p {
  margin: 0;
}

.brand {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.company {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.tagline {
  color: var(--navy-mid);
  font-size: 1rem;
  font-weight: 700;
}

.account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.account .quiet {
  font-size: 0.875rem;
}

.note-form,
.project-ask {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.project-ask {
  flex-direction: column;
  align-items: flex-start;
}

.project-ask textarea {
  width: 100%;
  min-height: 4.5rem;
  box-sizing: border-box;
}

.source-map,
.source-graph,
.source-graph-canvas {
  width: 100%;
  max-width: 100%;
}

.source-graph {
  overflow: hidden;
}

.source-graph-canvas {
  position: relative;
  overflow: hidden;
}

.source-graph svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.source-graph line[data-relation="topic"] {
  stroke: var(--navy);
  stroke-width: 2;
}

.source-graph line[data-relation="support"] {
  stroke: var(--blue);
  stroke-width: 2;
}

.source-graph line[data-relation="conflict"] {
  stroke: var(--navy-mid);
  stroke-width: 2;
  stroke-dasharray: 6 4;
}

.map-node,
.map-edge,
.map-list-node,
.map-list-edge {
  max-width: 46%;
  min-height: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 2px solid var(--navy);
  border-radius: 0.65rem;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.map-node,
.map-edge {
  position: absolute;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.map-edge[data-relation="conflict"] {
  border-style: dashed;
}

.map-list-node,
.map-list-edge {
  max-width: 100%;
  white-space: normal;
  text-align: left;
}

.source-map-detail,
.source-map-list,
.gap-finder,
.gap-suggestion {
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.gap-suggestion a,
.quiz,
.quiz-card {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.gap-suggestion a {
  display: block;
}

.search-scope {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0 0.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.project-kicker {
  margin: 0 0 0.3rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stash-search input[type="search"] {
  width: 100%;
  min-height: 2.6rem;
  margin: 0.8rem 0 0.4rem;
  padding: 0.4rem 0.7rem;
  border: 2px solid var(--line);
  border-radius: 0.55rem;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.45rem;
}

.tag,
.tag-add input {
  min-height: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
}

.tag {
  padding: 0 0.55rem;
  cursor: pointer;
}

.tag-add input {
  width: 7.5rem;
  padding: 0.15rem 0.55rem;
}

.source-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.source-form input {
  min-height: 2.4rem;
  min-width: 8rem;
  padding: 0.35rem 0.6rem;
  border: 2px solid var(--line);
  border-radius: 0.55rem;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.note-form input {
  min-height: 2.5rem;
  min-width: 10rem;
  padding: 0.4rem 0.65rem;
  border: 2px solid var(--line);
  border-radius: 0.55rem;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.layout {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 5.5rem);
}

.sidebar {
  width: 16.5rem;
  flex: 0 0 16.5rem;
  padding: 1rem 0.85rem;
  border-right: 1px solid var(--line);
  background: var(--white);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.sidebar h2,
.sheet h1 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.projects button {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.4rem 0.6rem;
  border: 3px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.projects button[aria-current="true"] {
  border-color: var(--navy);
  background: var(--blue-wash);
}

.projects button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.kind {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 1.5rem 1.5rem 2rem;
}

.project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.project-tools,
.confirm-line,
.item-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.confirm-line,
.item-tools {
  margin-top: 0.65rem;
}

.project-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
}

.project-about {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-weight: 600;
}

.project-rule {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0.75rem 0 1.25rem;
}

.item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.quote {
  margin: 0.35rem 0 0;
  font-size: 1.0625rem;
  font-weight: 600;
}

.source {
  margin: 0.35rem 0 0;
  font-weight: 600;
}

.source a,
.privacy a {
  color: var(--navy-mid);
  font-weight: 700;
}

.cite {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.package-actions,
.export {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.75rem;
}

.export {
  margin-top: 0.35rem;
}

#share-panel {
  margin-top: 0.75rem;
  padding: 1rem;
  border: 2px solid var(--navy);
  background: var(--white);
  max-width: 40rem;
}

#share-panel h2,
#share-warning,
#share-preview p {
  margin: 0 0 0.65rem;
}

#share-link input {
  width: 100%;
  min-height: 3rem;
}

#export-note {
  flex-basis: 100%;
  margin: 0;
  max-width: 40rem;
}

.btn {
  min-height: 3rem;
  padding: 0 1rem;
  border: 2px solid var(--navy);
  border-radius: 0.65rem;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}

.btn.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  min-height: 2.25rem;
  padding: 0 0.75rem;
  font-size: 0.9rem;
}

.btn[hidden],
#copy-status[hidden],
#export-status[hidden],
#bibliography[hidden],
#export[hidden],
.package[hidden],
.tour[hidden],
.tour button[hidden],
.welcome[hidden],
.modal[hidden],
#citation-wrap[hidden],
#project-type-fields[hidden],
#project-kind[hidden] {
  display: none !important;
}

.find-connect {
  margin: 0.75rem 1.25rem 0;
  padding: 0.9rem 1rem;
  border: 2px solid var(--blue);
  border-radius: 0.75rem;
  background: var(--white);
}

.find-connect h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.find-connect p {
  margin: 0 0 0.75rem;
}

.report-bar {
  padding: 0.75rem 1.25rem 1.25rem;
}

.report {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
  margin: 0;
}

.report a {
  color: var(--muted);
  font-weight: 700;
}

#report-address {
  color: var(--ink);
  font-weight: 600;
}

.report a:focus-visible,
#report-copy:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

#report-status[hidden],
#report-note[hidden] {
  display: none;
}

.tour-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.tour-help:focus-visible,
.tour:focus-visible,
.tour button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.tour {
  margin: 0.75rem 1.25rem 0;
  padding: 0.9rem 1rem;
  border: 2px solid var(--blue);
  border-radius: 0.75rem;
  background: var(--white);
  color: var(--ink);
  transition: none;
  animation: none;
}

.tour-kicker {
  margin: 0 0 0.25rem;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tour h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.tour p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.tour-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.tour button {
  min-height: 2.25rem;
  padding: 0 0.75rem;
  border: 2px solid var(--navy);
  border-radius: 0.45rem;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tour .tour-primary {
  background: var(--navy);
  color: var(--white);
}

.tour .tour-skip {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
}

.package {
  margin-top: 1rem;
  padding: 1rem;
  border: 2px solid var(--blue);
  border-radius: 0.65rem;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.quiet {
  color: var(--muted);
  font-weight: 600;
}

.empty-home,
.empty-project,
.welcome-card,
.modal-card {
  max-width: 36rem;
}

.empty-home,
.empty-project {
  padding: 1.5rem 0;
}

.empty-kicker,
.welcome-kicker {
  margin: 0 0 0.4rem;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-title,
.welcome-card h1,
.empty-project h3 {
  margin: 0 0 0.6rem;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.empty-lead,
.welcome-lead,
.empty-project p {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 600;
}

.empty-actions,
.welcome-actions,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.empty-tips {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--white);
  color: var(--muted);
  font-weight: 600;
}

.welcome {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  padding: 1rem;
  overflow: auto;
  background: rgba(11, 31, 58, 0.28);
  backdrop-filter: blur(6px);
}

.welcome-card {
  width: min(100%, 34rem);
  margin: auto;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--white);
  box-shadow: 0 12px 40px rgba(11, 31, 58, 0.08);
}

.welcome-steps {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-weight: 600;
}

.welcome-steps li + li {
  margin-top: 0.45rem;
}

.welcome-foot {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.welcome-dismiss {
  display: block;
  margin: 1rem auto 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  padding: 1rem;
  overflow: auto;
  background: rgba(11, 31, 58, 0.28);
}

.modal-card {
  width: min(100%, 28rem);
  margin: auto;
  display: grid;
  gap: 0.85rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--white);
}

.modal-card h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: -0.02em;
}

.modal-card label,
.modal-card fieldset {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-weight: 700;
}

.modal-card .inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 1rem;
}

.modal-card input[type="text"],
.modal-card select {
  min-height: 2.75rem;
  padding: 0.45rem 0.7rem;
  border: 2px solid var(--line);
  border-radius: 0.55rem;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}

.privacy h1,
.privacy h2,
.privacy h3 {
  text-transform: none;
  letter-spacing: 0;
}

.privacy h1 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
}

.privacy h2 {
  margin: 1.25rem 0 0.4rem;
  font-size: 1.05rem;
}

.privacy h3 {
  margin: 0.9rem 0 0.3rem;
  font-size: 1rem;
}

.privacy p,
.privacy li {
  margin: 0.4rem 0;
}

.privacy ul {
  margin: 0.35rem 0 0.6rem;
  padding-left: 1.2rem;
}

.privacy .meta {
  color: var(--muted);
}

.theme {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.theme select {
  min-height: 2.5rem;
  border: 2px solid var(--line);
  border-radius: 0.45rem;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.sheet {
  padding: 1.1rem 1.25rem;
}

@media (max-width: 720px) {
  .top {
    flex-direction: row;
    align-items: center;
  }

  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: auto;
    flex-basis: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .empty-title,
  .welcome-card h1 {
    font-size: 1.6rem;
  }
}

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

  .welcome {
    backdrop-filter: none;
  }
}

.top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  padding: 0 8px;
  overflow: visible;
}

.brand {
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
}

.brand-lockup,
.account {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.account {
  margin-left: auto;
}

.tagline,
.account > .quiet {
  display: none;
}

.usage-pill {
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f1fb;
  color: #0b2545;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

html[data-theme="dark"] .usage-pill {
  background: #14365f;
  color: #f4f8fc;
}

.btn,
.icon-btn,
.menu-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0b2545;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  padding: 0 14px;
}

.btn.primary {
  background: #0b2545;
  color: #ffffff;
}

.btn.ghost:hover,
.icon-btn:hover,
.menu-item:hover {
  background: #e8f1fb;
}

html[data-theme="dark"] .btn,
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .menu-item {
  color: #f4f8fc;
}

html[data-theme="dark"] .btn.primary {
  background: #f4f8fc;
  color: #071a33;
}

.menu {
  position: absolute;
  z-index: 5;
  min-width: 180px;
  margin-top: 4px;
  padding: 8px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(11, 37, 69, 0.14);
}

html[data-theme="dark"] .menu {
  background: #0e2c57;
}

.menu-item {
  display: flex;
  width: 100%;
  text-align: left;
}

.menu-item.danger,
.danger {
  color: #b42318;
}

.menu-note {
  display: block;
  color: #5b6b80;
  font-size: 12px;
  font-weight: 500;
}

.menu-wrap,
.account,
.action-bar {
  position: relative;
}

.item {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 0 0 12px;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(11, 37, 69, 0.06), 0 1px 3px rgba(11, 37, 69, 0.08);
}

.item-body {
  flex: 1;
  min-width: 0;
}

html[data-theme="dark"] .item {
  background: #0e2c57;
}

.item-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.item-note,
.cite,
.source-link {
  margin: 4px 0 0;
  color: #5b6b80;
  font-size: 14px;
  line-height: 22px;
}

.tag,
.add-tag {
  border: 0;
  border-radius: 999px;
  background: #e8f1fb;
  color: #0b2545;
}

.project-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  background: var(--off);
}

.action-bar .menu {
  top: auto;
  right: 0;
  bottom: calc(100% + 4px);
  left: auto;
  max-width: calc(100vw - 24px);
}

.lock {
  margin-left: 6px;
}

/* The project sidebar stays on the left edge. Only the reading area is capped. */
.layout {
  max-width: none;
  margin: 0;
}

.main {
  max-width: 860px;
}

body {
  overflow-x: hidden;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid #2f6fd1;
  outline-offset: 2px;
}

input,
select,
textarea {
  font-size: 16px;
}

.sheet-modal {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: flex-end;
  background: rgba(11, 37, 69, 0.4);
}

.sheet-card {
  width: 100%;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 12px 12px 0 0;
  background: #ffffff;
}

html[data-theme="dark"] .sheet-card {
  background: #0e2c57;
}

.mobile-add {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 3;
}

#projects-toggle {
  display: none;
}

@media (max-width: 767px) {
  .top,
  .brand-lockup,
  .account {
    flex-wrap: nowrap;
  }

  .action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-top: 1px solid #e3eaf2;
  }

  html[data-theme="dark"] .action-bar {
    background: #071a33;
  }

  .main {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .mobile-add {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .icon-btn,
  .tag,
  .add-tag,
  .drag-handle,
  .tour-help,
  .menu-item,
  #projects-toggle,
  #settings-toggle,
  #export-toggle,
  #generate,
  #share-project {
    min-width: 44px;
    min-height: 44px;
  }

  .sidebar {
    display: none;
    position: fixed;
    z-index: 5;
    inset: 56px auto 0 0;
    width: min(280px, 100%);
    padding: 16px;
    background: #f7fafc;
  }

  html[data-theme="dark"] .sidebar {
    background: #071a33;
  }

  body.drawer-open .sidebar {
    display: block;
  }

  #projects-toggle {
    display: inline-flex;
  }

  .btn,
  .icon-btn,
  .menu-item {
    min-height: 44px;
  }
}

@media (min-width: 768px) {
  .mobile-add {
    display: none;
  }

  .btn,
  .icon-btn {
    min-height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .item,
  .btn,
  .menu {
    transition: none;
  }
}

[hidden] {
  display: none !important;
}

.projects button[aria-current="true"] {
  border: 0;
  background: #e8f1fb;
  box-shadow: none;
}

header.top,
header.top .account,
header.top .brand-lockup {
  flex-wrap: nowrap !important;
}

header.top .account {
  margin-left: auto;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.account-plan {
  margin: 0;
  color: #0b2545;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.lock {
  display: inline-block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  background: #e8f1fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230b2545' d='M7 10V8a5 5 0 0 1 10 0v2h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h1zm2 0h6V8a3 3 0 0 0-6 0v2z'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
}

.action-bar .btn {
  gap: 6px;
  white-space: nowrap;
}

#add-open {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  padding: 0;
  border-radius: 999px;
}

.undo-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #0b2545;
  color: #ffffff;
}

.undo-toast p {
  margin: 0;
}

.undo-toast button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  color: #0b2545;
  font-weight: 600;
}

.trash-panel {
  margin: 16px;
}
