:root {
  color-scheme: light;
  --bg: #f4f3ef;
  --bg-elevated: #faf9f6;
  --surface: #ffffff;
  --ink: #141412;
  --ink-soft: #3b3a35;
  --muted: #6d6b64;
  --faint: #96938a;
  --line: #e3e1da;
  --line-strong: #d3d0c7;
  --accent: #141412;
  --accent-soft: #e9e6df;
  --danger: #c23a2c;
  --danger-soft: #f7e7e3;
  --success: #2c6a4d;
  --success-soft: #e7f1eb;
  --warning: #8a6116;
  --warning-soft: #f6eede;
  --ring: rgba(20, 20, 18, 0.18);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --font-display: "Schibsted Grotesk", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(900px 460px at 72% -18%, rgba(255, 255, 255, 0.9), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--ink);
  color: var(--surface);
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
  height: 100vh;
  padding: 26px 20px 20px;
  border-right: 1px solid var(--line);
  background: rgba(250, 249, 246, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  border-radius: var(--radius);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--ink);
  color: var(--surface);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.btn-primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.btn-primary:hover {
  background: #2a2a26;
  border-color: #2a2a26;
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--bg-elevated);
  color: var(--ink);
}

.btn-danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #a93125;
  border-color: #a93125;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 11px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-link:hover {
  background: rgba(20, 20, 18, 0.04);
  color: var(--ink);
}

.nav-link.is-active {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}

.nav-link.is-active svg {
  color: var(--ink);
}

.nav-badge {
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(20, 20, 18, 0.06);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.nav-link.is-active .nav-badge {
  background: var(--ink);
  color: var(--surface);
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
}

.sidebar-footer a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.sidebar-footer a:hover {
  color: var(--ink);
}

.sidebar-footer a svg {
  width: 12px;
  height: 12px;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 40px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 243, 239, 0.82);
  backdrop-filter: blur(18px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.mobile-brand {
  display: none;
}

.view-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.view-heading h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-chip {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.icon-btn.is-spinning svg {
  animation: spin 0.8s linear infinite;
}

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 40px 0;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.5;
}

.banner-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(194, 58, 44, 0.08);
  color: var(--danger);
}

.banner-icon svg {
  width: 15px;
  height: 15px;
}

.banner strong {
  color: var(--ink);
}

.banner code {
  margin-left: 4px;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(20, 20, 18, 0.05);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
  word-break: break-all;
}

.banner .btn {
  margin-left: auto;
  flex: 0 0 auto;
}

.content {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 36px 40px 96px;
}

.view {
  animation: viewIn 0.3s ease both;
}

.top-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(440px, 1.08fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  margin: 8px 0 44px;
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 0;
}

.hero h2 {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.055em;
  color: var(--ink);
}

.hero p {
  max-width: 44ch;
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.62;
}

.example-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  margin-top: 28px;
}

.example-chip {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.example-chip:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.capture-card {
  padding: 26px 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow:
    0 1px 0 rgba(20, 20, 18, 0.03),
    0 24px 60px -42px rgba(20, 20, 18, 0.4);
}

.capture-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.capture-head h2 {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.record-zone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0;
  margin: 22px 0 18px;
  text-align: center;
}

.mic-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 16px 32px -18px rgba(20, 20, 18, 0.65);
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.mic-btn:hover {
  transform: translateY(-1px) scale(1.015);
  box-shadow: 0 20px 38px -18px rgba(20, 20, 18, 0.7);
}

.mic-btn:active {
  transform: scale(0.985);
}

.mic-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.mic-icon svg {
  width: 31px;
  height: 31px;
}

.mic-stop svg {
  width: 26px;
  height: 26px;
}

.mic-ring {
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(20, 20, 18, 0.16);
  border-radius: 50%;
  opacity: 0;
}

.mic-btn.is-recording {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
  box-shadow: 0 16px 32px -18px rgba(194, 58, 44, 0.7);
}

.mic-btn.is-recording .mic-ring {
  border-color: rgba(194, 58, 44, 0.35);
  opacity: 1;
  animation: pulseRing 1.8s ease-out infinite;
}

.record-copy {
  min-width: 0;
  margin-top: 16px;
}

.record-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.record-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.record-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 16px;
  margin-top: 8px;
}

.timer {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.record-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--danger);
  font-size: 11px;
  font-weight: 500;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.2s ease-in-out infinite;
}

.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 30px;
  margin-top: 10px;
}

.waveform span {
  width: 3px;
  height: 24%;
  border-radius: 999px;
  background: var(--ink);
  animation: wave 1s ease-in-out infinite;
}

.waveform.is-live span {
  animation: none;
  transition: height 70ms linear;
}

.waveform span:nth-child(2n) {
  animation-delay: 0.12s;
}

.waveform span:nth-child(3n) {
  animation-delay: 0.24s;
}

.waveform span:nth-child(4n) {
  animation-delay: 0.36s;
}

.waveform span:nth-child(5n) {
  animation-delay: 0.08s;
}

#cancel-record {
  position: absolute;
  top: 0;
  right: 0;
}

.live-transcript {
  margin: 0 0 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8f7f3;
}

.live-transcript-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.live-transcript-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 500;
}

.live-transcript-status {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.live-transcript-text {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.live-transcript-text.is-empty {
  color: var(--faint);
}

.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 11.5px;
}

.or-divider::before,
.or-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.text-capture {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.text-capture input {
  min-width: 0;
  height: 46px;
  flex: 1;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 13.5px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.text-capture input::placeholder {
  color: var(--faint);
}

.text-capture input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--ring);
}

.text-capture .btn {
  height: 46px;
}

.capture-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--faint);
  font-size: 11.5px;
}

.file-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.15s ease;
}

.file-label:hover {
  color: var(--ink);
}

.file-label svg {
  width: 14px;
  height: 14px;
}

.processing {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8f7f3;
}

.processing-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.processing-copy strong {
  font-size: 12.5px;
  font-weight: 600;
}

.processing-copy span {
  color: var(--muted);
  font-size: 11.5px;
}

.processing-time {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.spinner {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border: 2px solid var(--line-strong);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 44px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat-card {
  min-width: 0;
  padding: 22px 24px 22px 0;
}

.stat-card + .stat-card {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.stat-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-copy span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}

.stat-copy strong {
  margin: 7px 0 5px;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.stat-copy small {
  overflow: hidden;
  color: var(--faint);
  font-size: 11.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 48px;
}

.panel {
  min-width: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.panel-head h3 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.text-link:hover {
  color: var(--ink);
}

.text-link svg {
  width: 13px;
  height: 13px;
}

.focus-list {
  display: flex;
  flex-direction: column;
}

.focus-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.focus-row:first-child {
  border-top: 0;
}

.focus-check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: transparent;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.focus-check:hover {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}

.focus-check:disabled {
  opacity: 0.45;
  cursor: wait;
}

.focus-check svg {
  width: 12px;
  height: 12px;
}

.focus-main {
  min-width: 0;
  flex: 1;
}

.focus-title {
  overflow: hidden;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.focus-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
  color: var(--faint);
  font-size: 11.5px;
}

.focus-due {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.focus-due.is-overdue {
  color: var(--danger);
}

.focus-due.is-today {
  color: var(--warning);
}

.focus-due svg {
  width: 12px;
  height: 12px;
}

.focus-priority {
  font-size: 11px;
  font-weight: 500;
}

.focus-priority.priority-urgent {
  color: var(--danger);
}

.focus-priority.priority-high {
  color: var(--warning);
}

.focus-priority.priority-medium {
  color: var(--muted);
}

.focus-priority.priority-low {
  color: var(--faint);
}

.recent-notes {
  display: flex;
  flex-direction: column;
}

.recent-note {
  display: flex;
  gap: 11px;
  width: 100%;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.recent-note:first-child {
  border-top: 0;
}

.recent-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--muted);
}

.recent-icon.is-voice {
  background: var(--accent-soft);
  color: var(--ink-soft);
}

.recent-icon.is-text {
  background: var(--bg-elevated);
  color: var(--muted);
}

.recent-icon svg {
  width: 14px;
  height: 14px;
}

.recent-main {
  min-width: 0;
  flex: 1;
}

.recent-text {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.15s ease;
}

.recent-note:hover .recent-text {
  color: var(--ink);
}

.recent-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  color: var(--faint);
  font-size: 11px;
}

.empty-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 0;
  color: var(--muted);
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--muted);
}

.empty-icon svg {
  width: 17px;
  height: 17px;
}

.empty-inline strong {
  display: block;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.empty-inline span {
  font-size: 12px;
  line-height: 1.45;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 4px 0 26px;
}

.section-head h2 {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.section-head p:not(.eyebrow) {
  max-width: 56ch;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  min-width: 230px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.search-box:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--ring);
}

.search-box svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
}

.search-box input::placeholder {
  color: var(--faint);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elevated);
}

.segmented button {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button.is-active {
  background: var(--ink);
  color: var(--surface);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.filter-chip span {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(20, 20, 18, 0.05);
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.filter-chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.filter-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
}

.filter-chip.is-active span {
  background: rgba(255, 255, 255, 0.16);
  color: var(--surface);
}

.task-grid {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.task-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 18px 8px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition:
    background-color 0.15s ease,
    opacity 0.15s ease;
}

.task-card:hover {
  background: rgba(255, 255, 255, 0.62);
}

.task-card.status-completed,
.task-card.status-cancelled {
  opacity: 0.58;
}

.task-card.status-completed .task-title,
.task-card.status-cancelled .task-title {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.task-card.is-highlighted {
  background: #fbf7e9;
  box-shadow: inset 3px 0 0 var(--ink);
}

.task-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: transparent;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.task-check:hover {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}

.task-check:disabled {
  cursor: default;
}

.task-card.status-completed .task-check {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--surface);
  opacity: 1;
}

.task-check svg {
  width: 11px;
  height: 11px;
}

.task-content {
  min-width: 0;
}

.task-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.task-title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 0;
  background: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.priority-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.priority-urgent .priority-badge {
  color: var(--danger);
}

.priority-high .priority-badge {
  color: var(--warning);
}

.priority-medium .priority-badge {
  color: var(--muted);
}

.priority-low .priority-badge {
  color: var(--faint);
}

.task-desc {
  display: -webkit-box;
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.due-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11.5px;
}

.due-chip.is-overdue {
  color: var(--danger);
}

.due-chip.is-today {
  color: var(--warning);
}

.due-chip svg {
  width: 12px;
  height: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.status-pill::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-pill.status-pending {
  color: var(--warning);
}

.status-pill.status-progress {
  color: #35618c;
}

.status-pill.status-completed {
  color: var(--success);
}

.status-pill.status-cancelled {
  color: var(--faint);
}

.task-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 1px;
}

.status-select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.status-select:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.status-select:focus {
  border-color: var(--ink);
}

.status-select:disabled {
  opacity: 0.55;
  cursor: wait;
}

.task-updated {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  white-space: nowrap;
}

.task-delete {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  margin-left: auto;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--faint);
  opacity: 0;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease;
}

.task-card:hover .task-delete,
.task-delete:focus-visible {
  opacity: 1;
}

.task-delete:hover {
  border-color: var(--line);
  background: var(--danger-soft);
  color: var(--danger);
}

.task-delete svg {
  width: 14px;
  height: 14px;
}

@media (hover: none) {
  .task-delete {
    opacity: 1;
  }
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-illustration {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  color: var(--faint);
}

.empty-illustration svg {
  width: 100%;
  height: 100%;
}

.empty-state h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.empty-state p {
  max-width: 420px;
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.notes-timeline {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.note-card {
  display: flex;
  gap: 14px;
  padding: 20px 8px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.15s ease;
}

.note-card:hover {
  background: rgba(255, 255, 255, 0.62);
}

.note-main {
  min-width: 0;
  flex: 1;
}

.note-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.source-badge.is-text {
  color: var(--muted);
}

.source-badge svg {
  width: 13px;
  height: 13px;
}

.intent-badge {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.intent-create {
  color: var(--success);
}

.intent-update {
  color: var(--warning);
}

.intent-query {
  color: #35618c;
}

.intent-note {
  color: var(--muted);
}

.note-time {
  margin-left: auto;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  white-space: nowrap;
}

.note-text {
  max-width: 78ch;
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}

.note-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.note-link {
  color: var(--muted);
  font-size: 11.5px;
}

.note-link strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.note-error {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11.5px;
  line-height: 1.45;
}

.link-btn {
  margin-left: auto;
  padding: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.link-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.bottom-nav {
  display: none;
}

.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 40px -20px rgba(20, 20, 18, 0.35);
  animation: toastIn 0.22s ease both;
  pointer-events: auto;
}

.toast.is-leaving {
  animation: toastOut 0.2s ease forwards;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--ink-soft);
}

.toast-icon svg {
  width: 13px;
  height: 13px;
}

.toast-success .toast-icon {
  background: var(--success-soft);
  color: var(--success);
}

.toast-error .toast-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.toast p {
  flex: 1;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.5;
}

.toast-close {
  padding: 2px;
  color: var(--faint);
  transition: color 0.15s ease;
}

.toast-close:hover {
  color: var(--ink);
}

.toast-close svg {
  width: 13px;
  height: 13px;
}

.dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(82vh, 760px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 32px 100px -32px rgba(20, 20, 18, 0.45);
}

.dialog::backdrop {
  background: rgba(20, 20, 18, 0.3);
  backdrop-filter: blur(4px);
}

.dialog-wide {
  width: min(680px, calc(100vw - 32px));
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dialog-head h3 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.dialog-sub {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.dialog-body {
  max-height: 50vh;
  overflow: auto;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.dialog-close {
  flex: 0 0 auto;
}

.dialog-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.dialog-task:first-child {
  border-top: 0;
}

.dialog-task-main {
  min-width: 0;
  flex: 1;
}

.dialog-task-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
}

.dialog-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.note-dialog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.note-transcript {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8f7f3;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.note-related {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.note-related p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.note-related .dialog-task-meta {
  margin-top: 8px;
}

.note-error-block {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(194, 58, 44, 0.2);
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12px;
  line-height: 1.55;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #e9e7e1;
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
}

.skeleton-row {
  height: 48px;
  margin-bottom: 8px;
}

.skeleton-row:last-child {
  margin-bottom: 0;
}

.skeleton-task {
  height: 92px;
  margin-bottom: 1px;
  border-radius: 0;
}

.skeleton-note {
  height: 96px;
  margin-bottom: 1px;
  border-radius: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseRing {
  0% {
    opacity: 0.9;
    transform: scale(0.92);
  }
  70% {
    opacity: 0;
    transform: scale(1.32);
  }
  100% {
    opacity: 0;
    transform: scale(1.32);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@keyframes wave {
  0%,
  100% {
    height: 24%;
  }
  50% {
    height: 100%;
  }
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 1180px) {
  .top-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .hero {
    padding-top: 0;
  }

  .hero h2 {
    max-width: 720px;
  }

  .hero p {
    max-width: 58ch;
  }

  .capture-card {
    max-width: 720px;
  }
}

@media (max-width: 1024px) {
  .overview-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    padding: 12px 24px;
  }

  .mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
  }

  .brand-mark-sm {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .brand-mark-sm svg {
    width: 18px;
    height: 18px;
  }

  .view-heading {
    display: none;
  }

  .content {
    padding: 28px 24px 112px;
  }

  .banner {
    margin: 14px 24px 0;
  }

  .bottom-nav {
    position: fixed;
    right: 16px;
    bottom: 16px;
    left: 16px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 62px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 50px -24px rgba(20, 20, 18, 0.4);
    backdrop-filter: blur(18px);
  }

  .bottom-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 5px 14px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 500;
  }

  .bottom-link svg {
    width: 19px;
    height: 19px;
  }

  .bottom-link.is-active {
    color: var(--ink);
  }

  .bottom-capture {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-top: -22px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--surface);
    box-shadow: 0 12px 24px -12px rgba(20, 20, 18, 0.6);
  }

  .bottom-capture svg {
    width: 21px;
    height: 21px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .section-actions {
    width: 100%;
  }

  .search-box {
    flex: 1;
  }
}

@media (max-width: 720px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    padding: 18px 20px 18px 0;
  }

  .stat-card + .stat-card {
    padding-left: 20px;
  }

  .stat-card:nth-child(3) {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .stat-card:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .task-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .task-footer {
    grid-column: 2;
  }

  .task-delete {
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 12px 16px;
  }

  .topbar-actions .date-chip {
    display: none;
  }

  .content {
    padding: 24px 16px 112px;
  }

  .banner {
    flex-wrap: wrap;
    margin: 12px 16px 0;
  }

  .banner .btn {
    margin-left: 0;
  }

  .top-grid {
    gap: 20px;
    margin-bottom: 28px;
  }

  .hero {
    padding: 0;
  }

  .hero h2 {
    margin: 16px 0 14px;
    font-size: clamp(36px, 10.5vw, 50px);
  }

  .hero p {
    font-size: 14px;
    line-height: 1.55;
  }

  .example-row {
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 14px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
  }

  .example-row::-webkit-scrollbar {
    display: none;
  }

  .example-chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .capture-card {
    padding: 20px 18px 18px;
    border-radius: var(--radius-lg);
  }

  .mic-btn {
    width: 78px;
    height: 78px;
  }

  .mic-icon svg {
    width: 27px;
    height: 27px;
  }

  .text-capture {
    flex-direction: column;
  }

  .text-capture .btn {
    width: 100%;
  }

  .stats-grid {
    margin-bottom: 32px;
  }

  .section-head h2 {
    font-size: 32px;
  }

  .section-actions {
    align-items: stretch;
  }

  .search-box {
    min-width: 0;
    width: 100%;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
  }

  .note-time {
    width: 100%;
    margin-left: 0;
  }

  .note-card {
    padding: 18px 4px;
  }

  .task-card {
    padding: 16px 4px;
  }

  .task-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .toast-stack {
    right: 16px;
    bottom: 92px;
  }

  .dialog {
    padding: 20px;
  }
}

@media (max-width: 400px) {
  .hero h2 {
    font-size: 36px;
  }

  .stat-copy strong {
    font-size: 32px;
  }

  .bottom-link {
    padding: 5px 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
