/* The accepted Lens prototype, applied to the existing functional DOM.
   Palette lives in brand.css; editor viewport and safe areas remain in their modules. */
body {
  font-family: var(--font-body);
  font-size: 15px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--surface-soft);
}
.sidebar {
  width: 240px;
  padding: 28px 16px 20px;
  gap: 0;
  background: var(--surface);
  border-color: var(--border);
}
.brand {
  gap: 10px;
}
.brand-mark {
  width: 34px;
  height: 34px;
}
.brand > span {
  font-size: 24px;
}
.brand small {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 5px;
}
.lens-nav-caption {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  margin: 28px 10px 12px;
  color: var(--muted);
}
.sidebar nav {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.sidebar nav::before {
  display: none;
}
.sidebar nav .nav {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  min-height: 66px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-secondary);
}
.sidebar nav .nav.active {
  background: var(--sky);
  color: var(--ink);
  border-color: var(--border);
  border-radius: 14px;
  font-weight: 600;
  box-shadow: none;
}
.lens-nav-label {
  min-width: 0;
}
.lens-nav-label small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
}
.sidebar-foot {
  margin-top: auto;
  padding-top: 18px;
}
.lens-appearance {
  margin-top: 12px;
}
.lens-appearance > summary {
  min-height: 44px;
  padding: 12px 6px;
  font-size: 12px;
  cursor: pointer;
}
.lens-appearance .appearance-controls {
  padding: 10px 0;
}
.sidebar #window-controls {
  order: 5;
  margin: 8px 0;
}
.sidebar .sidebar-foot {
  order: 6;
}
#fullscreen-toggle {
  font-size: 12px;
}
main {
  margin-left: 240px;
  padding: 0 32px 48px;
  max-width: 1900px;
}
.topline {
  min-height: 64px;
  margin: 0;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.page-header {
  padding: 28px 0 24px;
  margin: 0;
  align-items: center;
  gap: 20px;
}
.page-header h1 {
  font-size: 40px;
  margin: 4px 0 8px;
  letter-spacing: -1.2px;
  line-height: 1.2;
}
.page-header p {
  font-size: 15px;
  margin: 0;
  color: var(--muted);
}
.lens-eyebrow,
.lens-overline {
  font-size: 11px;
  letter-spacing: 0.13em;
  font-weight: 650;
  color: var(--muted);
}
#new-post {
  padding: 12px 20px;
  border-radius: 12px;
  min-height: 48px;
  font-size: 14px;
  box-shadow: 0 4px 10px var(--shadow-card);
}
.environment {
  font-size: 12px;
  margin: 0 0 20px;
  padding: 10px 12px;
  line-height: 1.5;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.lens-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 24px;
  align-items: start;
}
.lens-workspace.lens-single {
  display: block;
}
.lens-primary,
.lens-context {
  min-width: 0;
}
#lens-search-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
#lens-search-slot .search {
  display: block;
  width: auto;
  min-width: 0;
  max-width: none;
  flex: 1;
  margin: 0;
}
#lens-search-slot .search input {
  width: 100%;
  max-width: none;
  border-radius: 12px;
  min-height: 48px;
  font-size: 15px;
  padding: 12px 16px 12px 44px;
  font-weight: 400;
}
#browse-filters {
  flex: none;
  width: auto;
  border: 0;
  background: none;
  box-shadow: none;
  margin: 0;
  padding: 0;
}
#browse-filters > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  min-height: 48px;
  border: 1px solid var(--control-border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
}
#browse-filters > summary::after {
  display: none;
}
#browse-filters > summary::-webkit-details-marker {
  display: none;
}
#filter-count {
  font-size: 11px;
  font-weight: 400;
}
#lens-filter-dialog {
  width: min(620px, calc(100vw - 24px));
  margin: auto;
  max-height: calc(
    100dvh - var(--app-safe-top, 0px) - var(--app-safe-bottom, 0px) - 32px
  );
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  overflow: hidden;
}
#lens-filter-dialog[open] {
  display: flex;
  flex-direction: column;
}
#lens-filter-dialog > header,
#lens-filter-dialog > footer {
  flex: none;
}
#lens-filter-dialog::backdrop {
  background: var(--scrim);
  backdrop-filter: blur(5px);
}
#lens-filter-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}
#lens-filter-title {
  font: 400 30px/1.2 var(--font-editorial);
  margin: 0;
}
#lens-filter-dialog header button {
  min-width: 44px;
  min-height: 44px;
}
#lens-filter-dialog .browse-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 24px;
  min-height: 0;
  overflow-y: auto;
}
#lens-filter-dialog label {
  display: grid;
  gap: 8px;
  min-width: 0;
}
#lens-filter-dialog .browse-filters > p {
  grid-column: 1/-1;
  margin: 0;
}
#lens-filter-dialog footer {
  display: flex;
  margin: 0;
  justify-content: flex-end;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.lens-primary .stats {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 12px;
  align-items: stretch;
  margin: 0 0 24px;
}
.lens-primary .stats > * {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  min-height: 124px;
  padding: 18px 20px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: none;
  text-align: left;
}
.lens-primary .stats .lens-queue-total {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.lens-primary .stats span {
  border: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
}
.lens-primary .stats .lens-send-symbol {
  position: absolute;
  top: 20px;
  right: 18px;
  width: 24px;
  height: 24px;
  color: var(--action);
  display: grid;
  place-items: center;
}
.lens-queue-total > strong {
  font: 600 32px/1.15 var(--font-body);
  padding: 0;
  margin: 0;
  display: block;
  border: 0;
}
.lens-queue-total > .lens-stat-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.lens-queue-total .lens-stat-note {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
}
.lens-queue-total .lens-stat-note b {
  font-weight: 400;
}
.lens-primary .stats .lens-stat-small {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 124px;
  font-size: 14px;
  padding: 18px 20px;
}
.lens-primary .stats .lens-stat-small strong {
  display: block;
  order: -1;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 600;
  padding: 0;
  margin: 0;
  border: 0;
}
.lens-primary .stats button.selected {
  color: var(--ink);
  background: var(--sky);
  border-color: var(--action);
  box-shadow: inset 0 0 0 1px var(--action);
}
.toolbar {
  display: block;
  margin: 0 0 8px;
}
.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
.filters button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: left;
  white-space: normal;
}
.filters button.selected {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--control-border);
  box-shadow: 0 2px 4px var(--shadow-soft);
}
.lens-filter-count {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  border-radius: 6px;
  min-width: 18px;
  padding: 1px 4px;
  text-align: center;
}
.filters [data-filter="attention"] .lens-filter-count {
  background: var(--warning-soft);
  color: var(--warning);
}
.selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
#selection-toggle {
  background: none;
  border: 0;
  font-size: 13px;
  padding: 0 4px;
  min-height: 44px;
  font-weight: 400;
  color: var(--action);
}
.post-list {
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  max-width: 100%;
  padding: 22px 24px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 2px 4px var(--shadow-soft);
}
.post-card:hover {
  border-color: var(--control-border);
}
.post-icon {
  display: none;
}
.post-card .post-content {
  min-width: 0;
  padding-bottom: 20px;
  flex: 1;
}
.lens-card-overline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.lens-card-label {
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.lens-card-label::before {
  content: "•";
  color: var(--action);
  margin-right: 5px;
}
.post-card .badge {
  font-size: 12px;
  flex: none;
  padding: 5px 8px;
  border-radius: 6px;
}
.post-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.3px;
  overflow-wrap: anywhere;
}
.lens-post-title {
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  padding: 0;
  min-height: 44px;
  overflow-wrap: anywhere;
}
.lens-post-title:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.post-card .excerpt {
  display: -webkit-box;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--ink-secondary);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 20px;
}
.post-card .meta {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  font-size: 14px;
  line-height: 1.6;
}
.post-card .meta small,
.post-author small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
  font-weight: 400;
}
.post-card .meta .post-destination,
.post-card .meta .post-tags {
  grid-column: 1/-1;
}
.lens-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding-top: 12px;
}
.lens-card-footer .post-author {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  min-width: 0;
  overflow-wrap: anywhere;
}
.post-card .card-actions {
  display: flex;
  flex-wrap: nowrap;
  flex: none;
  justify-content: flex-end;
  gap: 12px;
  margin: 0;
  padding: 0;
}
.post-card .card-actions > button,
.post-card .post-menu > summary {
  background: none;
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 8px 5px;
  font-size: 12px;
}
.post-card .card-actions > button:hover,
.post-card .post-menu > summary:hover {
  background: var(--sky);
}
.post-menu-actions {
  width: 208px;
  padding: 5px;
  gap: 2px;
  border-radius: 14px;
}
.post-menu-actions button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.4;
}
.post-menu-actions button svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.post-menu-actions button.danger-text { margin-top: 5px; border-top: 1px solid var(--border); border-radius: 0 0 9px 9px; background: none; }
.post-menu-actions button.danger-text:hover { background: var(--danger-soft); }
.post-menu[data-side="above"] .post-menu-actions { top: auto; bottom: calc(100% + 8px); }
.post-menu[data-side="below"] .post-menu-actions { top: calc(100% + 8px); bottom: auto; }
.post-menu > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-top: -3px; }
.post-menu[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.post-selection {
  margin-bottom: 12px;
}
.next-publications {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 24px 20px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: none;
}
.next-publications::before {
  display: none;
}
.next-publications h2 {
  position: relative;
  font: 600 21px/1.3 var(--font-body);
  margin: 10px 0 8px;
  letter-spacing: -0.4px;
}
#upcoming-list {
  display: block;
  list-style: none;
  counter-reset: delivery;
  padding: 0;
  margin: 0;
  position: relative;
}
#upcoming-list li {
  display: flex;
  gap: 10px;
  counter-increment: delivery;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: none;
  padding: 17px 0;
}
#upcoming-list li:not(.upcoming-empty)::before {
  content: counter(delivery, decimal-leading-zero);
  font-size: 10px;
  color: var(--muted);
  padding-top: 6px;
}
#upcoming-list .upcoming-post {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  width: 100%;
  padding: 0;
  text-align: left;
  background: none;
}
#upcoming-list .upcoming-post time {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
#upcoming-list .upcoming-post > span {
  font-size: 14px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
#upcoming-list .upcoming-post > small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.lens-upcoming-note {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin: 15px 0 4px;
}
.lens-calendar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0;
  font-size: 12px;
  font-weight: 550;
}
.lens-week {
  margin: 16px 0 0;
  padding: 18px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}
.lens-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.lens-section-heading h2 {
  font: 600 14px var(--font-body);
  letter-spacing: 0;
  margin: 0;
}
.lens-section-heading > span {
  font-size: 11px;
  color: var(--muted);
}
.lens-section-heading button {
  min-width: 44px;
  min-height: 44px;
  font-size: 21px;
}
#lens-week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}
#lens-week-days button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-height: 76px;
  min-width: 0;
  padding: 6px 0;
  border-radius: 10px;
  font-size: 14px;
  background: none;
}
#lens-week-days small {
  color: var(--muted);
  font-size: 11px;
}
#lens-week-days i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}
#lens-week-days .has-delivery {
  background: currentColor;
}
#lens-week-days [aria-pressed="true"] {
  background: none;
  color: var(--ink);
}
#lens-week-days [aria-pressed="true"] small {
  color: var(--ink);
  font-weight: 600;
}
#lens-week-summary {
  display: grid;
  gap: 6px;
  margin: 16px 2px 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-inset);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
#lens-context-details {
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
}
#lens-context-details > summary {
  display: none;
}
.lens-rhythm {
  margin: 24px 0 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-inset);
}
.lens-rhythm-clock {
  display: grid;
  gap: 3px;
  padding: 14px 0;
}
.lens-rhythm-clock time {
  color: var(--ink);
  font-size: 36px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: lining-nums tabular-nums;
}
.lens-rhythm-clock span { color: var(--ink-secondary); font-size: 12px; line-height: 1.5; margin-top: 4px; }
.lens-rhythm-clock small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.lens-rhythm-next {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.lens-rhythm-next span,
.lens-rhythm-next small {
  color: var(--muted);
  font-size: 11px;
}
.lens-rhythm-next strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
  font-variant-numeric: lining-nums tabular-nums;
}
.lens-rhythm-next small:empty {
  display: none;
}
.lens-rhythm-days {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 12px 0;
  font-size: 12px;
  color: var(--muted);
}
.lens-rhythm-days > div + div {
  padding-left: 20px;
  border-left: 1px solid var(--border);
}
.lens-rhythm-days strong {
  display: block;
  font-size: 28px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}
.lens-rhythm-days small {
  font-size: 11px;
}
.lens-rhythm p {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.lens-rhythm p strong {
  float: right;
}
/* Calendar surface and agenda match the chosen layout, keeping all 42 dates and actions. */
#calendar-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.48fr);
  gap: 24px;
  align-items: start;
}
.lens-calendar-surface {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  padding: 24px;
}
.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0 0 23px;
}
.calendar-controls h2 {
  order: -1;
  margin-right: auto;
  font: 500 24px/1.3 var(--font-body);
  letter-spacing: -0.5px;
}
.calendar-controls button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
#lens-calendar-today {
  font-size: 12px;
}
.weekdays {
  gap: 5px;
  font-size: 12px;
  padding: 0;
  margin-bottom: 10px;
}
.calendar-grid {
  gap: 22px 4px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: none;
}
.calendar-grid .day {
  position: relative;
  display: block;
  overflow: visible;
  min-height: 80px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: none;
  box-shadow: none;
}
.calendar-grid .day-select {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 80px;
  height: 100%;
  padding: 6px 2px;
  border-radius: 14px;
  text-align: center;
  color: inherit;
  font-size: 15px;
  background: none;
}
.calendar-grid .day .day-count {
  display: block;
  padding: 2px 7px;
  margin: 0;
  width: auto;
  border-radius: 999px;
  background: var(--sky);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
}
.calendar-grid .day:hover {
  background: none;
}
.calendar-grid .day.today {
  border: 0;
  background: none;
}
.calendar-grid .day.outside {
  color: var(--muted);
}
.calendar-grid .day.selected {
  background: none;
  color: var(--ink);
  box-shadow: none;
}
.calendar-grid .day-add {
  background: var(--surface);
  border: 1px solid var(--border);
  position: absolute;
  bottom: -18px;
  right: auto;
  left: calc(50% - 14px);
  min-height: 28px;
  height: 28px;
  width: 28px;
  padding: 0;
  border-radius: 50%;
  font-size: 16px;
  opacity: 0;
  color: var(--action);
}
.calendar-grid .day:hover .day-add,
.calendar-grid .day:focus-within .day-add {
  opacity: 1;
}
.lens-calendar-key {
  padding: 14px 16px;
  margin: 20px 0 0;
  border: 0;
  border-radius: 12px;
  background: var(--surface-inset);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
#day-detail {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.day-detail-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}
.day-detail-heading h3 {
  font: 600 24px/1.25 var(--font-body);
  margin: 0;
}
.day-detail-heading button {
  background: var(--sky);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
}
#day-detail .lens-agenda-item {
  display: block;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  margin: 0 0 14px;
  padding: 20px;
  box-shadow: none;
}
.lens-agenda-item .lens-agenda-time {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 14px;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--sky);
  font-size: 18px;
  color: var(--ink);
  font-weight: 650;
}
.lens-agenda-time span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.lens-agenda-title {
  font-size: 17px;
  font-weight: 650;
  text-align: left;
  padding: 0;
  min-height: 30px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.lens-agenda-title:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.lens-agenda-item p {
  font-size: 13px;
  color: var(--muted);
  margin: 9px 0;
}
#day-detail .occurrence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
#day-detail .occurrence-actions button {
  min-height: 44px;
  background: var(--surface);
  border: 1px solid var(--control-border);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 550;
  padding: 8px 10px;
  text-align: left;
}
#day-detail .occurrence-actions button::after {
  content: none;
}
#day-detail .pager {
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  gap: 4px;
}
.history-row {
  border-radius: 12px;
}
/* Shared controls and full editor use the same Lens surfaces. */
.ky-select-field button.ky-select-control {
  padding: 12px 44px 12px 14px;
  min-height: 48px;
  border-radius: 13px;
  background-image: none;
  position: relative;
}
.ky-select-control::after {
  content: "";
  position: absolute;
  right: 18px;
  top: calc(50% - 5px);
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.ky-select-control[aria-expanded="true"]::after {
  transform: rotate(225deg);
  top: calc(50% - 2px);
}
.ky-select-panel {
  border-radius: 13px;
  padding: 6px;
}
.ky-select-option {
  border-radius: 10px;
}
#editor {
  border-radius: 24px;
}
#editor .editor-heading {
  border-bottom: 1px solid var(--border);
}
#editor input:not([type="checkbox"]),
#editor textarea {
  font-weight: 400;
}
#editor input::placeholder,
#editor textarea::placeholder {
  font-weight: 400;
}
#editor .editor-actions button {
  border-radius: 13px;
}
/* Workspace controls: original layout, inspired by Origin UI and ReUI.
   Provenance and exact archived sources: design-system/20261028-workspace-sources.md. */
.workspace-skip { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 14px 20px; background: var(--surface); color: var(--ink); border: 2px solid var(--action); border-radius: 10px; }
.workspace-skip:focus { top: 12px; }
#lens-search-slot .search { position: relative; }
#lens-search-slot .search::before { content: ""; position: absolute; left: 18px; top: 16px; width: 12px; height: 12px; border: 1.7px solid var(--muted); border-radius: 50%; pointer-events: none; z-index: 1; }
#lens-search-slot .search::after { content: ""; position: absolute; left: 30px; top: 29px; width: 6px; border-top: 1.7px solid var(--muted); transform: rotate(45deg); pointer-events: none; z-index: 1; }
.lens-primary .stats .lens-stat-small small { color: var(--muted); font-size: 12px; font-weight: 400; }
.lens-primary .stats .lens-stat-small:hover { border-color: var(--control-border); background: var(--sky); }
.lens-primary .stats .lens-stat-small:focus-visible { outline-offset: 3px; }
.post-card .card-actions > button.edit { border: 1px solid var(--control-border); padding: 8px 14px; font-size: 13px; }
.post-card .card-actions > button.edit:hover { background: var(--sky); }
.post-card .post-menu > summary { padding-inline: 10px; font-size: 13px; }
.post-card .meta .post-date { color: var(--ink); font-weight: 600; }
.post-card .meta small { font-weight: 400; }
#overview-view > section, #users-view > section, #users-view > .user-form { padding: 24px; margin-bottom: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
#overview-view h2, #users-view h2 { font: 600 22px/1.3 var(--font-body); margin-top: 0; }
.section-note { font-size: 15px; line-height: 1.65; margin: 0 0 24px; max-width: 78ch; }
.user-form { gap: 16px; align-items: end; }
.user-form label { font-size: 14px; }
.history-row { padding: 20px; border: 1px solid var(--border); margin-bottom: 12px; }
.history-row strong { font-size: 16px; line-height: 1.5; }
.history-row p { font-size: 14px; line-height: 1.65; }
.empty { padding: 40px 24px; border: 1px dashed var(--control-border); border-radius: 16px; background: var(--surface); }
.empty strong { font-size: 22px; }
.empty p { font-size: 15px; line-height: 1.65; max-width: 48ch; margin: 12px auto 24px; }
#editor { border-radius: 20px; }
#editor .editor-heading { background: var(--surface); }
#editor label, #editor legend { font-size: 14px; }
#editor .hint, #editor .section-summary { font-size: 13px; line-height: 1.6; }
#editor .post-settings { margin-bottom: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
#editor .post-settings-fields { gap: 20px; }
#editor .editor-section { border: 1px solid var(--border); border-radius: 12px; margin-top: 16px; background: var(--surface); }
#editor .editor-section > summary { min-height: 52px; padding: 12px 16px; font-size: 15px; }
#editor .editor-section[open] > summary { border-bottom: 1px solid var(--border); }
#editor .editor-section-content { padding: 16px; }
#editor .writing-panel { padding-block: 4px 12px; }
#editor .writing-panel .field-heading { margin-top: 12px; }
#editor #post-body, #editor #visual-body { font-size: 16px; line-height: 1.75; padding: 16px; border-radius: 12px; }
#editor .preview-label { font-size: 12px; letter-spacing: 0.05em; margin-bottom: 12px; }
#editor .formatted { font-size: 15px; line-height: 1.7; }
#editor .editor-actions { border-top: 1px solid var(--border); }
#editor .editor-tabs { gap: 8px; }
#editor .editor-tabs button { border-radius: 8px; font-size: 14px; }
#editor .upload-zone { min-height: 80px; font-size: 14px; line-height: 1.6; padding: 16px; text-align: center; }
/* Phosphor Duotone SVG originals and sidebar/calendar reference versions:
   design-system/20261028-navigation-calendar.md. */
.sidebar nav .nav .workspace-nav-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; background: var(--sky); color: var(--action); }
.sidebar nav .nav .workspace-nav-icon svg { width: 24px; height: 24px; flex: none; fill: currentColor; stroke: none; }
.sidebar nav .nav.active .workspace-nav-icon { background: var(--action); color: var(--surface); }
.sidebar nav .nav[data-view="overview"]::before { display: none; }
.sidebar nav .nav:hover:not(.active) { background: var(--surface-inset); }
.lens-primary .stats > button:hover:not(.selected) { background: var(--surface-inset); border-color: var(--control-border); }
.lens-primary .stats > button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.lens-primary .stats .lens-stat-note { color: var(--muted); font-size: 12px; font-weight: 400; }
#lens-week-days button > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-variant-numeric: tabular-nums; }
#lens-week-days [aria-current="date"] > span { box-shadow: inset 0 0 0 1px var(--control-border); }
#lens-week-days [aria-pressed="true"] > span { background: var(--action); color: var(--surface); box-shadow: none; }
#lens-week-days button:hover > span { box-shadow: 0 0 0 2px var(--border); }
#lens-week-days .has-delivery { background: var(--action); }
#lens-week-summary > strong { font-size: 15px; color: var(--ink); font-weight: 600; }
.calendar-grid .day-number { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 16px; line-height: 1; font-variant-numeric: tabular-nums; }
.calendar-grid .day.today .day-number { box-shadow: inset 0 0 0 1px var(--action); font-weight: 650; }
.calendar-grid .day.selected .day-number { background: var(--action); color: var(--surface); box-shadow: none; font-weight: 650; }
.calendar-grid .day:not(.selected) .day-select:hover .day-number { background: var(--sky); }
.calendar-grid .day-add:hover { border-color: var(--action); background: var(--sky); }
#day-detail > p.muted { padding: 24px; margin: 0; background: var(--surface); border: 1px dashed var(--border); border-radius: 20px; line-height: 1.6; }
@media (min-width: 761px) {
  html[data-effects] .sidebar nav { background: none; box-shadow: none; }
}
@media (min-width: 1440px) {
  .post-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-list > .empty { grid-column: 1 / -1; }
}
@media (min-width: 1101px) {
  .editor-grid {
    gap: 28px;
  }
}
@media (max-width: 1180px) and (min-width: 761px) {
  .sidebar {
    width: 208px;
    padding-inline: 12px;
  }
  .brand > span {
    font-size: 22px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
  }
  main {
    margin-left: 208px;
    padding-inline: 24px;
  }
  #calendar-view {
    grid-template-columns: minmax(0, 1fr);
  }
  #day-detail {
    padding: 0;
  }
}
@media (max-width: 1100px) {
  .lens-workspace {
    display: block;
  }
  .lens-context {
    margin: 4px 0 18px;
  }
  #lens-context-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    cursor: pointer;
    font-size: 13px;
  }
  #lens-context-details > summary::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
  }
  #lens-context-details[open] > summary::after {
    transform: rotate(225deg);
  }
  #lens-context-details[open] > summary {
    margin-bottom: 16px;
  }
}
@media (max-width: 760px) {
  .lens-primary .stats > *, .lens-primary .stats .lens-stat-small { min-height: 100px; padding: 12px; gap: 6px; }
  .lens-primary .stats .lens-send-symbol, .lens-stat-small small { display: none; }
  .lens-queue-total > strong, .lens-primary .stats .lens-stat-small strong { font-size: 28px; }
  .lens-queue-total > .lens-stat-title, .lens-primary .stats .lens-stat-small { font-size: 13px; }
  .lens-queue-total .lens-stat-note { font-size: 11px; line-height: 1.4; }
  #editor .post-settings { padding: 0; }
  #editor .post-settings-fields { padding: 12px; }
  #editor .editor-section > summary { font-size: 14px; padding-inline: 12px; }
  #editor .editor-section-content { padding: 12px; }
  #editor .upload-zone { min-height: 60px; }
  #overview-view > section, #users-view > section, #users-view > .user-form { padding: 16px; }
  #editor:not(.text-focus) { border-radius: 0; }
  .sidebar nav .lens-nav-label { white-space: nowrap; }
  .sidebar nav .nav .workspace-nav-icon { flex: 0 0 24px; width: 28px; height: 24px; border-radius: 0; background: none; }
  .sidebar nav .nav .workspace-nav-icon svg { width: 23px; height: 23px; }
  .sidebar nav .nav.active .workspace-nav-icon { background: none; color: var(--action); }
  .calendar-grid .day-number { width: 34px; height: 34px; font-size: 15px; }
  .sidebar {
    position: relative;
    width: 100%;
    min-height: 72px;
    height: auto;
    padding: 14px 16px;
    overflow: visible;
    gap: 0;
    border: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .sidebar .brand {
    max-width: calc(100% - 96px);
  }
  .brand > span {
    font-size: 22px;
  }
  .brand small {
    font-size: 10px;
    line-height: 1.4;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
  }
  .lens-nav-caption,
  .lens-nav-label small,
  .lens-rhythm {
    display: none;
  }
  .sidebar nav {
    position: fixed;
    left: max(12px, var(--app-safe-left, 0px));
    right: max(12px, var(--app-safe-right, 0px));
    bottom: calc(12px + var(--app-safe-bottom, 0px));
    z-index: 20;
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    margin: 0;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--glass-fill);
    box-shadow: inset 0 1px var(--glass-highlight), 0 5px 24px var(--shadow-card);
  }
  .sidebar nav .nav {
    flex: 1;
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 1px;
    border: 0;
    min-height: 55px;
    min-width: 0;
    font-size: 11px;
  }
  .sidebar nav .nav svg {
    width: 19px;
    height: 19px;
    flex: none;
  }
  .sidebar nav .nav.active {
    box-shadow: inset 0 2px var(--action);
    border-radius: 14px;
  }
  .sidebar #window-controls {
    position: absolute;
    top: 14px;
    right: 12px;
    width: 44px;
    padding: 0;
    margin: 0;
    border: 0;
  }
  #fullscreen-toggle {
    font-size: 0;
    width: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 50%;
  }
  #fullscreen-toggle::before {
    content: "⛶";
    font-size: 22px;
  }
  #fullscreen-notice {
    position: absolute;
    z-index: 22;
    right: 0;
    width: 250px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
  }
  .lens-appearance {
    position: absolute;
    top: 14px;
    right: 63px;
    z-index: 23;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .lens-appearance > summary {
    list-style: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--glass-fill);
    box-shadow: inset 0 1px var(--glass-highlight);
  }
  .lens-appearance > summary::before {
    content: "◐";
    font-size: 21px;
  }
  .lens-appearance > summary::-webkit-details-marker {
    display: none;
  }
  .lens-appearance .appearance-controls {
    position: absolute;
    top: 50px;
    right: -46px;
    width: min(320px, calc(100vw - 28px));
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 24px var(--shadow-dialog);
  }
  main {
    margin: 0;
    padding: 0 16px calc(110px + var(--app-safe-bottom, 0px));
  }
  .topline {
    display: none;
  }
  .page-header {
    flex-direction: row;
    padding: 14px 0 18px;
    gap: 12px;
  }
  .page-header > div {
    flex: 1;
    width: auto;
    min-width: 0;
  }
  .page-header h1 {
    font-size: 32px;
    margin: 0 0 4px;
  }
  .page-header p {
    font-size: 14px;
  }
  .lens-eyebrow {
    display: none;
  }
  #new-post {
    font-size: 12px;
    min-width: 44px;
    max-width: 110px;
    padding: 10px;
  }
  .environment {
    font-size: 12px;
    margin-bottom: 16px;
  }
  #lens-search-slot {
    gap: 8px;
    margin-bottom: 12px;
  }
  #lens-search-slot .search input {
    font-size: 16px;
    padding-left: 40px;
    padding-right: 12px;
  }
  #browse-filters > summary {
    padding: 10px;
  }
  #filter-count {
    display: none;
  }
  #lens-filter-dialog .browse-filters {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
  }
  #lens-filter-dialog > header {
    padding: 18px;
  }
  #lens-filter-dialog footer {
    padding: 16px 18px;
  }
  .lens-primary .stats {
    margin: 0 0 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .lens-primary .stats .lens-queue-total {
    flex-basis: auto;
  }
  .lens-primary .stats .lens-stat-small {
    min-height: 100px;
  }
  .lens-context {
    margin: 0 0 14px;
  }
  .filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    scroll-padding: 2px;
    scrollbar-width: thin;
  }
  .filters button {
    font-size: 12px;
    min-height: 44px;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 12px;
  }
  .selection-toolbar {
    margin: 5px 0;
  }
  .post-card {
    padding: 18px 16px 12px;
  }
  .post-card .excerpt {
    display: -webkit-box;
    font-size: 15px;
  }
  .post-card .meta {
    gap: 12px;
  }
  .lens-card-footer {
    gap: 8px;
  }
  .post-card .card-actions {
    gap: 8px;
    flex-direction: row;
  }
  .next-publications {
    padding: 20px;
  }
  .next-publications h2 {
    font-size: 21px;
  }
  .lens-week {
    margin: 16px 0;
  }
  #calendar-view {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .lens-calendar-surface {
    padding: 16px 10px;
    border-radius: 16px;
  }
  .calendar-controls {
    gap: 1px;
    margin-bottom: 16px;
  }
  .calendar-controls h2 {
    font-size: 20px;
  }
  .calendar-controls button {
    min-width: 36px;
    padding: 4px;
  }
  .calendar-grid { gap: 22px 2px; }
  .weekdays { gap: 2px; }
  .calendar-grid .day-select {
    font-size: 13px;
    min-height: 76px;
    padding-inline: 0;
  }
  .calendar-grid .day .day-count {
    font-size: 10px;
    padding: 2px 5px;
  }
  .calendar-grid .day-add {
    opacity: 0;
    min-width: 26px;
    min-height: 26px;
    font-size: 14px;
  }
  .calendar-grid .day.selected .day-add {
    opacity: 1;
  }
  .lens-calendar-key {
    font-size: 11px;
    margin-top: 14px;
    padding-top: 12px;
  }
  #day-detail {
    padding: 0;
  }
  .day-detail-heading h3 {
    font-size: 24px;
  }
  #editor {
    border-radius: 0;
  }
}
@media (max-width: 360px) {
  main {
    padding-inline: 12px;
  }
  .sidebar {
    padding-inline: 12px;
  }
  .brand > span {
    font-size: 20px;
  }
  .brand small {
    font-size: 9px;
  }
  .brand-mark {
    width: 25px;
    height: 25px;
  }
  .sidebar nav .nav {
    font-size: 10px;
  }
  .page-header h1 {
    font-size: 28px;
  }
  .page-header {
    flex-wrap: wrap;
  }
  .calendar-controls h2 {
    font-size: 18px;
  }
  #lens-calendar-today {
    font-size: 11px;
  }
  .lens-card-footer {
    flex-wrap: wrap;
  }
  .lens-card-footer .card-actions {
    margin-left: auto;
  }
}
html[data-effects="reduced"] .next-publications {
  background: var(--surface);
  box-shadow: none;
}
html[data-effects="reduced"] .next-publications::before {
  display: none;
}
html[data-effects="reduced"] #lens-filter-dialog::backdrop {
  backdrop-filter: none;
}
@media (prefers-reduced-motion: reduce),
  (prefers-reduced-transparency: reduce) {
  .next-publications {
    background: var(--surface);
    box-shadow: none;
  }
  .next-publications::before {
    display: none;
  }
}
@media (forced-colors: active) {
  .filters button.selected,
  .calendar-grid .day.selected {
    outline: 2px solid Highlight;
  }
  .next-publications::before {
    display: none;
  }
}
