/*
 * Toomey Family — Memory Atlas theme (Concept N1)
 * Cartographic dark mode applied to the complete private family archive.
 */

@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: Jakarta;
  src: url("assets/fonts/plus-jakarta-sans-latin-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #141912;
  --surface: #151b13;
  --surface-raised: #1b2318;
  --surface-hover: #263021;
  --card: #182016;
  --card-muted: #121710;
  --primary: #d7f49f;
  --primary-strong: #e7ffb8;
  --accent: #b8d495;
  --accent-soft: rgba(184, 212, 149, .12);
  --text: #e5eadb;
  --muted: #8b9882;
  --muted-strong: #b7c3ad;
  --border: #4c5e45;
  --border-soft: rgba(169, 195, 145, .22);
  --danger: #e99382;
  --warning: #d8bd78;
  --paper: #dce5cf;
  --paper-ink: #182016;
  --shadow: 0 28px 70px rgba(0, 0, 0, .34);
  --font-heading: Georgia, "Times New Roman", serif;
  --font-body: Inter, Arial, sans-serif;
  --font-mono: Inter, Arial, sans-serif;
}

html,
body { background: var(--bg); }

body {
  position: relative;
  padding: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 12%, rgba(116, 143, 91, .12), transparent 28rem),
    var(--bg);
  font-family: var(--font-body);
  letter-spacing: -.01em;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(116, 143, 91, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 143, 91, .055) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
  content: "";
}

button,
.file-button {
  min-height: 44px;
  border: 1px solid rgba(184, 212, 149, .38);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  padding: 11px 16px;
  font-size: .86rem;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: none;
}

button:hover,
.file-button:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #162012;
  box-shadow: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: -.045em;
}

label {
  color: #aab7a0;
  font-size: .85rem;
  letter-spacing: .06em;
}

input,
select,
textarea {
  min-height: 48px;
  border: 1px solid rgba(169, 195, 145, .27);
  border-radius: 0;
  background: rgba(12, 17, 11, .84);
  color: var(--text);
  padding: 12px 14px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(215, 244, 159, .06);
}

.relationship-grid select[multiple] {
  padding: 6px;
  background: #0c110b;
}

.relationship-grid select[multiple] option {
  margin: 2px 0;
  padding: 6px 10px;
  color: var(--text);
}

.relationship-grid select[multiple] option:checked {
  background: linear-gradient(var(--primary), var(--primary));
  color: var(--paper-ink);
  -webkit-text-fill-color: var(--paper-ink);
  font-weight: 850;
}

.relationship-grid select[multiple]:focus option:checked {
  background: linear-gradient(var(--primary-strong), var(--primary-strong));
  color: #10140f;
  -webkit-text-fill-color: #10140f;
}

input::placeholder,
textarea::placeholder { color: #697663; }

.app-shell {
  width: 100%;
  min-height: 100dvh;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.app-header {
  min-height: 138px;
  grid-template-columns: minmax(285px, 1fr) auto minmax(190px, 1fr);
  gap: 28px;
  padding: 0 clamp(24px, 4vw, 68px) 0 clamp(14px, 2vw, 30px);
  border-bottom: 1px solid rgba(169, 195, 145, .24);
  background: rgba(16, 20, 15, .9);
  backdrop-filter: blur(20px);
}

.brand-lockup { gap: 6px; }

.brand-mark {
  width: 126px;
  height: 102px;
  flex-basis: 126px;
  border: 0;
  border-radius: 0;
  padding: 0;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(184, 212, 149, .14));
}

.brand-lockup strong {
  font: 700 1.25rem/1.2 var(--font-heading);
  letter-spacing: .16em;
}

.brand-lockup span {
  margin-top: 6px;
  color: #78886e;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.top-nav { gap: clamp(18px, 2.8vw, 42px); }

.nav-link,
.ghost-action {
  min-height: 44px;
  color: #9da994;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
}

.nav-link { border-bottom-width: 1px; }
.nav-link:hover,
.nav-link.active { color: var(--primary); border-bottom-color: var(--primary); background: transparent; }
.ghost-action:hover { color: var(--primary); background: transparent; }

.header-actions { gap: 12px; }
.profile-action {
  min-width: 122px;
  border-color: #7d906f;
  background: transparent;
  color: #d8e4cb;
}
.profile-action:hover { border-color: var(--primary); background: var(--primary); color: #172014; }

.workspace {
  width: 100%;
  max-width: 1600px;
  padding: 0 clamp(24px, 5vw, 82px) 96px;
}

.view { scroll-margin-top: 110px; }
.overview-view { padding: 0; }

.hero-panel {
  min-height: calc(100vh - 100px);
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(430px, 1.12fr);
  align-items: center;
  gap: clamp(30px, 4vw, 72px);
  margin: 0;
  padding: clamp(58px, 6vw, 86px) 0 48px;
  border: 0;
  background: transparent;
}

.hero-copy { width: auto; position: relative; z-index: 2; }

.eyebrow,
.section-kicker {
  color: #8ea37e;
  font-size: .82rem;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

.hero-copy .eyebrow i {
  width: 18px;
  height: 1px;
  border-radius: 0;
  background: var(--primary);
  box-shadow: none;
}

.hero-copy h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(4.7rem, 8vw, 7.7rem);
  font-weight: 400;
  line-height: .84;
  letter-spacing: -.06em;
}

.hero-copy h1 span {
  color: var(--accent);
  font-style: italic;
}

.hero-copy > p:last-of-type {
  max-width: 560px;
  margin-top: 34px;
  color: #9ba592;
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-actions { gap: 22px; margin-top: 34px; }
.primary-action,
.outline-action { min-height: 49px; }

.primary-action {
  border-color: var(--primary);
  background: var(--primary);
  color: #172014;
  box-shadow: none;
}
.hero-actions .primary-action span { margin-left: 24px; }
.primary-action:hover { border-color: #efffcf; background: #efffcf; color: #172014; }

.outline-action {
  border: 0;
  border-bottom: 1px solid rgba(184, 212, 149, .55);
  border-radius: 0;
  background: transparent;
  color: #b9c5af;
  padding-inline: 0;
}
.outline-action:hover { border-bottom-color: var(--primary); background: transparent; color: var(--primary); }

.memory-atlas-map {
  width: min(100%, 820px);
  aspect-ratio: 3 / 2;
  position: relative;
  align-self: center;
  justify-self: end;
  overflow: hidden;
  border: 1px solid rgba(205, 228, 174, .42);
  background: #11170f;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
}

.memory-atlas-map::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 244, 215, .18);
  content: "";
}

.memory-atlas-map::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(221, 247, 184, .045), transparent 34%, rgba(5, 9, 5, .08));
  content: "";
}

.family-journey-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.atlas-coordinate-bar {
  display: flex;
  gap: 30px;
  border-top: 1px solid #3d4938;
  padding: 20px 0;
  color: #73816c;
  font: 700 .8rem/1 Inter, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.atlas-coordinate-bar span:last-child { margin-left: auto; color: #afc49d; }

.review-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 calc(clamp(24px, 5vw, 82px) * -1);
  border: 0;
  background: #93a287;
}

.metric,
.overview-card,
.backend-panel,
.person-card,
.change-card,
.source-note-card,
.source-card,
.access-card,
.invite-card,
.install-card,
.sync-panel,
.image-stage,
.dialog {
  border-color: rgba(169, 195, 145, .23);
  border-radius: 0;
  background: rgba(20, 27, 18, .92);
  box-shadow: none;
}

.metric {
  min-height: 185px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: space-between;
  border: 0;
  padding: 28px clamp(24px, 5vw, 82px);
  background: var(--paper);
  color: var(--paper-ink);
}
.metric span { color: #64745a; font: italic 400 clamp(3.4rem, 6vw, 5.8rem)/.9 var(--font-heading); letter-spacing: -.06em; }
.metric strong { color: #34402f; font-size: .82rem; letter-spacing: .13em; text-transform: uppercase; }
.metric small { color: #596552; font-size: .86rem; }
.metric-progress { height: 2px; background: rgba(60, 75, 54, .17); }
.metric-progress div { background: #65785a; box-shadow: none; }

.account-panel { margin-top: 26px; }
.backend-panel { padding: 22px 24px; }
.backend-summary p { color: #83907b; }
.backend-controls { gap: 10px; }
.backend-controls label { min-width: 270px; }

.status-pill,
.badge {
  border: 1px solid currentColor;
  border-radius: 0;
  background: transparent !important;
  font-size: .7rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.status-pill.local,
.badge.needs_review { color: var(--warning); }
.status-pill.ready,
.badge.confirmed { color: var(--primary); }
.status-pill.needs_login,
.badge.added { color: var(--accent); }
.status-pill.error,
.badge.disputed { color: var(--danger); }

.account-profile { border-color: rgba(169, 195, 145, .22); border-radius: 0; background: rgba(20, 27, 18, .9); }
.account-profile summary { color: #afbba5; }
.account-profile[open] summary { border-bottom-color: rgba(169, 195, 145, .18); }

.overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 88px; }
.overview-card { min-height: 300px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; padding: 30px; }
.overview-card::after { width: 28px; height: 1px; position: absolute; right: 24px; bottom: 24px; background: var(--primary); content: ""; }
.overview-tree-card {
  min-height: 515px;
  grid-row: span 2;
  background:
    linear-gradient(90deg, rgba(15, 20, 13, .97), rgba(15, 20, 13, .46)),
    url("assets/heritage-template-tree.png") 68% center / cover no-repeat;
}
.overview-card h2 { max-width: 590px; font-size: clamp(2.1rem, 3.3vw, 3.6rem); line-height: .94; }
.overview-card p:not(.section-kicker) { max-width: 570px; color: #83907b; }
.overview-tree-card p:not(.section-kicker) { color: #b5c0ac; }
.overview-card-header { align-items: flex-start; }
.overview-card-header h2 { font-size: clamp(1.7rem, 2.5vw, 2.7rem); }

.text-action { width: fit-content; border-bottom-color: rgba(215, 244, 159, .55); border-radius: 0; color: var(--primary); font-size: .75rem; }
.text-action:hover { border-bottom-color: var(--paper); background: transparent; color: var(--paper); }
.overview-list { gap: 1px; }
.overview-list-item { border: 1px solid transparent; border-radius: 0; background: rgba(184, 212, 149, .035); padding: 12px; }
.overview-list-item:hover { border-color: rgba(184, 212, 149, .18); background: rgba(184, 212, 149, .06); }
.overview-list-item strong { font-family: var(--font-heading); font-size: .88rem; font-weight: 400; }
.overview-list-item span { color: #7d8a76; font-size: .84rem; }
.overview-empty { color: #7d8a76; }
.mini-action { min-height: 34px; padding: 7px 11px; font-size: .68rem; }

.view:not(.overview-view) { max-width: 1440px; margin: 0 auto; }
.view-heading { min-height: 285px; display: flex; align-items: flex-end; margin: 0; padding: 65px 0 42px; border-bottom: 1px solid rgba(169, 195, 145, .2); }
.view-heading h1 { margin: 0; font-size: clamp(4.3rem, 8vw, 8rem); font-weight: 400; line-height: .8; }
.view-heading p:last-child { margin-top: 24px; color: #87937f; font-size: .98rem; line-height: 1.65; }
.view-heading-split { justify-content: space-between; }

.tool-row { gap: 8px; margin: 0 0 20px; padding: 18px 0; border-bottom: 1px solid rgba(169, 195, 145, .17); }
.correction-action { border-color: var(--primary); }
#zoomReadout { min-height: 44px; display: grid; place-items: center; border: 1px solid rgba(169, 195, 145, .3); border-radius: 0; padding: 0 17px; color: var(--primary); font-size: .66rem; }

.image-stage {
  border-color: rgba(169, 195, 145, .24);
  background:
    linear-gradient(rgba(113, 130, 105, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(113, 130, 105, .08) 1px, transparent 1px),
    radial-gradient(circle at center, rgba(86, 108, 70, .14), transparent 48%),
    #0d120c;
  background-size: 38px 38px, 38px 38px, auto, auto;
}
.empty-state { border-color: rgba(169, 195, 145, .2); border-radius: 0; background: rgba(18, 24, 16, .92); color: #7e8c77; }

.list-tools { gap: 10px; }
.people-list,
.change-list,
.source-list,
.invite-list { gap: 10px; }
.person-card,
.change-card,
.source-note-card,
.access-card,
.invite-card,
.install-card { padding: 20px; }
.person-card { gap: 15px; }
.person-avatar,
.invite-avatar { border: 1px solid rgba(215, 244, 159, .55); border-radius: 50%; background: rgba(184, 212, 149, .08); color: var(--primary); box-shadow: none; }
.person-name,
.change-title { font-family: var(--font-heading); font-size: 1.08rem; font-weight: 400; letter-spacing: -.02em; }
.person-meta,
.change-meta { color: #788574; }
.person-context { color: #a8b3a0; }
.relationship-chip { border-color: rgba(169, 195, 145, .18); border-radius: 0; background: rgba(184, 212, 149, .04); }

.change-list { padding-left: 16px; }
.change-list::before { background: linear-gradient(to bottom, transparent, var(--primary), transparent); opacity: .4; }
.timeline-marker { background: var(--primary); box-shadow: 0 0 0 5px var(--bg); }
.sync-panel { padding: 21px; }

.access-grid,
.install-grid { gap: 16px; margin-top: 22px; }
.danger-action { border-color: rgba(233, 147, 130, .48); background: rgba(233, 147, 130, .04); color: #efa796; }
.source-workspace { gap: 18px; margin-top: 22px; }
.source-actions { top: 112px; gap: 12px; }
.source-asset-list { gap: 14px; }
.source-card img { filter: saturate(.65) sepia(.1) contrast(1.04); }
.source-card figcaption { border-top-color: rgba(169, 195, 145, .18); }
.source-type { color: var(--primary); font-size: .84rem; letter-spacing: .08em; }
.document-source { border-color: rgba(169, 195, 145, .2); border-radius: 0; background: rgba(12, 17, 11, .78); }
.document-icon,
.source-note-icon { border-radius: 50%; background: rgba(184, 212, 149, .1); color: var(--primary); box-shadow: none; }

.dialog { border: 1px solid rgba(169, 195, 145, .36); border-radius: 0; background: #11170f; padding: 24px; box-shadow: 0 30px 90px rgba(0, 0, 0, .65); }
.dialog::backdrop { background: rgba(5, 8, 4, .86); backdrop-filter: blur(5px); }
.dialog-header { padding-bottom: 14px; border-bottom: 1px solid rgba(169, 195, 145, .18); }
.dialog-header h2 { color: var(--text); font-size: 2rem; }
.form-section { border-color: rgba(169, 195, 145, .18); border-radius: 0; background: rgba(12, 17, 11, .72); }
.form-section h3 { color: var(--primary); }
.toast { border-color: var(--primary); border-radius: 0; background: #182016; color: var(--text); box-shadow: 0 18px 60px rgba(0, 0, 0, .5); }

.atlas-footer {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  align-items: center;
  gap: 38px;
  padding: 46px clamp(24px, 5vw, 82px);
  border-top: 1px solid rgba(169, 195, 145, .18);
  background: rgba(12, 16, 11, .94);
}
.atlas-footer > strong { font-family: var(--font-heading); font-size: .82rem; letter-spacing: .15em; }
.atlas-footer > strong span { display: block; margin-top: 5px; color: #73816c; font: 700 .48rem Inter; text-transform: uppercase; }
.atlas-footer p { max-width: 430px; margin: 0; color: #788574; font-size: .68rem; }
.atlas-footer button { color: var(--primary); }
.atlas-footer button span { margin-left: 20px; }

@media (max-width: 1180px) {
  .app-header { grid-template-columns: minmax(245px, .8fr) auto minmax(170px, .65fr); gap: 14px; padding-inline: 22px; }
  .top-nav { gap: 12px; }
  .nav-link,
  .ghost-action { font-size: .86rem; }
  .workspace { padding-inline: 28px; }
  .hero-panel { grid-template-columns: .9fr 1.1fr; gap: 20px; }
}

@media (max-width: 1024px) {
  .app-header { min-height: 96px; grid-template-columns: 1fr auto; padding: 8px 13px 8px 8px; }
  .brand-mark { width: 86px; height: 69px; flex-basis: 86px; }
  .workspace { padding: 0 17px calc(92px + env(safe-area-inset-bottom)); }
  .hero-panel { min-height: auto; grid-template-columns: 1fr; gap: 52px; margin-inline: 0; padding: 72px 0 55px; }
  .hero-copy h1 { font-size: clamp(4.5rem, 14vw, 7.6rem); }
  .memory-atlas-map { width: min(92vw, 760px); justify-self: center; }
  .review-strip { margin-inline: -17px; }
  .overview-grid { grid-template-columns: 1fr; }
  .overview-tree-card { grid-row: auto; }
  .view-heading { min-height: 245px; margin: 0; }
  .view-heading h1 { font-size: clamp(4rem, 14vw, 6.4rem); }
  .mobile-nav { border-top-color: rgba(169, 195, 145, .2); background: rgba(13, 18, 12, .97); }
  .mobile-nav .tab,
  .mobile-more summary { color: #72806d; }
  .mobile-nav .tab,
  .mobile-more summary,
  .mobile-nav .tab > span,
  .mobile-more summary > span { font-size: .78rem; }
  .mobile-nav .tab .lucide,
  .mobile-more summary .lucide { color: #7d8b76; }
  .mobile-nav .tab.active { background: rgba(184, 212, 149, .1); color: var(--primary); }
  .mobile-nav .tab.active .lucide { color: var(--primary); }
  .mobile-more-menu { border-color: rgba(169, 195, 145, .25); border-radius: 0; background: #182016; }
  .atlas-footer { display: none; }
}

@media (max-width: 650px) {
  .app-header { min-height: 90px; padding: 7px 13px 7px 5px; }
  .brand-lockup { gap: 2px; }
  .brand-mark { width: 78px; height: 63px; flex-basis: 78px; }
  .brand-lockup strong { font-size: 1rem; }
  .brand-lockup span { font-size: .62rem; }
  .profile-action { width: 42px; min-width: 42px; padding: 0; }
  .profile-action span:last-child { display: none; }
  .workspace { padding-inline: 13px; }
  .hero-panel { gap: 38px; padding: 55px 0 36px; }
  .hero-copy h1 { font-size: clamp(3.25rem, 16vw, 5.2rem); }
  .hero-copy > p:last-of-type { margin-top: 29px; font-size: 1rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 16px; }
  .hero-actions button { width: auto; }
  .memory-atlas-map { width: calc(100% + 26px); min-height: 0; margin-left: -13px; }
  .atlas-coordinate-bar { flex-wrap: wrap; }
  .atlas-coordinate-bar span:last-child { width: 100%; margin: 0; }
  .review-strip { grid-template-columns: 1fr; margin-inline: -13px; }
  .metric { min-height: 135px; padding-inline: 22px; }
  .metric span { font-size: 3.8rem; }
  .backend-panel { padding: 18px; }
  .overview-grid { margin-top: 56px; }
  .overview-card { min-height: 270px; padding: 22px; }
  .overview-tree-card { min-height: 410px; }
  .overview-card h2 { font-size: 2.2rem; }
  .view-heading { min-height: 215px; padding-bottom: 32px; }
  .view-heading h1 { font-size: clamp(3.2rem, 16vw, 4.7rem); }
  .view-heading-split { align-items: flex-start; }
  .tool-row { margin-inline: -13px; padding-inline: 13px; }
  .list-tools { grid-template-columns: 1fr; }
  .person-card,
  .change-card,
  .source-note-card,
  .access-card,
  .invite-card,
  .install-card { padding: 17px; }
  .dialog { padding: 15px; }
}

@media (max-width: 390px) {
  .hero-copy h1,
  .view-heading h1 { font-size: 3rem; }
}

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

/* Keep interactive controls comfortably touchable after theme-specific sizing. */
button,
input,
select,
textarea,
summary,
.file-button { min-height: 44px; }

.profile-action,
.primary-action,
.outline-action,
.text-action,
.nav-link,
.tab,
.mobile-more summary,
.mobile-more-menu button { min-height: 44px !important; }
.nav-link { min-width: 44px; }

@media (max-width: 650px) {
  .profile-action { width: 44px; min-width: 44px; }
  .mobile-more-menu button { min-height: 44px; }
}

/* Incremental editorial refinement: signed-in focus board, profiles, and stories. */
.overview-view[data-home-state="signed-in"] .hero-panel {
  min-height: min(560px, calc(100vh - 138px));
  padding-top: 48px;
  padding-bottom: 34px;
}

.overview-view[data-home-state="signed-in"] .hero-copy h1 {
  font-size: clamp(4rem, 7vw, 6.3rem);
}

.overview-view[data-home-state="signed-in"] .hero-copy > p:last-of-type {
  margin-top: 24px;
  max-width: 500px;
}

.overview-view[data-home-state="signed-in"] .review-strip {
  margin-top: 0;
}

.overview-view[data-home-state="signed-in"] .metric {
  min-height: 132px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.overview-view[data-home-state="signed-in"] .metric span {
  font-size: clamp(2.8rem, 4.5vw, 4.4rem);
}

.overview-view[data-home-state="signed-in"] .account-panel {
  margin-top: 16px;
}

.overview-view[data-home-state="signed-in"] .account-profile {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.home-focus-board {
  align-items: stretch;
}

.home-focus-board .overview-card {
  min-height: 280px;
}

.overview-view[data-home-state="signed-in"] .home-focus-board {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 56px;
}

.overview-view[data-home-state="signed-in"] .home-focus-board .overview-tree-card {
  grid-row: 1 / span 2;
  min-height: 430px;
}

.overview-view[data-home-state="signed-in"] .home-focus-board .overview-card:not(.overview-tree-card) {
  min-height: 209px;
}

.overview-view[data-home-state="signed-in"] .overview-card-header h2 {
  font-size: clamp(1.45rem, 2.1vw, 2.15rem);
}

.focus-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid rgba(169, 195, 145, .2);
}

.focus-action-row .text-action {
  font-size: .72rem;
}

.person-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(270px, .8fr);
  align-items: start;
  gap: 16px;
}

.profile-main-column,
.profile-side-column {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.profile-side-column {
  position: sticky;
  top: 126px;
  align-self: start;
}

.person-profile-layout .profile-section-wide {
  grid-column: auto;
}

.profile-side-column .profile-section {
  background: rgba(17, 23, 15, .82);
}

.profile-side-column .profile-section h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.profile-main-column .profile-section {
  padding: clamp(22px, 3vw, 34px);
}

.profile-main-column .profile-section[data-profile-section="biography"] {
  border-top: 2px solid rgba(215, 244, 159, .45);
}

.story-list {
  display: grid;
  max-width: 1120px;
  gap: 16px;
  margin: 0 auto;
}

.story-card {
  display: grid;
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(22px, 3vw, 34px);
  border-left: 2px solid rgba(184, 212, 149, .45);
}

.story-card--featured {
  max-width: 1120px;
  border-left-color: var(--primary);
  background:
    linear-gradient(120deg, rgba(184, 212, 149, .09), transparent 52%),
    rgba(20, 27, 18, .96);
}

.story-card--featured h2 {
  max-width: 760px;
  font-size: clamp(2.2rem, 4.8vw, 4.8rem);
  line-height: .94;
}

.story-card h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3.4vw, 3.4rem);
}

.story-card > p:not(.story-context) {
  max-width: 760px;
  color: var(--muted-strong);
  font-size: 1rem;
  line-height: 1.7;
}

.story-card .story-meta,
.story-card .story-people {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.story-card .story-meta {
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .04em;
}

.story-card .story-people button {
  min-height: 36px;
  padding: 7px 10px;
  border-color: rgba(169, 195, 145, .22);
  color: var(--accent);
  font-size: .72rem;
  letter-spacing: .02em;
  text-transform: none;
}

.story-card .story-photo {
  max-width: 720px;
  border-color: rgba(215, 244, 159, .34);
}

.story-card .story-comments {
  margin-top: 8px;
}

.mobile-more summary.active {
  color: var(--primary);
  background: rgba(184, 212, 149, .1);
}

.mobile-more summary.active .lucide {
  color: var(--primary);
}

@media (max-width: 1024px) {
  .overview-view[data-home-state="signed-in"] .hero-panel {
    min-height: auto;
  }

  .overview-view[data-home-state="signed-in"] .home-focus-board {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .overview-view[data-home-state="signed-in"] .home-focus-board .overview-tree-card {
    grid-row: auto;
  }

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

  .profile-side-column {
    position: static;
    grid-row: 1;
  }

  .profile-main-column {
    grid-row: 2;
  }
}

@media (max-width: 650px) {
  .overview-view[data-home-state="signed-in"] .hero-panel {
    padding-top: 42px;
    padding-bottom: 28px;
  }

  .overview-view[data-home-state="signed-in"] .hero-copy h1 {
    font-size: clamp(3.2rem, 15vw, 5rem);
  }

  .overview-view[data-home-state="signed-in"] .metric {
    min-height: 112px;
  }

  .overview-view[data-home-state="signed-in"] .home-focus-board {
    margin-top: 42px;
  }

  .focus-action-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .profile-side-column,
  .profile-main-column {
    gap: 12px;
  }

  .story-card,
  .story-card--featured {
    padding: 20px;
  }

  .story-card--featured h2,
  .story-card h2 {
    font-size: 2.25rem;
  }
}
