:root {
  --ink: #15161a;
  --muted: #62666f;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --line: #dedbd2;
  --teal: #167d7f;
  --moss: #5a7f3f;
  --coral: #c95b45;
  --gold: #b88a2a;
  --blue: #315c9c;
  --shadow: 0 18px 55px rgba(20, 23, 28, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.55;
}

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

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 70px;
  padding: 14px clamp(18px, 4vw, 56px);
  color: #fff;
  background: rgba(12, 14, 16, 0.76);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.brand,
.main-nav,
.hero-actions,
.site-footer div {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #0f1418;
  background: #fff;
  border-radius: 50%;
  font-size: 0.82rem;
  letter-spacing: 0;
}

.main-nav {
  gap: clamp(10px, 2vw, 24px);
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.92rem;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.82);
}

.main-nav a:hover {
  color: #fff;
}

.main-nav a[aria-current="page"] {
  color: #fff;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: calc(86svh - 70px);
  display: grid;
  align-items: end;
  overflow: hidden;
  margin-top: -70px;
  padding: 150px clamp(20px, 6vw, 72px) 72px;
  color: #fff;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center top;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(8, 10, 12, 0.84), rgba(8, 10, 12, 0.42) 46%, rgba(8, 10, 12, 0.2)),
    linear-gradient(0deg, rgba(8, 10, 12, 0.45), rgba(8, 10, 12, 0.08));
}

.hero-content {
  position: relative;
  max-width: 650px;
  margin-left: clamp(420px, 42vw, 650px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #a6efdc;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(3.8rem, 9vw, 7.2rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: 750;
}

.primary-action {
  color: #102021;
  background: #a6efdc;
}

.secondary-action {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.section {
  padding: clamp(54px, 8vw, 98px) clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 900px;
  margin-bottom: 32px;
}

.section-heading.compact {
  max-width: 760px;
}

.journal-page-heading h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(3.4rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-heading h2 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-heading p {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.timeline-item,
.project-card,
.panel,
.source-card {
  background: var(--panel);
}

.timeline-item {
  padding: 26px;
}

.timeline-date,
.project-card span,
.toolbar-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.timeline h3,
.project-card h3,
.panel h3,
.source-card h3 {
  margin: 8px 0 6px;
  font-size: 1.15rem;
  line-height: 1.15;
}

.timeline p,
.project-card p,
.source-card p {
  color: var(--muted);
}

.timeline ul {
  margin: 16px 0 0;
  padding-left: 19px;
  color: var(--muted);
}

.project-grid,
.metric-grid,
.data-source-grid {
  display: grid;
  gap: 16px;
}

.project-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.project-card,
.source-card {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.project-card:nth-child(1) {
  border-top: 5px solid var(--teal);
}

.project-card:nth-child(2) {
  border-top: 5px solid var(--coral);
}

.project-card:nth-child(3) {
  border-top: 5px solid var(--blue);
}

.project-card:nth-child(4) {
  border-top: 5px solid var(--gold);
}

.skills-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.skills-strip span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #393c42;
  font-weight: 720;
  font-size: 0.9rem;
}

.dashboard-section {
  background:
    linear-gradient(180deg, #f2f7f6, #fbfaf6 44%),
    var(--paper);
}

.private-page {
  min-height: calc(100svh - 70px);
}

.dashboard-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.auth-panel,
.session-bar,
.journal-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 35px rgba(30, 33, 38, 0.06);
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  align-items: center;
  padding: clamp(20px, 3vw, 30px);
}

.auth-panel h3 {
  margin: 6px 0 10px;
  font-size: 1.6rem;
  line-height: 1.1;
}

.auth-panel p {
  margin: 0;
  color: var(--muted);
}

.auth-form label {
  display: block;
  margin-bottom: 8px;
  color: #3e4147;
  font-size: 0.82rem;
  font-weight: 780;
}

.auth-row {
  display: flex;
  gap: 8px;
}

.auth-row input,
.journal-title-row input,
.journal-date-controls button,
.custom-page-form input,
.journal-editor,
.journal-scroll-editor {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.auth-row input {
  min-width: 0;
  flex: 1;
  padding: 9px 11px;
}

.auth-row + label {
  margin-top: 14px;
}

.auth-form button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.form-status {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-status.is-error {
  color: #9b2f22;
}

.private-app {
  display: grid;
  gap: 18px;
}

.session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  color: var(--muted);
}

.session-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--teal);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.segmented-control {
  display: flex;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.segmented-control button,
.icon-button,
.secondary-button,
.danger-button {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 760;
}

.segmented-control button {
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
}

.segmented-control button.is-active {
  color: #fff;
  background: var(--ink);
}

.icon-button {
  padding: 8px 14px;
  color: #fff;
  background: var(--teal);
}

.secondary-button {
  padding: 8px 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: rgba(23, 107, 107, 0.4);
  color: var(--teal);
}

.danger-button {
  padding: 8px 14px;
  color: #9b2f22;
  border: 1px solid #e7c7c0;
  background: #fff4f1;
}

.danger-button:hover,
.danger-button:focus-visible {
  color: #fff;
  background: #9b2f22;
}

.journal-panel {
  padding: clamp(18px, 3vw, 26px);
}

.journal-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
}

.journal-sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
}

.journal-tab,
.custom-page-button {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #343840;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-weight: 760;
}

.journal-tab.is-active,
.custom-page-button.is-active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.custom-pages {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.custom-page-button {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journal-workspace {
  display: grid;
  gap: 12px;
}

.journal-title-row,
.custom-page-form,
.journal-editor-actions {
  display: grid;
  gap: 10px;
}

.journal-title-row {
  grid-template-columns: minmax(0, 1fr) auto minmax(320px, 420px);
  align-items: center;
  scroll-margin-top: 92px;
}

.journal-date-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 8px;
}

.journal-title-row input,
.journal-date-controls button,
.custom-page-form input,
.journal-editor,
.journal-scroll-editor {
  width: 100%;
  padding: 9px 11px;
}

.journal-title-row input:first-child {
  font-size: 1.2rem;
  font-weight: 820;
}

.journal-date-controls button {
  cursor: pointer;
  color: #343840;
  font-weight: 760;
}

.journal-date-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.custom-page-form {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.custom-page-form .icon-button {
  width: 100%;
}

.journal-view-toggle {
  justify-self: start;
}

.single-journal-view {
  display: grid;
  gap: 12px;
}

.journal-formatting-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.journal-formatting-toolbar button {
  min-width: 40px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #343840;
  background: #fff;
  cursor: pointer;
  font-weight: 820;
}

.journal-formatting-toolbar button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.journal-editor-shell,
.journal-scroll-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.journal-editor,
.journal-scroll-editor {
  min-height: 320px;
  resize: vertical;
  overflow: auto;
  padding: 16px 18px;
  font: 1rem/1.62 Inter, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fffdf8;
  outline: none;
}

.journal-editor:focus,
.journal-scroll-editor:focus {
  border-color: rgba(22, 125, 127, 0.65);
  box-shadow: 0 0 0 3px rgba(22, 125, 127, 0.12);
}

.rich-journal-editor:empty::before {
  content: attr(placeholder);
  color: var(--muted);
  pointer-events: none;
  white-space: pre-line;
}

.rich-editor-line {
  min-height: 1.62em;
  outline: none;
}

.rich-editor-line:first-child {
  margin-top: 0;
}

.rich-editor-line + .rich-editor-line {
  margin-top: 0.18rem;
}

.rich-editor-line.is-empty {
  min-height: 0.95rem;
}

.rich-editor-line.is-heading {
  margin-top: 1.05rem;
  font-weight: 840;
  line-height: 1.16;
  letter-spacing: 0;
}

.rich-editor-line.level-1 {
  color: #273033;
  font-size: 1.55rem;
}

.rich-editor-line.level-2 {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
  color: #1f4f50;
  font-size: 1.28rem;
}

.rich-editor-line.level-3 {
  color: #343840;
  font-size: 1.08rem;
}

.rich-editor-line.is-list-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-top: 0.35rem;
}

.rich-editor-marker {
  flex: 0 0 1.25rem;
  margin-left: -0.1rem;
  color: #1f4f50;
  cursor: pointer;
  border-radius: 4px;
  text-align: center;
  user-select: none;
}

.rich-editor-marker:hover {
  color: var(--teal);
  background: rgba(22, 125, 127, 0.08);
}

.rich-editor-text {
  min-width: 0;
  outline: none;
}

.rich-editor-line.is-list-item .rich-editor-text {
  flex: 1;
}

.rich-editor-priority {
  flex: 0 0 3.4rem;
  width: 3.4rem;
  min-width: 0;
  margin-top: 0.06rem;
  padding: 0.12rem 0.35rem;
  border: 1px solid rgba(44, 51, 55, 0.16);
  border-radius: 5px;
  color: #343840;
  background: #fff;
  font: 0.82rem/1.35 Inter, "Segoe UI", sans-serif;
  text-align: center;
  outline: none;
}

.rich-editor-priority::placeholder {
  color: rgba(83, 91, 97, 0.46);
}

.rich-editor-priority:focus {
  border-color: rgba(22, 125, 127, 0.72);
  box-shadow: 0 0 0 2px rgba(22, 125, 127, 0.12);
}

.rich-editor-priority.is-invalid {
  border-color: #b84a38;
  color: #9b2f22;
}

.rich-editor-line.is-complete .rich-editor-marker {
  color: var(--muted);
}

.rich-editor-line.is-complete .rich-editor-text,
.rich-editor-line del {
  color: var(--muted);
  text-decoration: line-through;
}

.rich-editor-line code {
  padding: 0.08rem 0.28rem;
  border: 1px solid rgba(44, 51, 55, 0.12);
  border-radius: 4px;
  background: rgba(44, 51, 55, 0.06);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.journal-editor-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.journal-editor-action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

#journalSaveStatus {
  color: var(--muted);
  font-size: 0.9rem;
}

#journalSaveStatus.is-error {
  color: #9b2f22;
}

.journal-scroll-view {
  display: grid;
  gap: 12px;
}

.journal-scroll-list {
  display: grid;
  gap: 14px;
}

.journal-scroll-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  scroll-margin-top: 92px;
}

.journal-scroll-card.is-active {
  border-color: rgba(22, 125, 127, 0.62);
  box-shadow: 0 0 0 3px rgba(22, 125, 127, 0.12);
}

.journal-scroll-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.journal-scroll-card h4 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
  font-size: 1.05rem;
}

.journal-page-status {
  color: var(--muted);
  font-size: 0.86rem;
}

.journal-page-status.is-error {
  color: #9b2f22;
}

.journal-scroll-editor {
  min-height: 230px;
}

.journal-scroll-extend {
  justify-self: center;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric-card {
  min-height: 150px;
  padding: 22px;
  color: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card:nth-child(1) {
  background: var(--teal);
}

.metric-card:nth-child(2) {
  background: var(--coral);
}

.metric-card:nth-child(3) {
  background: var(--blue);
}

.metric-card:nth-child(4) {
  background: var(--moss);
}

.metric-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 780;
}

.metric-value {
  display: block;
  margin-top: 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 820;
  line-height: 1;
}

.metric-sub {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.panel {
  min-width: 0;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 35px rgba(30, 33, 38, 0.06);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header .eyebrow {
  margin-bottom: 6px;
}

.panel h3 {
  font-size: 1.35rem;
}

.status-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: #0d3839;
  background: #d9f5eb;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill.neutral {
  color: #3f2a08;
  background: #f5e5bd;
}

.status-pill.calm {
  color: #283c6c;
  background: #dfe9ff;
}

.chart-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

#runChart {
  display: block;
  width: 100%;
  min-height: 220px;
}

.axis-label {
  fill: #74777f;
  font-size: 12px;
}

.run-line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 4;
}

.run-area {
  fill: rgba(22, 125, 127, 0.13);
}

.run-dot {
  fill: var(--coral);
}

.run-log {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.workout-schedule-panel {
  grid-column: 1 / -1;
}

.workout-schedule-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.workout-schedule {
  display: grid;
  grid-template-columns: 92px repeat(7, minmax(96px, 1fr));
  min-width: 820px;
}

.schedule-row {
  display: contents;
}

.schedule-corner,
.schedule-day,
.schedule-time,
.schedule-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.schedule-corner,
.schedule-day,
.schedule-time {
  background: #f7f5ee;
  color: #3e4147;
  font-weight: 800;
}

.schedule-corner,
.schedule-day {
  min-height: 66px;
  padding: 12px 10px;
}

.schedule-corner {
  display: flex;
  align-items: end;
}

.schedule-day {
  display: grid;
  align-content: center;
  gap: 2px;
  text-align: center;
}

.schedule-day strong {
  font-size: 0.95rem;
  line-height: 1;
}

.schedule-day span {
  color: var(--muted);
  font-size: 0.72rem;
}

.schedule-time {
  display: flex;
  align-items: center;
  min-height: 118px;
  padding: 12px 10px;
}

.schedule-cell {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 118px;
  padding: 12px;
  background: #fff;
}

.schedule-day:nth-child(8),
.schedule-cell:nth-child(8) {
  border-right: 0;
}

.workout-schedule .schedule-row:last-child .schedule-time,
.workout-schedule .schedule-row:last-child .schedule-cell {
  border-bottom: 0;
}

.workout-slot {
  display: grid;
  gap: 2px;
  padding-left: 10px;
  border-left: 4px solid var(--teal);
}

.workout-slot[data-category="lift"] {
  border-color: var(--coral);
}

.workout-slot[data-category="run"] {
  border-color: var(--blue);
}

.workout-slot strong {
  font-size: 0.96rem;
  line-height: 1.1;
}

.workout-slot span,
.schedule-empty {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.schedule-empty {
  align-self: center;
}

.run-entry,
.health-item,
.pipeline-stage {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.run-entry strong,
.health-item strong,
.pipeline-stage strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
}

.run-entry span,
.health-item span,
.pipeline-stage span {
  color: var(--muted);
  font-size: 0.85rem;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table th {
  color: #3e4147;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.commit-heatmap {
  display: grid;
  grid-template-columns: repeat(18, minmax(10px, 1fr));
  gap: 5px;
}

.commit-day {
  aspect-ratio: 1;
  border-radius: 3px;
  background: #e4e1d8;
}

.commit-day[data-level="1"] {
  background: #b9d8c7;
}

.commit-day[data-level="2"] {
  background: #78b697;
}

.commit-day[data-level="3"] {
  background: #327b63;
}

.commit-day[data-level="4"] {
  background: #185744;
}

.data-source-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.source-card {
  min-height: 190px;
}

.source-card input {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 72px);
  color: #fff;
  background: #15161a;
}

.site-footer p {
  margin: 0;
  font-weight: 800;
}

.site-footer div {
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
}

code {
  padding: 0.1em 0.25em;
  background: rgba(22, 125, 127, 0.1);
  border-radius: 4px;
}

@media (max-width: 1080px) {
  .timeline,
  .project-grid,
  .metric-grid,
  .data-source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    color: var(--ink);
    background: #fff;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .main-nav a {
    color: var(--muted);
  }

  .main-nav a[aria-current="page"] {
    color: var(--ink);
  }

  .brand-mark {
    color: #fff;
    background: var(--ink);
  }

  .hero {
    min-height: 78svh;
    margin-top: 0;
    padding: 96px 20px 46px;
  }

  .hero-content {
    max-width: 620px;
    margin-left: 0;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(7, 9, 10, 0.78), rgba(7, 9, 10, 0.28)),
      linear-gradient(90deg, rgba(7, 9, 10, 0.65), rgba(7, 9, 10, 0.18));
  }

  h1 {
    font-size: clamp(3.1rem, 18vw, 5.2rem);
  }

  .timeline,
  .project-grid,
  .metric-grid,
  .data-source-grid,
  .health-grid,
  .pipeline,
  .run-log {
    grid-template-columns: 1fr;
  }

  .dashboard-toolbar,
  .auth-panel,
  .session-bar,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-panel,
  .journal-layout,
  .journal-title-row,
  .journal-date-controls,
  .journal-editor-shell,
  .journal-scroll-grid,
  .journal-editor-actions {
    grid-template-columns: 1fr;
  }

  .commit-heatmap {
    grid-template-columns: repeat(14, minmax(10px, 1fr));
  }
}
