/* plan.sheppard-family.com - Home-aligned Travel Plan skin. */

:root {
  --paper: #fbfaf7;
  --paper-deep: #f3efe8;
  --paper-warm: #fff8eb;
  --white: #ffffff;
  --ink: #182623;
  --ink-light: #43524f;
  --ink-muted: #687774;
  --plum: #4c385f;
  --plum-light: #7b638b;
  --plum-pale: #f4eff8;
  --gold: #f3be4d;
  --gold-pale: #fff2c8;
  --sage: #5f8074;
  --sage-pale: #edf4ee;
  --sea: #6b9fb2;
  --sea-pale: #edf6f8;
  --rose: #c96f62;
  --rose-pale: #f9ece8;
  --border-soft: rgba(24, 38, 35, 0.10);
  --border-light: rgba(255, 255, 255, 0.68);
  --shadow-soft: 0 12px 32px rgba(118, 101, 76, 0.10);
  --shadow-lift: 0 18px 44px rgba(118, 101, 76, 0.14);
  --font-display: 'Playfair Display', serif;
  --font-body: 'DM Sans', sans-serif;
  --card-radius: 8px;
  --btn-radius: 8px;
  --nav-height: 60px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52) 0%, rgba(251, 250, 247, 0) 280px),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  color: var(--ink);
  font-family: var(--font-body);
}

body:not(.is-authenticated) .site-header,
body:not(.is-authenticated) .plan-hero,
body:not(.is-authenticated) .planning-note-wrap,
body:not(.is-authenticated) .tabs,
body:not(.is-authenticated) main,
body:not(.is-authenticated) .footer {
  visibility: hidden;
}

a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(243, 190, 77, 0.74);
  outline-offset: 3px;
}

/* ========== Auth gate ========== */

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(251, 250, 247, 0.98) 0%, rgba(251, 250, 247, 0.82) 48%, rgba(251, 250, 247, 0.42) 100%),
    url("/static/hero-plan-2026-v2.webp") center center / cover no-repeat;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.auth-gate.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.auth-gate-inner {
  width: min(420px, 100%);
  padding: 38px 34px;
  text-align: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 20px 54px rgba(118, 101, 76, 0.18);
  backdrop-filter: blur(10px) saturate(1.04);
}

.auth-gate-mark {
  width: 64px;
  height: 64px;
  display: block;
  margin: 0 auto 18px;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(24, 38, 35, 0.12);
}

.auth-gate h1 {
  margin: 0 0 10px;
  color: var(--ink);
  font: 700 clamp(2rem, 7vw, 2.55rem) / 0.95 var(--font-display);
  letter-spacing: 0;
}

#loadingText {
  color: var(--ink-light);
  font-size: 0.96rem;
  font-weight: 700;
}

.auth-error {
  min-height: 0;
  margin-top: 12px;
  color: #8d2f28;
  font-size: 0.9rem;
  font-weight: 700;
}

.sign-out-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 18px auto 0;
  padding: 0 15px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink-light);
  cursor: pointer;
  font: 800 0.88rem var(--font-body);
}

.auth-error:not(:empty) ~ .sign-out-btn {
  display: inline-flex;
}

/* ========== Header ========== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--nav-height);
  padding: 9px clamp(14px, 4vw, 32px);
  background: rgba(255, 255, 255, 0.58);
  border-bottom: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow: 0 12px 36px rgba(24, 38, 35, 0.10);
  backdrop-filter: blur(16px) saturate(1.04);
}

.site-nav {
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.brand {
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--paper-deep);
  box-shadow: 0 8px 18px rgba(24, 38, 35, 0.10);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.brand-title {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-subtitle {
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-status {
  justify-self: center;
  max-width: min(620px, 52vw);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  padding: 0 13px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink-light);
  box-shadow: 0 10px 26px rgba(24, 38, 35, 0.08);
  white-space: nowrap;
}

.status-place,
.status-item {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.status-weather {
  max-width: 170px;
}

.status-weather[data-state="muted"] {
  color: var(--ink-muted);
}

.status-place {
  color: var(--ink);
}

.status-divider {
  width: 1px;
  height: 18px;
  flex: 0 0 1px;
  background: rgba(24, 38, 35, 0.12);
}

.header-actions {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.user-info {
  position: static;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-light);
  font-size: 0.86rem;
  font-weight: 800;
}

.user-avatar,
.user-avatar img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.user-avatar {
  flex: 0 0 34px;
  overflow: hidden;
  background: var(--plum);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-avatar img {
  display: block;
  object-fit: cover;
}

.user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sign-out {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink-light);
  cursor: pointer;
  font: 800 0.84rem var(--font-body);
  white-space: nowrap;
}

/* ========== Masthead ========== */

.plan-hero {
  width: min(1120px, calc(100% - clamp(28px, 8vw, 104px)));
  min-height: clamp(300px, 34vw, 360px);
  margin: clamp(24px, 5vw, 42px) auto 0;
  padding: clamp(34px, 6vw, 58px);
  display: flex;
  align-items: flex-end;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.72) 39%, rgba(255, 255, 255, 0.32) 68%, rgba(255, 255, 255, 0.06) 100%),
    url("/static/hero-plan-2026-v2.webp") center center / cover no-repeat;
  box-shadow: 0 18px 48px rgba(118, 101, 76, 0.18);
}

.plan-hero-content {
  width: min(620px, 100%);
  position: relative;
  z-index: 1;
  color: var(--ink);
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.82);
}

.hero-eyebrow,
.section-kicker {
  margin: 0;
  color: var(--plum);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero-title {
  margin: 15px 0 14px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 8vw, 5.2rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.88;
}

.hero-tagline {
  max-width: 560px;
  margin: 0;
  color: var(--ink-light);
  font-size: clamp(1.04rem, 2vw, 1.28rem);
  font-weight: 600;
  line-height: 1.48;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.hero-link,
.age-badge {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: none;
}

.hero-link {
  padding: 0 18px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 26px rgba(118, 101, 76, 0.14);
}

.age-badge {
  padding: 0 15px;
  color: var(--ink-light);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  text-shadow: none;
}

/* ========== Planning note ========== */

.planning-note-wrap {
  width: min(1120px, calc(100% - clamp(28px, 8vw, 104px)));
  margin: 34px auto 0;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid rgba(24, 38, 35, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 32px rgba(118, 101, 76, 0.08);
}

.planning-note-inner {
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(22px, 5vw, 48px);
  align-items: center;
}

.planning-note-wrap h2 {
  max-width: 680px;
  margin: 8px 0 10px;
  color: var(--ink);
  font: 700 clamp(1.7rem, 3.6vw, 2.55rem) / 1 var(--font-display);
  letter-spacing: 0;
}

.planning-note-wrap p:not(.section-kicker) {
  max-width: 720px;
  margin: 0;
  color: var(--ink-light);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.55;
}

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

.planning-note-list span {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 13px;
  border: 1px solid rgba(24, 38, 35, 0.09);
  border-radius: 8px;
  background: rgba(251, 250, 247, 0.72);
  color: var(--ink-light);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
}

/* ========== Tabs ========== */

.tabs {
  width: min(1120px, calc(100% - clamp(28px, 8vw, 104px)));
  margin: 26px auto 0;
  padding: 6px;
  position: sticky;
  top: calc(var(--nav-height) + 10px);
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px) saturate(1.05);
}

.tab-scroll {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.tab-scroll::-webkit-scrollbar {
  display: none;
}

.tab {
  min-height: 38px;
  appearance: none;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  font: 900 0.86rem var(--font-body);
  letter-spacing: 0;
  padding: 0 12px;
  transition: background-color 150ms ease, color 150ms ease;
}

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

.tab.is-active {
  background: var(--plum);
  color: white;
}

.tab--copy {
  border: 1px solid rgba(24, 38, 35, 0.08);
  background: var(--paper);
  color: var(--ink-light);
}

.copy-status {
  position: absolute;
  right: 6px;
  bottom: -34px;
  min-height: 28px;
  display: none;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(76, 56, 95, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--plum);
  box-shadow: 0 10px 24px rgba(118, 101, 76, 0.12);
  font-size: 0.78rem;
  font-weight: 900;
  pointer-events: none;
}

.copy-status:not(:empty) {
  display: inline-flex;
}

/* ========== Panels ========== */

main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 48px clamp(18px, 5vw, 48px) 82px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.panel-intro {
  max-width: 760px;
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.panel-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.panel-subtitle {
  margin: 0;
  color: var(--ink-light);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.55;
}

.year-jump-nav {
  width: min(980px, 100%);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.year-jump-nav[hidden] {
  display: none;
}

.year-jump-link {
  min-width: 48px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgba(24, 38, 35, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink-light);
  box-shadow: 0 8px 18px rgba(118, 101, 76, 0.07);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.year-jump-link:hover,
.year-jump-link:focus-visible {
  border-color: rgba(95, 128, 116, 0.34);
  background: var(--sage-pale);
  color: var(--ink);
}

.year-jump-link.is-active {
  border-color: rgba(76, 56, 95, 0.24);
  background: var(--plum-pale);
  color: var(--plum);
}

/* ========== Year cards ========== */

.years-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.year-card {
  --card-accent: var(--sage);
  position: relative;
  scroll-margin-top: calc(var(--nav-height) + 92px);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 10px 28px rgba(118, 101, 76, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.year-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--card-accent);
}

.year-card:nth-child(5n + 1) { --card-accent: var(--sage); }
.year-card:nth-child(5n + 2) { --card-accent: var(--gold); }
.year-card:nth-child(5n + 3) { --card-accent: var(--plum-light); }
.year-card:nth-child(5n + 4) { --card-accent: var(--sea); }
.year-card:nth-child(5n + 5) { --card-accent: var(--rose); }

@media (hover: hover) {
  .year-card:hover {
    transform: translateY(-2px);
    border-color: rgba(24, 38, 35, 0.18);
    box-shadow: var(--shadow-lift);
  }
}

.year-card[open] {
  box-shadow: var(--shadow-lift);
}

.year-card.year-card--past:not([open]) {
  background: rgba(255, 255, 255, 0.68);
}

.year-summary {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px 18px 26px;
  cursor: pointer;
  list-style: none;
}

.year-summary::-webkit-details-marker {
  display: none;
}

.year-summary:hover {
  background: rgba(251, 250, 247, 0.80);
}

.year-summary-text {
  min-width: 0;
  flex: 1;
}

.year-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.24rem, 2.3vw, 1.64rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.12;
}

.year-subtitle {
  margin: 6px 0 0;
  color: var(--ink-muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
}

.year-card:not([open]) .year-summary {
  height: 96px;
}

.year-card:not([open]) .year-title,
.year-card:not([open]) .year-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.year-summary-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.year-grade-pill {
  min-width: 46px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border: 1px solid rgba(143, 101, 31, 0.18);
  border-radius: 999px;
  background: var(--gold-pale);
  color: #79551a;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1;
}

.year-comment-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--plum-pale);
  color: var(--plum);
  font-size: 0.78rem;
  font-weight: 900;
}

/* The pills are shown/hidden via the `hidden` attribute in app.js, but the
   explicit display above overrides `hidden`'s display:none. Restore it so an
   empty grade pill or a zero-note pill actually disappears. */
.year-grade-pill[hidden],
.year-comment-pill[hidden] {
  display: none;
}

.note-count[hidden] {
  display: none;
}

.year-toggle {
  color: var(--ink-muted);
  font-size: 1.05rem;
  transition: transform 150ms ease;
}

.year-card[open] .year-toggle {
  transform: rotate(180deg);
}

.year-body {
  padding: 0 22px 22px 26px;
  border-top: 1px solid rgba(24, 38, 35, 0.08);
}

.year-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
  font-size: 0.88rem;
}

.year-actions-row .last-edited {
  margin-left: auto;
}

.year-render {
  padding-top: 10px;
  overflow-x: auto;
}

.year-render .trip-plan-table {
  min-width: 760px;
  table-layout: fixed;
  font-size: 0.9rem;
}

.trip-plan-table .trip-plan-col--trip {
  width: 27%;
}

.trip-plan-table .trip-plan-col--plan {
  width: 58%;
}

.trip-plan-table .trip-plan-col--status {
  width: 15%;
}

.trip-plan-table .trip-col {
  padding: 14px 14px 13px;
}

.trip-cell {
  display: grid;
  gap: 5px;
}

.trip-cell-title {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.26;
  text-wrap: pretty;
}

.trip-cell-title strong {
  font: inherit;
}

.trip-cell-meta {
  color: var(--ink-light);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.34;
}

.trip-plan-table .plan-col {
  color: var(--ink-light);
  font-size: 0.88rem;
  line-height: 1.52;
}

.trip-plan-table .status-col {
  text-align: center;
}

.trip-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(95, 128, 116, 0.20);
  border-radius: 999px;
  background: var(--sage-pale);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
  text-transform: capitalize;
  white-space: nowrap;
}

.trip-status--maybe {
  border-color: rgba(143, 101, 31, 0.24);
  background: var(--gold-pale);
  color: #79551a;
}

/* ========== Editor / textareas ========== */

textarea {
  width: 100%;
  padding: 14px;
  resize: vertical;
  border: 1px solid rgba(24, 38, 35, 0.14);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: 0.9rem / 1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.comment-textarea {
  min-height: 74px;
  font-family: var(--font-body);
  font-size: 0.94rem;
  line-height: 1.5;
}

.year-edit {
  padding-top: 12px;
}

.edit-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.88rem;
}

/* ========== Meta sections ========== */

.meta-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
  margin-bottom: 22px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 10px 28px rgba(118, 101, 76, 0.08);
}

.meta-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--plum);
}

.meta-render {
  overflow-x: auto;
  padding-bottom: 2px;
}

.meta-render .markdown-body table,
.meta-render.markdown-body table {
  min-width: 720px;
}

.meta-edit summary {
  margin-top: 18px;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
}

.meta-edit summary:hover {
  color: var(--plum);
}

.settings-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.88rem;
}

.settings-footer a {
  color: var(--plum);
}

/* ========== Comments ========== */

.year-comments {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(24, 38, 35, 0.08);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment {
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: var(--gold-pale);
  padding: 12px 14px;
}

.comment[data-author-email="andrew.sheppard@gmail.com"] {
  border-left-color: var(--sage);
  background: var(--sage-pale);
}

.comment[data-author-email="marie.lozano.sheppard@gmail.com"] {
  border-left-color: var(--rose);
  background: var(--rose-pale);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.comment-author {
  color: var(--ink);
  font-weight: 900;
}

.comment-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.comment-body {
  font-size: 0.96rem;
}

.comment-replies {
  margin-top: 10px;
  margin-left: 16px;
  padding-left: 10px;
  border-left: 2px dashed rgba(24, 38, 35, 0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-form,
.comment-edit-form,
.comment-reply-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
}

.comment-form button,
.comment-edit-form button,
.comment-reply-form button {
  align-self: flex-start;
}

/* ========== Buttons and utility ========== */

.btn {
  min-height: 38px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.btn--sm {
  min-height: 34px;
  padding: 0 11px;
  font-size: 0.82rem;
}

.btn--primary {
  border: 1px solid var(--plum);
  background: var(--plum);
  color: white;
}

.btn--primary:hover {
  background: #3f304f;
}

.btn--secondary {
  border: 1px solid var(--border-soft);
  background: var(--white);
  color: var(--ink-light);
}

.btn--ghost {
  border: 1px solid rgba(76, 56, 95, 0.14);
  background: rgba(244, 239, 248, 0.70);
  color: var(--plum);
}

.btn--ghost:hover {
  background: var(--plum-pale);
  color: var(--ink);
}

.muted {
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.loading {
  padding: 44px 18px;
  color: var(--ink-muted);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  text-align: center;
}

.edit-status,
.meta-status {
  color: var(--ink-muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.edit-status.ok,
.meta-status.ok {
  color: #2f6f4f;
}

.edit-status.err,
.meta-status.err {
  color: #9b2c2c;
}

/* ========== Footer ========== */

.footer {
  width: min(1080px, calc(100% - clamp(24px, 8vw, 104px)));
  margin: 0 auto clamp(18px, 4vw, 34px);
  padding: 26px clamp(20px, 4vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 16px 44px rgba(11, 24, 21, 0.14);
  backdrop-filter: blur(16px) saturate(1.04);
  color: var(--ink-light);
  font-size: 0.85rem;
}

.footer-inner {
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
}

.footer-brand {
  min-width: 0;
  display: grid;
  gap: 5px;
  text-align: left;
}

.footer-brand a {
  width: fit-content;
  min-height: auto;
  padding: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.footer-brand span {
  color: var(--ink-muted);
  font-weight: 700;
  line-height: 1.35;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 12px;
}

.footer-links a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  color: var(--ink-light);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--ink);
}

/* ========== Markdown rendering ========== */

.markdown-body {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.58;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 24px 0 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.08;
}

.markdown-body h2 { font-size: 1.55rem; }
.markdown-body h3 { font-size: 1.25rem; }
.markdown-body h4 { font-size: 1.08rem; }

.markdown-body p {
  margin: 10px 0;
}

.markdown-body a {
  color: var(--plum);
  font-weight: 800;
}

.markdown-body table {
  width: 100%;
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid rgba(24, 38, 35, 0.10);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  font-size: 0.88rem;
}

.markdown-body th,
.markdown-body td {
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(24, 38, 35, 0.08);
  text-align: left;
  vertical-align: top;
}

.markdown-body tr:last-child td {
  border-bottom: 0;
}

.markdown-body th {
  background: var(--paper-deep);
  color: var(--ink);
  font-weight: 900;
}

.markdown-body code {
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--sea-pale);
  color: var(--ink);
  font: 0.88em ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.markdown-body blockquote {
  margin: 16px 0;
  padding: 6px 14px;
  border-left: 4px solid var(--plum-light);
  background: var(--plum-pale);
  color: var(--ink-light);
  font-style: italic;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 22px;
}

.markdown-body li {
  margin: 6px 0;
}

.markdown-body hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid rgba(24, 38, 35, 0.12);
}

/* ========== Mobile ========== */

@media (max-width: 860px) {
  :root {
    --nav-height: 100px;
  }

  .site-nav {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 8px;
  }

  .header-status {
    grid-column: 1 / -1;
    justify-self: stretch;
    max-width: none;
    min-height: 32px;
    justify-content: center;
    gap: 7px;
    padding: 0 10px;
  }

  .status-place,
  .status-item {
    font-size: 0.7rem;
  }

  .status-weather {
    max-width: 120px;
  }

  .status-divider {
    height: 14px;
  }

  .planning-note-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-height: 98px;
  }

  .site-header {
    padding: 8px 14px;
  }

  .site-nav {
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .brand-subtitle {
    display: none;
  }

  .user-name {
    display: inline;
    max-width: 58px;
    font-size: 0.78rem;
  }

  .sign-out {
    min-width: 64px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .plan-hero {
    width: min(100% - 28px, 640px);
    min-height: 420px;
    margin-top: 18px;
    padding: 32px 20px;
    align-items: flex-end;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.74) 50%, rgba(255, 255, 255, 0.94) 100%),
      url("/static/hero-plan-2026-v2.webp") 58% center / cover no-repeat;
  }

  .hero-title {
    font-size: clamp(3rem, 18vw, 4.2rem);
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-link,
  .age-badge {
    width: 100%;
  }

  .planning-note-wrap {
    margin-top: 24px;
    width: min(100% - 28px, 640px);
    padding: 24px 18px;
  }

  .tabs {
    width: calc(100% - 28px);
    top: calc(var(--nav-height) + 8px);
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .tab--copy {
    margin-left: 0;
  }

  main {
    padding: 36px 18px 70px;
  }

  .year-jump-nav {
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scroll-padding-inline: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .year-jump-link {
    min-width: 46px;
    min-height: 32px;
    flex: 0 0 auto;
    font-size: 0.78rem;
  }

  .year-summary {
    min-height: 92px;
    padding: 16px 16px 16px 20px;
    gap: 12px;
  }

  .year-card:not([open]) .year-summary {
    height: 92px;
  }

  .year-summary-meta {
    gap: 8px;
  }

  .year-grade-pill {
    min-width: 42px;
    min-height: 32px;
    padding: 5px 9px;
    font-size: 1rem;
  }

  .year-comment-pill {
    display: none;
  }

  .year-body {
    padding: 0 16px 18px 20px;
  }

  .year-actions-row .last-edited {
    width: 100%;
    margin-left: 0;
  }

  .markdown-body {
    font-size: 0.94rem;
  }

  .markdown-body table {
    font-size: 0.78rem;
  }

  .markdown-body th,
  .markdown-body td {
    padding: 8px 9px;
  }

  .year-render {
    overflow-x: visible;
  }

  .year-render .trip-plan-table {
    display: block;
    width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0.9rem;
  }

  .trip-plan-table colgroup,
  .trip-plan-table thead {
    display: none;
  }

  .trip-plan-table tbody {
    display: grid;
    width: 100%;
    gap: 10px;
  }

  .trip-plan-table tr {
    display: block;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(24, 38, 35, 0.10);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 20px rgba(118, 101, 76, 0.07);
  }

  .trip-plan-table td {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(24, 38, 35, 0.07);
  }

  .trip-plan-table tr:last-child td,
  .trip-plan-table td:last-child {
    border-bottom: 0;
  }

  .trip-plan-table .trip-col {
    padding: 13px 14px 12px;
    background: var(--paper);
  }

  .trip-cell-title {
    font-size: 1.02rem;
    line-height: 1.24;
  }

  .trip-cell-meta {
    font-size: 0.9rem;
  }

  .trip-plan-table .plan-col,
  .trip-plan-table .status-col {
    text-align: left;
  }

  .trip-plan-table .plan-col::before,
  .trip-plan-table .status-col::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--ink-muted);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .brand-title {
    max-width: 42vw;
  }

  .plan-hero {
    min-height: 390px;
  }

  .planning-note-list span {
    min-height: auto;
  }
}

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

  .year-card {
    transition: none;
  }

  @media (hover: hover) {
    .year-card:hover {
      transform: none;
    }
  }
}
