:root {
  color-scheme: light;
  --forest: #173d2d;
  --deep-forest: #102b21;
  --ink: #17281f;
  --lime: #c9e879;
  --stone: #f5f3eb;
  --paper: #fffefa;
  --muted: #68766e;
  --hairline: #d9ded6;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--stone);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--stone); }
body { margin: 0; background: var(--stone); }
button, input { font: inherit; }
form { margin: 0; }

/* Dashboard */
.dashboard-shell { min-height: 100vh; background: var(--stone); }

.dashboard-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 30rem;
  padding: 2rem max(1.5rem, calc((100vw - 1180px) / 2));
  color: #f7f5ea;
  background:
    radial-gradient(circle at 82% 62%, rgba(201, 232, 121, .16), transparent 24%),
    linear-gradient(135deg, #173d2d 0%, #102b21 72%, #0b231a 100%);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -5rem;
  bottom: -16rem;
  width: 34rem;
  aspect-ratio: 1;
  border: 1px solid rgba(201, 232, 121, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 5rem rgba(201, 232, 121, .025), 0 0 0 10rem rgba(201, 232, 121, .018);
}

.dashboard-nav,
.dashboard-account,
.dashboard-brand,
.dashboard-hero-content,
.dashboard-section-heading,
.dashboard-panel-heading,
.dashboard-actions,
.dashboard-list-item,
.dashboard-status,
.dashboard-footer {
  display: flex;
  align-items: center;
}

.dashboard-nav { justify-content: space-between; gap: 1rem; }
.dashboard-brand { gap: .75rem; font-weight: 760; letter-spacing: -.025em; }
.dashboard-account { gap: 1rem; }
.dashboard-account-email { color: #a9bbae; font-size: .8rem; }

.dashboard-signout {
  min-height: 2.6rem;
  padding: .6rem 1rem;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 2rem;
  color: #f7f5ea;
  background: transparent;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}

.dashboard-signout:hover { border-color: rgba(201, 232, 121, .65); background: rgba(255, 255, 255, .06); }

.dashboard-hero-content {
  min-height: 22rem;
  justify-content: space-between;
  align-items: flex-end;
  gap: 3rem;
  padding: 5rem 0 2rem;
}

.dashboard-kicker {
  margin: 0 0 .7rem;
  color: #718278;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.dashboard-hero .dashboard-kicker,
.dashboard-feature-dark .dashboard-kicker { color: var(--lime); }

.dashboard-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 8vw, 7.6rem);
  font-weight: 400;
  letter-spacing: -.065em;
  line-height: .86;
}

.dashboard-hero h1 em { color: var(--lime); font-weight: 400; }

.dashboard-hero-aside {
  min-width: 11rem;
  padding-bottom: .45rem;
  text-align: right;
}

.dashboard-hero-aside p { margin: 0 0 1rem; color: #a9bbae; font-size: .85rem; }
.dashboard-rhythm { height: 3.4rem; display: flex; align-items: center; justify-content: flex-end; gap: .45rem; }
.dashboard-rhythm span { width: .3rem; height: 48%; border-radius: 1rem; background: rgba(201, 232, 121, .42); }
.dashboard-rhythm .is-tall { height: 100%; background: var(--lime); }
.dashboard-rhythm .is-short { height: 24%; }

.dashboard-main {
  width: min(1180px, calc(100% - 3rem));
  margin: -2.5rem auto 0;
  padding-bottom: 5rem;
}

.dashboard-message {
  position: relative;
  z-index: 2;
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid;
  border-radius: .75rem;
  font-size: .9rem;
  font-weight: 700;
  box-shadow: 0 .8rem 2rem rgba(16, 43, 33, .08);
}

.dashboard-message-success { color: #245c3c; border-color: #bbd8c4; background: #e7f3e9; }
.dashboard-message-error { color: #8a302d; border-color: #e6c4bd; background: #faeae6; }

.dashboard-section { padding: 4.5rem 0 1rem; }
.dashboard-section:first-of-type { padding-top: 0; }

.dashboard-section-heading {
  justify-content: space-between;
  align-items: flex-end;
  gap: 3rem;
  margin-bottom: 1.5rem;
}

.dashboard-section-heading-compact { margin-bottom: 1.5rem; }

.dashboard-section-heading h2,
.dashboard-panel-heading h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.04em;
}

.dashboard-section-heading h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
.dashboard-section-heading > p { max-width: 25rem; margin: 0; color: var(--muted); line-height: 1.6; }

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--hairline);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 1.2rem 3rem rgba(25, 52, 39, .06);
}

.dashboard-metric {
  min-height: 10.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.35rem;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.dashboard-metric:nth-child(4n) { border-right: 0; }
.dashboard-metric small { margin-bottom: auto; color: #718078; font-size: .7rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-metric strong { overflow-wrap: anywhere; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 400; letter-spacing: -.045em; line-height: 1; }
.dashboard-metric span { margin-top: .35rem; color: #839087; font-size: .75rem; }
.dashboard-metric-accent { background: var(--lime); }
.dashboard-metric-accent small, .dashboard-metric-accent span { color: #3c532a; }
.dashboard-metric-forest { color: #f7f5ea; background: var(--forest); }
.dashboard-metric-forest small, .dashboard-metric-forest span { color: #a9bbae; }
.dashboard-metric-wide { grid-column: span 2; }
.dashboard-metric-wide strong { font-size: clamp(1.6rem, 3vw, 2.5rem); }

.dashboard-feature-grid,
.dashboard-content-grid { display: grid; gap: 1rem; }
.dashboard-feature-grid { grid-template-columns: 1fr 1fr; }

.dashboard-feature {
  min-height: 24rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--hairline);
  border-radius: 1rem;
  background: var(--paper);
}

.dashboard-feature-dark { color: #f7f5ea; border-color: var(--forest); background: var(--forest); }
.dashboard-feature-number { align-self: flex-end; color: #a0ada5; font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; }
.dashboard-feature-dark .dashboard-feature-number { color: rgba(201, 232, 121, .52); }
.dashboard-feature h3 { margin: 0 0 .8rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 400; letter-spacing: -.04em; }
.dashboard-feature p:not(.dashboard-kicker) { max-width: 28rem; margin: 0; color: var(--muted); line-height: 1.65; }
.dashboard-feature-dark p:not(.dashboard-kicker) { color: #b7c7bc; }
.dashboard-config-note { margin-top: .7rem !important; font-size: .8rem; font-weight: 700; }

.dashboard-status {
  width: fit-content;
  gap: .5rem;
  margin-top: 1rem;
  padding: .45rem .75rem;
  border-radius: 2rem;
  color: #1f5939;
  background: #e7f3d0;
  font-size: .75rem;
  font-weight: 750;
}

.dashboard-status span,
.dashboard-brand-dot { width: .45rem; height: .45rem; border-radius: 50%; background: var(--lime); }
.dashboard-status span { background: #39704f; }
.dashboard-actions { flex-wrap: wrap; gap: .65rem; }

.dashboard-button {
  min-height: 3rem;
  padding: .75rem 1.15rem;
  border: 1px solid var(--forest);
  border-radius: .65rem;
  color: #f9faef;
  background: #1c5438;
  font-weight: 750;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}

.dashboard-button:hover { transform: translateY(-1px); background: #246747; }
.dashboard-button-lime { color: var(--deep-forest); border-color: var(--lime); background: var(--lime); }
.dashboard-button-lime:hover { background: #d6ef95; }
.dashboard-button-quiet { color: var(--forest); border-color: #bec9c0; background: transparent; }
.dashboard-button-quiet:hover { background: #eef1ea; }

.dashboard-content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 5rem;
}

.dashboard-panel {
  min-height: 22rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--hairline);
  border-radius: 1rem;
  background: var(--paper);
}

.dashboard-panel-wide { grid-column: span 2; }
.dashboard-panel-heading { justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: 1.4rem; border-bottom: 1px solid #e5e8e1; }
.dashboard-panel-heading h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.dashboard-count { min-width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border-radius: 50%; color: var(--forest); background: var(--lime); font-size: .8rem; font-weight: 800; }
.dashboard-list { display: grid; }
.dashboard-list-item { gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid #e8ebe5; }
.dashboard-list-item:last-child { border-bottom: 0; }
.dashboard-list-marker { width: .4rem; height: 2.3rem; flex: 0 0 auto; border-radius: 1rem; background: var(--lime); }
.dashboard-list-item div:last-child { min-width: 0; display: grid; gap: .25rem; }
.dashboard-list-item strong { overflow-wrap: anywhere; font-size: .95rem; }
.dashboard-list-item small { color: var(--muted); font-size: .78rem; line-height: 1.5; }
.dashboard-empty { min-height: 11rem; display: grid; align-content: center; justify-items: start; gap: 1rem; color: var(--muted); line-height: 1.6; }
.dashboard-empty p { max-width: 26rem; margin: 0; }
.dashboard-empty-mark { width: 2.4rem; height: .35rem; border-radius: 1rem; background: var(--lime); box-shadow: .7rem 0 0 rgba(201, 232, 121, .5), 1.4rem 0 0 rgba(201, 232, 121, .22); }

.dashboard-footer {
  justify-content: center;
  gap: .65rem;
  padding: 2rem 1.5rem 3rem;
  color: #75837a;
  font-size: .78rem;
}

.dashboard-brand-dot { box-shadow: 0 0 0 4px rgba(201, 232, 121, .2); }

@media (max-width: 900px) {
  .dashboard-hero { min-height: 25rem; }
  .dashboard-hero-content { min-height: 18rem; padding-top: 3.5rem; }
  .dashboard-main { width: min(100% - 2rem, 1180px); }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-metric:nth-child(4n) { border-right: 1px solid var(--hairline); }
  .dashboard-metric:nth-child(2n) { border-right: 0; }
  .dashboard-feature-grid { grid-template-columns: 1fr; }
  .dashboard-feature { min-height: 20rem; }
}

@media (max-width: 650px) {
  .dashboard-hero { min-height: 27rem; padding-inline: 1.1rem; }
  .dashboard-nav { align-items: flex-start; }
  .dashboard-account { align-items: flex-end; flex-direction: column; gap: .6rem; }
  .dashboard-account-email { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dashboard-hero-content { align-items: flex-start; flex-direction: column; justify-content: flex-end; gap: 1.8rem; padding-bottom: 1rem; }
  .dashboard-hero h1 { font-size: clamp(3.6rem, 17vw, 5.4rem); }
  .dashboard-hero-aside { display: flex; align-items: center; gap: 1rem; padding: 0; text-align: left; }
  .dashboard-hero-aside p { margin: 0; }
  .dashboard-rhythm { height: 2rem; }
  .dashboard-section { padding-top: 3.5rem; }
  .dashboard-section-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .dashboard-metrics { grid-template-columns: 1fr 1fr; }
  .dashboard-metric { min-height: 8.5rem; padding: 1rem; }
  .dashboard-metric strong { font-size: 2.1rem; }
  .dashboard-metric-wide { grid-column: span 2; }
  .dashboard-content-grid { grid-template-columns: 1fr; margin-top: 3.5rem; }
  .dashboard-panel-wide { grid-column: auto; }
  .dashboard-panel { min-height: auto; }
}

@media (max-width: 390px) {
  .dashboard-metrics { grid-template-columns: 1fr; }
  .dashboard-metric, .dashboard-metric:nth-child(2n), .dashboard-metric:nth-child(4n) { border-right: 0; }
  .dashboard-metric-wide { grid-column: auto; }
}

/* Authentication */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, .92fr) minmax(430px, 1.08fr);
  background: #f5f3eb;
}

.auth-story {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(2rem, 5vw, 4.75rem);
  color: #f7f5ea;
  background:
    radial-gradient(circle at 82% 18%, rgba(196, 227, 107, .18) 0, rgba(196, 227, 107, 0) 32%),
    linear-gradient(145deg, #173d2d 0%, #102b21 68%, #0b231a 100%);
}

.auth-story::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(42vw, 540px);
  aspect-ratio: 1;
  right: -26%;
  bottom: 5%;
  border: 1px solid rgba(219, 237, 170, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(219, 237, 170, .035), 0 0 0 110px rgba(219, 237, 170, .025);
}

.auth-brand,
.auth-mobile-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -.025em;
}

.auth-brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: .55rem;
  border-radius: 50%;
  color: #173d2d;
  background: #c9e879;
}

.auth-brand-mark span {
  display: block;
  width: 3px;
  height: 45%;
  border-radius: 3px;
  background: currentColor;
}

.auth-brand-mark span:nth-child(2) { height: 100%; }
.auth-brand-mark span:nth-child(3) { height: 70%; }

.auth-story-copy { max-width: 37rem; }

.auth-kicker {
  margin: 0 0 1rem;
  color: #67806e;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.auth-story .auth-kicker { color: #c9e879; }

.auth-story h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.25rem, 6vw, 6.4rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .92;
}

.auth-story h1 em { color: #c9e879; font-weight: 400; }

.auth-intro {
  max-width: 31rem;
  margin: 2rem 0 0;
  color: #bfd0c4;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.7;
}

.auth-rhythm {
  height: 4.5rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: 2.4rem;
}

.auth-rhythm span {
  width: .38rem;
  height: 48%;
  border-radius: 1rem;
  background: rgba(201, 232, 121, .48);
}

.auth-rhythm .is-tall { height: 100%; background: #c9e879; }
.auth-rhythm .is-short { height: 25%; }

.auth-private-note {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0;
  color: #91aa99;
  font-size: .82rem;
}

.auth-private-note span {
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: #c9e879;
  box-shadow: 0 0 0 4px rgba(201, 232, 121, .1);
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vw, 7rem);
}

.auth-mobile-brand { display: none; color: #173d2d; }
.auth-card { width: min(100%, 29rem); }

.auth-card h2 {
  margin: 0;
  color: #17281f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 4vw, 3.65rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1.05;
}

.auth-subtitle {
  margin: 1rem 0 2.4rem;
  color: #68766e;
  line-height: 1.65;
}

.auth-message {
  margin: 0 0 1.25rem;
  padding: .8rem 1rem;
  border: 1px solid;
  border-radius: .6rem;
  font-size: .9rem;
  font-weight: 650;
}

.auth-message-error { color: #8a302d; border-color: #e6c4bd; background: #faeae6; }
.auth-message-success { color: #245c3c; border-color: #bbd8c4; background: #e7f3e9; }
.auth-form { display: grid; gap: 1.4rem; }
.auth-field { display: grid; gap: .55rem; }

.auth-field label {
  color: #263b2f;
  font-size: .84rem;
  font-weight: 700;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-label-row a {
  color: #39704f;
  font-size: .8rem;
  font-weight: 650;
  text-decoration: none;
}

.auth-label-row a:hover { text-decoration: underline; }

.auth-input {
  width: 100%;
  min-height: 3.35rem;
  padding: .85rem 1rem;
  border: 1px solid #cdd3c8;
  border-radius: .65rem;
  outline: none;
  color: #17281f;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 1px 0 rgba(21, 51, 37, .04);
  font: inherit;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.auth-input::placeholder { color: #9aa49d; }

.auth-input:focus {
  border-color: #39704f;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(57, 112, 79, .12);
}

.auth-submit {
  min-height: 3.45rem;
  margin-top: .35rem;
  border: 0;
  border-radius: .65rem;
  color: #f9faef;
  background: #1c5438;
  box-shadow: 0 .8rem 1.8rem rgba(28, 84, 56, .18);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  background: #246747;
  box-shadow: 0 1rem 2rem rgba(28, 84, 56, .23);
}

.auth-submit:focus-visible { outline: 3px solid rgba(57, 112, 79, .28); outline-offset: 3px; }

.auth-security-note {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 1.5rem 0 0;
  color: #859087;
  font-size: .75rem;
  line-height: 1.5;
}

.auth-security-note svg { width: 1rem; flex: 0 0 auto; fill: #6f8275; }

.auth-back-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: #39704f;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-back-link:hover { text-decoration: underline; }

@media (max-width: 800px) {
  .auth-shell { display: block; min-height: 100svh; }
  .auth-story { display: none; }
  .auth-panel { min-height: 100svh; display: flex; flex-direction: column; align-items: stretch; padding: 1.5rem; }
  .auth-mobile-brand { display: flex; }
  .auth-card { margin: auto; padding: 3rem 0; align-self: center; }
}

@media (max-width: 420px) {
  .auth-panel { padding: 1.25rem; }
  .auth-card h2 { font-size: 2.35rem; }
  .auth-subtitle { margin-bottom: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-input, .auth-submit { transition: none; }
}
