:root {
  --forest: #1b2e26;
  --forest-deep: #121c18;
  --moss: #3d5c4a;
  --sage: #6b8f71;
  --sage-soft: #9bb39e;
  --fog: #e7ece8;
  --mist: #f4f6f4;
  --slate: #4a5560;
  --charcoal: #1c2320;
  --ink: #24302b;
  --paper: #f7f8f6;
  --white: #fcfdfb;
  --line: rgba(36, 48, 43, 0.12);
  --shadow: 0 18px 50px rgba(18, 28, 24, 0.16);
  --header-bg: rgba(247, 248, 246, 0.96);
  --btn: #1b2e26;
  --btn-hover: #243f34;
  --focus: #2f6f4e;
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --radius: 18px;
  --max: 1120px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (hover: none) and (pointer: coarse) {
  html {
    scroll-behavior: auto;
  }
}

*:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  scroll-margin-top: 6rem;
}

#main:focus {
  outline: none;
}

#about,
#notes,
#work {
  scroll-margin-top: 5.5rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus,
.skip:focus-visible {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--white);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moss);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin: 0 0 18px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 16px;
}

h3 {
  font-size: 1.45rem;
  margin: 0 0 8px;
}

.lede {
  font-size: 1.2rem;
  max-width: 38rem;
  color: var(--slate);
}

.blog-intro {
  max-width: 44rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  border-radius: 8px;
}

.brand-logo {
  display: block;
  height: 56px;
  width: auto;
}

.brand-logo-dark {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav a:not(.btn) {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--slate);
}

.nav a:not(.btn):hover,
.nav a:not(.btn):focus-visible {
  color: var(--forest);
}

.nav a:focus-visible,
.nav-menu > summary:focus-visible {
  border-radius: 6px;
}

.nav a:not(.btn)[aria-current="page"],
.nav-menu[aria-current="page"] > summary {
  color: var(--forest-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.38em;
  text-decoration-color: var(--moss);
}

.nav-menu {
  position: relative;
}

.nav-menu > summary {
  list-style: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--slate);
}

.nav-menu > summary::-webkit-details-marker,
.nav-menu > summary::marker {
  display: none;
  content: "";
}

.nav-menu > summary:hover,
.nav-menu > summary:focus-visible,
.nav-menu[open] > summary {
  color: var(--forest);
}

.nav-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 12.5rem;
  padding: 8px 0;
  background: var(--paper);
  border: 1px solid var(--line);
  z-index: 30;
}

.nav-menu-list a {
  display: block;
  padding: 8px 16px;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active:not(.is-busy):not(:disabled) {
  transform: scale(0.97);
}

.btn.is-busy,
.btn:disabled {
  cursor: wait;
  opacity: 0.88;
  transform: none;
  pointer-events: none;
}

.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  transform: none;
  cursor: default;
  box-shadow: none;
}

.btn-spinner {
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--btn);
  color: #fff;
  box-shadow: 0 8px 20px rgba(27, 46, 38, 0.22);
}

.btn-primary:hover {
  background: var(--btn-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--mist);
  border: 1px solid rgba(247, 248, 246, 0.45);
}

.btn-light {
  background: #fcfdfb;
  color: #1b2e26;
}

.btn-secondary {
  background: var(--fog);
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  place-items: end start;
  color: var(--mist);
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 28, 24, 0.18) 0%, rgba(18, 28, 24, 0.55) 55%, rgba(18, 28, 24, 0.82) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 0 0 72px;
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.hero :focus-visible,
.fit :focus-visible {
  outline-color: #f7f8f6;
}

.site-footer :focus-visible {
  outline-color: #c8f5c0;
}

/* Trial 0.8.89: desktop JS parallax; mobile CSS scroll-timeline. Remove class hero-parallax-trial from index.html to revert. */
.hero.hero-parallax-trial {
  overflow: clip;
}

@keyframes jl-hero-copy-rise {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -28px, 0); }
}

@keyframes jl-hero-media-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, 48px, 0); }
}

@media (min-width: 861px) {
  .hero.hero-parallax-trial img {
    inset: auto 0 auto 0;
    top: -18%;
    height: 136%;
    will-change: transform;
  }

  .hero.hero-parallax-trial .hero-copy {
    will-change: transform;
  }
}

@media (max-width: 860px) {
  .hero.hero-parallax-trial img {
    inset: 0 auto auto 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 124%;
    transform: none;
  }
}

@supports (animation-timeline: scroll()) {
  @media (max-width: 860px) {
    .hero.hero-parallax-trial .hero-copy {
      animation: jl-hero-copy-rise 1s linear both;
      animation-timeline: scroll();
      animation-timeline: scroll(root);
      animation-range: 0 70vh;
    }

    .hero.hero-parallax-trial img {
      animation: jl-hero-media-drift 1s linear both;
      animation-timeline: scroll();
      animation-timeline: scroll(root);
      animation-range: 0 70vh;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero.hero-parallax-trial img {
    inset: 0;
    top: auto;
    height: 100%;
    transform: none;
    animation: none;
  }

  .hero.hero-parallax-trial .hero-copy {
    transform: none;
    animation: none;
  }
}

@media (max-width: 860px) {
  .hero {
    min-height: calc(100svh - 5.5rem);
    place-items: center start;
  }

  .hero img {
    object-position: center 20%;
  }

  .hero-copy {
    padding-bottom: 20px;
  }
}

.hero .eyebrow {
  color: var(--fog);
  text-shadow: 0 1px 10px rgba(18, 28, 24, 0.55);
}

.hero .lede {
  color: rgba(244, 246, 244, 0.86);
}

.hero .btn-primary,
.site-header .btn-primary,
.nav a.btn-primary {
  background: var(--btn);
  color: #fff;
}

.hero .btn-primary:hover,
.site-header .btn-primary:hover,
.nav a.btn-primary:hover {
  background: var(--btn-hover);
  color: #fff;
}

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

section {
  padding: 88px 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 40px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 32px;
  box-shadow: 0 10px 30px rgba(18, 28, 24, 0.05);
}

.card-num {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--sage);
  margin-bottom: 18px;
}

.bio {
  background: var(--fog);
}

.bio-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.origin-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.origin-photo {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}

.origin-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.bio-photo {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}

.bio-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.bio-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--slate);
}

.engagement-note {
  max-width: 46rem;
  margin: 0 0 22px;
}

.engagement {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: 0 10px 30px rgba(18, 28, 24, 0.05);
  max-width: 46rem;
}

.engagement h3 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.engagement .btn {
  margin-top: 8px;
}

.engagement-facts {
  display: grid;
  gap: 14px;
  margin: 24px 0 28px;
}

.engagement-facts div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 12px 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.engagement-facts dt {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.engagement-facts dd {
  margin: 0;
}

.notes-band {
  background: var(--fog);
}

.fit {
  position: relative;
  color: var(--mist);
  overflow: hidden;
}

.fit img.fit-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.22) contrast(1.06) saturate(1.12);
}

.fit::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 16, 13, 0.64) 0%, rgba(10, 16, 13, 0.38) 48%, rgba(10, 16, 13, 0.12) 100%),
    linear-gradient(180deg, rgba(10, 16, 13, 0.06) 0%, rgba(10, 16, 13, 0.22) 100%);
}

.fit .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  justify-items: start;
  align-items: start;
}

.fit h2 {
  text-shadow: 0 1px 18px rgba(8, 16, 12, 0.9), 0 0 2px rgba(8, 16, 12, 0.7);
}

.fit .lede {
  color: rgba(244, 246, 244, 0.92);
  text-shadow: 0 1px 14px rgba(8, 16, 12, 0.85);
}

.fit .eyebrow {
  color: #c8f5c0;
  text-shadow: 0 1px 14px rgba(8, 16, 12, 0.9), 0 0 2px rgba(8, 16, 12, 0.7);
}

.fit .btn-light {
  box-shadow: 0 8px 24px rgba(8, 16, 12, 0.35);
}

.copy-list {
  max-width: 40rem;
  margin: 0 0 1.2em;
  padding-left: 1.2rem;
}

.copy-list li {
  margin-bottom: 10px;
}

.connect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.connect-grid h3 {
  margin-top: 0;
}

#field-notes {
  margin-top: 18px;
}

.site-footer {
  background: #121c18;
  color: #e7ece8;
  padding: 36px 0 28px;
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}

.footer-inner > p:first-child {
  margin-right: auto;
}

.footer-inner a {
  color: #9bb39e;
  text-decoration: none;
}

.footer-inner a:hover,
.footer-inner a:focus-visible {
  color: #d7eadc;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

/* Draft changelog. Visible on the local preview; hidden on joyandlinden.com. */
.changelog {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(231, 236, 232, 0.16);
}

.changelog h2 {
  color: var(--fog);
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.changelog-note {
  margin: 0 0 16px;
  color: var(--sage-soft);
  font-size: 0.88rem;
}

.changelog-entry {
  display: grid;
  grid-template-columns: 4.5rem 7.5rem 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(231, 236, 232, 0.1);
  align-items: start;
}

.changelog-entry:last-child {
  border-bottom: 0;
}

.changelog-entry strong {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--sage-soft);
}

.changelog-entry time {
  font-size: 0.85rem;
  color: rgba(231, 236, 232, 0.62);
}

.changelog-entry ul {
  margin: 0;
  padding-left: 1.1rem;
}

.changelog-entry li {
  margin: 0 0 4px;
}

@media (max-width: 860px) {
  .changelog-entry {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.page {
  padding: 48px 0 88px;
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 36px;
}

.steps {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.step {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.step.active {
  background: var(--btn);
  color: #fff;
  border-color: var(--btn);
}

.sso-grid {
  display: grid;
  gap: 12px;
  max-width: 420px;
}

.sso-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-align: left;
}

.sso-btn:hover {
  border-color: var(--sage);
  background: var(--mist);
}

a.sso-btn {
  color: inherit;
  text-decoration: none;
}

a.sso-btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.sso-icon {
  width: 22px;
  height: 22px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  margin: 22px 0;
  color: var(--slate);
  font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.email-login {
  max-width: 420px;
}

.email-login .btn {
  display: block;
  width: 100%;
  margin-top: 8px;
}

.email-login .linkish,
#google-step .linkish,
#password-step .linkish {
  display: block;
  margin-top: 14px;
}

.totp-secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--forest);
}

.backup-codes {
  background: var(--mist);
  padding: 14px 16px;
  border-radius: 12px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
  line-height: 1.7;
}

input[readonly] {
  background: var(--mist);
}

.secure-note {
  margin-top: 18px;
  color: var(--slate);
  font-size: 0.95rem;
}

.hidden {
  display: none !important;
}

.session-chip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: var(--mist);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 22px;
  font-size: 0.95rem;
}

.linkish {
  background: none;
  border: 0;
  color: var(--moss);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.calendar {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.month-nav h3 {
  margin: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
}

.dow,
.grid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}

.dow {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 8px;
}

.day {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.day:hover:not(:disabled) {
  background: var(--fog);
}

.day.selected {
  background: var(--btn);
  color: #fff;
}

.day:disabled {
  color: #b7c0ba;
  cursor: default;
}

.slots h3 {
  margin-top: 0;
}

.slot-list {
  display: grid;
  gap: 8px;
}

.slot {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  font: inherit;
}

.slot.selected {
  background: var(--btn);
  color: #fff;
  border-color: var(--btn);
}

.slot:disabled {
  color: #9aa59e;
  background: var(--fog);
  cursor: not-allowed;
}

.form-row {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

label {
  font-size: 0.88rem;
  font-weight: 600;
}

input,
textarea,
select {
  font: inherit;
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
}

fieldset.form-row {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
  min-inline-size: 0;
}

legend {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  padding: 0;
}

.choice-list {
  display: grid;
  gap: 10px;
}

.choice-list label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 500;
  font-size: 0.95rem;
}

.choice-list input[type="radio"] {
  width: auto;
  margin-top: 4px;
  padding: 0;
  accent-color: var(--forest);
}

.confirm-card {
  background: var(--mist);
  border-radius: 16px;
  padding: 20px;
  margin: 18px 0 24px;
}

.status {
  margin: 12px 0 0;
  color: var(--moss);
  font-weight: 600;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 28, 24, 0.55);
  display: grid;
  place-items: center;
  z-index: 40;
}

.overlay-card {
  background: var(--white);
  padding: 28px 32px;
  border-radius: 16px;
  text-align: center;
  min-width: 280px;
}

.spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border: 3px solid var(--fog);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.text-link {
  color: var(--moss);
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
}

#success-panel .text-link {
  color: #146c3d;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

#success-panel .text-link:hover,
#success-panel .text-link:focus-visible {
  color: var(--forest-deep);
}

.post-list {
  display: grid;
  gap: 22px;
  margin-top: 36px;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
}

.post-card h2 {
  font-size: 1.7rem;
  margin: 0 0 10px;
}

.post-card h2 a {
  text-decoration: none;
  border-radius: 4px;
}

.post-card h2 a:hover,
.post-card h2 a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.article-wrap {
  max-width: 720px;
}

.article {
  margin-top: 28px;
}

.article h2,
.article h3 {
  margin: 1.6em 0 0.5em;
}

.article p,
.article li {
  font-size: 1.08rem;
}

.article ul {
  padding-left: 1.2rem;
}

.article blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--sage);
  color: var(--slate);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
}

.blog-edit-hint {
  margin-top: 28px;
  font-size: 0.95rem;
}

.blog-edit-hint a {
  color: var(--moss);
}

.editor-layout {
  display: grid;
  grid-template-columns: 0.35fr 0.65fr;
  gap: 22px;
  margin-top: 28px;
}

.editor-list h2 {
  font-size: 1.3rem;
}

.editor-list .linkish,
.editor-list p {
  display: block;
  margin: 10px 0;
  text-align: left;
}

.editor-deleted {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.deleted-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0;
}

.deleted-row .linkish {
  margin: 0;
}

.deleted-row .btn-compact {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

#field-body {
  min-height: 320px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem;
}

#field-body.drop-target {
  border-color: var(--sage);
  background: var(--fog);
}

.image-insert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.image-insert span {
  font-size: 0.88rem;
  color: var(--slate);
}

.image-insert-btn {
  min-height: 40px;
  cursor: pointer;
}

#field-image {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.article img,
.article-image img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 1.1em 0 0.4em;
  display: block;
}

.article-image {
  margin: 1.4em 0;
}

.article-image figcaption {
  font-size: 0.92rem;
  color: var(--slate);
}

.studio-grid {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.client-card h2 {
  font-size: 1.6rem;
  margin: 0 0 8px;
}

.client-actions {
  margin-top: 16px;
}

.client-actions select {
  font: inherit;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
}

.db-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0 12px;
}

.db-toolbar input[type="search"] {
  flex: 1;
  min-width: 220px;
  font: inherit;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.studio-page .wrap {
  width: min(1280px, calc(100% - 40px));
}

.db-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
  gap: 22px;
  align-items: start;
}

.db-layout > * {
  min-width: 0;
}

#client-detail {
  overflow-wrap: anywhere;
}

#client-detail .form-grid,
#client-detail .form-row {
  min-width: 0;
}

#client-detail .form-grid {
  grid-template-columns: minmax(0, 1fr);
}

#client-detail input,
#client-detail textarea,
#client-detail select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#client-detail .invoice-form {
  grid-template-columns: minmax(0, 1fr);
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.activity-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.activity-list li:last-child {
  border-bottom: 0;
}

.activity-when {
  display: block;
  font-size: 0.82rem;
  color: var(--moss);
  font-weight: 600;
  margin-bottom: 2px;
}

.client-note {
  background: var(--mist);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 18px;
}

.client-note .eyebrow {
  margin-bottom: 6px;
}

.client-note p:last-child {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.db-table-wrap {
  min-width: 0;
  overflow-x: hidden;
  padding: 0;
}

.db-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.db-table th,
.db-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.db-table tbody tr {
  cursor: pointer;
}

.db-table tbody tr:hover,
.db-table tbody tr.on {
  background: var(--fog);
}

.db-table tbody tr[data-open]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.invoice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.invoice-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 12px 0 28px;
}

.invoice-badge {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
}

.invoice-badge.unpaid {
  background: #eee6e8;
  color: #6b3a48;
}

.invoice-badge.sent {
  background: #e7eee8;
  color: var(--moss);
}

.invoice-badge.paid {
  background: var(--btn);
  color: #fff;
}

.cal-links {
  margin: 28px 0;
}

.cal-links .hero-actions {
  margin-top: 8px;
}

@media (max-width: 1100px) {
  .db-layout {
    grid-template-columns: 1fr;
  }

  #client-detail .form-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .cards,
  .bio-grid,
  .origin-grid,
  .connect-grid,
  .engagement-facts div,
  .calendar,
  .editor-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }



  .header-inner {
    flex-wrap: wrap;
    min-height: 0;
    padding-block: 10px;
  }

  .nav {
    gap: 10px 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .brand-logo {
    height: 44px;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .site-header .btn-primary,
  .nav a.btn-primary {
    min-height: 40px;
    padding: 0 16px;
    white-space: nowrap;
  }

  section {
    padding: 64px 0;
  }
}

@media (max-width: 860px) and (orientation: portrait) {
  .header-inner {
    gap: 4px 12px;
    padding-block: 6px;
  }

  .brand-logo {
    height: 36px;
  }

  .nav {
    flex: 1 1 100%;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .nav a:not(.btn),
  .nav-menu > summary {
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .site-header .btn-primary,
  .nav a.btn-primary {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 370px) and (orientation: portrait) {
  .hide-sm {
    display: none;
  }
}

.slot-subhead {
  font-size: 1.05rem;
  margin: 22px 0 10px;
}

.slot-week {
  display: grid;
  gap: 12px;
}

.slot-day {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 8px 16px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.slot-times {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 28px;
}

.slot-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  background: var(--fog);
  font-size: 0.88rem;
}

.slot-remove {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0 2px;
}

.slot-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.slot-time-input,
#slot-new-date {
  min-height: 36px;
  width: 10rem;
  padding: 0 10px;
}

select.slot-time-input {
  width: 10.5rem;
}

.slot-empty {
  color: var(--slate);
  font-size: 0.9rem;
}

.slot-date-add {
  margin-bottom: 12px;
}

.slot-cal-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 8px;
}

.slot-cal-open,
.slot-cal-closed {
  margin: 0;
  font-weight: 600;
}

.slot-cal-closed {
  color: #8a3b32;
}

.slot-presets {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
}

.slot-preset {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.slot-preset.is-active {
  border-color: var(--sage);
  background: var(--fog);
}

.slot-preset-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.slot-preset-hint {
  color: var(--slate);
  font-size: 0.88rem;
}

.slot-preset-active {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--sage);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.slot-preset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: flex-end;
}

.slot-preset-actions .btn-compact,
.slot-add .btn-compact,
.slot-preset-save .btn-compact {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
}

.slot-preset-save {
  margin-bottom: 8px;
}

#slot-preset-name {
  min-height: 36px;
  width: min(22rem, 100%);
  padding: 0 10px;
}

@media (max-width: 860px) {
  .fit::after {
    background: linear-gradient(180deg, rgba(10, 16, 13, 0.58) 0%, rgba(10, 16, 13, 0.4) 55%, rgba(10, 16, 13, 0.24) 100%);
  }

  .slot-day {
    grid-template-columns: 1fr;
  }

  .slot-preset {
    grid-template-columns: 1fr;
  }
}

#notes-panel .notes-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

#notes-panel .btn-compact {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
}

#notes-panel .db-table {
  table-layout: auto;
}

#notes-panel .db-table tbody tr,
#notes-panel .db-table tbody tr:hover {
  cursor: default;
  background: transparent;
}

#notes-panel .notes-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#notes-panel .notes-client-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--moss);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  text-align: left;
}

#notes-panel .notes-client-link:hover,
#notes-panel .notes-client-link:focus-visible {
  color: var(--forest-deep);
}

.activity-summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--moss);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
}

.activity-summary::-webkit-details-marker,
.activity-summary::marker {
  display: none;
  content: "";
}

.activity-summary:hover,
.activity-summary:focus-visible,
#activity-details[open] > .activity-summary {
  color: var(--forest-deep);
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

@media (hover: none) and (pointer: coarse) {
  .theme-toggle {
    display: none;
  }
}

.site-footer .theme-toggle {
  width: 40px;
  height: 40px;
  border-color: rgba(231, 236, 232, 0.22);
  background: transparent;
  color: #e7ece8;
}

.site-footer .theme-toggle:hover,
.site-footer .theme-toggle:focus-visible {
  border-color: #9bb39e;
  color: #d7eadc;
}

.theme-toggle:hover {
  border-color: var(--moss);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle-sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle-sun {
  display: block;
}

html[data-theme="dark"] .theme-toggle-moon {
  display: none;
}

html[data-theme="dark"] .brand-logo-light {
  display: none;
}

html[data-theme="dark"] .brand-logo-dark {
  display: block;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --forest: #c5e0cc;
  --forest-deep: #e8eee9;
  --moss: #9ec9a8;
  --sage: #8fb89a;
  --sage-soft: #b7d4bc;
  --fog: #1c2b24;
  --mist: #24352c;
  --slate: #b7c4bc;
  --charcoal: #e8eee9;
  --ink: #e8eee9;
  --paper: #101915;
  --white: #18241e;
  --line: rgba(232, 238, 233, 0.22);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  --header-bg: rgba(16, 25, 21, 0.94);
  --focus: #c8f5c0;
}

html[data-theme="dark"] .hero,
html[data-theme="dark"] .fit {
  color: #e8eee9;
}

html[data-theme="dark"] .hero .lede,
html[data-theme="dark"] .fit .lede {
  color: rgba(244, 246, 244, 0.86);
}

html[data-theme="dark"] .hero .eyebrow {
  color: #e7ece8;
}

html[data-theme="dark"] .hero .btn-ghost {
  color: #e8eee9;
  border-color: rgba(247, 248, 246, 0.45);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  color: var(--ink);
  background: var(--paper);
  border-color: rgba(232, 238, 233, 0.35);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: var(--slate);
  opacity: 1;
}

html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus,
html[data-theme="dark"] textarea:-webkit-autofill,
html[data-theme="dark"] select:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--paper) inset;
  transition: background-color 99999s ease-out 0s;
}

html[data-theme="dark"] input[readonly] {
  background: var(--mist);
  color: var(--ink);
}

html[data-theme="dark"] option {
  background: var(--paper);
  color: var(--ink);
}

html[data-theme="dark"] .confirm-card,
html[data-theme="dark"] .session-chip,
html[data-theme="dark"] .backup-codes,
html[data-theme="dark"] .overlay-card {
  background: var(--mist);
  color: var(--ink);
}

html[data-theme="dark"] .sso-btn {
  background: var(--paper);
  color: var(--ink);
  border-color: rgba(232, 238, 233, 0.35);
}

html[data-theme="dark"] .sso-btn:hover {
  background: var(--mist);
  color: var(--ink);
}

html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .day,
html[data-theme="dark"] .slot {
  color: var(--ink);
}

html[data-theme="dark"] .slot,
html[data-theme="dark"] .icon-btn {
  background: var(--paper);
}

html[data-theme="dark"] .day:disabled {
  color: rgba(232, 238, 233, 0.28);
}

html[data-theme="dark"] .day.selected,
html[data-theme="dark"] .slot.selected {
  background: #c8f5c0;
  color: #101915;
  border-color: #c8f5c0;
  font-weight: 700;
}

html[data-theme="dark"] #success-panel .text-link {
  color: #9ee0b4;
}

html[data-theme="dark"] #success-panel .text-link:hover,
html[data-theme="dark"] #success-panel .text-link:focus-visible {
  color: #c8f5c0;
}
