/* Notes Home — calm landing view for the Notes Studio (see notes-home.js). */
.notes-home {
  grid-column: 2 / -1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  padding: 40px clamp(20px, 4vw, 56px) 64px;
  background: var(--color-bg);
  color: var(--color-text);
}
.notes-home[hidden] {
  display: none !important;
}
.notes-home > * {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

.nh-hero {
  margin-bottom: 36px;
}
.nh-eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-muted);
}
.nh-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.nh-capture {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.nh-capture:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.nh-capture input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
}
.nh-capture input:focus {
  outline: none;
}
.nh-capture input::placeholder {
  color: var(--color-placeholder);
}

.nh-section {
  margin-bottom: 36px;
}
.nh-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-border-subtle);
}
.nh-section-head h2 {
  margin: 0;
  font-size: 18px;
}
.nh-link {
  border: 0;
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.nh-link:hover {
  text-decoration: underline;
}

/* Soft tints shared by start cards and folder avatars (readable in light and dark). */
.tint-rose { --tint: 244, 114, 182; }
.tint-amber { --tint: 245, 158, 11; }
.tint-sky { --tint: 56, 189, 248; }
.tint-mint { --tint: 52, 211, 153; }
.tint-violet { --tint: 167, 139, 250; }
.tint-sand { --tint: 214, 173, 120; }

.nh-start-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.nh-start-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(var(--tint), 0.35);
  border-radius: 16px;
  background: rgba(var(--tint), 0.12);
  color: var(--color-text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.nh-start-card:hover {
  transform: translateY(-2px);
  background: rgba(var(--tint), 0.18);
  box-shadow: var(--shadow-md);
}
.nh-start-card:focus-visible,
.nh-folder:focus-visible,
.nh-note-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.nh-start-icon {
  font-size: 30px;
  line-height: 1;
  margin-bottom: auto;
}
.nh-start-card strong {
  font-size: 15px;
}
.nh-start-text {
  font-size: 12.5px;
  color: var(--color-text-secondary);
}

.nh-folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px;
}
.nh-folder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  cursor: pointer;
  min-width: 0;
}
.nh-folder:hover {
  background: var(--color-surface-alt);
}
.nh-folder-avatar {
  display: grid;
  place-items: center;
  width: 84px;
  height: 72px;
  border-radius: 12px;
  background: rgba(var(--tint, 148, 163, 184), 0.18);
  color: rgb(var(--tint, 148, 163, 184));
  font-size: 32px;
  font-weight: 800;
}
.nh-folder-new .nh-folder-avatar {
  background: transparent;
  border: 2px dashed var(--color-border-strong);
  color: var(--color-muted);
  font-weight: 400;
}
.nh-folder-name {
  max-width: 100%;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nh-folder-count {
  font-size: 11.5px;
  color: var(--color-muted);
}

.nh-note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.nh-note-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
  color: var(--color-text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.nh-note-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}
.nh-note-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nh-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--color-surface-alt);
  color: var(--color-text-secondary);
}
.nh-badge-youtube {
  background: rgba(239, 68, 68, 0.14);
  color: #ef4444;
}
.nh-badge-article {
  background: var(--color-info-soft);
  color: var(--color-info-text);
}
.nh-pin {
  font-size: 12px;
}
.nh-note-title {
  font-size: 15px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nh-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  background: var(--color-surface-sunken);
}
.nh-excerpt {
  margin: 0;
  min-height: 60px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nh-note-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  font-size: 11.5px;
  color: var(--color-muted);
}
.nh-note-foot span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nh-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 16px;
  border: 1px dashed var(--color-border);
  border-radius: 14px;
  color: var(--color-text-secondary);
  text-align: center;
}
.nh-empty p {
  margin: 0;
}

/* The print-only title was also drawn on screen, so every note showed its title twice. */
#print-title {
  display: none;
}
@media print {
  #print-title {
    display: block;
  }
  .notes-home {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .notes-home {
    grid-column: 1 / -1;
    padding: 24px 16px 48px;
  }
  .nh-capture {
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nh-start-card,
  .nh-note-card {
    transition: none;
  }
  .nh-start-card:hover,
  .nh-note-card:hover {
    transform: none;
  }
}

/* The workspace styles centre button content; cards here are read left to right. */
.notes-home .nh-note-card,
.notes-home .nh-start-card {
  text-align: left;
  justify-content: flex-start;
  align-items: stretch;
}
.notes-home .nh-start-card {
  align-items: flex-start;
}
.notes-home .nh-note-card > * {
  text-align: left;
}
.notes-home .nh-start-card,
.notes-home .nh-note-card,
.notes-home .nh-folder {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Stop-sharing only appears while a screen share is running (note-tools.js toggles .is-sharing). */
#capture-stop-sharing:not(.is-sharing) {
  display: none;
}
/* Metadata-only organisation preview; uses the same folders as the desktop studio. */
.nh-organize-dialog { width:min(580px,calc(100vw - 40px));max-height:80vh;overflow:auto;box-sizing:border-box;padding:22px;border:1px solid var(--color-border,#cbd5e1);border-radius:14px;background:var(--color-surface,#fff);color:var(--color-text,#172033);font-family:inherit; }
.nh-organize-dialog::backdrop { background:#0007; }
.nh-organize-dialog h2 { font-size:18px;margin:0 0 8px; }
.nh-organize-dialog p { font-size:13px;line-height:1.5; }
.nh-organize-proposals { display:grid;gap:8px;max-height:48vh;overflow:auto; }
.nh-organize-proposal { display:flex;gap:10px;align-items:flex-start;padding:10px;border:1px solid var(--color-border,#cbd5e1);border-radius:8px; }
.nh-organize-proposal span { display:grid;gap:5px;overflow-wrap:anywhere;min-width:0; }
.nh-organize-proposal strong { font-size:13px; }
.nh-organize-proposal small { font-size:12px;opacity:.8; }
.nh-organize-actions { display:flex;gap:8px;justify-content:flex-end;margin-top:14px; }
.nh-organize-error { color:#dc2626; }
