/*
 * MyNote — Linear Notion Workspace in the VerifyLangScore Paper & Ink Aesthetic
 * Warm parchment canvas, deep oxford ink, terracotta & sage accents, zero clutter.
 */

:root {
  --paper: 245 242 234;          /* #F5F2EA Warm parchment background */
  --surface: 255 253 249;        /* #FFFDF9 Crisp ivory surface */
  --surface-2: 238 234 224;      /* #EEEAE0 Quiet sidebar / recessed surface */
  --ink: 19 32 58;               /* #13203A Deep oxford ink */
  --ink-2: 60 71 96;             /* #3C4760 Secondary ink */
  --muted: 108 116 134;          /* #6C7486 Muted metadata ink */
  --line: 226 220 206;           /* #E2DCCE Subtle 1px divider */
  --line-2: 210 202 184;         /* #D2CAB8 Hover / active border */
  --accent: 194 59 20;           /* #C23B14 Warm terracotta */
  --accent-soft: 251 230 221;    /* #FBE6DD Soft terracotta pill */
  --ok: 36 120 90;               /* #24785A Sage green */
  --ok-soft: 225 242 234;        /* #E1F2EA Soft sage pill */
  --warn: 180 98 10;             /* #B4620A Amber */
  --warn-soft: 254 243 199;      /* #FEF3C7 Soft amber pill */
  --danger: 185 28 28;           /* #B91C1C Crimson */
  --danger-soft: 254 226 226;    /* #FEE2E2 Soft crimson pill */
  --info: 29 91 161;             /* #1D5BA1 Academic blue */
  --info-soft: 231 237 248;      /* #E7EDF8 Soft blue pill */
  --tile: 16 26 47;              /* #101A2F Brand badge */
  --tile-ink: 238 241 247;
  --shadow: 0 1px 2px rgba(19, 32, 58, 0.05), 0 12px 28px -12px rgba(19, 32, 58, 0.14);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Iowan Old Style", "Newsreader", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html[data-theme="dark"] {
  --paper: 15 18 26;
  --surface: 21 26 37;
  --surface-2: 12 15 22;
  --ink: 236 232 223;
  --ink-2: 190 195 206;
  --muted: 136 144 162;
  --line: 34 41 55;
  --line-2: 48 57 76;
  --accent: 255 106 61;
  --accent-soft: 58 28 19;
  --ok: 76 195 152;
  --ok-soft: 16 41 31;
  --warn: 245 158 11;
  --warn-soft: 69 42 10;
  --danger: 248 113 113;
  --danger-soft: 69 18 18;
  --info: 96 165 250;
  --info-soft: 23 34 56;
  --tile: 28 36 52;
  --tile-ink: 238 241 247;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 36px -16px rgba(0, 0, 0, 0.75);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: rgb(var(--paper));
  color: rgb(var(--ink));
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* App Shell with Collapsible Notion Sidebar */
.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.18s ease;
}

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

.app-shell.sidebar-collapsed .sidebar {
  width: 0;
  padding: 0;
  overflow: hidden;
  border-right: none;
  opacity: 0;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
}

/* Quiet Notion Sidebar */
.sidebar {
  background: rgb(var(--surface-2) / 0.75);
  border-right: 1px solid rgb(var(--line));
  padding: 0.85rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  user-select: none;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.45rem;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgb(var(--tile));
  color: rgb(var(--tile-ink));
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: rgb(var(--ink));
}

.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: rgb(var(--muted));
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  transition: background 0.12s ease, color 0.12s ease;
}

.icon-btn:hover {
  background: rgb(var(--line) / 0.55);
  color: rgb(var(--ink));
}

.nav-section-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(var(--muted));
  padding: 0 0.5rem;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav-item {
  width: 100%;
  border: none;
  background: transparent;
  color: rgb(var(--ink-2));
  padding: 0.36rem 0.5rem;
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s ease, color 0.1s ease;
}

.nav-item:hover {
  background: rgb(var(--line) / 0.5);
  color: rgb(var(--ink));
}

.nav-item.active {
  background: rgb(var(--surface));
  color: rgb(var(--ink));
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(19, 32, 58, 0.05);
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.12rem 0.5rem;
  border-radius: 6px;
  background: rgb(var(--surface-2));
  border: 1px solid rgb(var(--line));
  color: rgb(var(--ink-2));
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.pill.accent {
  background: rgb(var(--accent-soft));
  border-color: rgb(var(--accent) / 0.25);
  color: rgb(var(--accent));
}

.pill.ok {
  background: rgb(var(--ok-soft));
  border-color: rgb(var(--ok) / 0.25);
  color: rgb(var(--ok));
}

.pill.warn {
  background: rgb(var(--warn-soft));
  border-color: rgb(var(--warn) / 0.25);
  color: rgb(var(--warn));
}

.pill.info {
  background: rgb(var(--info-soft));
  border-color: rgb(var(--info) / 0.25);
  color: rgb(var(--info));
}

.kbd {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--line));
  color: rgb(var(--muted));
}

/* Main Linear Canvas */
.main-canvas {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: rgb(var(--paper));
}

.topbar {
  height: 46px;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgb(var(--paper) / 0.88);
  backdrop-filter: blur(8px);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: rgb(var(--muted));
}

.breadcrumbs strong {
  color: rgb(var(--ink));
  font-weight: 500;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.34rem 0.68rem;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface));
  color: rgb(var(--ink-2));
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn:hover {
  border-color: rgb(var(--line-2));
  color: rgb(var(--ink));
  background: rgb(var(--surface-2) / 0.6);
}

.btn-primary {
  background: rgb(var(--accent));
  border-color: rgb(var(--accent));
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.92;
  background: rgb(var(--accent));
  border-color: rgb(var(--accent));
  color: #fff;
}

.btn-soft {
  background: rgb(var(--accent-soft));
  border-color: rgb(var(--accent) / 0.25);
  color: rgb(var(--accent));
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
}

.btn-ghost:hover {
  background: rgb(var(--line) / 0.45);
  border-color: transparent;
}

/* Linear Document Column (Notion proportions) */
.content-wrap {
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding: 2.75rem 3rem 8rem;
  transition: max-width 0.18s ease;
}

.content-wrap.full-width {
  max-width: 1240px;
}

@media (max-width: 768px) {
  .content-wrap {
    padding: 1.75rem 1.25rem 6rem;
  }
}

/* Notion Page Header & Properties */
.notion-header {
  margin-bottom: 1.5rem;
}

.notion-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.6rem;
}

.notion-icon-input {
  width: 44px;
  height: 44px;
  font-size: 2rem;
  line-height: 1;
  text-align: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  margin-top: 0.1rem;
}

.notion-icon-input:hover {
  background: rgb(var(--line) / 0.45);
}

.notion-title-input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-serif);
  font-size: 2.45rem;
  font-weight: 600;
  color: rgb(var(--ink));
  line-height: 1.18;
  letter-spacing: -0.02em;
  outline: none;
}

.notion-title-input::placeholder {
  color: rgb(var(--muted) / 0.45);
}

/* Notion Metadata Properties Table */
.notion-props {
  margin-top: 0.5rem;
  padding: 0.55rem 0 0.85rem;
  border-bottom: 1px solid rgb(var(--line));
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.prop-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
  min-height: 30px;
  font-size: 0.82rem;
  border-radius: 6px;
  padding: 0.15rem 0.35rem;
}

.prop-row:hover {
  background: rgb(var(--line) / 0.28);
}

.prop-label {
  color: rgb(var(--muted));
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

.prop-value {
  color: rgb(var(--ink));
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.prop-inline-input,
.prop-inline-select {
  border: none;
  background: transparent;
  color: rgb(var(--ink));
  font-size: 0.82rem;
  font-family: var(--font-sans);
  padding: 0.15rem 0.35rem;
  border-radius: 5px;
  outline: none;
}

.prop-inline-input:hover,
.prop-inline-input:focus,
.prop-inline-select:hover {
  background: rgb(var(--surface));
}

.tag-input {
  border: 1px dashed rgb(var(--line-2));
  background: transparent;
  color: rgb(var(--ink));
  font-size: 0.74rem;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  width: 96px;
  outline: none;
}

.tag-input:focus {
  border-style: solid;
  border-color: rgb(var(--accent));
  background: rgb(var(--surface));
}

/* Seamless Linear Block Editor */
.blocks-container {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 1rem;
}

.block-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.18rem 0;
  border-radius: 6px;
}

.block-handle {
  position: absolute;
  left: -48px;
  top: 0.2rem;
  width: 44px;
  opacity: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  color: rgb(var(--muted));
  transition: opacity 0.12s ease;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .block-handle {
    position: static;
    width: auto;
    padding-top: 0.25rem;
  }
}

.block-row:hover .block-handle,
.block-row:focus-within .block-handle {
  opacity: 1;
}

.handle-btn {
  border: none;
  background: transparent;
  color: rgb(var(--muted));
  cursor: pointer;
  width: 20px;
  height: 22px;
  border-radius: 4px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.handle-btn:hover {
  background: rgb(var(--line) / 0.6);
  color: rgb(var(--ink));
}

.block-body {
  flex: 1;
  min-width: 0;
  position: relative;
}

.block-input {
  width: 100%;
  border: none;
  background: transparent;
  color: rgb(var(--ink));
  outline: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  resize: none;
  overflow: hidden;
  display: block;
}

.block-input::placeholder {
  color: rgb(var(--muted) / 0.42);
}

.block-row:focus-within .block-input::placeholder {
  color: rgb(var(--muted) / 0.72);
}

.block-h1 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0.85rem;
  margin-bottom: 0.15rem;
}

.block-h2 {
  font-family: var(--font-serif);
  font-size: 1.42rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 0.65rem;
  margin-bottom: 0.1rem;
}

.block-h3 {
  font-family: var(--font-serif);
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 0.45rem;
}

/* Inline Block Variants */
.block-todo-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.block-todo-wrap input[type="checkbox"] {
  margin-top: 0.36rem;
  width: 16px;
  height: 16px;
  accent-color: rgb(var(--ok));
  cursor: pointer;
  flex-shrink: 0;
}

.block-todo-wrap.done .block-input {
  text-decoration: line-through;
  color: rgb(var(--muted));
}

.block-bullet-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.bullet-marker {
  margin-top: 0.62rem;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgb(var(--ink));
  flex-shrink: 0;
}

.numbered-marker {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: rgb(var(--muted));
  margin-top: 0.18rem;
  min-width: 1.4rem;
}

.block-callout-box {
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--line));
  border-left: 3.5px solid rgb(var(--accent));
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  margin: 0.35rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.block-quote-box {
  border-left: 3px solid rgb(var(--ink-2));
  padding-left: 0.95rem;
  margin: 0.25rem 0;
}

.block-quote-box .block-input {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.08rem;
}

.block-code-box {
  background: rgb(var(--surface-2));
  border: 1px solid rgb(var(--line));
  border-radius: 9px;
  padding: 0.7rem 0.9rem;
  margin: 0.35rem 0;
}

.block-code-box .block-input {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.55;
}

.block-toggle-wrap {
  margin: 0.15rem 0;
}

.block-toggle-head {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.toggle-caret {
  border: none;
  background: transparent;
  color: rgb(var(--ink-2));
  cursor: pointer;
  width: 22px;
  height: 24px;
  border-radius: 5px;
  margin-top: 0.12rem;
  font-size: 0.78rem;
}

.toggle-caret:hover {
  background: rgb(var(--line) / 0.5);
}

.block-toggle-content {
  margin-left: 1.6rem;
  margin-top: 0.25rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgb(var(--line));
}

.block-divider-line {
  border: none;
  border-top: 1px solid rgb(var(--line));
  margin: 0.75rem 0;
}

/* Inline Kanban Block (Right inside the linear Notion page!) */
.inline-kanban-block {
  background: rgb(var(--surface) / 0.65);
  border: 1px solid rgb(var(--line));
  border-radius: 14px;
  padding: 1rem;
  margin: 0.65rem 0;
}

.inline-kanban-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgb(var(--line));
}

.inline-kanban-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  align-items: start;
}

.inline-kanban-col {
  background: rgb(var(--paper));
  border: 1px solid rgb(var(--line));
  border-radius: 10px;
  padding: 0.65rem;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.inline-kanban-col.drag-over {
  border-color: rgb(var(--accent));
  background: rgb(var(--accent-soft) / 0.35);
}

.inline-kanban-card {
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--line));
  border-radius: 9px;
  padding: 0.65rem 0.72rem;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(19, 32, 58, 0.04);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease, transform 0.12s ease;
}

.inline-kanban-card:hover {
  border-color: rgb(var(--line-2));
  box-shadow: 0 3px 10px -4px rgba(19, 32, 58, 0.12);
}

.inline-kanban-card.is-dragging {
  opacity: 0.45;
  transform: scale(0.98);
}

.inline-kanban-card.drag-over-card {
  border-top: 2.5px solid rgb(var(--accent));
}

.kanban-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.32rem;
}

.kanban-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.inline-kanban-card:hover .kanban-card-actions {
  opacity: 1;
}

.kanban-card-title {
  font-weight: 500;
  color: rgb(var(--ink));
  line-height: 1.4;
  word-break: break-word;
}

.kanban-card-title.is-done {
  text-decoration: line-through;
  color: rgb(var(--muted));
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.32rem;
  margin-top: 0.45rem;
  font-size: 0.7rem;
  color: rgb(var(--muted));
}

.prio-pill {
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.05rem 0.38rem;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.prio-urgent {
  background: rgb(var(--danger-soft));
  color: rgb(var(--danger));
}

.prio-high {
  background: rgb(var(--accent-soft));
  color: rgb(var(--accent));
}

.prio-medium {
  background: rgb(var(--info-soft));
  color: rgb(var(--info));
}

.prio-low {
  background: rgb(var(--surface-2));
  color: rgb(var(--muted));
}

.due-badge {
  font-size: 0.68rem;
  padding: 0.04rem 0.35rem;
  border-radius: 5px;
  background: rgb(var(--surface-2));
  color: rgb(var(--ink-2));
}

.due-badge.overdue {
  background: rgb(var(--danger-soft));
  color: rgb(var(--danger));
  font-weight: 600;
}

.kanban-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.kanban-filter-input {
  border: 1px solid rgb(var(--line));
  background: rgb(var(--paper));
  color: rgb(var(--ink));
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.76rem;
  width: 170px;
  outline: none;
}

.kanban-filter-input:focus {
  border-color: rgb(var(--accent));
}

.kanban-quick-add {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.45rem;
  border-radius: 8px;
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--accent) / 0.5);
}

.kanban-subtask-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.35rem;
  border-radius: 6px;
}

.kanban-subtask-row:hover {
  background: rgb(var(--paper));
}

.kanban-modal-panel {
  max-width: 640px;
  max-height: 88vh;
  overflow-y: auto;
}

/* Inline Table Block */
.inline-table-wrap {
  margin: 0.6rem 0;
  overflow-x: auto;
}

.inline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--line));
  border-radius: 8px;
  overflow: hidden;
}

.inline-table th,
.inline-table td {
  border: 1px solid rgb(var(--line));
  padding: 0.45rem 0.65rem;
  text-align: left;
}

.inline-table tr:first-child td {
  background: rgb(var(--surface-2) / 0.7);
  font-weight: 600;
}

.inline-table input {
  width: 100%;
  border: none;
  background: transparent;
  color: rgb(var(--ink));
  font-size: 0.86rem;
  outline: none;
}

/* Inline Active Recall Block */
.inline-recall-card {
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--line-2));
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin: 0.45rem 0;
}

.inline-recall-answer {
  margin-top: 0.55rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  background: rgb(var(--paper));
  border: 1px dashed rgb(var(--line-2));
}

/* Empty Page Notion Template Starters */
.empty-templates-area {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px dashed rgb(var(--line));
  color: rgb(var(--muted));
}

.template-starter-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
  max-width: 420px;
}

.template-starter-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.48rem 0.65rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: rgb(var(--ink-2));
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
}

.template-starter-btn:hover {
  background: rgb(var(--surface));
  border-color: rgb(var(--line));
  color: rgb(var(--ink));
}

/* Slash Command Menu */
.slash-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  width: 310px;
  max-height: 330px;
  overflow-y: auto;
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--line-2));
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0.35rem;
  z-index: 60;
}

.slash-menu-header {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(var(--muted));
  padding: 0.3rem 0.5rem 0.2rem;
}

.slash-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  color: rgb(var(--ink));
}

.slash-item:hover,
.slash-item.selected {
  background: rgb(var(--surface-2));
}

.slash-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgb(var(--paper));
  border: 1px solid rgb(var(--line));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.slash-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: rgb(var(--ink));
}

.slash-desc {
  font-size: 0.72rem;
  color: rgb(var(--muted));
}

/* Modals & Optional Full Views */
.vls-card {
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--line));
  border-radius: 14px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 16, 24, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 80;
}

.modal-panel {
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--line-2));
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.input-field {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgb(var(--line-2));
  background: rgb(var(--paper));
  color: rgb(var(--ink));
  font-size: 0.88rem;
  outline: none;
}

.input-field:focus {
  border-color: rgb(var(--accent));
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.rating-btn {
  padding: 0.55rem 0.45rem;
  border-radius: 9px;
  border: 1px solid rgb(var(--line-2));
  background: rgb(var(--surface-2));
  color: rgb(var(--ink));
  cursor: pointer;
  text-align: center;
}

.rating-btn:hover {
  border-color: rgb(var(--ink));
  background: rgb(var(--surface));
}

.rating-btn strong {
  display: block;
  font-size: 0.82rem;
}

.rating-btn span {
  font-size: 0.7rem;
  color: rgb(var(--muted));
  font-family: var(--font-mono);
}

/* Hierarchical Sidebar Page Tree & Inline Page Link Block */
.tree-row {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 7px;
  padding-right: 0.25rem;
}

.tree-row:hover {
  background: rgb(var(--line) / 0.5);
}

.tree-row.active {
  background: rgb(var(--surface));
  box-shadow: 0 1px 2px rgba(19, 32, 58, 0.05);
}

.tree-row .nav-item {
  flex: 1;
  min-width: 0;
  padding: 0.34rem 0.35rem;
  background: transparent !important;
  box-shadow: none !important;
}

.tree-toggle {
  width: 20px;
  height: 22px;
  border: none;
  background: transparent;
  color: rgb(var(--muted));
  cursor: pointer;
  border-radius: 5px;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tree-toggle:hover {
  background: rgb(var(--line) / 0.65);
  color: rgb(var(--ink));
}

.tree-add-child {
  opacity: 0;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: rgb(var(--muted));
  cursor: pointer;
  border-radius: 5px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tree-row:hover .tree-add-child {
  opacity: 1;
}

.tree-add-child:hover {
  background: rgb(var(--line) / 0.7);
  color: rgb(var(--ink));
}

.page-link-block {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface) / 0.7);
  color: rgb(var(--ink));
  font-size: 0.94rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  margin: 0.15rem 0;
  transition: all 0.12s ease;
}

.page-link-block:hover {
  background: rgb(var(--surface));
  border-color: rgb(var(--line-2));
}

.breadcrumb-link {
  border: none;
  background: transparent;
  color: rgb(var(--muted));
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 5px;
}

.breadcrumb-link:hover {
  background: rgb(var(--line) / 0.5);
  color: rgb(var(--ink));
}

/* Notion-style Bottom Click & Hover Add Zone */
.canvas-tail-zone {
  min-height: 220px;
  padding-top: 0.5rem;
  cursor: text;
}

.tail-add-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0;
  color: rgb(var(--muted));
  font-size: 0.86rem;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.canvas-tail-zone:hover .tail-add-row,
.tail-add-row:focus-within {
  opacity: 1;
}

.tail-add-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgb(var(--line));
  background: rgb(var(--surface));
  color: rgb(var(--ink-2));
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.12s ease;
}

.tail-add-btn:hover {
  border-color: rgb(var(--line-2));
  background: rgb(var(--surface-2));
  color: rgb(var(--ink));
}
