:root {
  --width: 720px;
  --font-main: Verdana, sans-serif;
  --font-secondary: Verdana, sans-serif;
  --font-scale: 1em;
  --background-color: #fff;
  --heading-color: #222;
  --text-color: #444;
  --link-color: #3273dc;
  --visited-color: #8b6fcb;
  --code-background-color: #f2f2f2;
  --code-color: #222;
  --blockquote-color: #222;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #01242e;
    --heading-color: #eee;
    --text-color: #ddd;
    --link-color: #8cc2dd;
    --visited-color: #8b6fcb;
    --code-background-color: #000;
    --code-color: #ddd;
    --blockquote-color: #ccc;
  }
}

body {
  font-family: var(--font-secondary);
  font-size: var(--font-scale);
  margin: auto;
  padding: 20px;
  max-width: var(--width);
  text-align: left;
  background-color: var(--background-color);
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
  color: var(--text-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-main);
  color: var(--heading-color);
}

a {
  color: var(--link-color);
  cursor: pointer;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

nav a {
  margin-right: 8px;
  vertical-align: middle;
}

strong,
b {
  color: var(--heading-color);
}

button {
  margin: 0;
  cursor: pointer;
}

time {
  font-family: monospace;
  font-style: normal;
  font-size: 15px;
}

main {
  line-height: 1.6;
}

table {
  width: 100%;
}

hr {
  border: 0;
  border-top: 1px dashed;
}

img {
  max-width: 100%;
}

code {
  font-family: monospace;
  padding: 2px;
  background-color: var(--code-background-color);
  color: var(--code-color);
  border-radius: 3px;
}

blockquote {
  border-left: 1px solid #999;
  color: var(--code-color);
  padding-left: 20px;
  font-style: italic;
}

footer {
  padding: 25px 0;
  text-align: center;
}

.title:hover {
  text-decoration: none;
}

.title h1 {
  font-size: 1.5em;
}

.inline {
  width: auto !important;
}

.highlight,
.code {
  padding: 1px 15px;
  background-color: var(--code-background-color);
  color: var(--code-color);
  border-radius: 3px;
  margin-block-start: 1em;
  margin-block-end: 1em;
  overflow-x: auto;
}


ul.blog-posts {
  list-style-type: none;
  padding: unset;
}

ul.blog-posts li {
  display: flex;
}

ul.blog-posts li span {
  flex: 0 0 130px;
}

ul.blog-posts li a:visited {
  color: var(--visited-color);
}

/* Nav "+ New"/"View" dropdowns — plain <details>/<summary>; base.html
   adds a small amount of JS on top (outside-click dismiss, and opening
   one closes the other) since native <details> doesn't do either on
   its own. The menu is lifted out of normal flow (position: absolute)
   so opening the dropdown doesn't reflow "About" and the rest of the
   nav — same idea as editor.html's #asset-dropdown. Only ever rendered
   inside {{ if .IsAuth }} (base.html) — anonymous visitors never see
   either exists, Logout included. */
.nav-admin {
  display: inline-block;
  position: relative;
  vertical-align: middle;
  margin-right: 8px;
}

.nav-admin summary {
  cursor: pointer;
  color: var(--link-color);
  list-style: none;
}

.nav-admin summary::-webkit-details-marker {
  display: none;
}

.nav-admin[open] summary {
  text-decoration: underline;
}

.nav-admin-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  background-color: var(--background-color);
  border: 1px solid var(--heading-color);
  border-radius: 4px;
  overflow: hidden;
}

.nav-admin-menu a {
  display: block;
  white-space: nowrap;
  padding: 4px 10px;
}

/* Separates the plain "view" entries above from Logout below, inside
   the "View" dropdown (report 0043 §2 split "Admin" into "+ New" and
   "View" — Logout stays with View, still its own separated section). */
.nav-admin-divider {
  border: none;
  border-top: 1px solid var(--heading-color);
  margin: 4px 0;
}

/* Logout is a POST form (state-changing — see report 0013/0014's
   bookmark-GET finding, deliberately not repeating that shape here),
   styled to read as just another dropdown row rather than a button. */
.nav-logout-form {
  display: block;
}

.nav-logout-form button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  color: var(--link-color);
  border: none;
  border-radius: 0;
  padding: 4px 10px;
  font-size: 1em;
  font-weight: normal;
  cursor: pointer;
}

.nav-logout-form button:hover {
  text-decoration: underline;
  opacity: 1;
}

/* Error page — same bordered-box language as the rest of the app
   (.field-hint/.schedule-preview/#asset-dropdown all use
   var(--code-background-color) + a var(--heading-color) border), with a
   left accent stripe in the same muted red kanban's priority-donow
   already uses (#c0392b) so "something went wrong" reads clearly
   without introducing a jarring, off-palette red block. */
.error-box {
  background-color: var(--code-background-color);
  border: 1px solid var(--heading-color);
  border-left: 4px solid #c0392b;
  border-radius: 4px;
  padding: 12px 15px;
  margin: 1rem 0;
}

.error-box-label {
  color: #c0392b;
}

.error-box p {
  margin: 6px 0 0;
  color: var(--text-color);
}

/* editor css section */

/* Base Form Control Uniformity */
button, input[type="file"], textarea {
  font-family: var(--font-secondary);
  color: var(--text-color);
  background-color: var(--code-background-color);
  border: 1px solid var(--heading-color);
  border-radius: 3px;
  padding: 6px 12px;
  box-sizing: border-box;
  font-size: 1em;
}

button {
  background-color: var(--heading-color);
  color: var(--background-color);
  width: auto;
}

button:hover {
  opacity: 0.9;
}

/* Toolbar: Upload / List / Preview (or Back), centered, all same width */
.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 1rem 0;
  position: relative;
}

.toolbar-btn {
  width: 110px;
  text-align: center;
}

/* Title on its own row; tags + draft/private share a row below it */
.editor-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.editor-fields input[type="text"] {
  width: 100%;
  box-sizing: border-box;
}

.editor-meta-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.editor-meta-row input[type="text"] {
  width: auto;
  flex: 1;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  font-size: 1em;
  color: var(--text-color);
}

.checkbox-field input[type="checkbox"] {
  width: auto;
}

/* Textarea / preview pane share the same box so switching between them
   doesn't shift the layout */
.editor-body {
  position: relative;
}

textarea,
#preview-pane {
  width: 100%;
  box-sizing: border-box;
  min-height: 50px;
  resize: vertical;
}

#vim-textarea {
  min-height: 300px;
  overflow: hidden;
}

#preview-pane {
  min-height: 300px;
  padding: 8px 12px;
  border: 1px solid var(--heading-color);
  border-radius: 3px;
  background-color: var(--code-background-color);
  overflow-y: auto;
}

.hidden {
  display: none !important;
}

/* Dropdowns & Popups styling */
.dropdown {
  position: relative;
}

#asset-dropdown, #upload-container {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  background-color: var(--background-color);
  border: 1px solid var(--heading-color);
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-top: 5px;
  width: max-content;
  max-width: 320px;
}

#upload-container input[type="file"] {
  width: 100%;
  display: block;
  margin-bottom: 10px;
}

#asset-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
}

.asset-item {
  cursor: pointer;
  padding: 6px 4px;
  border-bottom: 1px solid var(--code-background-color);
  font-size: 0.9em;
  word-break: break-all;
}

.asset-item:hover {
  background-color: var(--code-background-color);
}

#load-more {
  cursor: pointer;
  text-align: center;
  font-weight: bold;
  color: var(--link-color);
}

/* Visibility hook for the JS file toggle class */
.visible {
  display: block !important;
}

/* --- Dynamic Form Styling Additions --- */

/* 1. Extend Base Form Controls to include all text-based inputs */
button,
input[type="file"],
input[type="text"],
input[type="url"],
input[type="datetime-local"],
select,
textarea {
  font-family: var(--font-secondary);
  color: var(--text-color);
  background-color: var(--code-background-color);
  border: 1px solid var(--heading-color);
  border-radius: 3px;
  padding: 8px 12px;
  box-sizing: border-box;
  width: 100%; /* Full width for cleaner alignment */
}

/* Reset button width so it doesn't span 100% like inputs */
button {
  width: auto;
  background-color: var(--heading-color);
  color: var(--background-color);
  font-weight: bold;
}

/* 2. Layout for the dynamic entry rows */
.entry-row {
  background-color: transparent;
  padding: 20px;
  border: 1px dashed var(--text-color); /* Matches your <hr> style */
  border-radius: 4px;
  margin-bottom: 25px;
}

.field-group {
  margin-bottom: 15px;
}

.field-group label {
  display: block;
  font-weight: bold;
  color: var(--heading-color);
  margin-bottom: 5px;
}

/* 3. Side-by-side date inputs */
.date-group {
  display: flex;
  gap: 15px;
}

.date-group .date-input {
  flex: 1;
}

/* 4. Action Buttons styling */
.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.btn-remove {
  background-color: transparent;
  color: var(--heading-color);
  border: 1px solid var(--heading-color);
  margin-top: 10px;
  font-size: 0.9em;
}

.btn-remove:hover {
  background-color: var(--heading-color);
  color: var(--background-color);
}

/* 5. Read-only inputs UX */
input[readonly] {
  opacity: 0.7;
  cursor: not-allowed;
  border-style: dashed;
}

/* --- Chroma code fence highlighting (markup.highlight, "friendly" style) ---
   Generated via chroma/formatters/html.Formatter.WriteCSS; class names are
   Chroma's own standard short token classes, all scoped under .chroma. */
.bg { background-color: #f0f0f0; -moz-tab-size: 4; -o-tab-size: 4; tab-size: 4 }
.chroma { background-color: #f0f0f0; -moz-tab-size: 4; -o-tab-size: 4; tab-size: 4; border-radius: 3px; overflow-x: auto; }
.chroma .ln:target { background-color: #d8d8d8 }
.chroma .lnt:target { background-color: #d8d8d8 }
.chroma .err {  }
.chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
.chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
.chroma .hl { background-color: #d8d8d8 }
.chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em; color: #7f7f7f }
.chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em; color: #7f7f7f }
.chroma .line { display: flex; }
.chroma .k { color: #007020; font-weight: bold }
.chroma .kc { color: #007020; font-weight: bold }
.chroma .kd { color: #007020; font-weight: bold }
.chroma .kn { color: #007020; font-weight: bold }
.chroma .kp { color: #007020 }
.chroma .kr { color: #007020; font-weight: bold }
.chroma .kt { color: #902000 }
.chroma .na { color: #4070a0 }
.chroma .nb { color: #007020 }
.chroma .nc { color: #0e84b5; font-weight: bold }
.chroma .no { color: #60add5 }
.chroma .nd { color: #555555; font-weight: bold }
.chroma .ni { color: #d55537; font-weight: bold }
.chroma .ne { color: #007020 }
.chroma .nf { color: #06287e }
.chroma .nl { color: #002070; font-weight: bold }
.chroma .nn { color: #0e84b5; font-weight: bold }
.chroma .nt { color: #062873; font-weight: bold }
.chroma .nv { color: #bb60d5 }
.chroma .s { color: #4070a0 }
.chroma .sa { color: #4070a0 }
.chroma .sb { color: #4070a0 }
.chroma .sc { color: #4070a0 }
.chroma .dl { color: #4070a0 }
.chroma .sd { color: #4070a0; font-style: italic }
.chroma .s2 { color: #4070a0 }
.chroma .se { color: #4070a0; font-weight: bold }
.chroma .sh { color: #4070a0 }
.chroma .si { color: #70a0d0; font-style: italic }
.chroma .sx { color: #c65d09 }
.chroma .sr { color: #235388 }
.chroma .s1 { color: #4070a0 }
.chroma .ss { color: #517918 }
.chroma .m { color: #40a070 }
.chroma .mb { color: #40a070 }
.chroma .mf { color: #40a070 }
.chroma .mh { color: #40a070 }
.chroma .mi { color: #40a070 }
.chroma .il { color: #40a070 }
.chroma .mo { color: #40a070 }
.chroma .o { color: #666666 }
.chroma .ow { color: #007020; font-weight: bold }
.chroma .c { color: #60a0b0; font-style: italic }
.chroma .ch { color: #60a0b0; font-style: italic }
.chroma .cm { color: #60a0b0; font-style: italic }
.chroma .c1 { color: #60a0b0; font-style: italic }
.chroma .cs { color: #60a0b0; background-color: #fff0f0 }
.chroma .cp { color: #007020 }
.chroma .cpf { color: #007020 }
.chroma .gd { color: #a00000 }
.chroma .ge { font-style: italic }
.chroma .gr { color: #ff0000 }
.chroma .gh { color: #000080; font-weight: bold }
.chroma .gi { color: #00a000 }
.chroma .go { color: #888888 }
.chroma .gp { color: #c65d09; font-weight: bold }
.chroma .gs { font-weight: bold }
.chroma .gu { color: #800080; font-weight: bold }
.chroma .gt { color: #0044dd }
.chroma .gl { text-decoration: underline }
.chroma .w { color: #bbbbbb }

/* Dark-mode overrides ("monokai" style) — same class set, only colors change. */
@media (prefers-color-scheme: dark) {
  .bg { color: #f8f8f2; background-color: #272822; }
  .chroma { color: #f8f8f2; background-color: #272822; }
  .chroma .ln:target, .chroma .lnt:target, .chroma .hl { color: #f8f8f2; background-color: #3c3d38 }
  .chroma .err { color: #960050; background-color: #1e0010 }
  .chroma .k, .chroma .kc, .chroma .kd, .chroma .kp, .chroma .kr, .chroma .kt, .chroma .no { color: #66d9ef }
  .chroma .kn, .chroma .nt, .chroma .o, .chroma .ow, .chroma .gd { color: #f92672 }
  .chroma .na, .chroma .nc, .chroma .nd, .chroma .ne, .chroma .nf, .chroma .nx, .chroma .gi { color: #a6e22e }
  .chroma .l, .chroma .se, .chroma .m, .chroma .mb, .chroma .mf, .chroma .mh, .chroma .mi, .chroma .il, .chroma .mo { color: #ae81ff }
  .chroma .ld, .chroma .s, .chroma .sa, .chroma .sb, .chroma .sc, .chroma .dl, .chroma .sd, .chroma .s2, .chroma .sh,
  .chroma .si, .chroma .sx, .chroma .sr, .chroma .s1, .chroma .ss { color: #e6db74 }
  .chroma .c, .chroma .ch, .chroma .cm, .chroma .c1, .chroma .cs, .chroma .cp, .chroma .cpf, .chroma .gu { color: #75715e }
}

/* Reminder list */
.reminder-list {
  list-style: none;
  padding: 0;
}

/* Project list + a project's own read view (report 0042 §1), and the
   "add existing records" candidate list (report 0043 §3) — same
   plain-list reset every other flat list in this app uses. */
.project-list,
.project-section-list,
.project-candidate-list {
  list-style: none;
  padding: 0;
}

.project-candidate-list label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  cursor: pointer;
}

/* .row-item is the shared shape behind every "one row in a flat list"
   pattern in this app (reminders, bookmarks, and previously identical
   copy-pasted rules for each) — one row-height, gap, and divider
   defined once; each list adds only what actually differs. */
.row-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--code-background-color);
}

.reminder-title {
  font-weight: bold;
}

.reminder-due {
  color: var(--text-color);
  font-size: 0.9em;
}

.reminder-flag {
  color: #fff;
  background-color: #c0392b;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 0.8em;
  font-weight: bold;
}

/* Three states, three treatments: pending (not yet in its lookahead
   window) reads as quiet/muted, active (INPROGRESS) gets a distinct
   accent so it's not confused with plain body text, overdue stays the
   app's one existing red. Deliberately not green for active — reserved
   per your call, not this app's semantic for "in progress." */
.reminder-item.pending .reminder-title,
.reminder-item.pending .reminder-due {
  color: var(--text-color);
  opacity: 0.6;
}

.reminder-item.active .reminder-title,
.reminder-item.active .reminder-due {
  color: #2980b9;
}

.reminder-item.overdue .reminder-title,
.reminder-item.overdue .reminder-due {
  color: #c0392b;
}

.reminder-complete-form {
  margin-left: auto;
}

.reminder-list-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 1em 0;
}

.reminder-showall-form {
  font-size: 0.9em;
}

.schedule-preview {
  color: var(--text-color);
  font-size: 0.9em;
  margin-top: 6px;
}

/* Bookmark list — same row treatment as .reminder-list. The install
   link (btn-bookmarklet) reuses the app's real <button> look (bold,
   var(--heading-color) fill) so it reads as an action, but stays a real
   <a href="javascript:..."> — it's a genuine browser bookmarklet, so the
   class name stays; installation only works by dragging a link to the
   bookmarks bar, a <button> can't be dragged there and its href
   attribute isn't valid HTML in the first place. */
.btn-bookmarklet {
  display: inline-block;
  background-color: var(--heading-color);
  color: var(--background-color);
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 3px;
  text-decoration: none;
}

.btn-bookmarklet:hover {
  opacity: 0.9;
  text-decoration: none;
}

.bookmark-list {
  list-style: none;
  padding: 0;
}

/* Title + description used to sit in separate flex children of the
   shared .row-item row (see that rule's own comment) — since
   description length varies wildly per bookmark, the date ended up at
   a different horizontal position on every row instead of lining up.
   Combining title+description into one truncating line and pinning
   the date to the right (margin-left: auto, never shrinks) fixes both:
   one continuous line per bookmark, date always in the same place. */
.bookmark-list .bookmark-line {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bookmark-list .bookmark-date {
  flex-shrink: 0;
  margin-left: auto;
}

/* Group index */
.group-table {
  border-collapse: collapse;
}

.group-table th,
.group-table td {
  text-align: left;
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid var(--code-background-color);
}

.group-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 0.75em;
  color: var(--text-color);
  background-color: var(--code-background-color);
  border-radius: 3px;
}

.field-hint {
  color: var(--text-color);
  font-size: 0.9em;
}

/* Shared "secondary, slightly greyed" text style — a bookmark's
   insert date, a completed checklist item's "- completed on" suffix,
   the gantt chart's "(month view)" label: metadata that reads, not
   content that reads. */
.text-muted {
  color: var(--text-color);
  opacity: 0.65;
  font-size: 0.9em;
}

/* Gantt SVG — dimensions come from the template (per-group data), colors
   from the same palette as the rest of the UI. SvgWidth is now solved to
   always fit within maxChartWidthPx (720, same as --width) regardless of
   a group's span (render.computePixelsPerDay) — this wrapper is a
   defensive fallback, not something normal use should ever need to
   actually scroll. */
.gantt-scroll {
  overflow-x: auto;
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* legacy Edge */
}

.gantt-scroll::-webkit-scrollbar {
  display: none;              /* Chrome/Safari/new Edge */
}

.gantt {
  font-family: var(--font-secondary);
}

.gantt text {
  dominant-baseline: middle;
  text-anchor: middle;
  font-size: 12px;
  fill: var(--text-color);
}

.gantt .header rect {
  fill: var(--code-background-color);
  rx: 3;
}

.gantt .rows rect {
  fill: var(--link-color);
  rx: 3;
  opacity: 0.55;
}

.gantt .rows g:hover rect {
  opacity: 0.85;
}

.gantt .rows line {
  stroke: var(--heading-color);
  stroke-opacity: 0.3;
}

.gantt .rows text {
  text-anchor: start;
}

/* Today's column, in both the day/week header and any row it overlaps. */
.gantt .header.date .today rect {
  fill: #c0392b;
  opacity: 0.25;
}

/* Separates the reserved row-label gutter from the timeline itself —
   see render.BuildGanttChart's labelGutterWidthPx doc comment. */
.gantt-gutter-divider {
  stroke: var(--heading-color);
  stroke-opacity: 0.3;
}

/* Checklist */
.checklist {
  list-style: none;
  padding: 0;
}

.checklist-item {
  padding: 6px 0;
  border-bottom: 1px solid var(--code-background-color);
}

.checklist-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checklist-item input[type="checkbox"] {
  width: auto;
}

.checklist-completed .checklist-item {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

/* Kanban */
.kanban-board {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  overflow-x: auto;
}

.kanban-column {
  flex: 1;
  min-width: 160px;
}

.kanban-column h3 {
  font-size: 1em;
  margin: 0 0 8px;
}

.kanban-card {
  background-color: var(--code-background-color);
  border-left: 4px solid var(--text-color);
  border-radius: 3px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.kanban-card.priority-eliminate { border-left-color: #3498db; }
.kanban-card.priority-delegate  { border-left-color: #16a085; }
.kanban-card.priority-dolater   { border-left-color: #e67e22; }
.kanban-card.priority-donow     { border-left-color: #c0392b; }

.kanban-card-title {
  font-weight: bold;
  margin-bottom: 4px;
}

.kanban-overdue-flag {
  display: inline-block;
  color: #fff;
  background-color: #c0392b;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 0.75em;
  font-weight: bold;
  margin-bottom: 4px;
}

.kanban-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.kanban-card-actions form {
  margin: 0;
}

/* Small round icon buttons, outlined rather than solid-filled — the
   default global <button> (bold, solid var(--heading-color) fill) reads
   as a primary submit action; these are secondary, frequent, low-stakes
   controls and should look like it. Fills solid on hover instead, so
   the "this is clickable" affordance is still there. */
.kanban-card-actions button {
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-color);
  border: 1px solid var(--text-color);
  border-radius: 50%;
  font-size: 0.85em;
  font-weight: normal;
  line-height: 1;
}

.kanban-card-actions button:hover {
  background-color: var(--heading-color);
  border-color: var(--heading-color);
  color: var(--background-color);
  opacity: 1;
}

/* Cancel reads as destructive — same red as the reminder/overdue flags,
   only on hover so the card isn't red at rest. */
.kanban-card-actions button.kanban-btn-cancel:hover {
  background-color: #c0392b;
  border-color: #c0392b;
  color: #fff;
}

/* Quick thoughts — full-width, single-column cards (no columns to move
   between, unlike kanban.html's board: a quick thought has no status
   workflow, just a running capture feed) so a longer description reads
   as normal paragraph text instead of getting squeezed into a narrow
   column. The card itself (.quick-card below) still reuses
   .kanban-card's exact look — separate class names from kanban's own
   .kanban-board/.kanban-card, so this doesn't touch that board's
   3-column layout at all. */
.quick-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-card {
  background-color: var(--code-background-color);
  border-left: 4px solid var(--text-color);
  border-radius: 3px;
  padding: 8px 10px;
}

.quick-card-title {
  font-weight: bold;
  margin-bottom: 4px;
}

.quick-card-desc {
  color: var(--text-color);
  font-size: 0.9em;
  margin-bottom: 6px;
}

.quick-card-time {
  color: var(--text-color);
  font-size: 0.8em;
  opacity: 0.6;
}

/* Calendar month view — a fixed 6x7 grid (report 0029/0030), gap-as-
   gridline trick: the grid's own background shows through 1px gaps
   between cells instead of every cell needing its own border. */
.calendar-nav {
  display: flex;
  gap: 12px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background-color: var(--code-background-color);
  border: 1px solid var(--heading-color);
}

/* Weekday header row — its own grid sharing the same 7-column template
   so it lines up with the day grid below; the shared border between
   them is collapsed to one line rather than doubled. */
.calendar-grid-header {
  border-bottom: none;
}

.calendar-grid + .calendar-grid {
  border-top: none;
}

.calendar-weekday {
  background-color: var(--background-color);
  padding: 4px;
  text-align: center;
  font-size: 0.8em;
  font-weight: bold;
  color: var(--heading-color);
}

.calendar-day {
  background-color: var(--background-color);
  min-height: 80px;
  padding: 4px;
  box-sizing: border-box;
  /* Grid items default to min-width:auto — a nowrap pill's intrinsic
     content width leaks into that column's track sizing otherwise,
     stealing space from every other column in the row (the "one column
     squeezed to a sliver, its neighbor's pills overspill" bug). This is
     what actually enforces the 7-equal-columns layout; without it
     grid-template-columns: repeat(7, 1fr) is only a starting point, not
     a guarantee. */
  min-width: 0;
  overflow: hidden;
}

/* Leading/trailing days borrowed from the adjacent month to pad the
   grid out — greyed, not hidden: still a real date, still shows its
   real items, just de-emphasized (your call, report 0030). */
.calendar-day-outside {
  opacity: 0.45;
}

/* Today's highlight — deliberately not red (already means "overdue"
   elsewhere in this app, see the reminder/gantt-today colors below) and
   not green (ruled out). Reuses --link-color as a light background
   wash, same "muted tint, not a solid block" treatment gantt's own
   today-column highlight already uses. var()-in-rgba() isn't valid CSS,
   so the light/dark values are spelled out here matching --link-color's
   own light (#3273dc) / dark (#8cc2dd) hex exactly. */
.calendar-day-today {
  background-color: rgba(50, 115, 220, 0.12);
}

@media (prefers-color-scheme: dark) {
  .calendar-day-today {
    background-color: rgba(140, 194, 221, 0.18);
  }
}

.calendar-day-number {
  display: block;
  font-size: 0.85em;
  color: var(--text-color);
  opacity: 0.75;
  margin-bottom: 2px;
}

.calendar-item {
  background-color: var(--link-color);
  opacity: 0.7;
  border-radius: 3px;
  padding: 1px 5px;
  margin-top: 2px;
  font-size: 0.8em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-item,
.calendar-item a {
  color: var(--background-color);
  text-decoration: none;
}

/* A multi-day record's two boundary pills — a pointy/chevron edge on
   the side that "continues" instead of the bar spanning multiple day
   cells (your call, report 0030 §1: avoids the week-row-splitting and
   overlap-lane-assignment a true spanning bar would need). Nothing
   renders on the days between start and end. */
.calendar-item.cal-edge-start {
  clip-path: polygon(0 0, 85% 0, 100% 50%, 85% 100%, 0 100%);
  padding-right: 9px;
}

.calendar-item.cal-edge-end {
  clip-path: polygon(100% 0, 15% 0, 0 50%, 15% 100%, 100% 100%);
  padding-left: 9px;
}

/* Group-records view (report 0033) — a compact per-record card (title,
   description, date nudges, priority stepper, edit link) stacked
   vertically rather than a wide table, so the whole thing stays inside
   the site's own 720px content width without a horizontal scroll —
   nothing in any one line needs to be wider than a title. */
.group-records {
  list-style: none;
  padding: 0;
}

.group-record {
  border: 1px solid var(--code-background-color);
  border-radius: 4px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.group-record-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.group-record-title {
  font-weight: bold;
  color: var(--heading-color);
}

.group-record-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: center;
  margin-top: 6px;
  font-size: 0.85em;
  color: var(--text-color);
}

/* Quick +/-1 / +/-3 day adjustment — deliberately tiny, this is a fast
   nudge, not a data-entry control; the full edit form (btn-edit-record)
   is one click away for anything more than a small date slip. */
.nudge-form {
  display: inline-flex;
  gap: 2px;
}

.nudge-form button {
  padding: 1px 5px;
  font-size: 0.8em;
  font-weight: normal;
}

.group-record-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.priority-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.priority-form button {
  padding: 0 6px;
  font-size: 0.8em;
  font-weight: normal;
}

.group-record-priority {
  font-size: 0.85em;
  color: var(--text-color);
  min-width: 64px;
  text-align: center;
}

.btn-edit-record {
  font-size: 0.85em;
}

.project-attach-form select {
  width: auto;
  max-width: 160px;
  font-size: 0.8em;
  padding: 2px 6px;
}

