/*
 * Unlimited Calendar — Paperboard v2
 *
 * A quiet, white working surface inspired by CalendarCN's spatial rhythm.
 * This file intentionally sits last in the cascade: it changes presentation
 * without replacing the DOM contracts used by app.js.
 */

@font-face {
  font-family: "EB Garamond Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url("assets/fonts/eb-garamond-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Noto Serif SC Collector";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("assets/fonts/noto-serif-sc-collector.ttf") format("truetype");
}

:root {
  --uc-canvas: #ffffff;
  --uc-sidebar: #f8f8f7;
  --uc-soft: #f8f8f7;
  --uc-hover: #efefef;
  --uc-ink: #32302c;
  --uc-muted: #797875;
  --uc-faint: #aaa9a6;
  --uc-line: #eeeeee;
  --uc-line-strong: #e5e5e5;
  --uc-focus: #5d6470;
  --uc-now: #f04842;
  --uc-radius-xs: 4px;
  --uc-radius-sm: 6px;
  --uc-radius-md: 10px;
  --uc-shadow-float: 0 18px 50px rgba(50, 48, 44, .13), 0 2px 8px rgba(50, 48, 44, .06);
  --heatmap-0: #f2f5f7;
  --heatmap-1: #dde5ea;
  --heatmap-2: #b7c6d1;
  --heatmap-3: #7e96a8;
  --heatmap-4: #405a70;
  --uc-font-editorial: "Noto Serif SC Collector", "EB Garamond Variable", "Noto Serif SC", "Songti SC", serif;
  --uc-font-display: var(--uc-font-editorial);
  --uc-font-text: "Inter Variable", Inter, "Noto Sans SC", "Microsoft YaHei UI", sans-serif;
  --uc-font-data: "Inter Variable", "Cascadia Mono", "Cascadia Code", Consolas, monospace;
  --uc-calendar-axis: 58px;

  --paper: var(--uc-canvas);
  --surface: var(--uc-canvas);
  --ink: var(--uc-ink);
  --muted: var(--uc-muted);
  --line: var(--uc-line);
  --blue: var(--uc-ink);
  --blue-soft: var(--uc-soft);
  --shadow: none;
}

html {
  background: var(--uc-canvas);
  color-scheme: light;
}

html,
body {
  color: var(--uc-ink);
  background: var(--uc-canvas);
  font-family: var(--uc-font-text);
  font-size: 15px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-width: 1024px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--uc-focus) 70%, white);
  outline-offset: 2px;
}

/* App frame -------------------------------------------------------------- */

.shell,
.shell.sidebar-collapsed {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--uc-canvas);
}

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

main {
  min-width: 0;
  padding: 0;
  background: var(--uc-canvas);
}

#todayView {
  height: 100vh;
  overflow: hidden;
  background: var(--uc-canvas);
}

/* Sidebar — expanded, quiet, and deliberately spacious ------------------ */

.sidebar {
  position: sticky;
  inset: 0 auto auto 0;
  z-index: 20;
  width: auto;
  height: 100vh;
  padding: 12px 10px 10px;
  border: 0;
  border-right: 1px solid var(--uc-line);
  background: var(--uc-sidebar);
  display: flex;
  align-items: stretch;
  flex-direction: column;
  overflow: visible;
}

.sidebar-brand-row {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  width: auto;
  height: 40px;
  margin: 0 7px;
  color: var(--uc-ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid #242321;
  border-radius: 6px;
  background: var(--uc-ink);
  color: #fff;
  font: 700 13px/1 var(--uc-font-display);
  box-shadow: none;
}

.brand-text {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--uc-ink);
  font-family: var(--uc-font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy {
  min-width: 0;
  line-height: 1;
}

.brand-copy small {
  display: block;
  margin-top: 5px;
  color: var(--uc-faint);
  font-size: 10px;
  letter-spacing: .01em;
  white-space: nowrap;
}

.sidebar-collapse-btn {
  position: absolute;
  top: 50%;
  right: -22px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--uc-line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--uc-muted);
  box-shadow: 0 2px 8px rgba(29, 31, 30, .08);
  transform: translateY(-50%);
  transition: color .15s ease, border-color .15s ease;
}

.sidebar-collapse-btn:hover {
  border-color: #b8bbb9;
  color: var(--uc-ink);
}

.sidebar-collapse-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shell.sidebar-collapsed .sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 22px 0 0;
}

.sidebar-nav-group {
  display: grid;
  gap: 2px;
}

.sidebar-nav-group + .sidebar-nav-group {
  margin-top: 18px;
}

.sidebar-nav-label {
  margin: 0 10px 6px;
  color: var(--uc-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}

.sidebar nav a,
.sidebar nav a:hover,
.sidebar nav a.active {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--uc-radius-sm);
  color: var(--uc-muted);
  text-decoration: none;
  transform: none;
  box-shadow: none;
  transition: background-color .15s ease, color .15s ease;
}

.sidebar nav a:hover {
  background: var(--uc-hover);
  color: var(--uc-ink);
}

.sidebar nav a.active {
  background: #e9e9e7;
  color: var(--uc-ink);
  font-weight: 620;
}

.sidebar nav a::before,
.sidebar nav a::after {
  display: none;
  content: none;
}

.sidebar nav a > svg,
.sidebar nav a .nav-icon,
.sidebar nav a .nav-icon svg {
  display: block;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  color: currentColor;
  overflow: visible;
}

.sidebar nav a .nav-icon svg,
.sidebar nav a > svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
}

.sidebar nav a .nav-icon .icon-shell,
.sidebar nav a .nav-icon .icon-outer,
.sidebar nav a .nav-icon .icon-detail,
.sidebar nav a.active .nav-icon .icon-shell,
.sidebar nav a.active .nav-icon .icon-outer,
.sidebar nav a.active .nav-icon .icon-detail {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
}

.sidebar nav a .nav-label {
  display: block;
  overflow: hidden;
  font-family: var(--uc-font-display);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#deviceDot {
  right: 10px;
  top: 9px;
  width: 6px;
  height: 6px;
  border: 1px solid var(--uc-sidebar);
  background: #b8b7b4;
}

#deviceDot.online {
  background: #4a9b68;
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-help {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 8px);
  height: 36px;
  margin: 0 4px 8px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--uc-radius-sm);
  background: transparent;
  color: var(--uc-muted);
  font-size: 16px;
  box-shadow: none;
}

.sidebar-help span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
}

.sidebar-help em {
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.sidebar-help:hover {
  background: var(--uc-hover);
  color: var(--uc-ink);
}

.device-card {
  position: static;
  display: flex;
  align-items: center;
  gap: 9px;
  width: auto;
  margin: 0;
  padding: 11px 8px 7px;
  border: 0;
  border-top: 1px solid var(--uc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.device-card:hover {
  background: var(--uc-hover);
}

.device-avatar {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border-radius: 50%;
  background: #e9e9e7;
  color: var(--uc-ink);
  font-size: 10px;
  font-weight: 700;
}

.device-copy {
  display: block;
  flex: 1;
  min-width: 0;
}

.device-card strong,
.device-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-card strong {
  color: var(--uc-ink);
  font-family: var(--uc-font-display);
  font-size: 12px;
  font-weight: 650;
}

.device-card small {
  margin-top: 3px;
  color: var(--uc-faint);
  font-size: 11px;
}

.device-more {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: currentColor;
  color: var(--uc-faint);
}

.shell.sidebar-collapsed .sidebar {
  padding-inline: 9px;
  align-items: center;
}

.shell.sidebar-collapsed .brand {
  margin-inline: 0;
}

.shell.sidebar-collapsed .brand-copy,
.shell.sidebar-collapsed .sidebar-nav-label,
.shell.sidebar-collapsed .sidebar nav a .nav-label,
.shell.sidebar-collapsed .sidebar-help em,
.shell.sidebar-collapsed .device-card {
  display: none;
}

.shell.sidebar-collapsed .sidebar nav {
  width: 100%;
}

.shell.sidebar-collapsed .sidebar nav a,
.shell.sidebar-collapsed .sidebar nav a:hover,
.shell.sidebar-collapsed .sidebar nav a.active {
  justify-content: center;
  padding-inline: 0;
}

.shell.sidebar-collapsed .sidebar-help {
  justify-content: center;
  width: 36px;
  padding: 0;
}

/* Top navigation --------------------------------------------------------- */

.calendar-topbar {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 18px;
  height: 56px;
  min-height: 56px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid var(--uc-line);
  background: rgba(255, 255, 255, .96);
  box-shadow: none;
  backdrop-filter: none;
}

.product-title {
  display: none;
}

.product-title strong {
  color: var(--uc-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
}

.date-navigation {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.date-navigation > .eyebrow {
  display: block;
  order: -1;
  margin: 0 11px 0 -5px;
  color: var(--uc-muted);
  font-family: var(--uc-font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.today-button,
.icon-button,
.view-select,
.view-tabs,
.button {
  border: 0;
  border-radius: var(--uc-radius-sm);
  background: var(--uc-soft);
  color: var(--uc-ink);
  box-shadow: none;
}

.today-button,
.icon-button {
  height: 30px;
}

.today-button {
  display: flex;
  align-items: center;
  justify-content: center;
  order: -1;
  justify-content: flex-start;
  gap: 0;
  min-width: 0;
  padding: 0 10px 0 0;
  background: transparent;
  font-family: var(--uc-font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.03em;
}

.today-button > span:first-child {
  display: none;
}

.icon-button {
  width: 30px;
  padding: 0;
  font-size: 21px;
  font-weight: 350;
}

.today-button:hover,
.icon-button:hover,
.view-tabs button:hover,
.button:hover {
  background: var(--uc-hover);
}

.today-button:hover {
  background: transparent;
}

.capture-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.view-tabs {
  display: inline-flex;
  gap: 1px;
  padding: 2px;
}

.view-tabs button,
.metric-tabs button {
  min-width: 37px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--uc-muted);
  font-family: var(--uc-font-display);
  font-size: 13px;
  font-weight: 600;
}

.view-tabs button.active,
.metric-tabs button.active {
  background: var(--uc-canvas);
  color: var(--uc-ink);
  box-shadow: 0 1px 2px rgba(50, 48, 44, .08);
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--uc-muted);
  font-size: 12px;
}

.status-pill > i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #bebdb9;
}

.button {
  padding: 8px 12px;
  font-family: var(--uc-font-display);
  font-size: 13px;
  font-weight: 650;
}

.button.primary,
.button.primary:hover,
.calendar-composer button,
.calendar-composer button:hover {
  border-color: var(--uc-ink);
  background: var(--uc-ink);
  color: #fff;
}

/* Calendar board --------------------------------------------------------- */

.calendar-layout {
  --context-rail-width: 316px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(650px, 1fr) var(--context-rail-width);
  height: calc(100vh - 56px);
  min-height: 0;
  background: var(--uc-canvas);
}

.calendar-layout.context-rail-collapsed {
  grid-template-columns: minmax(650px, 1fr) 0;
}

.context-rail-collapse {
  position: absolute;
  z-index: 8;
  top: 14px;
  right: var(--context-rail-width);
  width: 30px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--uc-line);
  border-right: 0;
  border-radius: 9px 0 0 9px;
  display: grid;
  place-items: center;
  background: var(--uc-canvas);
  color: var(--uc-muted);
  cursor: pointer;
  box-shadow: -4px 5px 14px rgba(50, 48, 44, .05);
  transition: right .22s ease, color .15s ease, background .15s ease;
}

.context-rail-collapse svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .22s ease;
}

.context-rail-collapse:hover {
  background: var(--uc-soft);
  color: var(--uc-ink);
}

.calendar-layout.context-rail-collapsed .context-rail-collapse {
  right: 0;
}

.calendar-layout.context-rail-collapsed .context-rail-collapse svg {
  transform: rotate(180deg);
}

.calendar-stage {
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: var(--uc-canvas);
}

.calendar-workspace {
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr) 28px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--uc-canvas);
  box-shadow: none;
}

.calendar-week-head {
  display: grid;
  grid-template-columns: 58px 1fr;
  height: 44px;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid var(--uc-line);
  background: var(--uc-canvas);
}

.calendar-week-head > span {
  align-self: end;
  padding: 0 8px 7px 0;
  color: var(--uc-faint);
  font: 10px/1 var(--uc-font-data);
  text-align: right;
}

.week-headers {
  display: grid;
  grid-template-columns: repeat(var(--calendar-columns, 7), minmax(78px, 1fr));
}

.calendar-week-head {
  grid-template-columns: var(--uc-calendar-axis) minmax(0, 1fr);
  padding-right: var(--calendar-scrollbar-width, 0px);
}

.week-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-left: 1px solid var(--uc-line);
  color: var(--uc-muted);
  font-family: var(--uc-font-display);
  font-size: 12px;
  font-weight: 600;
}

.week-header.today {
  background: transparent;
}

.week-header strong {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  color: var(--uc-ink);
  font: 700 14px/1 var(--uc-font-display);
}

.week-header.today strong {
  background: var(--uc-now);
  color: #fff;
  box-shadow: none;
}

.calendar-scroll {
  display: grid;
  grid-template-columns: var(--uc-calendar-axis) minmax(0, 1fr);
  height: auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--uc-canvas);
  scrollbar-color: #d2d1ce transparent;
  scrollbar-width: thin;
}

.calendar-scroll::-webkit-scrollbar {
  width: 9px;
}

.calendar-scroll::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: #c9c8c4;
  background-clip: padding-box;
}

.time-axis {
  position: relative;
  height: 1440px;
  border: 0;
  background: var(--uc-canvas);
}

.time-label {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  color: var(--uc-faint);
  font: 10px/1 var(--uc-font-data);
}

.week-body,
.week-body.cracked-earth {
  position: relative;
  min-width: 560px;
  height: 1440px;
  isolation: auto;
  background: var(--uc-canvas);
}

.week-body.cracked-earth::before {
  display: none;
  content: none;
}

.hour-lines,
.week-body.cracked-earth .hour-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 59px, var(--uc-line) 59px, var(--uc-line) 60px);
}

.week-columns,
.week-body.cracked-earth .week-columns {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--calendar-columns, 7), minmax(78px, 1fr));
}

.calendar-day-column {
  position: relative;
  border: 0;
  border-left: 1px solid var(--uc-line);
  background: transparent;
  cursor: crosshair;
}

.calendar-day-column:last-child {
  border-right: 1px solid var(--uc-line);
}

.calendar-day-column.today {
  background: rgba(50, 48, 44, .018);
}

.calendar-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-top: 1px solid var(--uc-line);
  background: var(--uc-canvas);
  color: var(--uc-faint);
  font-size: 10px;
}

.calendar-legend i {
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 3px;
}

.interaction-hint {
  margin-left: auto;
}

.now-line,
.week-body.cracked-earth .now-line,
.now-line::before {
  background: var(--uc-now);
}

.now-line {
  height: 1px;
}

.now-line::before {
  left: -3px;
  top: -3px;
  width: 7px;
  height: 7px;
}

/* CalendarCN-style paper tags: color identifies the event without becoming a slab. */
.calendar-event {
  min-height: 22px;
  padding: 5px 7px 5px 9px;
  border-radius: var(--uc-radius-xs);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: -.005em;
  box-shadow: none;
  transition: box-shadow .14s ease, filter .14s ease, transform .14s ease;
}

.calendar-event strong {
  font-family: var(--uc-font-display);
  font-size: 12px;
  font-weight: 700;
}

.calendar-event time {
  margin-top: 2px;
  font: 9px/1.2 var(--uc-font-data);
}

.calendar-event.confirmed {
  color: color-mix(in srgb, var(--event-color, #32a5e5) 72%, #252525);
  border: 0;
  border-left: 4px solid var(--event-color, #32a5e5);
  background: color-mix(in srgb, var(--event-color, #32a5e5) 15%, #fff);
}

.calendar-event.pending {
  color: color-mix(in srgb, var(--event-color, #5875d5) 76%, #303236);
  border: 1px dashed color-mix(in srgb, var(--event-color, #5875d5) 68%, #777);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--event-color, #5875d5) 12%, #fff), color-mix(in srgb, var(--event-color, #5875d5) 12%, #fff) 6px, color-mix(in srgb, var(--event-color, #5875d5) 7%, #fff) 6px, color-mix(in srgb, var(--event-color, #5875d5) 7%, #fff) 12px);
}

.calendar-event:hover,
.calendar-event:focus-visible {
  z-index: 5;
  filter: none;
  transform: none;
  outline: 0;
  box-shadow: 0 4px 12px rgba(50, 48, 44, .12);
}

.calendar-event.selected,
.month-event.selected {
  outline: 2px solid var(--event-color, #32a5e5);
  outline-offset: 1px;
  box-shadow: none;
}

.calendar-event.is-interacting {
  z-index: 10;
  opacity: .94;
  transform: none;
  box-shadow: 0 14px 30px rgba(50, 48, 44, .2);
  transition: none;
}

.calendar-selection {
  --event-color: #6f9cf5;
  padding: 5px 7px 5px 9px;
  overflow: hidden;
  border: 0;
  border-left: 4px solid var(--event-color);
  border-radius: var(--uc-radius-xs);
  background: color-mix(in srgb, var(--event-color) 15%, #fff);
  color: color-mix(in srgb, var(--event-color) 72%, #252525);
  box-shadow: none;
}

.calendar-selection strong {
  padding: 0;
  font: 600 10px/1.3 var(--uc-font-data);
  letter-spacing: -.01em;
}

.calendar-draft-preview {
  padding: 5px 7px 5px 9px;
  border: 0;
  border-left: 4px solid var(--event-color, #6f9cf5);
  border-radius: var(--uc-radius-xs);
  background: color-mix(in srgb, var(--event-color, #6f9cf5) 15%, #fff);
  color: color-mix(in srgb, var(--event-color, #6f9cf5) 72%, #252525);
  box-shadow: 0 6px 16px rgba(50, 48, 44, .1);
}

.calendar-draft-preview strong {
  font-family: var(--uc-font-text);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.calendar-draft-preview time {
  font: 500 9px/1.2 var(--uc-font-data);
}

.calendar-draft-preview span {
  border-radius: 4px;
  background: color-mix(in srgb, var(--event-color, #6f9cf5) 9%, #fff);
  color: color-mix(in srgb, var(--event-color, #6f9cf5) 66%, #424242);
  font-family: var(--uc-font-text);
  letter-spacing: 0;
}

.calendar-event.is-interacting.confirmed {
  border-left: 4px solid var(--event-color, #6f9cf5);
  background: color-mix(in srgb, var(--event-color, #6f9cf5) 18%, #fff);
  color: color-mix(in srgb, var(--event-color, #6f9cf5) 76%, #202020);
  box-shadow: 0 10px 24px rgba(50, 48, 44, .16);
}

/* Right context rail ----------------------------------------------------- */

.context-rail {
  display: block;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-left: 1px solid var(--uc-line);
  background: var(--uc-canvas);
  scrollbar-width: thin;
  transition: opacity .16s ease;
}

.calendar-layout.context-rail-collapsed .context-rail {
  overflow: hidden;
  border-left: 0;
  opacity: 0;
  pointer-events: none;
}

.context-rail > section,
.context-rail > .quick-entry.calendar-composer,
.context-rail > section.status-deck {
  margin: 0;
  padding: 19px 20px;
  border: 0;
  border-bottom: 1px solid var(--uc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.quick-entry.calendar-composer {
  display: block;
  background: var(--uc-canvas);
}

.quick-entry-title {
  margin: 0;
  color: var(--uc-ink);
  font: 700 17px/1.25 var(--uc-font-display);
  letter-spacing: -.01em;
}

.quick-entry.calendar-composer > .quick-input-container {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 13px;
}

.quick-entry.calendar-composer .quick-entry-input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--uc-line-strong);
  border-radius: var(--uc-radius-sm);
  background: var(--uc-canvas);
  color: var(--uc-ink);
  outline: 0;
  box-shadow: none;
  font-family: var(--uc-font-text);
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.quick-entry.calendar-composer .quick-entry-input:focus {
  border-color: #9a9995;
  background: var(--uc-canvas);
  box-shadow: 0 0 0 3px rgba(50, 48, 44, .06);
}

.quick-input-label {
  position: absolute;
  left: 11px;
  top: 12px;
  z-index: 1;
  padding: 0;
  background: transparent;
  color: var(--uc-faint);
  font-family: var(--uc-font-text);
  font-size: 13px;
  font-weight: 500;
  opacity: 1;
  transform: none;
  pointer-events: none;
  transition: opacity .12s ease;
}

.quick-input-container .quick-entry-input:focus ~ .quick-input-label,
.quick-input-container .quick-entry-input:not(:placeholder-shown) ~ .quick-input-label {
  top: 12px;
  opacity: 0;
  transform: none;
}

.quick-input-container .topline,
.quick-input-container .underline {
  display: none;
}

.quick-entry.calendar-composer > .quick-entry-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
}

.quick-entry.calendar-composer .voice-toggle-action,
.quick-entry.calendar-composer .generate-button {
  width: 100%;
  min-width: 0;
  height: 38px;
  margin: 0;
  border-radius: var(--uc-radius-sm);
}

.quick-entry.calendar-composer .voice-toggle-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 9px;
  border: 1px solid var(--uc-line);
  background: var(--uc-soft);
  color: var(--uc-ink);
}

.voice-toggle-caption {
  font-family: var(--uc-font-display);
  font-size: 12px;
  font-weight: 650;
}

.voice-switch {
  width: 30px;
  height: 16px;
}

.voice-slider {
  border: 0;
  border-radius: 999px;
  background: #cfceca;
  box-shadow: none;
}

.voice-slider::before {
  width: 12px;
  height: 12px;
  left: 2px;
  bottom: 2px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(50, 48, 44, .18);
}

.voice-toggle:checked + .voice-slider,
.voice-toggle.listening + .voice-slider {
  background: var(--uc-ink);
}

.voice-toggle:checked + .voice-slider::before,
.voice-toggle.listening + .voice-slider::before {
  transform: translateX(14px);
}

.voice-switch:hover .voice-slider {
  box-shadow: none;
}

.quick-entry.calendar-composer .generate-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 0;
  background: var(--uc-ink);
  color: #fff;
  font-family: var(--uc-font-display);
  font-size: 13px;
  font-weight: 700;
  transition: background-color .15s ease, transform .15s ease;
}

.quick-entry.calendar-composer .generate-button:hover {
  background: #1f1e1c;
}

.generate-button:hover .svg-wrapper,
.generate-button:hover svg,
.generate-button:hover .generate-button-text {
  animation: none;
  transform: none;
  opacity: 1;
}

.generate-button svg {
  width: 15px;
  height: 15px;
}

.quick-entry.calendar-composer > #entryFeedback {
  margin: 8px 0 0;
  color: var(--uc-muted);
  font-size: 10px;
}

.side-panel-heading {
  align-items: flex-start;
}

.side-panel-heading .eyebrow,
.calendar-composer .eyebrow {
  color: var(--uc-faint);
  font-family: var(--uc-font-display);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .09em;
}

.side-panel-heading h2,
.time-overview .side-panel-heading h2 {
  margin: 4px 0 0;
  color: var(--uc-ink);
  font-family: var(--uc-font-display);
  font-size: 16px;
  font-weight: 700;
}

.side-panel-heading > strong,
.time-overview .side-panel-heading > strong {
  color: var(--uc-ink);
  font-family: var(--uc-font-display);
  font-size: 18px;
  font-weight: 700;
}

.distribution-content {
  margin-top: 14px;
}

.distribution-donut {
  box-shadow: none;
}

.distribution-legend > div {
  font-family: var(--uc-font-text);
  font-size: 13px;
}

.distribution-legend strong,
.distribution-legend p {
  font-size: 12px;
}

.heatmap-header span {
  font-family: var(--uc-font-display);
  font-size: 14px;
  font-weight: 700;
}

.heatmap-weekdays span {
  font-size: 11px;
}

.context-rail .status-tile {
  border-color: var(--uc-line);
  border-radius: var(--uc-radius-md);
  background: var(--uc-soft);
  box-shadow: none;
}

/* Status is information, not a second dashboard. */
.context-rail > section.status-deck {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 8px 20px;
}

.context-rail .status-tile,
.context-rail .ai-inbox-tile,
.context-rail .collector-status-tile {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--uc-ink);
  box-shadow: none;
}

.context-rail .ai-inbox-tile {
  flex-direction: row;
  cursor: pointer;
}

.context-rail .ai-inbox-tile:hover {
  background: transparent;
}

.context-rail .ai-inbox-tile::before,
.context-rail .collector-status-tile::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
  background: #c2c1bd;
}

.context-rail .ai-inbox-tile.has-messages::before {
  background: #d75b4b;
}

.context-rail .folder-scene,
.context-rail .collector-status-pattern,
.context-rail .collector-switch-control {
  display: none;
}

.context-rail .status-tile-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.context-rail .status-tile-copy strong,
.context-rail .collector-status-tile h1 {
  margin: 0;
  color: var(--uc-ink);
  font: 620 11px/1.2 "Segoe UI Variable Text", "Segoe UI", "PingFang SC", sans-serif;
  letter-spacing: 0;
  text-align: left;
}

.context-rail .status-tile-copy small,
.context-rail .collector-status-tile > strong {
  margin-left: auto;
  color: var(--uc-muted);
  font-size: 10px;
  font-weight: 450;
  line-height: 1.2;
  text-align: right;
}

.context-rail .collector-status-tile {
  flex-direction: row;
  border-top: 1px solid var(--uc-line);
}

.context-rail .collector-status-tile > strong {
  display: block;
}

.context-rail .inbox-badge {
  position: static;
  order: 3;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 0;
  background: var(--uc-ink);
  box-shadow: none;
  font-size: 9px;
}

.recording-heatmap {
  margin-top: 14px;
}

.heatmap-grid i[style*="--level"],
.heatmap-scale i[style*="--level"] {
  box-shadow: none;
}

.heatmap-grid i.heatmap-today {
  outline-color: var(--uc-now);
}

.heatmap-nav:hover {
  background: var(--uc-hover);
  color: var(--uc-ink);
}

/* Event detail popover --------------------------------------------------- */

.event-popover {
  width: min(430px, calc(100vw - 24px));
  border: 1px solid var(--uc-line);
  border-radius: var(--uc-radius-md);
  background: rgba(255, 255, 255, .98);
  box-shadow: var(--uc-shadow-float);
  backdrop-filter: blur(18px);
}

.event-popover form {
  padding: 22px;
}

.event-popover h2,
.event-title-field input {
  font-family: var(--uc-font-display);
}

.event-popover h2 {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 680;
}

.event-field {
  gap: 6px;
}

.event-field > span,
.event-color-field > span {
  color: var(--uc-muted);
  font-size: 10px;
}

.event-field input,
.event-field select,
.event-field textarea {
  border: 1px solid var(--uc-line-strong);
  border-radius: var(--uc-radius-sm);
  background: var(--uc-canvas);
}

.event-field input:focus,
.event-field select:focus,
.event-field textarea:focus {
  border-color: #9a9995;
  box-shadow: 0 0 0 3px rgba(50, 48, 44, .06);
}

.event-title-field input {
  height: 46px;
  font-size: 17px;
  font-weight: 650;
}

.event-form-grid {
  gap: 11px 10px;
}

.event-duration {
  color: var(--uc-muted);
}

.button.danger {
  border-color: #ecd8d4;
  background: #fff9f8;
  color: #aa4b3e;
}

/* Secondary product pages share the same sheet, not separate dashboards. */
.page-view,
.app-page-body {
  background: var(--uc-canvas);
}

.app-page-head {
  min-height: 132px;
  padding-top: 25px;
  border-bottom: 1px solid var(--uc-line);
  background: var(--uc-sidebar);
}

.app-page-head h1 {
  color: var(--uc-ink);
  font-size: 34px;
  font-weight: 680;
  letter-spacing: -.035em;
}

.page-tabs button {
  color: var(--uc-muted);
}

.page-tabs button.active {
  background: var(--uc-canvas);
  color: var(--uc-ink);
}

/* Batch workbench -------------------------------------------------------- */

.batch-module {
  display: flex;
  width: min(960px, 100%);
  min-height: calc(100vh - 132px);
  margin: 0 auto;
  padding: 46px 36px 64px;
  flex-direction: column;
  background: var(--uc-canvas);
}

.batch-heading {
  order: 0;
  max-width: 690px;
}

.batch-heading .eyebrow {
  color: var(--uc-faint);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .1em;
}

.batch-heading h2 {
  margin: 7px 0 6px;
  color: var(--uc-ink);
  font-size: 25px;
  font-weight: 680;
  letter-spacing: -.03em;
}

.batch-heading p {
  color: var(--uc-muted);
  font-size: 12px;
}

.batch-result {
  order: 1;
  margin: 28px 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
}

.batch-preview-head {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--uc-line);
}

.batch-preview-head h3 {
  font-size: 17px;
}

.batch-table {
  gap: 0;
  border-bottom: 1px solid var(--uc-line);
}

.batch-row {
  gap: 10px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--uc-line);
  border-radius: 0;
  background: transparent;
}

.batch-row:last-child {
  border-bottom: 0;
}

.batch-row input,
.batch-row select {
  border-color: var(--uc-line-strong);
  border-radius: var(--uc-radius-sm);
}

.batch-date-row,
.batch-hint,
.batch-entry-tools,
.batch-module > textarea,
.batch-module > .batch-actions,
.batch-module > .module-error {
  order: 2;
}

.batch-date-row {
  margin-top: 25px;
  padding: 0;
  border: 0;
  background: transparent;
}

.batch-check,
.batch-default-date {
  color: var(--uc-ink);
  font-size: 11px;
}

.batch-default-date input {
  border-color: var(--uc-line-strong);
  border-radius: var(--uc-radius-sm);
}

.batch-hint {
  color: var(--uc-muted);
  font-size: 10px;
}

.batch-entry-tools {
  margin-top: 4px;
}

.batch-field-label {
  color: var(--uc-ink);
  font-size: 11px;
  font-weight: 650;
}

.batch-entry-tools .voice-input {
  height: 32px;
  border-color: var(--uc-line-strong);
  border-radius: var(--uc-radius-sm);
  background: var(--uc-canvas);
  color: var(--uc-ink);
  font-size: 10px;
}

.batch-module > textarea {
  min-height: 190px;
  padding: 15px;
  border: 1px solid var(--uc-line-strong);
  border-radius: var(--uc-radius-md);
  background: var(--uc-canvas);
  color: var(--uc-ink);
  font-size: 12px;
  line-height: 1.7;
  box-shadow: none;
}

.batch-module > textarea:focus {
  border-color: #999894;
  box-shadow: 0 0 0 3px rgba(50, 48, 44, .06);
}

.batch-module > .batch-actions {
  margin-top: 12px;
}

/* Projects — a real working table, not a stack of floating cards. */
.project-module {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding-top: 56px;
}

.module-toolbar {
  gap: 9px;
  margin-bottom: 24px;
}

.module-search,
.module-toolbar select,
.report-generator select {
  height: 38px;
  border-color: var(--uc-line-strong);
  border-radius: var(--uc-radius-sm);
  background: var(--uc-canvas);
  color: var(--uc-muted);
  font-size: 12px;
}

.project-table {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-top: 1px solid var(--uc-line);
  border-bottom: 1px solid var(--uc-line);
  border-radius: 0;
}

.project-table-head,
.project-row {
  min-height: 52px;
  padding: 10px 14px;
}

.project-table-head {
  min-height: 40px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--uc-line);
  color: var(--uc-faint);
  font-size: 10px;
  font-weight: 620;
}

.functional-module.project-module .project-table .project-row,
.functional-module.project-module .project-table .project-row:hover {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--uc-line);
  border-radius: 0;
  background: var(--uc-canvas);
  color: var(--uc-ink);
  transform: none;
  box-shadow: none;
  transition: background-color .14s ease;
}

.functional-module.project-module .project-table .project-row:last-child {
  border-bottom: 0;
}

.functional-module.project-module .project-table .project-row:hover {
  background: var(--uc-sidebar);
}

.project-name i {
  width: 9px;
  height: 9px;
}

.project-name b {
  font-size: 12px;
  font-weight: 650;
}

.project-name small,
.project-row > span {
  color: var(--uc-muted);
  font-size: 10px;
}

.compact-dialog,
.project-question-dialog {
  border: 1px solid var(--uc-line);
  border-radius: var(--uc-radius-md);
  background: var(--uc-canvas);
  box-shadow: var(--uc-shadow-float);
}

.compact-dialog input,
.compact-dialog textarea,
.compact-dialog select {
  border-color: var(--uc-line-strong);
  border-radius: var(--uc-radius-sm);
}

/* Reports — one continuous document with restrained internal hierarchy. */
.reports-module {
  width: min(1080px, 100%);
  max-width: none;
  margin: 0 auto;
  padding-top: 56px;
}

.reports-module .report-generator {
  padding: 15px 16px;
  border: 1px solid var(--uc-line);
  border-radius: var(--uc-radius-md);
  background: var(--uc-canvas);
}

.reports-module .report-generator h2 {
  margin-bottom: 3px;
  font-size: 15px;
  font-weight: 650;
}

.reports-module .report-generator p {
  color: var(--uc-muted);
  font-size: 10px;
}

.generated-report-grid {
  max-width: none;
  margin-top: 28px;
}

.caretaker-report {
  overflow: hidden;
  border: 1px solid var(--uc-line);
  border-radius: 12px;
  background: var(--uc-canvas);
  box-shadow: none;
}

.caretaker-report .report-document-head {
  padding: 23px 28px;
  border-bottom: 1px solid var(--uc-line);
  background: var(--uc-canvas);
}

.report-document-head h2 {
  font-size: 20px;
}

.reports-module .caretaker-report .caretaker-brief {
  margin: 0;
  padding: 30px 32px;
  border-radius: 0;
  border-bottom: 1px solid var(--uc-line);
  background: var(--uc-canvas);
  box-shadow: none;
}

.reports-module .caretaker-report .caretaker-brief h2 {
  font-size: 23px;
  line-height: 1.48;
}

.brief-notes {
  border-color: var(--uc-line);
}

.brief-notes > div + div {
  border-color: var(--uc-line);
}

.report-distribution {
  padding: 28px 32px;
}

.weekly-day-list {
  gap: 0;
}

.weekly-day-list .week-day-story,
.weekly-day-list .week-day-story:hover {
  padding: 24px 0;
  border: 0;
  border-bottom: 1px solid var(--uc-line);
  border-radius: 0;
  background: var(--uc-canvas);
  transform: none;
  box-shadow: none;
}

.weekly-day-list .week-day-story:last-child {
  border-bottom: 0;
}

/* Collector — an editorial download object adapted from the supplied Download 4 reference. */
.collector-download {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, .96fr);
  gap: clamp(42px, 6vw, 86px);
  width: min(1120px, calc(100% - 64px));
  min-height: 670px;
  margin: 34px auto 26px;
  padding: clamp(32px, 4vw, 56px);
  border: 1px solid var(--uc-line);
  border-radius: 20px;
  background: #fff;
  color: var(--uc-ink);
  overflow: hidden;
}

.collector-download-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  min-height: 560px;
  font-family: "Inter Variable", var(--uc-font-text);
}

.collector-kicker {
  color: var(--uc-muted);
  font-family: "Inter Variable", var(--uc-font-text);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .24em;
}

.collector-download-center {
  align-self: center;
  max-width: 510px;
  padding: 28px 0 40px;
}

.collector-download h2 {
  margin: 0;
  color: var(--uc-ink);
  font-family: "Noto Serif SC Collector", "EB Garamond Variable", "Noto Serif SC", serif;
  font-size: clamp(55px, 4.75vw, 74px);
  font-weight: 430;
  letter-spacing: -.025em;
  line-height: 1.11;
  font-optical-sizing: auto;
}

.collector-download h2 span {
  display: block;
  white-space: nowrap;
}

.collector-download p {
  max-width: 430px;
  margin: 36px 0 30px;
  color: var(--uc-muted);
  font-family: "Inter Variable", var(--uc-font-text);
  font-size: 15px;
  line-height: 1.8;
}

.collector-download-button,
.collector-download-button:hover {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 7px 8px 7px 24px;
  border: 0;
  border-radius: 999px;
  background: #263747;
  color: #fff;
  font-family: "Inter Variable", var(--uc-font-text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: none;
  transition: background-color .15s ease, transform .15s ease;
}

.collector-download-button:hover {
  background: #1d2a35;
  transform: translateY(-1px);
}

.collector-download-button b {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}

.collector-download-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.collector-download-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--uc-faint);
  font-family: "Inter Variable", var(--uc-font-text);
  font-size: 11px;
  letter-spacing: .04em;
}

.collector-download-meta strong {
  color: var(--uc-ink);
  font-weight: 700;
}

.collector-device-visual {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-width: 0;
  min-height: 500px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 18px;
  background: linear-gradient(150deg, #cad5de 0%, #8197a8 100%);
  overflow: hidden;
}

.collector-device-visual.collector-scene {
  display: block;
  height: 100%;
  min-height: 570px;
  margin: 0;
  padding: 0;
  background: #83919c;
}

.collector-device-visual.collector-scene::before {
  display: none;
}

.collector-scene::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 28%;
  background: linear-gradient(to top, rgba(20, 29, 36, .48), transparent);
  pointer-events: none;
}

.collector-scene img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 570px;
  object-fit: cover;
  object-position: center;
}

.collector-device-visual::before {
  content: "";
  position: absolute;
  inset: -22% auto auto -26%;
  width: 82%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 50%;
}

.collector-window-shell {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(100%, 420px);
  margin: 0 auto;
  border: 1px solid rgba(38, 55, 71, .22);
  border-radius: 13px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 28px 70px rgba(38, 55, 71, .24);
  overflow: hidden;
}

.collector-window-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid #e7ebee;
  color: #7d888f;
  font-size: 9px;
}

.collector-window-bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cfd4d8;
}

.collector-window-bar span {
  margin-left: 6px;
}

.collector-window-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 42px;
  color: #263747;
}

.collector-windows-logo {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 19px;
  border-radius: 12px;
  background: #263747;
  color: #fff;
  font-size: 26px;
}

.collector-window-body strong {
  font-size: 18px;
}

.collector-window-body small {
  margin-top: 7px;
  color: #7a858c;
  font-size: 10px;
}

.collector-visual-toggle {
  width: 48px;
  height: 26px;
  margin-top: 24px;
  padding: 3px;
  border-radius: 999px;
  background: #263747;
}

.collector-visual-toggle i {
  display: block;
  width: 20px;
  height: 20px;
  margin-left: auto;
  border-radius: 50%;
  background: #fff;
}

.collector-visual-meta {
  position: absolute;
  right: 24px;
  bottom: 22px;
  left: 24px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, .92);
  font-family: "Inter Variable", var(--uc-font-text);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .16em;
}

.collector-visual-meta span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.collector-visual-meta i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #eff4f0;
}

.collector-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  width: min(900px, calc(100% - 64px));
  margin: 0 auto 36px;
  padding: 0;
  list-style: none;
}

.collector-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--uc-muted);
  font-size: 12px;
}

.collector-steps b {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border: 1px solid var(--uc-line-strong);
  border-radius: 50%;
  border-color: var(--uc-line-strong);
  color: var(--uc-ink);
  font-size: 10px;
}

.collector-simple.collector-status-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  width: min(760px, calc(100% - 64px));
  margin: 100px auto;
  padding: 28px 30px;
  border: 1px solid var(--uc-line);
  border-color: var(--uc-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.collector-status-card .collector-device-mark {
  width: 46px;
  height: 46px;
  background: #e7efe9;
  color: #3b7351;
}

.collector-status-card h2 {
  margin: 4px 0 0;
  font-family: var(--uc-font-display);
  font-size: 21px;
}

.collector-status-card p {
  margin: 6px 0 0;
  color: var(--uc-muted);
  font-size: 12px;
}

/* Typography system: collector editorial display + restrained UI sans. */
.brand-text,
.sidebar nav a .nav-label,
.device-card strong,
.date-navigation > .eyebrow,
.view-tabs button,
.metric-tabs button,
.button,
.week-header,
.calendar-event strong,
.voice-toggle-caption,
.quick-entry.calendar-composer .generate-button,
.side-panel-heading .eyebrow,
.calendar-composer .eyebrow {
  font-family: var(--uc-font-text);
}

.today-button,
.side-panel-heading h2,
.time-overview .side-panel-heading h2,
.time-overview .side-panel-heading > strong,
.heatmap-header span,
.event-popover h2,
.event-title-field input,
.collector-status-card h2 {
  font-family: var(--uc-font-editorial);
  font-optical-sizing: auto;
}

.today-button {
  font-size: 23px;
  font-weight: 560;
  letter-spacing: -.035em;
}

.side-panel-heading h2,
.time-overview .side-panel-heading h2 {
  font-size: 18px;
  font-weight: 560;
  letter-spacing: -.025em;
}

.calendar-event strong {
  font-weight: 650;
}

@media (max-width: 960px) {
  .collector-download {
    grid-template-columns: 1fr;
    width: min(760px, calc(100% - 36px));
  }

  .collector-download-copy {
    min-height: 520px;
  }

  .collector-device-visual {
    min-height: 480px;
  }

  .collector-steps {
    width: min(700px, calc(100% - 36px));
    grid-template-columns: 1fr;
  }
}

/* Settings --------------------------------------------------------------- */
.settings-stack {
  width: min(860px, 100%);
  max-width: none;
  margin: 0 auto;
  gap: 16px;
}

.settings-stack .settings-panel {
  max-width: none;
  padding: 24px 28px;
  border: 1px solid var(--uc-line);
  border-radius: var(--uc-radius-md);
  background: var(--uc-canvas);
  box-shadow: none;
}

/* Authentication — the same sheet of paper, before the workspace opens. */
.auth-view {
  position: relative;
  min-height: 100vh;
  padding: 32px;
  overflow: hidden;
  background:
    linear-gradient(rgba(218, 220, 218, .34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(218, 220, 218, .34) 1px, transparent 1px),
    var(--uc-canvas);
  background-size: 32px 32px;
}

.auth-view::before {
  content: "UNC";
  position: absolute;
  top: 30px;
  left: 34px;
  color: var(--uc-ink);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: .12em;
}

.auth-card {
  position: relative;
  width: min(420px, 100%);
  padding: 38px 40px 34px;
  border: 1px solid var(--uc-line-strong);
  border-radius: var(--uc-radius-md);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--uc-shadow-float);
}

.auth-card h1 {
  margin: 4px 0 7px;
  color: var(--uc-ink);
  font-size: 25px;
  font-weight: 680;
  letter-spacing: -.03em;
}

.auth-subtitle {
  margin-bottom: 26px;
  color: var(--uc-muted);
  font-size: 12px;
}

.auth-card label {
  color: var(--uc-muted);
  font-size: 11px;
  font-weight: 620;
}

.auth-card input {
  min-height: 42px;
  border-color: var(--uc-line-strong);
  border-radius: var(--uc-radius-sm);
  color: var(--uc-ink);
}

.auth-card input:focus {
  border-color: var(--uc-ink);
  outline: 2px solid rgba(50, 48, 44, .1);
}

.auth-switch {
  color: var(--uc-ink);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-avatar {
  border-radius: var(--uc-radius-md);
  background: var(--uc-ink);
}

.account-save-state {
  background: var(--uc-soft);
  color: var(--uc-muted);
  font-size: 10px;
}

.guide-list > div,
.weekday-settings span {
  border-color: var(--uc-line);
  border-radius: var(--uc-radius-sm);
}

.weekday-settings input:checked + span {
  border-color: var(--uc-ink);
  background: var(--uc-ink);
}

/* Responsive: collapse the navigation into an icon rail before hiding data. */
@media (max-width: 1280px) {
  .shell,
  .shell.sidebar-collapsed {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 9px;
    align-items: center;
  }

  .brand {
    margin-inline: 0;
  }

  .brand-text,
  .brand-copy small,
  .sidebar-nav-label,
  .sidebar nav a .nav-label,
  .device-card {
    display: none;
  }

  .sidebar nav {
    width: 100%;
  }

  .sidebar-collapse-btn {
    display: none;
  }

  .sidebar-help {
    justify-content: center;
    width: 36px;
    padding: 0;
  }

  .sidebar-help em {
    display: none;
  }

  .sidebar nav a,
  .sidebar nav a:hover,
  .sidebar nav a.active {
    justify-content: center;
    padding-inline: 0;
  }

  .sidebar nav a::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 48px;
    top: 50%;
    z-index: 60;
    display: block;
    padding: 6px 8px;
    border-radius: 5px;
    background: var(--uc-ink);
    color: #fff;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    transform: translate(5px, -50%);
    pointer-events: none;
    transition: opacity .12s ease, transform .12s ease;
  }

  .sidebar nav a:hover::after {
    opacity: 1;
    transform: translate(0, -50%);
  }

  .calendar-layout {
    --context-rail-width: 306px;
    grid-template-columns: minmax(620px, 1fr) var(--context-rail-width);
  }

  .calendar-topbar {
    grid-template-columns: 92px minmax(280px, 1fr) auto;
  }

  .product-title strong,
  .capture-controls > .status-pill {
    display: none;
  }
}

@media (max-width: 1080px) {
  .calendar-layout {
    grid-template-columns: minmax(620px, 1fr);
  }

  .context-rail {
    display: none;
  }

  .context-rail-collapse {
    display: none;
  }

  .calendar-topbar {
    grid-template-columns: 48px minmax(260px, 1fr) auto;
    gap: 10px;
    padding-inline: 14px;
  }

  .product-title {
    min-width: 0;
  }

  .today-button {
    min-width: 190px;
  }
}

@media (max-width: 720px) {
  body {
    min-width: 0;
  }

  .shell,
  .shell.sidebar-collapsed {
    display: block;
  }

  #todayView {
    height: auto;
    overflow: visible;
  }

  .sidebar {
    position: fixed !important;
    top: auto !important;
    right: 0;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 50;
    width: 100% !important;
    height: 58px !important;
    padding: 5px 9px !important;
    border: 0;
    border-top: 1px solid var(--uc-line);
    background: rgba(248, 248, 247, .96);
    backdrop-filter: blur(16px);
    transform: none !important;
  }

  .brand,
  .sidebar-help,
  .device-card,
  .sidebar-spacer {
    display: none !important;
  }

  .mobile-menu-btn,
  .sidebar-scrim {
    display: none !important;
  }

  .sidebar nav {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
  }

  .sidebar nav a,
  .sidebar nav a:hover,
  .sidebar nav a.active {
    display: flex !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0 !important;
  }

  .sidebar nav a .nav-label {
    display: none !important;
  }

  .sidebar nav a::after {
    display: none;
  }

  .calendar-topbar {
    grid-template-columns: 1fr auto;
    height: 58px;
    min-height: 58px;
    padding: 0 10px;
  }

  .product-title {
    display: none;
  }

  .date-navigation {
    justify-self: start;
  }

  .today-button {
    min-width: 0;
    max-width: 190px;
  }

  .capture-controls > .button,
  .capture-controls > .status-pill {
    display: none;
  }

  .calendar-layout {
    display: block;
    height: calc(100vh - 116px);
  }

  .calendar-stage,
  .calendar-workspace {
    height: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
