/* Traan — styled after Ian's Journal. House rule: no block capitals anywhere. */

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

:root {
  --bg: #f5f0e8;
  --text: #2c2620;
  --muted: #7a6a5a;
  --border: #d4c4a8;
  --ink: #1a1410;
  --paper: #ffffff;
  --gold: #c9a87a;
  --bronze: #a08060;
  --cream: #f5e6cc;
  --link: #8a5030;
  --display: 'Playfair Display', Georgia, serif;
  --body: 'Lora', Georgia, serif;
  --label: 'Oswald', 'Arial Narrow', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
* { text-transform: none !important; }
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--ink); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Masthead ── */
.masthead {
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  padding: 2.4rem 2rem 2.2rem;
  position: relative;
}
.masthead--home { padding: 5rem 2rem 4rem; }
.masthead::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,0.04) 39px, rgba(255,255,255,0.04) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,0.02) 39px, rgba(255,255,255,0.02) 40px);
  pointer-events: none;
}
.masthead-inner { position: relative; max-width: 1100px; margin: 0 auto; }
.masthead-label {
  font-style: italic;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--bronze);
  margin-bottom: 0.6rem;
}
.masthead-title {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #fff8ee;
}
.masthead--home .masthead-title { font-size: clamp(3rem, 8vw, 6rem); }
.masthead-title a { color: inherit; text-decoration: none; }
.masthead-title em { font-style: italic; font-weight: 400; color: var(--gold); }
.masthead-rule { width: 80px; height: 1px; background: var(--bronze); margin: 1.5rem auto; border: none; }
.masthead-tagline {
  font-style: italic;
  color: var(--bronze);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}
.masthead-hero { margin: 2.5rem auto 0; max-width: 900px; }
.masthead-hero img {
  display: block;
  width: 100%;
  border: 1px solid rgba(201,168,122,0.35);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

/* ── Navigation ── */
.site-nav { background: #241c16; border-bottom: 1px solid #000; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.2rem 1.8rem; padding: 0.9rem 1rem; }
.site-nav li { position: relative; }
.site-nav a, .site-nav .nav-header, .site-nav button {
  font-family: var(--label);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: #c9b393;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}
.site-nav a:hover, .site-nav .current > a, .site-nav .active > a { color: #fff8ee; }
.site-nav ul ul { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background: #241c16; flex-direction: column; gap: 0.6rem; padding: 0.9rem 1.2rem; min-width: 12rem; z-index: 20; box-shadow: 0 10px 24px rgba(0,0,0,0.3); }
.site-nav li:hover > ul, .site-nav li:focus-within > ul { display: flex; }
/* Login gets a small arrow-into-door icon; Logout sits quietly beside Family. */
.site-nav a.menu-login { display: inline-flex; align-items: center; gap: 0.45em; }
.site-nav a.menu-login::after {
  content: ""; width: 0.95em; height: 0.95em; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4'/%3E%3Cpath d='M3 12h11'/%3E%3Cpath d='M10 8l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4'/%3E%3Cpath d='M3 12h11'/%3E%3Cpath d='M10 8l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.site-nav a.menu-logout { opacity: 0.75; }
.site-nav a.menu-logout:hover { opacity: 1; }

/* ── Layout ── */
.site-main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 4rem 2rem 6rem; }
.site-top, .site-bottom { margin: 0 0 2rem; }

/* ── Section labels ── */
.section-label {
  font-family: var(--label);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--muted);
  margin: 0 0 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.story-grid + .section-label, .gen + .gen .section-label { margin-top: 3.5rem; }

/* ── Story cards ── */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.story-card {
  background: var(--paper);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.story-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); color: inherit; }
.card-stripe { height: 6px; width: 100%; }
.card-body { padding: 1.8rem 1.8rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card-date { font-family: var(--label); font-size: 0.72rem; letter-spacing: 0.18em; color: var(--muted); margin-bottom: 0.5rem; }
.card-title { font-family: var(--display); font-size: 1.6rem; font-weight: 700; line-height: 1.15; color: var(--ink); margin-bottom: 0.4rem; }
.card-subtitle { font-style: italic; font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; }
.card-description { font-size: 0.9rem; line-height: 1.6; color: #555; flex: 1; }
.card-footer { padding: 1rem 1.8rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 0.78rem; }
.card-location { color: var(--muted); font-style: italic; }
.card-read { font-family: var(--label); font-size: 0.74rem; letter-spacing: 0.1em; white-space: nowrap; }

/* ── Articles: shared ── */
.traan-article { max-width: 760px; margin: 0 auto; }
.traan-tree { max-width: 1100px; }
.overline { font-family: var(--label); font-size: 0.72rem; letter-spacing: 0.22em; color: var(--muted); margin-bottom: 0.7rem; }
.story-head { text-align: center; margin-bottom: 3rem; }
.story-head h1, .person-title h1 {
  font-family: var(--display);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.08;
  color: var(--ink);
  font-weight: 700;
}
.subtitle { font-style: italic; color: var(--muted); font-size: 1.1rem; margin-top: 0.8rem; line-height: 1.5; }
.story-head::after { content: ''; display: block; width: 60px; height: 1px; background: var(--bronze); margin: 2rem auto 0; }
.crumb { font-family: var(--label); font-size: 0.78rem; letter-spacing: 0.12em; margin: -1.5rem 0 2rem; }
.crumb a { text-decoration: none; color: var(--muted); }
.crumb a:hover { color: var(--ink); }
.notice { text-align: center; color: var(--muted); font-style: italic; }
.edit-icons { text-align: right; margin-bottom: 1rem; font-size: 0.8rem; }

/* ── Article body ── */
.article-body { font-size: 1.08rem; line-height: 1.85; }
.article-body > * + * { margin-top: 1.2em; }
.article-body h2 { font-family: var(--display); font-size: 1.7rem; line-height: 1.2; color: var(--ink); margin-top: 2.4em; }
.article-body h3 { font-family: var(--display); font-size: 1.3rem; color: var(--ink); margin-top: 2em; }
.article-body h4 { font-family: var(--label); font-weight: 400; font-size: 0.85rem; letter-spacing: 0.16em; color: var(--muted); margin-top: 2em; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li + li { margin-top: 0.4em; }
.article-body blockquote { border-left: 2px solid var(--gold); padding: 0.2em 0 0.2em 1.4em; font-style: italic; color: #4a3e34; }
.article-body hr { border: 0; height: 1px; background: var(--border); width: 80px; margin: 2.5em auto; }
.article-body .poem { font-style: italic; white-space: pre-line; padding-left: 1.4em; border-left: 2px solid var(--border); }
.article-body .poem-title { font-family: var(--display); font-style: normal; font-size: 1.25rem; color: var(--ink); }
.article-body figure { margin: 2em 0; }
.article-body figure img { display: block; width: 100%; cursor: zoom-in; background: #ebe2d3; }
.article-body figcaption, .masthead-hero figcaption { font-size: 0.85rem; font-style: italic; color: var(--muted); text-align: center; margin-top: 0.6em; }
.article-body iframe { width: 100%; aspect-ratio: 16/9; border: 0; }
.article-body table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.article-body td, .article-body th { border-bottom: 1px solid var(--border); padding: 0.5em 0.6em; text-align: left; }
.article-body .button-link, .button-link {
  display: inline-block; font-family: var(--label); font-size: 0.8rem; letter-spacing: 0.12em;
  border: 1px solid var(--border); background: var(--paper); padding: 0.6em 1.1em; text-decoration: none; color: var(--ink);
}
.article-body .button-link:hover { border-color: var(--bronze); }
/* Justified galleries: heights are set by template.js */
.article-body figure.img-grid { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin: 2em -2rem; }
.article-body figure.img-grid img { width: auto; flex: 0 0 auto; }
.article-body figure.img-grid figcaption { flex-basis: 100%; }

/* ── Person page ── */
.person-head { display: grid; grid-template-columns: 220px 1fr; gap: 2.4rem; align-items: center; margin-bottom: 3rem; }
.person-head--nophoto { grid-template-columns: 1fr; text-align: center; }
.person-portrait img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; border: 6px solid var(--paper); box-shadow: 0 10px 28px rgba(0,0,0,0.16); cursor: zoom-in; }
.life { margin-top: 1.1rem; font-size: 0.98rem; color: #4a3e34; line-height: 1.7; }
.life strong { font-weight: 400; color: var(--ink); }
.life .sep { color: var(--gold); margin: 0 0.35em; }
.kin { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.6rem; background: var(--paper); border: 1px solid var(--border); padding: 1.6rem; margin-bottom: 3rem; }
.kin-label { font-family: var(--label); font-size: 0.72rem; letter-spacing: 0.2em; color: var(--muted); margin-bottom: 0.8rem; }
.chip-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.kin .chip-grid { grid-template-columns: 1fr; }
.chip { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: inherit; padding: 0.45rem 0.6rem 0.45rem 0.45rem; border: 1px solid transparent; background: var(--bg); transition: border-color 0.2s, background 0.2s; }
.chip:hover { border-color: var(--border); background: #fffaf2; color: inherit; }
.chip img, .chip-initial { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; object-fit: cover; }
.chip-initial, .ped-initial { display: grid; place-items: center; background: #e6dac6; color: var(--muted); font-family: var(--display); font-size: 1.2rem; }
.chip-text { display: flex; flex-direction: column; min-width: 0; }
.chip-role { font-family: var(--label); font-size: 0.66rem; letter-spacing: 0.16em; color: var(--muted); }
.chip-name { font-family: var(--display); font-weight: 700; font-size: 1rem; line-height: 1.2; color: var(--ink); }
.chip-years { font-size: 0.8rem; color: var(--muted); }

/* ── Family tree ── */
.tree-intro { max-width: 640px; margin: 0 auto 3.5rem; text-align: center; font-style: italic; }
.tree-hint { text-align: center; font-style: italic; color: var(--muted); font-size: 0.9rem; margin: -1rem 0 2rem; }
.ped { overflow-x: auto; padding: 0.5rem 0 1.5rem; display: flex; justify-content: center; }
.ped-branch { display: flex; align-items: center; }
.ped-node {
  flex: 0 0 210px;
  width: 210px;
  display: flex; align-items: center; gap: 0.7rem;
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem 0.55rem 0.55rem;
  text-decoration: none; color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative; z-index: 1;
}
a.ped-node:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.12); color: inherit; }
.ped-node--root { border-top: 4px solid var(--gold); }
.ped-node--empty { background: transparent; border-style: dashed; color: var(--muted); }
.ped-node--empty .ped-name { font-family: var(--body); font-weight: 400; font-style: italic; font-size: 0.85rem; color: var(--muted); }
.ped-node img, .ped-initial { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; object-fit: cover; }
.ped-text { display: flex; flex-direction: column; min-width: 0; }
.ped-name { font-family: var(--display); font-weight: 700; font-size: 0.95rem; line-height: 1.2; color: var(--ink); }
.ped-years { font-size: 0.78rem; color: var(--muted); }
.ped-parents { display: flex; flex-direction: column; justify-content: center; position: relative; padding-left: 36px; }
.ped-parents > .ped-branch { position: relative; padding: 6px 0; }
.ped-parents::before { content: ''; position: absolute; left: 0; top: 50%; width: 18px; border-top: 1px solid var(--bronze); }
.ped-parents > .ped-branch::before { content: ''; position: absolute; left: -18px; top: 50%; width: 18px; border-top: 1px solid var(--bronze); }
.ped-parents > .ped-branch::after { content: ''; position: absolute; left: -18px; border-left: 1px solid var(--bronze); }
.ped-parents > .ped-branch:first-child::after { top: 50%; bottom: 0; }
.ped-parents > .ped-branch:last-child::after { top: 0; bottom: 50%; }
.gen-list { display: none; }

/* ── Forms (login) ── */
.site-main form { max-width: 420px; }
.site-main label { display: block; font-family: var(--label); font-size: 0.75rem; letter-spacing: 0.14em; color: var(--muted); margin: 1rem 0 0.35rem; }
.site-main input[type=text], .site-main input[type=password], .site-main input[type=email], .site-main input[type=search], .site-main textarea, .site-main select {
  width: 100%; font: inherit; padding: 0.6rem 0.75rem; border: 1px solid var(--border); background: var(--paper); color: var(--text);
}
.site-main button, .site-main .btn, .site-main input[type=submit] {
  font-family: var(--label); font-size: 0.82rem; letter-spacing: 0.12em; padding: 0.65rem 1.3rem; margin-top: 1.2rem;
  background: var(--ink); color: var(--cream); border: 0; cursor: pointer; text-decoration: none; display: inline-block;
}
.site-main button:hover, .site-main .btn:hover { background: #3a2e24; color: #fff; }
.site-main .btn-secondary, .site-main .btn-link { background: transparent; color: var(--link); padding-left: 0; }
.site-main ul.com-users-login__options, .site-main .mod-login__options { list-style: none; margin-top: 1rem; font-size: 0.85rem; }
.com-users-login, .com-users-logout, .com-users-profile { max-width: 520px; margin: 0 auto; }
.site-main fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.com-users-login .page-header h1 { text-align: center; margin-bottom: 1.5rem; }
.com-users-login__form { margin: 0 auto; background: var(--paper); border: 1px solid var(--border); padding: 1.6rem 2rem 2rem; }
.site-main .input-group { display: flex; }
.site-main .input-group .form-control { flex: 1; }
.site-main .input-password-toggle { margin: 0; padding: 0 0.8rem; border: 1px solid var(--border); border-left: 0; background: var(--paper); color: var(--muted); }
.site-main .input-password-toggle .icon-eye::before { content: "\1F441"; font-size: 0.95rem; }
.site-main .input-password-toggle:hover { background: var(--bg); color: var(--text); }
.site-main .form-check { display: flex; align-items: center; gap: 0.5rem; margin-top: 1.2rem; }
.site-main .form-check label { margin: 0; }
/* Login: passkey first, password as the fallback. */
.traan-login .com-users-login__form { max-width: 420px; }
.site-main .traan-passkey {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%; margin-top: 1.4rem;
  padding: 0.85rem 1.3rem; font-size: 0.9rem; background: var(--ink); color: var(--cream);
}
.site-main .traan-passkey svg { width: 1.3em; height: 1.3em; fill: currentColor; flex: none; }
.traan-or { display: flex; align-items: center; gap: 0.8rem; margin: 1.6rem 0 0.2rem; font-family: var(--label); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--muted); }
.traan-or::before, .traan-or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.site-main .traan-login-password { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.site-main .traan-login-password:hover { background: var(--ink); color: var(--cream); }
.traan-login .control-group { margin: 0; }

/* Multi-factor step (only shown for password logins when MFA is set up). */
.users-mfa-captive { max-width: 520px; margin: 0 auto; background: var(--paper); border: 1px solid var(--border); padding: 2rem; }
.users-mfa-captive h2 { font-family: var(--display, 'Playfair Display', serif); font-size: 1.6rem; line-height: 1.25; margin-bottom: 0.8rem; }
.users-mfa-captive h2 small { font-size: 0.6em; color: var(--muted); font-weight: 400; }
.users-mfa-captive-pre-message { font-size: 0.95rem; color: var(--muted); margin-bottom: 1rem; }
.users-mfa-captive .row { display: block; margin: 0; }
.users-mfa-captive [class*="col-"] { width: auto; margin: 0; padding: 0; }
#users-mfa-captive-form-standard-buttons { margin-top: 0.4rem; }
#users-mfa-captive-form-standard-buttons .col-sm-9 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1rem; }
#users-mfa-captive-button-logout { background: transparent; color: var(--muted); padding: 0.65rem 0; margin-top: 1.2rem; }
#users-mfa-captive-button-logout:hover { color: var(--ink); background: transparent; }
#users-mfa-captive-form-choose-another { flex-basis: 100%; font-size: 0.85rem; margin: 0.4rem 0 0; }
.users-mfa-captive .icon, .users-mfa-captive [class^="icon-"] { display: none; }

.site-main .com-users-login__options { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem 1.4rem; max-width: 420px; margin: 1.2rem auto 0; font-size: 0.85rem; }
.alert, joomla-alert { display: block; background: var(--paper); border: 1px solid var(--border); border-left: 4px solid var(--gold); padding: 0.9rem 1.2rem; margin-bottom: 2rem; font-size: 0.95rem; }
.alert-error, .alert-danger, joomla-alert[type=danger] { border-left-color: #a33; }
.pagination-wrap { margin-top: 3rem; text-align: center; }
.pagination-wrap ul { list-style: none; display: inline-flex; gap: 0.4rem; }
.pagination-wrap a, .pagination-wrap span { display: inline-block; padding: 0.35rem 0.7rem; border: 1px solid var(--border); text-decoration: none; }

/* ── Footer ── */
.site-footer { background: var(--ink); color: var(--bronze); text-align: center; padding: 2rem; font-size: 0.8rem; letter-spacing: 0.08em; }
.site-footer a { color: var(--gold); }
.site-footer ul { list-style: none; display: flex; gap: 1.2rem; justify-content: center; margin-bottom: 0.8rem; }

/* ── Lightbox ── */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(16,12,8,0.94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 92vw; max-height: 80vh; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.lightbox figcaption { color: var(--cream); font-style: italic; margin-top: 0.9rem; text-align: center; font-size: 0.95rem; white-space: pre-line; max-width: 70ch; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--cream); font-size: 2.6rem; line-height: 1; cursor: pointer; padding: 0.6rem 1rem; opacity: 0.8; }
.lightbox button:hover { opacity: 1; }
.lightbox-close { top: 0.6rem; right: 0.8rem; }
.lightbox-prev { left: 0.6rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.6rem; top: 50%; transform: translateY(-50%); }

/* ── Small screens ── */
@media (max-width: 980px) {
  .ped { display: none; }
  .gen-list { display: block; }
  .tree-hint { display: none; }
}
@media (max-width: 700px) {
  .site-main { padding: 2.5rem 1rem 4rem; }
  .masthead--home { padding: 3.5rem 1.2rem 3rem; }
  .story-grid { grid-template-columns: 1fr; }
  .person-head { grid-template-columns: 1fr; text-align: center; gap: 1.6rem; }
  .person-portrait { max-width: 220px; margin: 0 auto; }
  .article-body figure.img-grid { margin-left: 0; margin-right: 0; }
  .card-body { padding: 1.4rem 1.3rem 1.2rem; }
  .card-footer { padding: 0.9rem 1.3rem; }
}
@media print {
  .site-nav, .site-footer, .lightbox, .edit-icons { display: none !important; }
  .masthead { background: none; color: #000; padding: 1rem; }
  .masthead::before { display: none; }
  body { background: #fff; }
}

/* Generation list chips sit on the page background, so give them a card face. */
.gen-list .chip { background: var(--paper); border-color: var(--border); }
.tree-stories-label { margin-top: 4.5rem; }
.tree-intro p { margin: 0; }
/* Certificates and other documents: shown small, full size in the viewer. */
.article-body figure.doc { max-width: 300px; }
/* Single photos in Tracy's blogs: never stretched past their real size, never taller than the screen. */
.article-body figure.photo { text-align: center; }
.article-body figure.photo img { width: auto; max-width: 100%; height: auto; max-height: 80vh; margin: 0 auto; }
.article-body figure.doc img { border: 1px solid var(--border); box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.article-body p.more { margin-top: 1.4em; }
.article-body .poem { white-space: normal; }
.article-body .poem p + p { margin-top: 1.2em; }
.article-body .poem-title { margin-top: 2.4em; }
/* Wide trees scroll sideways instead of being cut off. */
.ped { justify-content: flex-start; }
.ped-inner { width: max-content; margin: 0 auto; }
.ped--deep .ped-node { flex-basis: 176px; width: 176px; }
.ped--deep .ped-name { font-size: 0.88rem; }
.ped--deep .ped-parents { padding-left: 30px; }
.ped--deep .ped-parents::before { width: 15px; }
.ped--deep .ped-parents > .ped-branch::before { left: -15px; width: 15px; }
.ped--deep .ped-parents > .ped-branch::after { left: -15px; }
/* Cover images on cards (photo albums). */
.card-image { aspect-ratio: 16/10; overflow: hidden; background: #ebe2d3; }
.card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Deep trees may use the full window width. */
.traan-tree .ped--deep { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding-left: 1.5rem; padding-right: 1.5rem; }

/* ── Back and back-to-top buttons ── */
.nav-fab {
  position: fixed; z-index: 900;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(26,20,16,0.82); color: var(--cream);
  border: 1px solid rgba(201,168,122,0.45);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  text-decoration: none; transition: background 0.2s, opacity 0.25s, transform 0.25s;
}
.nav-fab:hover, .nav-fab:focus-visible { background: var(--ink); color: #fff; }
.nav-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-top { right: 18px; bottom: 18px; }
.nav-top[hidden] { display: grid; opacity: 0; transform: translateY(10px); pointer-events: none; }
@media (max-width: 700px) {
  .nav-fab { width: 40px; height: 40px; }
  .nav-top { right: 12px; bottom: 12px; }
}
@media print { .nav-fab { display: none !important; } }

/* Tracy's blogs: her own layout, fonts and colours from Google Docs, inside the site frame. */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.traan-story .story-head:has(h1.visually-hidden) { margin-bottom: 0.5rem; }
.tracy-doc { font-family: Arial, sans-serif; font-size: 11pt; color: #000; line-height: 1.15; overflow-wrap: anywhere;
  background: #fff; border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(26,20,16,0.10); padding: 2.5rem 3rem; }
.article-body .tracy-doc p, .article-body .tracy-doc li { margin: 0; line-height: inherit; }
.article-body .tracy-doc h1, .article-body .tracy-doc h2, .article-body .tracy-doc h3,
.article-body .tracy-doc h4, .article-body .tracy-doc h5, .article-body .tracy-doc h6 {
  margin: 0; font-weight: 400; letter-spacing: normal; text-transform: none; border: 0; line-height: 1.15;
}
.article-body .tracy-doc h1::after, .article-body .tracy-doc h2::after { content: none; }
.tracy-doc img { display: inline-block; max-width: 100%; height: auto; cursor: zoom-in; vertical-align: bottom; }
.tracy-doc table { border-collapse: collapse; margin: 0 auto; max-width: 100%; }
.tracy-doc td, .tracy-doc th { vertical-align: top; }
.tracy-doc ul, .tracy-doc ol { margin: 0; padding-left: 1.6em; }
.tracy-doc a { color: #1155cc; text-decoration: underline; }
@media (max-width: 700px) {
  .tracy-doc { padding: 1.4rem 1rem; }
  .tracy-doc table, .tracy-doc tbody, .tracy-doc tr, .tracy-doc td { display: block; width: auto !important; }
}

/* Photo albums: a grid of photos, each with Tracy's caption underneath; click for the lightbox. */
.article-body .album { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.6rem 1.2rem; margin: 2em -2rem; align-items: start; }
.article-body .album figure { margin: 0; }
.article-body .album img { width: 100%; height: 220px; object-fit: cover; display: block; cursor: zoom-in; background: #ebe2d3; }
.article-body .album figcaption { font-size: 0.85rem; line-height: 1.45; color: var(--muted); margin-top: 0.5rem; }
@media (max-width: 700px) {
  .article-body .album { grid-template-columns: repeat(2, 1fr); gap: 1rem 0.8rem; margin: 2em 0; }
  .article-body .album img { height: 150px; }
}

/* ── Search (1.8) ── */
.site-nav a.menu-search { display: inline-flex; align-items: center; font-size: 0; letter-spacing: 0; position: relative; top: -2px; }
.site-nav a.menu-search::after {
  content: ""; width: 1.05rem; height: 1.05rem; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E") center / contain no-repeat;
}
.traan-search { max-width: 760px; margin: 0 auto; }
.traan-search .page-title { font-family: var(--display); font-size: clamp(2.1rem, 5vw, 3rem); color: var(--ink); text-align: center; margin-bottom: 1.8rem; }
.site-main form.search-box { max-width: none; display: flex; gap: 0; }
.search-box input[type=search] { flex: 1; min-width: 0; font-size: 1.05rem; padding: 0.75rem 0.9rem; border-right: 0; -webkit-appearance: none; border-radius: 0; }
.site-main .search-box button { margin: 0; padding: 0 1.4rem; }
.search-note { color: var(--muted); font-style: italic; font-size: 0.95rem; margin-top: 0.9rem; text-align: center; }
.search-count { font-family: var(--label); font-size: 0.75rem; letter-spacing: 0.2em; color: var(--muted); margin: 2.4rem 0 0.5rem; display: flex; align-items: center; gap: 1rem; }
.search-count::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.search-results { list-style: none; padding: 0; margin: 0; }
.search-result { padding: 1.3rem 0; border-bottom: 1px solid var(--border); }
.search-where { font-family: var(--label); font-size: 0.68rem; letter-spacing: 0.2em; color: var(--bronze); margin-bottom: 0.3rem; }
.search-title { font-family: var(--display); font-size: 1.35rem; line-height: 1.25; font-weight: 700; margin: 0; }
.search-title a { color: var(--ink); text-decoration: none; }
.search-title a:hover { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.search-snippet { margin-top: 0.4rem; color: var(--text); line-height: 1.6; font-size: 0.98rem; }
.search-results mark { background: #f1dfb8; color: inherit; padding: 0 0.1em; }
.search-pages { margin-top: 2rem; }
.search-pages ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; padding: 0; }
.search-pages a, .search-pages span { display: inline-block; min-width: 2.2rem; padding: 0.35rem 0.6rem; text-align: center; border: 1px solid var(--border); color: var(--link); text-decoration: none; font-family: var(--label); font-size: 0.8rem; }
.search-pages .active a, .search-pages .active span, .search-pages [aria-current] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.search-pages .disabled { opacity: 0.4; }
