/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *


 */

:root {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --border: rgba(148, 163, 184, 0.35);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --accent: #86efac;
  --danger: #fecaca;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1e293b 0, var(--bg) 42%);
  color: var(--text);
}

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

.site-shell {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
}

.site-shell:has(> .field-notes-content),
.site-shell:has(> .board-content) {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.site-header {
  flex: 0 0 auto;
}

.site-shell > main {
  flex: 1 1 auto;
  min-height: 0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.75);
}

.site-header > div,
.site-header nav {
  min-width: 0;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
}

.site-mobile-menu {
  display: none;
}

.site-mobile-menu-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.site-mobile-menu-summary::-webkit-details-marker {
  display: none;
}

.site-mobile-menu-summary::before {
  content: "☰";
}

.site-mobile-menu-drawer {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 12px;
  width: min(280px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.environment-pill {
  margin-left: 8px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
}

.content {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.card {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.hero-card { margin-bottom: 24px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2 { margin-top: 0; }

p { color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.auth-card {
  max-width: 460px;
  margin: 8vh auto 0;
}

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 6px;
}

label { font-weight: 700; }

input, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #020617;
  color: var(--text);
}

.button, input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #052e16;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
}

.flash {
  width: min(1040px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px 16px;
  border-radius: 14px;
}

.notice { background: rgba(134, 239, 172, 0.16); color: var(--accent); }
.alert { background: rgba(254, 202, 202, 0.16); color: var(--danger); }

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  outline-offset: 4px;
}

.table-scroll:focus-visible {
  outline: 2px solid var(--accent);
}

.table-scroll .data-table {
  min-width: 520px;
}

.data-table th, .data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.hint {
  margin: 0;
  font-size: 0.9rem;
}

.field-notes-content,
.board-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 0;
  padding: 0;
}

.field-notes-shell,
.board-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(1, 1, 2, 0.54);
}

.field-notes-sidebar,
.board-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.92);
}

.field-notes-sidebar-top,
.board-sidebar-top {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.field-notes-sidebar-header,
.field-note-header,
.field-summary-heading,
.board-sidebar-header,
.board-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.field-notes-sidebar-header h2,
.field-note-header h1,
.field-summary-heading h2,
.board-sidebar-header h2,
.board-chat-header h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

.field-note-header > div,
.board-chat-header > div {
  min-width: 0;
}

.current-title-disclosure {
  min-width: 0;
}

.current-title-disclosure summary {
  cursor: pointer;
  list-style: none;
}

.current-title-disclosure summary::-webkit-details-marker {
  display: none;
}

.current-title-disclosure summary::after {
  content: "Show full title";
  display: inline-flex;
  margin-top: 6px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.current-title-disclosure[open] summary::after {
  content: "Hide full title";
}

.current-title-full {
  margin: 10px 0 0;
  overflow-wrap: anywhere;
}

.field-note-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}

.field-note-header h1,
.board-chat-header h1 {
  overflow-wrap: anywhere;
}

.field-notes-overline,
.board-overline {
  margin: 0 0 6px;
  color: #8a8f98;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-toggle,
.icon-button,
.delete-chat-button,
.composer-send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.sidebar-toggle,
.icon-button {
  min-width: 40px;
  width: auto;
  height: 40px;
  gap: 8px;
  padding-inline: 12px;
  flex: 0 0 auto;
}

.sidebar-toggle-label {
  font-weight: 800;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible,
.icon-button:hover,
.icon-button:focus-visible,
.composer-send-button:hover,
.composer-send-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.danger-icon-button:hover,
.danger-icon-button:focus-visible {
  border-color: var(--danger);
  color: var(--danger);
}

.delete-chat-button {
  gap: 9px;
  width: auto;
  min-height: 40px;
  padding: 0 14px;
  color: #fecaca;
  font-size: 0.9rem;
  font-weight: 800;
}

.delete-chat-button:hover,
.delete-chat-button:focus-visible {
  background: rgba(248, 113, 113, 0.12);
}

.delete-chat-icon {
  font-size: 1rem;
}

.delete-chat-form {
  flex: 0 0 auto;
}

.icon-button-form {
  flex: 0 0 auto;
}

.new-chat-button,
.sidebar-settings-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.new-chat-button:hover,
.new-chat-button:focus-visible,
.sidebar-settings-link:hover,
.sidebar-settings-link:focus-visible,
.chat-history-item:hover,
.chat-history-item:focus-visible,
.chat-history-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.sidebar-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #8a8f98;
}

.sidebar-search input {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
}

.sidebar-search input::placeholder {
  color: #8a8f98;
}

.field-notes-sidebar-top form,
.board-sidebar-top form {
  min-width: 0;
}

.chat-history-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 12px 10px;
}

.chat-history {
  display: grid;
  gap: 6px;
}

.chat-history-item {
  display: block;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
}

.chat-history-item[hidden] {
  display: none;
}

.chat-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-sidebar-copy,
.empty-chat-copy {
  color: #8a8f98;
}

.field-notes-sidebar-footer,
.board-sidebar-footer {
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.96);
}

.board-sidebar-footer {
  display: grid;
  gap: 8px;
}

.field-notes-sidebar-footer p {
  margin: 0;
  color: #8a8f98;
  font-size: 0.82rem;
  line-height: 1.45;
}

.field-notes-workspace,
.board-workspace {
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  flex-direction: column;
  gap: 20px;
  padding: 28px clamp(28px, 4vw, 72px);
  background: radial-gradient(circle at top, rgba(94, 106, 210, 0.16), transparent 36%), rgba(8, 9, 10, 0.72);
}

.field-notes-empty-workspace,
.board-empty-workspace {
  align-items: center;
  justify-content: center;
}

.field-notes-welcome-panel,
.board-welcome-panel {
  width: min(1120px, 100%);
  text-align: center;
}

.field-notes-welcome-panel h1,
.board-welcome-panel h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  letter-spacing: -0.055em;
}

.field-note-message-list,
.message-list {
  display: grid;
  gap: 16px;
  margin: 4px auto 0;
  width: min(1180px, 100%);
  flex: 1 1 auto;
  align-content: start;
}

.field-note-message,
.message {
  max-width: 82%;
  overflow-wrap: anywhere;
}

.field-note-message strong,
.message strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.88rem;
}

.field-note-message p,
.message p {
  margin-top: 0;
}

.field-note-message ul,
.field-note-message ol,
.message ul,
.message ol {
  margin: 0.6rem 0 0.9rem 1.25rem;
  padding: 0;
}

.field-note-message li,
.message li {
  margin: 0.25rem 0;
  line-height: 1.55;
}

.field-note-message strong,
.message strong {
  font-weight: 800;
}

.field-note-message p:last-child,
.message p:last-child {
  margin-bottom: 0;
}

.field-note-message-user,
.message-user {
  justify-self: end;
  padding: 14px 16px;
  border-radius: 18px 18px 4px 18px;
  background: #2f3136;
}

.field-note-message-assistant,
.message-assistant {
  justify-self: start;
  padding: 2px 0;
}

.field-note-composer,
.chat-composer {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  min-width: 0;
  width: min(1180px, 100%);
  margin: auto auto 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(25, 26, 27, 0.96);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.36);
}

.field-notes-workspace .field-note-composer {
  position: relative;
  bottom: auto;
}

.field-note-composer {
  grid-template-columns: minmax(0, 1fr) auto;
}

.field-note-composer textarea,
.chat-composer textarea,
textarea {
  width: 100%;
  min-height: 54px;
  max-height: 220px;
  padding: 12px 6px;
  border: 0;
  background: transparent;
  color: var(--text);
  resize: vertical;
  outline: none;
}

.composer-send-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--text);
  color: #08090a;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}

.composer-button-icon {
  line-height: 1;
}

.composer-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(8, 9, 10, 0.24);
  border-top-color: #08090a;
  border-radius: 999px;
  animation: composer-spin 0.8s linear infinite;
}

.composer-send-button:disabled {
  cursor: wait;
  opacity: 1;
}

.field-note-composer.is-submitting,
.chat-composer.is-submitting {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 22px 70px rgba(0, 0, 0, 0.46);
}

.field-note-composer.is-submitting textarea,
.chat-composer.is-submitting textarea {
  color: #c9ccd3;
  cursor: wait;
}

.field-note-composer.is-submitting .composer-button-icon,
.chat-composer.is-submitting .composer-button-icon {
  display: none;
}

.field-note-composer.is-submitting .composer-spinner,
.chat-composer.is-submitting .composer-spinner,
.composer-send-button:disabled .composer-spinner {
  display: block;
}

.composer-loading-status {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d7dae1;
  font-size: 0.9rem;
  font-weight: 700;
}

.composer-loading-status[hidden] {
  display: none;
}

.composer-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #86efac;
  box-shadow: 0 0 0 rgba(134, 239, 172, 0.7);
  animation: composer-pulse 1.1s ease-in-out infinite;
}

@keyframes composer-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes composer-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(134, 239, 172, 0.7);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(134, 239, 172, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(134, 239, 172, 0);
  }
}

.composer-helper {
  grid-column: 1 / -1;
  margin: -2px 2px 0;
  color: #8a8f98;
  font-size: 0.86rem;
}

.field-summary-layout,
.field-composer-layout,
.field-summary-card,
.field-note-log {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.field-summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.field-composer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.field-summary-card,
.field-note-log {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.18);
}

.field-summary-layout .field-summary-card {
  width: 100%;
  margin-inline: 0;
}

.field-composer-layout .field-note-composer {
  width: 100%;
  margin: 0;
}

.field-summary-action-area {
  align-self: start;
  justify-self: end;
  padding-top: 8px;
}

.field-composer-action-area {
  align-self: start;
  justify-self: end;
  padding-top: 8px;
}

.field-note-log {
  background: rgba(255, 255, 255, 0.025);
}

.field-note-log h2 {
  margin-top: 0;
}

.field-summary-body {
  margin-top: 14px;
  color: #e5e7eb;
  line-height: 1.65;
}

.field-summary-body p:last-child {
  margin-bottom: 0;
}

.context-pill,
.owner-label,
.field-note-history-owner {
  color: #aeb4c1;
}

.context-pill {
  width: fit-content;
  margin: 0 auto 0 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
  font-weight: 750;
}

.context-pill span {
  color: var(--text);
}

.owner-label {
  margin: 8px 0 0;
  font-weight: 700;
}

.field-note-history-owner {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-summary-actions,
.composer-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.composer-actions {
  justify-content: flex-end;
}

.summary-navigation-button,
.copy-summary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.summary-navigation-button:hover,
.summary-navigation-button:focus-visible,
.copy-summary-button:hover,
.copy-summary-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

.field-summary-card.is-navigation-highlighted {
  border-color: rgba(134, 239, 172, 0.72);
  box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.14), 0 18px 70px rgba(0, 0, 0, 0.18);
}

.previous-generated-summaries {
  margin-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

.previous-generated-summaries summary {
  width: fit-content;
  color: #c9ccd3;
  cursor: pointer;
  font-weight: 800;
}

.previous-generated-summary-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.copy-summary-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.copy-feedback {
  color: #86efac;
  font-size: 0.82rem;
}

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

.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.sidebar-collapsed .field-notes-sidebar,
.sidebar-collapsed .board-sidebar {
  align-items: center;
}

.sidebar-collapsed .field-notes-sidebar-header h2,
.sidebar-collapsed .field-notes-overline,
.sidebar-collapsed .field-note-history-owner,
.sidebar-collapsed .board-sidebar-header h2,
.sidebar-collapsed .board-overline,
.sidebar-collapsed .sidebar-label,
.sidebar-collapsed .chat-title,
.sidebar-collapsed .empty-sidebar-copy,
.sidebar-collapsed .sidebar-search input {
  display: none;
}

.sidebar-collapsed .field-notes-sidebar-top,
.sidebar-collapsed .field-notes-sidebar-footer,
.sidebar-collapsed .board-sidebar-top,
.sidebar-collapsed .board-sidebar-footer {
  padding-inline: 14px;
}

.sidebar-collapsed .sidebar-search {
  display: flex;
  justify-content: center;
  padding: 11px 0;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-field input {
  width: auto;
}

@media (max-width: 800px), (max-width: 900px) and (max-height: 640px) {
  .site-header {
    position: relative;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    justify-content: space-between;
  }

  .site-header > div {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
  }

  .site-header > div strong {
    white-space: nowrap;
  }

  .site-header .site-nav-desktop {
    display: none;
  }

  .site-mobile-menu {
    position: relative;
    display: block;
  }

  .site-header .site-mobile-menu-drawer {
    display: grid;
    align-items: stretch;
    width: min(280px, calc(100vw - 24px));
    gap: 12px;
  }

  .environment-pill {
    margin-left: 0;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .page-heading > div {
    min-width: 0;
  }

  .page-heading .button {
    max-width: 100%;
    white-space: normal;
  }

  .field-notes-shell,
  .board-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
    min-height: 0;
  }

  .field-notes-sidebar,
  .board-sidebar {
    height: 100%;
    max-height: none;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .field-notes-sidebar-top,
  .board-sidebar-top {
    gap: 10px;
    padding: 14px;
  }

  .field-notes-sidebar-footer,
  .board-sidebar-footer {
    padding: 12px 14px;
  }

  .field-notes-workspace,
  .board-workspace {
    min-height: 0;
    padding: 20px;
  }

  .field-notes-empty-workspace,
  .board-empty-workspace {
    justify-content: flex-start;
  }

  .field-note-header,
  .board-chat-header {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .field-note-header h1 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .field-note-header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .field-note-add-note-button {
    width: 100%;
  }

  .delete-chat-button {
    min-width: 0;
  }

  .field-note-message,
  .message {
    max-width: 100%;
  }

  .field-summary-layout {
    grid-template-columns: 1fr;
  }

  .field-composer-layout {
    grid-template-columns: 1fr;
  }

  .field-summary-action-area {
    justify-self: stretch;
    padding-top: 0;
  }

  .field-composer-action-area {
    justify-self: stretch;
    padding-top: 0;
  }

  .field-summary-action-area .summary-navigation-button,
  .field-composer-action-area .summary-navigation-button {
    width: 100%;
  }

  .field-note-composer {
    grid-template-columns: 1fr;
  }

  .composer-actions {
    justify-content: space-between;
  }

  .field-notes-shell.sidebar-collapsed,
  .board-shell.sidebar-collapsed {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .sidebar-collapsed .field-notes-sidebar,
  .sidebar-collapsed .board-sidebar {
    height: auto;
    align-items: stretch;
  }

  .sidebar-collapsed .field-notes-sidebar,
  .sidebar-collapsed .board-sidebar {
    grid-template-rows: auto;
  }

  .sidebar-collapsed .chat-history-scroll,
  .sidebar-collapsed .sidebar-search,
  .sidebar-collapsed .board-sidebar-footer {
    display: none;
  }

  .sidebar-collapsed .field-notes-sidebar-top,
  .sidebar-collapsed .board-sidebar-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .sidebar-collapsed .field-notes-sidebar-header,
  .sidebar-collapsed .board-sidebar-header {
    grid-column: 1 / -1;
  }

  .sidebar-collapsed .new-chat-button .sidebar-label,
  .sidebar-collapsed .sidebar-toggle-label {
    display: inline;
  }

  .sidebar-collapsed .field-notes-sidebar-footer {
    display: none;
  }
}

@media (max-width: 800px), (max-width: 900px) and (max-height: 640px) {
  .site-header {
    gap: 16px;
    padding: 14px 20px;
  }

  .field-notes-sidebar-top,
  .board-sidebar-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .field-notes-sidebar-header,
  .board-sidebar-header {
    grid-column: 1 / -1;
  }

  .field-notes-sidebar-top form,
  .board-sidebar-top form,
  .sidebar-search {
    min-width: 0;
  }

  .new-chat-button,
  .sidebar-search,
  .sidebar-settings-link {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 0.9rem;
    line-height: 1.15;
  }

  .sidebar-settings-link .sidebar-label,
  .new-chat-button .sidebar-label {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .field-notes-sidebar-footer,
  .board-sidebar-footer {
    padding: 8px 10px;
  }

  .board-sidebar-footer {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .chat-history-scroll {
    padding: 8px;
  }

  .chat-history-item {
    padding: 9px 10px;
  }

  .field-notes-workspace,
  .board-workspace,
  .idea-shelf-workspace {
    gap: 12px;
    padding: 14px;
  }

  .field-notes-welcome-panel h1,
  .board-welcome-panel h1 {
    margin-bottom: 8px;
    font-size: clamp(1.65rem, 8vw, 2.4rem);
  }

  .field-notes-welcome-panel p,
  .board-welcome-panel p {
    margin-block: 8px;
  }

  .field-note-composer,
  .chat-composer,
  .idea-note-composer {
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
  }

  .field-note-composer textarea,
  .chat-composer textarea,
  .idea-note-composer textarea {
    min-height: 44px;
    padding: 8px 4px;
  }

  .composer-send-button {
    width: 40px;
    height: 40px;
  }
}

.idea-shelf-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.idea-shelf-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  height: calc(100vh - 73px);
  min-height: 640px;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(1, 1, 2, 0.54);
}

.idea-shelf-sidebar {
  display: grid;
  grid-template-rows: none;
  grid-auto-rows: max-content;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.94);
}

.idea-shelf-sidebar-top,
.idea-shelf-section {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 18px;
}

.idea-shelf-sidebar-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.idea-shelf-overline {
  margin: 0 0 6px;
  color: #8a8f98;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.idea-shelf-workspace {
  display: flex;
  min-height: 0;
  overflow-y: auto;
  flex-direction: column;
  gap: 20px;
  padding: 28px clamp(24px, 4vw, 72px);
  background: radial-gradient(circle at top, rgba(134, 239, 172, 0.12), transparent 34%), rgba(8, 9, 10, 0.72);
}

.idea-shelf-empty-workspace {
  align-items: center;
  justify-content: center;
}

.idea-shelf-welcome-panel,
.idea-owner-workspace,
.idea-read-only-publication {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.idea-shelf-category {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.idea-shelf-category summary {
  min-height: 36px;
  padding: 8px;
  cursor: pointer;
  font-weight: 700;
}

.idea-shelf-section > summary,
.idea-shelf-category > summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  cursor: pointer;
  list-style: none;
}

.idea-shelf-section > summary::-webkit-details-marker,
.idea-shelf-category > summary::-webkit-details-marker {
  display: none;
}

.idea-shelf-section > summary::before,
.idea-shelf-category > summary::before {
  content: "›";
  display: inline-block;
  flex: 0 0 1em;
  font-size: 1.2em;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 120ms ease;
}

.idea-shelf-section[open] > summary::before,
.idea-shelf-category[open] > summary::before {
  transform: rotate(90deg);
}

.idea-shelf-category h3,
.idea-shelf-section h2 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.idea-shelf-list,
.idea-raw-note-list {
  display: grid;
  gap: 8px;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  list-style: none;
}

.idea-shelf-disclosure-body,
.idea-shelf-idea-item,
.idea-shelf-archived-item,
.idea-shelf-shared-item {
  min-width: 0;
  max-width: 100%;
}

.idea-shelf-item-link,
.idea-shelf-idea-item,
.idea-shelf-archived-item,
.idea-shelf-shared-item {
  display: block;
}

.idea-shelf-idea-item[hidden],
.idea-shelf-shared-item[hidden] {
  display: none;
}

.idea-shelf-item-link {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
}

.idea-shelf-idea-item.is-active .idea-shelf-item-link,
.idea-shelf-shared-item.is-active .idea-shelf-item-link,
.idea-shelf-item-link:hover,
.idea-shelf-item-link:focus-visible {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.idea-shelf-item-title,
.idea-shelf-item-meta {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.idea-shelf-item-title {
  font-weight: 800;
  white-space: normal;
}

.idea-shelf-item-meta {
  color: #8a8f98;
  font-size: 0.84rem;
}

.idea-shelf-unread-count {
  color: #86efac;
  font-weight: 800;
}

.idea-shelf-unread-badge,
.idea-shelf-global-unread,
.idea-category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  font-weight: 900;
}

.idea-shelf-unread-badge,
.idea-shelf-global-unread {
  padding: 2px 8px;
  background: rgba(134, 239, 172, 0.16);
  color: #86efac;
  font-size: 0.78rem;
}

.idea-category-pill {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.idea-title-row,
.idea-summary-heading,
.idea-generated-edit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.idea-title-row h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.idea-summary-layout,
.idea-composer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  width: min(1180px, 100%);
  margin-inline: auto;
}

.idea-summary-card,
.idea-raw-notes-panel,
.idea-generated-history,
.idea-generated-edit-panel,
.idea-share-panel,
.idea-read-only-publication {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.18);
}

.idea-summary-content,
.idea-publication-summary,
.idea-raw-note-content,
.idea-generated-revision {
  color: #e5e7eb;
  line-height: 1.65;
}

.idea-summary-content ul,
.idea-publication-summary ul,
.idea-raw-note-content ul,
.idea-generated-revision ul {
  margin: 0.6rem 0 0.9rem 1.25rem;
  padding: 0;
}

.idea-note-composer {
  position: static;
  bottom: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(25, 26, 27, 0.96);
}

.idea-summary-action-area {
  align-self: start;
  justify-self: end;
  padding-top: 8px;
}

.idea-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.idea-shelf-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: #17191c;
  color: var(--text);
}

.idea-shelf-dialog::backdrop {
  background: rgba(2, 6, 23, 0.74);
}

.idea-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.idea-dialog-close {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.4rem;
  cursor: pointer;
}

.idea-raw-notes-panel > summary {
  cursor: pointer;
  font-weight: 800;
}

.idea-composer-action-area {
  align-self: start;
  justify-self: end;
  padding-top: 8px;
}

.idea-summary-card.is-navigation-highlighted {
  border-color: rgba(134, 239, 172, 0.72);
  box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.14), 0 18px 70px rgba(0, 0, 0, 0.18);
}

.idea-raw-note,
.idea-publication-decision,
.idea-generated-revision {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
}

.idea-raw-note-actions,
.idea-generated-edit-form {
  display: grid;
  gap: 12px;
}

.idea-stale-warning,
.idea-generated-edit-warning,
.idea-final-note-guidance {
  padding: 12px 14px;
  border: 1px solid rgba(254, 202, 202, 0.36);
  border-radius: 14px;
  background: rgba(254, 202, 202, 0.1);
  color: #fecaca;
}

.idea-publication-exports {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.idea-shelf-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.idea-shelf-action-button:hover,
.idea-shelf-action-button:focus-visible {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.idea-shelf-danger-button {
  color: #fecaca;
}

.idea-shared-count-badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(134, 239, 172, 0.14);
  color: #86efac;
  font-size: 0.85rem;
  font-weight: 900;
}

.idea-publication-boundary-copy,
.idea-publication-drift,
.idea-stale-publication-block {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.idea-publication-drift,
.idea-stale-publication-block {
  border-color: rgba(254, 240, 138, 0.34);
  background: rgba(254, 240, 138, 0.1);
  color: #fef08a;
}

.idea-publication-decision-options {
  display: grid;
  gap: 8px;
}

.idea-publication-decision-options label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.idea-publication-decision-options input[type="radio"] {
  width: auto;
}

.idea-archive-restore-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.idea-publication-view.idea-read-only-publication {
  max-width: 900px;
}

.idea-shelf-first-idea-form {
  display: grid;
  gap: 12px;
  text-align: left;
}

@media (max-width: 800px) {
  .content {
    width: min(1040px, calc(100% - 24px));
  }

  .field-notes-content,
  .board-content,
  .idea-shelf-content {
    width: 100%;
    max-width: none;
  }

  .idea-shelf-shell {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .idea-shelf-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .idea-shelf-workspace,
  .idea-owner-workspace,
  .idea-read-only-publication,
  .idea-summary-card,
  .idea-raw-notes-panel,
  .idea-generated-history,
  .idea-generated-edit-panel,
  .idea-share-panel {
    min-width: 0;
  }

  .idea-shelf-section > summary,
  .idea-shelf-category > summary,
  .idea-title-row,
  .idea-summary-heading,
  .idea-generated-edit-header,
  .idea-publication-exports {
    min-width: 0;
  }

  .idea-title-row h1,
  .idea-summary-heading h2,
  .idea-generated-edit-header h2,
  .idea-shelf-section h2,
  .idea-shelf-category h3 {
    overflow-wrap: anywhere;
  }

  .idea-shelf-section {
    flex: 0 0 auto;
  }

  .idea-shelf-workspace {
    min-height: 58vh;
    padding: 20px;
  }

  .idea-summary-layout,
  .idea-composer-layout {
    grid-template-columns: 1fr;
  }

  .idea-summary-action-area,
  .idea-composer-action-area {
    justify-self: stretch;
    padding-top: 0;
  }

  .idea-summary-action-area .summary-navigation-button,
  .idea-composer-action-area .summary-navigation-button {
    width: 100%;
  }

  .idea-title-row,
  .idea-summary-heading,
  .idea-generated-edit-header,
  .idea-publication-exports {
    align-items: stretch;
    flex-direction: column;
  }

  .idea-summary-actions {
    justify-content: flex-start;
  }

  .idea-summary-actions .idea-shelf-action-button {
    flex: 1 1 140px;
  }

  .idea-shelf-action-button,
  .summary-navigation-button,
  .copy-summary-button {
    max-width: 100%;
    white-space: normal;
  }
}

.idea-share-panel {
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.idea-shelf-unread-badge {
  border-radius: 999px;
}

.idea-shelf-unread-count {
  color: #86efac;
}

.idea-read-only-publication {
  max-width: 900px;
}

.idea-publication-exports {
  display: flex;
}
