:root {
  /* Paper & ink, with a single ember accent that marks focus. */
  --bg: #f6f3ee;
  --bg-soft: #eeeae2;
  --bg-sidebar: #efebe4;
  --bg-hover: rgba(33, 30, 26, 0.055);
  --bg-active: rgba(33, 30, 26, 0.09);
  --card: #fffdf9;
  --text: #1f1d1a;
  --text-muted: #6d685f;
  --text-faint: #a39e94;
  --border: #e4dfd5;
  --border-strong: #cec7ba;
  --primary: #1f1d1a;
  --primary-hover: #000000;
  --primary-text: #fbf8f2;
  --accent: #c8501b;
  --accent-hover: #a9420f;
  --accent-soft: #f8e6db;
  --accent-text: #ffffff;
  --link: #9a3f13;
  --success: #2e7a4f;
  --success-soft: #e2f0e6;
  --warn: #9a6a12;
  --warn-soft: #f6ecd6;
  --danger: #b4322f;
  --danger-soft: #f7e1df;
  --danger-hover: #952826;
  --break: #2f7a6c;
  --code: #a63d1a;
  --info: #2f5f8f;
  --toast-bg: #1f1d1a;
  --toast-text: #fbf8f2;
  --scrim: rgba(24, 22, 19, 0.45);
  --shadow: 0 1px 2px rgba(33, 30, 26, 0.05), 0 2px 10px rgba(33, 30, 26, 0.05);
  --shadow-lg: 0 12px 40px rgba(33, 30, 26, 0.16);
  --radius: 8px;
  --radius-sm: 5px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
  --font-display: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Charter, 'Bitstream Charter', Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --sidebar-w: 256px;
  color-scheme: light;
}

/* Dark theme: used when chosen explicitly, or when the system prefers dark and no choice was made. */
:root[data-theme='dark'] {
  --bg: #141311;
  --bg-soft: #1b1a17;
  --bg-sidebar: #181715;
  --bg-hover: rgba(255, 248, 235, 0.055);
  --bg-active: rgba(255, 248, 235, 0.1);
  --card: #1e1d1a;
  --text: #ebe6dd;
  --text-muted: #a19b90;
  --text-faint: #6f6a62;
  --border: #2d2b27;
  --border-strong: #3d3a35;
  --primary: #ebe6dd;
  --primary-hover: #ffffff;
  --primary-text: #141311;
  --accent: #ea7440;
  --accent-hover: #f58a5a;
  --accent-soft: rgba(234, 116, 64, 0.15);
  --link: #f0905f;
  --success: #5fb683;
  --success-soft: rgba(95, 182, 131, 0.15);
  --warn: #d9a441;
  --warn-soft: rgba(217, 164, 65, 0.15);
  --danger: #e2685f;
  --danger-soft: rgba(226, 104, 95, 0.15);
  --danger-hover: #ee8077;
  --break: #5cb3a2;
  --code: #f0905f;
  --info: #7fb0e0;
  --toast-bg: #ebe6dd;
  --toast-text: #141311;
  --scrim: rgba(0, 0, 0, 0.6);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #141311;
    --bg-soft: #1b1a17;
    --bg-sidebar: #181715;
    --bg-hover: rgba(255, 248, 235, 0.055);
    --bg-active: rgba(255, 248, 235, 0.1);
    --card: #1e1d1a;
    --text: #ebe6dd;
    --text-muted: #a19b90;
    --text-faint: #6f6a62;
    --border: #2d2b27;
    --border-strong: #3d3a35;
    --primary: #ebe6dd;
    --primary-hover: #ffffff;
    --primary-text: #141311;
    --accent: #ea7440;
    --accent-hover: #f58a5a;
    --accent-soft: rgba(234, 116, 64, 0.15);
    --link: #f0905f;
    --success: #5fb683;
    --success-soft: rgba(95, 182, 131, 0.15);
    --warn: #d9a441;
    --warn-soft: rgba(217, 164, 65, 0.15);
    --danger: #e2685f;
    --danger-soft: rgba(226, 104, 95, 0.15);
    --danger-hover: #ee8077;
    --break: #5cb3a2;
    --code: #f0905f;
    --info: #7fb0e0;
    --toast-bg: #ebe6dd;
    --toast-text: #141311;
    --scrim: rgba(0, 0, 0, 0.6);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 10px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.4em;
}
h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
}
h3 {
  font-size: 1rem;
  font-weight: 650;
}
p {
  margin: 0 0 0.75em;
}

[hidden] {
  display: none !important;
}

.icon {
  flex-shrink: 0;
}

.muted {
  color: var(--text-muted);
}
.small {
  font-size: 0.85rem;
}
.d-block {
  display: block;
}
.center {
  text-align: center;
  justify-content: center;
}
.grow {
  flex: 1;
  min-width: 0;
}
.nowrap {
  white-space: nowrap;
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 4px;
}
.boot {
  display: grid;
  place-items: center;
  height: 100vh;
  color: var(--text-muted);
}

/* ---------- buttons & inputs ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 550;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover {
  background: var(--bg-hover);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-text);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: var(--danger-hover);
}
.btn-danger-ghost {
  color: var(--danger);
  border-color: transparent;
  background: transparent;
}
.btn-danger-ghost:hover {
  background: var(--danger-soft);
}
.btn-ghost {
  border-color: transparent;
  background: transparent;
}
.btn-small {
  padding: 4px 10px;
  font-size: 0.85rem;
}
.btn-lg {
  padding: 11px 20px;
  font-size: 1rem;
}
.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
}
.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.icon-btn.small {
  width: 22px;
  height: 22px;
}
.icon-btn.on {
  color: var(--warn);
}
.link-btn {
  border: none;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.link-btn:hover {
  text-decoration: underline;
}

input,
select,
textarea {
  font: inherit;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  width: 100%;
  min-width: 0;
}
input[type='checkbox'] {
  width: auto;
  accent-color: var(--accent);
}
input:focus,
select:focus,
textarea:focus,
.btn:focus-visible,
.icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
input:disabled {
  color: var(--text-muted);
  background: var(--bg-soft);
}
textarea {
  resize: vertical;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: 0.85rem;
  font-weight: 600;
}
.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.form-error {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg-hover);
  color: var(--text-muted);
  white-space: nowrap;
}
.chip.today {
  background: var(--accent-soft);
  color: var(--accent);
}
.chip.overdue {
  background: var(--danger-soft);
  color: var(--danger);
}
.priority-chip.p1 {
  color: var(--info);
}
.priority-chip.p2 {
  color: var(--warn);
}
.priority-chip.p3 {
  color: var(--danger);
}

.notice {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.notice.success {
  background: var(--success-soft);
  border-color: transparent;
}
.notice.warn {
  background: var(--warn-soft);
  border-color: transparent;
}
.notice.welcome {
  background: var(--accent-soft);
  border-color: transparent;
  margin-bottom: 20px;
}
.notice.welcome ol {
  margin: 6px 0 0;
  padding-left: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.card-head h2,
.card-head h3 {
  margin: 0;
}

.empty-state {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
}
.empty-state.small {
  padding: 16px;
}
.empty-state.center {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--primary);
  color: var(--primary-text);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.avatar.small {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

/* ---------- toasts, overlays, popovers ---------- */

.toasts {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
  width: min(92vw, 440px);
}
.toast {
  background: var(--toast-bg);
  color: var(--toast-text);
  padding: 10px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  animation: toast-in 0.2s ease-out;
  transition: opacity 0.25s, transform 0.25s;
}
.toast-success {
  box-shadow: inset 4px 0 0 var(--success), var(--shadow-lg);
}
.toast-error {
  box-shadow: inset 4px 0 0 var(--danger), var(--shadow-lg);
}
.toast.leaving {
  opacity: 0;
  transform: translateY(6px);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.overlay {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  display: grid;
  place-items: start center;
  padding: 10vh 16px 16px;
  z-index: 100;
  overflow-y: auto;
}
.modal {
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  width: min(100%, 460px);
  border: 1px solid var(--border);
}
.modal-wide {
  width: min(100%, 640px);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 0;
}
.modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
}
.modal-body {
  padding: 14px 18px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 18px 16px;
}

.popover {
  position: absolute;
  z-index: 150;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.menu {
  display: flex;
  flex-direction: column;
  padding: 4px;
  min-width: 200px;
  max-height: 60vh;
  overflow-y: auto;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.menu-item:hover,
.menu-item:focus-visible {
  background: var(--bg-hover);
  outline: none;
}
.menu-item.danger {
  color: var(--danger);
}
.menu-icon {
  width: 20px;
  text-align: center;
  color: var(--text-muted);
}
.menu-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ---------- app shell ---------- */

.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 8px;
  overflow-y: auto;
  gap: 4px;
}
.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 4px 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none !important;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.logo {
  flex-shrink: 0;
}
.logo-bg {
  fill: var(--primary);
}
.logo-ring {
  stroke: var(--primary-text);
}
.logo-dot {
  fill: var(--accent);
}
.user-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
}
.user-button:hover {
  background: var(--bg-hover);
}
.user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 550;
  font-size: 0.92rem;
  text-decoration: none !important;
}
.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.nav-link.active {
  background: var(--bg-active);
  color: var(--text);
}
.sidebar-section {
  margin-top: 14px;
}
.sidebar-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6px 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 12px;
}

.focus-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 4px 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none !important;
}
.focus-pill.break {
  background: var(--break);
}
.focus-pill.paused {
  background: var(--text-muted);
}
.focus-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.6s infinite;
}
.focus-pill.paused .dot {
  animation: none;
  opacity: 0.6;
}
.focus-pill-time {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.tree-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px 3px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none !important;
  min-height: 28px;
}
.tree-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.tree-item.active {
  background: var(--bg-active);
  color: var(--text);
  font-weight: 550;
}
.tree-toggle {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: none;
  background: none;
  color: var(--text-faint);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s;
}
.tree-toggle:hover {
  background: var(--bg-active);
}
.tree-toggle.open {
  transform: rotate(90deg);
}
.tree-toggle.empty {
  opacity: 0.35;
}
.tree-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.tree-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-actions {
  display: none;
  gap: 2px;
}
.tree-item:hover .tree-actions,
.tree-item:focus-within .tree-actions {
  display: inline-flex;
}
.tree-empty {
  padding: 4px 10px;
  font-size: 0.88rem;
}

.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.main {
  flex: 1;
  outline: none;
}
.mobile-bar {
  display: none;
}
.sidebar-backdrop {
  display: none;
}

.page-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}
.page-wrap.wide {
  max-width: 1120px;
}
.page-wrap.narrow {
  max-width: 620px;
}
.page-wrap.narrow .card {
  margin-bottom: 16px;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
}
.page-header h1 {
  margin: 0;
}
.page-header p {
  margin: 4px 0 0;
  max-width: 640px;
}
.section {
  margin-top: 36px;
}

/* ---------- auth & landing ---------- */

.auth-theme {
  position: fixed;
  top: 14px;
  right: 14px;
}
.theme-toggle {
  width: 100%;
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--bg-soft);
}
.auth-card {
  width: min(100%, 400px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.auth-brand {
  margin-bottom: 20px;
}
.auth-card h1 {
  font-size: 1.5rem;
}
.auth-footer {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.standalone {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--bg-soft);
}
.standalone-card {
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.standalone-card h1 {
  font-size: 1.4rem;
}

/* ---------- dashboard ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-grid.compact {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 0;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.stat-icon {
  color: var(--text-muted);
  margin-bottom: 4px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
}
.stat-label {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}
.dashboard-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.focus-card {
  border-top: 3px solid var(--accent);
}
.focus-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.focus-card-clock {
  font-size: 2.4rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin: 6px 0 10px;
}
.quick-presets {
  display: grid;
  gap: 6px;
}
.page-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.page-list a {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 6px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
}
.page-list a:hover {
  background: var(--bg-hover);
}

.week-chart {
  display: flex;
  gap: 8px;
  height: 120px;
  align-items: stretch;
}
.week-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.week-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  background: var(--bg-soft);
  border-radius: 6px;
  overflow: hidden;
}
.week-bar {
  width: 100%;
  background: var(--accent);
  border-radius: 6px 6px 0 0;
  min-height: 2px;
}
.week-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---------- tasks ---------- */

.quick-add {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 4px 6px 4px 10px;
  margin-bottom: 14px;
  background: var(--card);
}
.quick-add:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.quick-add-icon {
  color: var(--text-faint);
  display: grid;
}
.quick-add-input {
  border: none;
  padding: 8px 0;
  background: transparent;
}
.quick-add-input:focus {
  outline: none;
}
.quick-add-date {
  width: auto;
  border: none;
  color: var(--text-muted);
  background: transparent;
  padding: 4px;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  overflow-x: auto;
}
.tab {
  border: none;
  background: none;
  font: inherit;
  font-weight: 550;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover {
  color: var(--text);
}
.tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.task-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}
.task {
  border-bottom: 1px solid var(--border);
}
.task-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 4px;
}
.task-check {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}
.task.priority-3 .task-check {
  accent-color: var(--danger);
}
.task-body {
  flex: 1;
  min-width: 0;
}
.task-title {
  cursor: text;
  word-break: break-word;
}
.task.done .task-title {
  text-decoration: line-through;
  color: var(--text-faint);
}
.task-title-input {
  padding: 2px 6px;
}
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
}
.task-meta:empty {
  display: none;
}
.task-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.1s;
}
.task:hover .task-actions,
.task:focus-within .task-actions,
.task-actions .on {
  opacity: 1;
}
.task-details {
  padding: 0 4px 12px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.task-detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.inline-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.inline-field input,
.inline-field select {
  width: auto;
  padding: 4px 8px;
}

/* ---------- focus timer ---------- */

.focus-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}
.focus-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.focus-setup {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.focus-label-input {
  font-size: 1.3rem;
  font-weight: 600;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 6px 0 10px;
  background: transparent;
}
.focus-label-input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.preset {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.preset span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.preset:hover {
  border-color: var(--accent);
}
.preset.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}
.num-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.num-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.focus-total {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.focus-total.error {
  color: var(--danger);
}
.accountability-box {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px dashed var(--border-strong);
}
.toggle-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}
.toggle-row input {
  margin-top: 4px;
}
.partner-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-left: 24px;
}

.timer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 28px 18px;
}
.timer-label {
  font-size: 1.2rem;
  font-weight: 650;
  text-align: center;
}
.ring-wrap {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 1;
}
.ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring-track {
  fill: none;
  stroke: var(--bg-hover);
  stroke-width: 12;
}
.ring-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s linear, stroke 0.3s;
}
.phase-break .ring-progress {
  stroke: var(--break);
}
.paused .ring-progress {
  stroke: var(--text-faint);
}
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.timer-phase {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.timer-clock {
  font-size: clamp(2.6rem, 9vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.timer-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.timer-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.session-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.session-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.session-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
  flex-shrink: 0;
}
.session-dot.completed {
  background: var(--success);
}

/* ---------- accountability ---------- */

.partners-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: 20px;
  align-items: start;
}
.partner-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.partner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.partner.unsubscribed {
  opacity: 0.7;
}
.partner-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.partner-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.partner-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}
.partner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.invite-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.invite-box p {
  margin: 0;
}
.invite-link code {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 6px 8px;
  background: var(--card);
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 3px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 4px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 550;
  cursor: pointer;
}
.segment.active {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table.log {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.log th,
.log td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.log th {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg-soft);
}
.log tr:last-child td {
  border-bottom: none;
}
.status {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.status-sent {
  background: var(--success-soft);
  color: var(--success);
}
.status-logged {
  background: var(--bg-hover);
  color: var(--text-muted);
}
.status-failed {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ---------- pages / documents ---------- */

.doc {
  min-height: 100%;
}
.doc-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  overflow: hidden;
  white-space: nowrap;
}
.breadcrumbs a {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.breadcrumbs > span:last-child {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}
.breadcrumbs .sep {
  color: var(--text-faint);
}
.doc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.doc-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 60px 120px;
}
.page-icon {
  font-size: 54px;
  line-height: 1;
  border: none;
  background: none;
  padding: 6px;
  margin-left: -6px;
  border-radius: 10px;
  cursor: pointer;
}
.page-icon:hover:not(:disabled) {
  background: var(--bg-hover);
}
.page-icon:disabled {
  cursor: default;
}
.page-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 10px 0 4px;
  outline: none;
  word-break: break-word;
}
.page-title:empty::before {
  content: attr(data-placeholder);
  color: var(--text-faint);
}
.page-meta {
  margin-bottom: 18px;
}
.emoji-picker {
  display: grid;
  grid-template-columns: repeat(8, 36px);
  gap: 2px;
  padding: 8px;
}
.emoji {
  font-size: 22px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
}
.emoji:hover {
  background: var(--bg-hover);
}
.emoji-remove {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 4px;
}
.subpages {
  margin-top: 30px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.subpages:empty {
  display: none;
}
.subpage {
  display: flex;
  gap: 8px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}
.subpage:hover {
  background: var(--bg-hover);
}
.conflict {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.invite-form {
  display: flex;
  gap: 8px;
}
.invite-form select {
  width: auto;
}
.collab-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.collab-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.collab-row select {
  width: auto;
  padding: 4px 8px;
  font-size: 0.85rem;
}

/* ---------- block editor ---------- */

.editor {
  position: relative;
  padding-bottom: 80px;
  cursor: text;
}
.block {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 1px 0;
  border-radius: 4px;
}
.block-gutter {
  position: absolute;
  left: -52px;
  top: 2px;
  display: flex;
  gap: 0;
  opacity: 0;
  transition: opacity 0.1s;
  user-select: none;
}
.block:hover .block-gutter,
.block:focus-within .block-gutter {
  opacity: 1;
}
.gutter-btn {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--text-faint);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}
.gutter-btn:hover {
  background: var(--bg-hover);
  color: var(--text-muted);
}
.gutter-btn.grip {
  cursor: grab;
}
.block.dragging {
  opacity: 0.4;
}
.block.drop-before {
  box-shadow: 0 -2px 0 var(--accent);
}
.block.drop-after {
  box-shadow: 0 2px 0 var(--accent);
}
.block-text {
  flex: 1;
  min-width: 0;
  padding: 3px 2px;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 1.5em;
}
.block-text:empty::before {
  color: var(--text-faint);
  pointer-events: none;
}
.block-text:empty:focus::before,
.editor-empty .block:first-child .block-text:empty::before,
.block:not(.b-paragraph) > .block-text:empty::before {
  content: attr(data-placeholder);
}
.read-only .block-text:empty::before {
  content: none !important;
}
.block-text a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--text-faint);
  text-underline-offset: 2px;
}
.read-only .block-text a {
  cursor: pointer;
}
.block-text code {
  font-family: var(--mono);
  font-size: 0.87em;
  background: var(--bg-hover);
  color: var(--code);
  padding: 1px 5px;
  border-radius: 4px;
}
.block-marker {
  flex-shrink: 0;
  min-width: 24px;
  padding-top: 3px;
  text-align: center;
  user-select: none;
}
.block-marker.num {
  min-width: 26px;
  text-align: right;
  padding-right: 4px;
}
.b-bullet .block-marker {
  font-size: 1.3em;
  line-height: 1.2;
}
.b-todo .block-marker {
  padding-top: 5px;
}
.todo-check {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.b-todo.checked .block-text {
  text-decoration: line-through;
  color: var(--text-faint);
}
.b-heading1 {
  margin-top: 1.4em;
}
.b-heading1 .block-text {
  font-size: 1.85em;
  font-weight: 700;
  line-height: 1.25;
}
.b-heading2 {
  margin-top: 1.1em;
}
.b-heading2 .block-text {
  font-size: 1.45em;
  font-weight: 650;
  line-height: 1.3;
}
.b-heading3 {
  margin-top: 0.8em;
}
.b-heading3 .block-text {
  font-size: 1.2em;
  font-weight: 650;
}
.b-quote .block-text {
  border-left: 3px solid var(--text);
  padding-left: 14px;
  font-size: 1.05em;
}
.b-callout {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 4px 0;
}
.b-callout .block-gutter {
  left: -40px;
}
.callout-icon {
  font-size: 1.15em;
  padding-top: 1px;
}
.b-code .block-text {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  tab-size: 2;
  overflow-x: auto;
}
.block-divider {
  flex: 1;
  padding: 10px 2px;
  outline: none;
  border-radius: 4px;
}
.block-divider:focus {
  background: var(--accent-soft);
}
.block-divider hr {
  border: none;
  border-top: 1px solid var(--border-strong);
  margin: 0;
}

.slash-pop {
  padding: 4px;
}
.slash-menu {
  width: 290px;
  max-height: 340px;
  overflow-y: auto;
}
.slash-heading {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 6px 8px 4px;
}
.slash-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
}
.slash-item .d-block {
  font-size: 0.78rem;
}
.slash-item.active {
  background: var(--bg-hover);
}
.slash-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.slash-empty {
  padding: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.format-toolbar {
  position: absolute;
  z-index: 160;
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}
.tb-btn {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 28px;
  border: none;
  background: none;
  color: var(--text);
  border-radius: 5px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}
.tb-btn:hover {
  background: var(--bg-hover);
}
.tb-btn code {
  font-family: var(--mono);
  font-size: 0.8rem;
}
.link-form {
  display: flex;
  gap: 6px;
  padding: 6px;
  width: 320px;
}

/* ---------- landing page ---------- */

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
.lp {
  background: var(--bg);
}
.lp-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.lp section[id] {
  scroll-margin-top: 80px;
}
.lp h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}
.lp h3 {
  font-size: 1.02rem;
  margin: 0 0 6px;
}
.lp-eyebrow {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.lp-lead {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.6;
}

/* nav */
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.lp-nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.lp-links {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}
.lp-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.lp-links a:hover {
  color: var(--text);
  background: var(--bg-hover);
}
.lp-nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* hero */
.lp-hero {
  padding: 72px 0 64px;
  overflow: hidden;
}
.lp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 550;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  background: var(--card);
  padding: 4px 12px;
  border-radius: 999px;
  margin: 0 0 22px;
}
.lp-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.lp-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}
.lp-hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.lp-hero-sub {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 0 30px;
}
.lp-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.lp-cta-row .icon {
  margin-right: -4px;
}
.lp-checks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0;
  margin: 22px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.lp-checks li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lp-checks .icon,
.lp-bullets .icon {
  color: var(--success);
}

/* hero product preview */
.lp-preview {
  position: relative;
  padding: 26px 0 40px;
}
.lp-mock-window {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.lp-mock-bar {
  display: flex;
  gap: 6px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.lp-mock-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.lp-mock-body {
  display: grid;
  grid-template-columns: 30% 1fr;
  min-height: 330px;
}
.lp-mock-side {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 16px 14px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
}
.lp-mock-side .logo {
  margin-bottom: 6px;
}
.lp-mock-line {
  height: 8px;
  border-radius: 4px;
  background: var(--bg-active);
}
.lp-mock-line.active {
  background: var(--accent);
  opacity: 0.85;
}
.lp-mock-gap {
  height: 10px;
}
.lp-mock-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 22px 16px;
}
.lp-mock-ring {
  --progress: 0deg;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) var(--progress), var(--bg-active) 0);
  transition: background 0.9s linear;
}
.lp-mock-ring-inner {
  width: 166px;
  height: 166px;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.lp-mock-phase {
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.lp-mock-clock {
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.lp-mock-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.lp-mock-buttons {
  display: flex;
  gap: 8px;
}
.lp-mock-btn {
  font-size: 0.75rem;
  font-weight: 550;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--primary);
  color: var(--primary-text);
}
.lp-mock-btn.ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}
.lp-mock-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.lp-toast {
  position: absolute;
  width: 250px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  box-shadow: var(--shadow-lg);
  font-size: 0.82rem;
}
.lp-toast strong {
  display: block;
  font-size: 0.86rem;
}
.lp-toast p {
  margin: 2px 0 0;
  color: var(--text-muted);
}
.lp-toast.a {
  top: 0;
  right: -18px;
  animation: lp-float 6s ease-in-out infinite;
}
.lp-toast.b {
  bottom: 4px;
  left: -26px;
  animation: lp-float 6s ease-in-out 3s infinite;
}
.lp-toast-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.lp-toast-app {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-weight: 600;
}
@keyframes lp-float {
  50% {
    transform: translateY(-6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .lp-toast.a,
  .lp-toast.b {
    animation: none;
  }
}

/* capability strip */
.lp-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.lp-strip-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 18px;
  padding-bottom: 18px;
  font-size: 0.88rem;
  font-weight: 550;
  color: var(--text-muted);
}
.lp-strip-inner span::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: middle;
}

/* sections */
.lp-section {
  padding: 96px 0 0;
}
.lp-section-head {
  margin-bottom: 40px;
}
.lp-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}
.lp-step {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.lp-step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 14px;
  font-variant-numeric: lining-nums;
}
.lp-step p,
.lp-feature p,
.lp-aud p {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}
.lp-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border);
  gap: 1px;
}
.lp-feature {
  padding: 28px 26px;
  background: var(--card);
}
.lp-feature-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 16px;
}

/* split sections */
.lp-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
  padding: 110px 0 0;
}
.lp-split.reverse .lp-split-copy {
  order: 2;
}
.lp-bullets {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
}
.lp-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.lp-bullets .icon {
  margin-top: 3px;
}
.lp-bullets.two {
  grid-template-columns: repeat(2, 1fr);
  margin: 0 0 26px;
}
.lp-chat {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lp-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.lp-chat-head strong {
  display: block;
  font-size: 0.92rem;
}
.lp-chat-head span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.lp-bubble {
  align-self: flex-start;
  max-width: 88%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  padding: 10px 13px;
  font-size: 0.9rem;
  line-height: 1.45;
}
.lp-bubble.me {
  align-self: flex-end;
  background: var(--primary);
  color: var(--primary-text);
  border-color: var(--primary);
  border-radius: 14px 14px 4px 14px;
}
.lp-doc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px 32px;
  box-shadow: var(--shadow);
}
.lp-doc-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.lp-doc-h {
  font-weight: 650;
  font-size: 1.1rem;
  margin: 6px 0 6px;
}
.lp-doc-p {
  color: var(--text);
  margin-bottom: 10px;
}
.lp-doc-todo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
}
.lp-doc-todo .box {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
}
.lp-doc-todo.done {
  color: var(--text-faint);
  text-decoration: line-through;
}
.lp-doc-todo.done .box {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.lp-doc-callout {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

/* audiences */
.lp-audience {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.lp-aud {
  padding: 22px 0 0;
  border-top: 2px solid var(--text);
}

/* pricing */
.lp-price {
  max-width: 640px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--card);
  padding: 32px;
  box-shadow: var(--shadow);
}
.lp-price-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.lp-price-head h3 {
  font-size: 1.2rem;
}
.lp-price-head p {
  margin: 0;
}
.lp-price-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 600;
  line-height: 1;
}

/* faq */
.lp-faq {
  max-width: 820px;
  border-top: 1px solid var(--border);
}
.lp-faq-item {
  border-bottom: 1px solid var(--border);
}
.lp-faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  font-weight: 600;
  font-size: 1.02rem;
  cursor: pointer;
  list-style: none;
}
.lp-faq-item summary::-webkit-details-marker {
  display: none;
}
.lp-faq-item summary .icon {
  color: var(--text-muted);
  transition: transform 0.2s;
}
.lp-faq-item[open] summary .icon {
  transform: rotate(45deg);
}
.lp-faq-item p {
  margin: -6px 0 20px;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.6;
}

/* final call to action and footer */
.lp-final {
  margin-top: 110px;
  background: var(--primary);
  color: var(--primary-text);
}
.lp-final-inner {
  padding-top: 80px;
  padding-bottom: 80px;
  text-align: center;
}
.lp-final h2 {
  color: var(--primary-text);
  max-width: 720px;
  margin: 0 auto 12px;
}
.lp-final p {
  opacity: 0.75;
  margin: 0 0 28px;
  font-size: 1.08rem;
}
.lp-footer {
  padding: 56px 0 28px;
}
.lp-footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
.lp-footer-brand p {
  margin: 10px 0 0;
}
.lp-footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lp-footer-col h4 {
  margin: 0 0 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.lp-footer-col a {
  color: var(--text-muted);
  font-size: 0.92rem;
}
.lp-copy {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

@media (max-width: 980px) {
  .lp-hero-grid,
  .lp-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .lp-split.reverse .lp-split-copy {
    order: 0;
  }
  .lp-feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lp-audience {
    grid-template-columns: repeat(2, 1fr);
  }
  .lp-links {
    display: none;
  }
  .lp-toast.a {
    right: 0;
  }
  .lp-toast.b {
    left: 0;
  }
}
@media (max-width: 640px) {
  .lp-container {
    padding: 0 16px;
  }
  .lp-hero {
    padding: 44px 0 40px;
  }
  .lp-steps,
  .lp-feature-grid,
  .lp-audience,
  .lp-bullets.two {
    grid-template-columns: minmax(0, 1fr);
  }
  .lp-section {
    padding-top: 72px;
  }
  .lp-split {
    padding-top: 80px;
  }
  .lp-mock-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .lp-mock-side {
    display: none;
  }
  .lp-toast {
    width: 210px;
  }
  .lp-login {
    display: none;
  }
  .lp-price {
    padding: 22px;
  }
  .lp-price-head {
    flex-direction: column;
  }
  .lp-footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .lp-footer-brand {
    grid-column: 1 / -1;
  }
  .lp-strip-inner {
    justify-content: flex-start;
  }
}

/* ---------- focus mode (full screen) ---------- */

.timer-card {
  position: relative;
}
.focus-mode-btn {
  position: absolute;
  top: 14px;
  right: 14px;
}
.zen-open {
  overflow: hidden;
}
.zen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  padding: 20px 24px;
  --zen-accent: var(--accent);
}
.zen.on-break {
  --zen-accent: var(--break);
}
.zen.paused {
  --zen-accent: var(--text-faint);
}
.zen-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.zen-exit,
.zen-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
}
.zen-exit:hover,
.zen-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.zen-btn {
  font-size: 1rem;
  padding: 10px 22px;
  color: var(--text);
}
.zen-btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-text);
}
.zen-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}
.zen-label {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text-muted);
  max-width: 90vw;
}
.zen-phase {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--zen-accent);
}
.zen-clock {
  font-size: clamp(5rem, 22vw, 15rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.zen-bar {
  width: min(560px, 70vw);
  height: 4px;
  border-radius: 4px;
  background: var(--bg-active);
  overflow: hidden;
}
.zen-bar-fill {
  height: 100%;
  background: var(--zen-accent);
  transition: width 0.4s linear, background 0.3s;
}
.zen-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.zen-controls {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.zen-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.zen-top,
.zen-controls,
.zen-hint {
  transition: opacity 0.6s;
}
.zen.idle {
  cursor: none;
}
.zen.idle .zen-top,
.zen.idle .zen-controls,
.zen.idle .zen-hint {
  opacity: 0;
}
@media (max-width: 760px) {
  .focus-mode-btn {
    position: static;
    align-self: flex-end;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .dashboard,
  .focus-layout,
  .partners-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 90;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar-open .sidebar {
    transform: none;
  }
  .sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--scrim);
    z-index: 80;
  }
  .mobile-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 20;
  }
  .page-wrap {
    padding: 24px 16px 60px;
  }
  .doc-bar {
    top: 49px;
    padding: 8px 12px;
  }
  .doc-body {
    padding: 24px 20px 100px;
  }
  .page-title {
    font-size: 1.9rem;
  }
  .block-gutter {
    display: none;
  }
  .task-actions {
    opacity: 1;
  }
  .num-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .invite-form {
    flex-wrap: wrap;
  }
  .stat-grid.compact {
    grid-template-columns: repeat(3, 1fr);
  }
  .save-status {
    display: none;
  }
}
