@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Serif:wght@500;600&display=swap");

:root {
  --bg: #eceef1;
  --bg-alt: #e3e6ea;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(17, 24, 39, 0.14);
  --line-strong: rgba(17, 24, 39, 0.22);
  --ink: #111418;
  --muted: #626973;
  --soft: #868f9a;
  --accent: #1c1f24;
  --accent-soft: rgba(17, 24, 39, 0.06);
  --danger: #7e2626;
  --max-width: 1560px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "IBM Plex Sans", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.72), transparent 34%),
    linear-gradient(180deg, #f4f5f7 0%, #eceef1 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 14px 0;
  border-width: 0 0 1px;
  border-radius: 0;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #9aa0a9;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--line-strong);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.backdrop {
  position: fixed;
  inset: auto;
  z-index: 0;
  pointer-events: none;
  filter: blur(34px);
  opacity: 0.65;
}

.backdrop-one {
  top: 32px;
  right: 4vw;
  width: 280px;
  height: 280px;
  background: rgba(130, 138, 150, 0.22);
}

.backdrop-two {
  left: 8vw;
  bottom: 32px;
  width: 320px;
  height: 320px;
  background: rgba(84, 91, 103, 0.16);
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
  max-width: var(--max-width);
  min-height: 100vh;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 28px 26px 40px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  background: rgba(255, 255, 255, 0.3);
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-copy small,
.sidebar-copy,
.helper,
.footer,
.lead,
.nav-link small,
.side-card span,
.metric-card span,
.snapshot-card span,
.item-meta,
.empty-state,
.pill,
.feature-badge,
.text-link,
.field span,
.money-row p,
.task-card p,
.note-card p,
.snippet-card p,
.link-card p,
.launch-card p,
.quick-link p,
.mini-card p,
.metric-tile p,
.mood-entry span,
.bar-row span {
  color: var(--muted);
}

.sidebar-copy {
  margin: 0 0 28px;
  line-height: 1.7;
  font-size: 0.95rem;
}

.nav-list,
.sidebar-stack,
.app-main,
.list-stack,
.mood-log,
.link-groups,
.bar-list {
  display: grid;
}

.nav-list,
.sidebar-stack,
.app-main {
  gap: 0;
}

.nav-link {
  display: grid;
  gap: 3px;
  padding: 12px 0 14px 14px;
  border-left: 2px solid transparent;
  border-bottom: 1px solid var(--line);
  transition: border-color 160ms ease, padding-left 160ms ease, color 160ms ease;
}

.nav-link span {
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.is-active {
  border-left-color: var(--ink);
  padding-left: 18px;
  color: var(--ink);
}

.side-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.side-card strong,
.metric-card strong,
.snapshot-card strong,
.metric-tile strong,
.mini-card strong {
  display: block;
  margin: 8px 0 0;
  font-family: "IBM Plex Serif", "Times New Roman", serif;
  font-size: clamp(1.25rem, 1.8vw, 1.8rem);
  font-weight: 600;
}

.side-kicker,
.eyebrow,
.section-tag,
.pill,
.feature-badge,
.text-link {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.side-card-accent strong,
.side-card-accent span,
.side-card-accent p {
  color: var(--ink);
}

.app-main {
  min-width: 0;
  padding: 32px 40px 56px;
  gap: 28px;
}

.page-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}

.page-top h1,
.hero h2 {
  margin: 0;
  font-family: "IBM Plex Sans", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.page-top h1 {
  font-size: clamp(2.1rem, 4vw, 3.8rem);
  max-width: 11ch;
}

.hero h2 {
  font-size: clamp(1.45rem, 2.3vw, 2.35rem);
  max-width: 16ch;
}

.eyebrow,
.lead {
  margin: 0 0 10px;
}

.lead,
.hero-copy p,
.sidebar-copy,
.note-body,
.snippet-body {
  line-height: 1.75;
}

.page-actions,
.action-row,
.badge-row,
.mood-buttons,
.item-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.wrap {
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.button:hover {
  background: rgba(17, 24, 39, 0.05);
}

.button.primary {
  background: var(--accent);
  color: #f7f8fa;
  border-color: var(--accent);
}

.button.primary:hover {
  background: #0f1115;
}

.button.danger {
  color: var(--danger);
  border-color: rgba(126, 38, 38, 0.28);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  gap: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  display: grid;
  align-content: start;
  gap: 14px;
}

.hero-copy p {
  margin: 0;
  max-width: 62ch;
}

.section-tag,
.feature-badge,
.pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-metrics,
.metric-grid,
.snapshot-grid,
.grid,
.lane-grid,
.quick-link-grid,
.launch-grid,
.card-grid,
.mini-grid,
.link-grid {
  display: grid;
  gap: 0;
}

.hero-metrics {
  align-content: start;
}

.metric-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}

.metric-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 24px;
}

.snapshot-grid,
.hero-metrics,
.mini-grid {
  grid-template-columns: 1fr;
}

.grid.two-up {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  column-gap: 48px;
}

.lane-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 32px;
}

.panel {
  padding: 24px 0 10px;
  border-top: 1px solid var(--line);
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.spotlight,
.accent-panel {
  background: none;
}

.tall-input {
  min-height: 180px;
}

.field,
.form-panel,
.timer-panel {
  display: grid;
  gap: 12px;
}

.field span {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 12px;
}

.metric-card,
.snapshot-card,
.metric-tile,
.mini-card,
.launch-card,
.quick-link,
.note-card,
.snippet-card,
.link-card,
.habit-card,
.routine-row,
.task-card,
.money-row,
.mood-entry,
.empty-state {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.metric-card p,
.snapshot-card p,
.metric-tile p,
.mini-card p,
.launch-card p,
.note-card p,
.snippet-card p,
.link-card p,
.task-card p,
.money-row p {
  margin: 0;
}

.launch-grid,
.quick-link-grid,
.compact-grid,
.notes-grid,
.card-grid,
.link-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
}

.launch-card,
.quick-link,
.habit-card,
.note-card,
.snippet-card,
.link-card {
  display: grid;
  gap: 8px;
  align-content: start;
}

.launch-card strong,
.quick-link strong,
.note-card strong,
.snippet-card strong,
.link-card strong,
.habit-card strong,
.task-card strong,
.money-row strong,
.routine-row strong {
  font-size: 1rem;
  font-weight: 600;
}

.list-stack {
  gap: 0;
}

.task-card.is-done {
  opacity: 0.54;
}

.task-card.is-done strong {
  text-decoration: line-through;
}

.item-top,
.item-bottom,
.money-head,
.group-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.item-bottom,
.money-row,
.routine-row {
  align-items: center;
}

.item-bottom {
  margin-top: 12px;
}

.text-link {
  font-weight: 600;
}

.text-link:hover {
  color: var(--ink);
}

.tag.priority-high {
  border-color: rgba(126, 38, 38, 0.22);
  color: #6e2626;
}

.tag.priority-medium {
  border-color: rgba(17, 24, 39, 0.16);
}

.tag.priority-low {
  color: var(--soft);
}

.link-groups {
  gap: 18px;
}

.group-head {
  margin-bottom: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.link-card a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.timer-display {
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--line);
  font-family: "IBM Plex Serif", "Times New Roman", serif;
  font-size: clamp(3.3rem, 8vw, 5.6rem);
  line-height: 0.95;
}

.mood-log {
  gap: 0;
  margin-top: 10px;
}

.bar-row {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.bar-track {
  width: 100%;
  height: 8px;
  background: rgba(17, 24, 39, 0.08);
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #14181d, #767d88);
}

.money-amount.income {
  color: #2f6358;
}

.money-amount.expense {
  color: #4e5056;
}

.status-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-healthy {
  color: #215247;
  border-color: rgba(33, 82, 71, 0.18);
}

.status-watch,
.status-monitoring {
  color: #5b5262;
  border-color: rgba(91, 82, 98, 0.18);
}

.status-blocked,
.status-open {
  color: #7e2626;
  border-color: rgba(126, 38, 38, 0.2);
}

.status-closed {
  color: #58616c;
}

.severity-sev1 {
  color: #7e2626;
  border-color: rgba(126, 38, 38, 0.2);
}

.severity-sev2 {
  color: #5a4c2a;
  border-color: rgba(90, 76, 42, 0.2);
}

.severity-sev3 {
  color: #3d556f;
  border-color: rgba(61, 85, 111, 0.2);
}

.code-block {
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.04);
  color: #182028;
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.88rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.mono {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
}

.helper,
.footer {
  margin: 0;
  line-height: 1.7;
  font-size: 0.92rem;
}

.footer {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(18px);
  min-width: 220px;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(17, 24, 39, 0.9);
  color: #f3f5f8;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 50;
  text-align: center;
  backdrop-filter: blur(10px);
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.file-button {
  cursor: pointer;
}

@media (max-width: 1220px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .grid.two-up,
  .hero {
    grid-template-columns: 1fr;
    row-gap: 28px;
  }

  .launch-grid,
  .quick-link-grid,
  .compact-grid,
  .notes-grid,
  .card-grid,
  .link-grid,
  .metric-grid.two,
  .metric-grid.three,
  .lane-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
    padding: 22px 18px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
  }

  .app-main {
    padding: 24px 18px 44px;
  }

  .page-top {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .field-grid,
  .inline-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-list,
  .metric-grid.two,
  .metric-grid.three,
  .launch-grid,
  .quick-link-grid,
  .compact-grid,
  .notes-grid,
  .card-grid,
  .link-grid,
  .lane-grid {
    grid-template-columns: 1fr;
  }

  .button,
  .file-button {
    width: 100%;
  }

  .page-actions,
  .action-row,
  .badge-row,
  .mood-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .item-top,
  .item-bottom,
  .group-head,
  .money-row,
  .routine-row {
    display: grid;
  }
}
