/* LWS base.css - ONE master template's layout. All color/type comes from the
   skin token file. Performance discipline: no frameworks, no icon fonts.
   Readability: body 18px+, line-height 1.7 (grieving 60-year-old on a phone). */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 18px; line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.25; color: var(--ink); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 18px; }
.wrap.narrow { max-width: 720px; }

/* Header: sticky, brand left, tap-to-call right (thumb reach). */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); color: var(--header-ink); box-shadow: 0 1px 6px rgba(0,0,0,.12); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--header-ink); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 36px; width: auto; }
.brand-name { font-family: var(--font-display); font-size: 20px; letter-spacing: .01em; }
.call-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink); padding: 9px 14px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.call-btn:hover { text-decoration: none; filter: brightness(1.05); }
.site-nav { border-top: 1px solid rgba(255,255,255,.15); background: var(--header-bg); overflow-x: auto; }
.admin-header .site-nav { border-top: 1px solid var(--rule); }
.nav-row { display: flex; gap: 4px; padding: 0 10px; }
.site-nav a { color: var(--header-ink); opacity: .85; padding: 10px 12px; font-size: 16px; white-space: nowrap; }
.site-nav a.active, .site-nav a:hover { opacity: 1; text-decoration: none; box-shadow: inset 0 -3px 0 var(--accent); }

/* Hero */
.hero { background: var(--surface-alt); padding: 56px 0; text-align: center; border-bottom: 1px solid var(--rule); }
.hero-firm { font-size: 34px; margin: 0 0 8px; }
.hero-line { color: var(--ink-soft); font-size: 19px; margin: 0 0 24px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-block; border: 1px solid var(--accent); border-radius: var(--radius); padding: 12px 20px; font-family: var(--font-body); font-size: 17px; font-weight: 600; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn-small { padding: 8px 14px; font-size: 15px; }

/* Sections */
.section { padding: 44px 0; }
.section-alt { background: var(--surface-alt); }
.section-title { font-size: 26px; margin: 0 0 18px; }
.page-title { font-size: 32px; margin: 0 0 18px; }
.section-more { margin-top: 18px; }
.body-copy { color: var(--ink); max-width: 68ch; }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }

/* Obituary cards */
.obit-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.obit-card { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px; color: var(--ink); }
.obit-card:hover { text-decoration: none; border-color: var(--accent); }
.obit-portrait { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.monogram { display: flex; align-items: center; justify-content: center; background: var(--surface-alt); border: 1px double var(--accent); color: var(--accent); border-radius: 50%; }
.monogram span { font-family: var(--font-display); font-size: 24px; letter-spacing: .04em; }
.obit-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.obit-card-name { font-family: var(--font-display); font-size: 20px; }
.obit-card-years { color: var(--ink-soft); font-size: 16px; }
.obit-card-service { color: var(--accent); font-size: 15px; font-weight: 600; }
.load-more { text-align: center; margin-top: 22px; }

/* Search */
.obit-search { display: flex; gap: 10px; margin-bottom: 6px; position: relative; }
.obit-search input[type="search"] { flex: 1; }
.search-suggest { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; }
.search-suggest a { display: block; padding: 10px 14px; color: var(--ink); border-bottom: 1px solid var(--rule); }
.search-suggest a:last-child { border-bottom: 0; }
.search-suggest a:hover { background: var(--surface-alt); text-decoration: none; }

/* Obit detail */
.obit-head { text-align: center; }
.obit-name { font-size: 34px; margin: 0 0 4px; }
.obit-dates { color: var(--ink-soft); font-size: 18px; margin: 0 0 22px; }
.obit-hero-portrait { width: 210px; height: 210px; border-radius: 50%; object-fit: cover; margin: 0 auto 26px; }
.monogram.large span { font-size: 64px; }
.service-card { background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 20px; margin: 0 0 28px; }
.service-card-title { font-size: 21px; margin: 0 0 12px; }
.service-row { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.service-row:last-of-type { border-bottom: 0; }
.service-kind { font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.service-when { font-size: 18px; font-weight: 600; }
.service-where { color: var(--ink-soft); }
.service-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.life-story p { font-size: 19px; margin: 0 0 1.1em; }
.photo-set { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 24px 0; }
.photo-set img { width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius); }
.entrusted { color: var(--ink-soft); font-style: italic; margin: 26px 0 10px; }
.share-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.keepsake-slot { background: var(--surface-alt); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; margin-bottom: 30px; }
.keepsake-slot p { margin: 0 0 8px; color: var(--ink-soft); }

/* Condolences + forms */
.condolence { border-bottom: 1px solid var(--rule); padding: 14px 0; }
.condolence-msg { margin: 0 0 6px; }
.condolence-who { margin: 0; color: var(--ink-soft); font-size: 16px; }
.condolence-form { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; margin-top: 20px; }
.form-title { margin: 0 0 12px; font-size: 20px; }
.condolence-form label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 16px; }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], textarea, select {
  width: 100%; margin-top: 6px; padding: 11px 12px; font-size: 17px; font-family: var(--font-body);
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--bg); color: var(--ink);
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-note { color: var(--ink-soft); font-size: 15px; }
.notice { background: var(--surface-alt); border-left: 4px solid var(--accent); padding: 12px 14px; border-radius: var(--radius); }
.notice-error { border-left-color: #b0453e; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-trio { display: grid; grid-template-columns: 1fr; gap: 0; }
.check-line { font-weight: 400 !important; }
.check-line input { width: auto; margin-right: 8px; }
.photo-preview { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.photo-preview img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--rule); }
.photo-thumb { position: relative; display: inline-block; }
.thumb-x { position: absolute; top: -6px; right: -6px; border: 0; background: var(--ink); color: #fff; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; line-height: 1; }
.contribute-url input { font-size: 15px; color: var(--ink-soft); }

/* Services cards (home) */
.svc-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
.svc-card { display: block; background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 20px; color: var(--ink); }
.svc-card:hover { text-decoration: none; border-color: var(--accent); }
.svc-card-title { display: block; font-family: var(--font-display); font-size: 21px; margin-bottom: 6px; }
.svc-card-line { color: var(--ink-soft); font-size: 16px; }

/* Staff */
.staff-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.staff-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; text-align: center; }
.staff-photo { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; }
.staff-photo.monogram span { font-size: 34px; }
.staff-name { font-family: var(--font-display); font-size: 20px; margin: 0; }
.staff-title { color: var(--accent); font-size: 15px; font-weight: 600; margin: 2px 0 8px; }
.staff-bio { color: var(--ink-soft); font-size: 16px; margin: 0; }

/* Map + misc */
.map-embed { margin: 22px 0; }
.map-embed iframe { width: 100%; height: 320px; border: 0; border-radius: var(--radius); }
.urgent-line { font-size: 19px; }

/* Footer */
.site-footer { background: var(--header-bg); color: var(--header-ink); padding: 34px 0; margin-top: 40px; text-align: center; }
.site-footer a { color: var(--header-ink); text-decoration: underline; }
.foot-firm { font-family: var(--font-display); font-size: 20px; margin: 0 0 6px; }
.site-footer p { margin: 4px 0; font-size: 16px; opacity: .92; }
.foot-credit { margin-top: 16px !important; font-size: 14px !important; opacity: .65 !important; }

/* Admin */
.admin-body { background: var(--bg); }
.admin-header { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--rule); }
.admin-header .brand-name { color: var(--ink); }
.admin-header .site-nav { background: var(--surface); }
.admin-header .site-nav a { color: var(--ink); }
.admin-tag { font-size: 13px; background: var(--accent); color: var(--accent-ink); border-radius: 4px; padding: 2px 7px; vertical-align: middle; margin-left: 6px; font-family: var(--font-body); }
.admin-main { padding: 30px 0 60px; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 30px; }
.stat-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; color: var(--ink); }
.stat-card:hover { border-color: var(--accent); text-decoration: none; }
.stat-attn { border-left: 4px solid var(--accent); }
.stat-num { font-family: var(--font-display); font-size: 34px; color: var(--accent); }
.stat-label { font-size: 16px; line-height: 1.4; }
.stat-label small { color: var(--ink-soft); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); font-size: 16px; }
.admin-table th { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.status-pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.status-published { background: #e2efe4; color: #22623a; }
.status-draft { background: #f0ead8; color: #7a5d17; }
.status-unpublished { background: #eee; color: #666; }
.queue-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.queue-meta { margin: 0 0 8px; color: var(--ink-soft); font-size: 15px; }
.queue-body { margin: 0; white-space: pre-line; }

/* Wider screens */
@media (min-width: 700px) {
  .hero { padding: 76px 0; }
  .hero-firm { font-size: 44px; }
  .obit-grid { grid-template-columns: 1fr 1fr; }
  .svc-cards { grid-template-columns: 1fr 1fr 1fr; }
  .staff-grid { grid-template-columns: 1fr 1fr 1fr; }
  .field-trio { grid-template-columns: 1fr 1fr 2fr; gap: 12px; }
  .obit-name { font-size: 42px; }
}
@media (min-width: 1000px) {
  .obit-grid { grid-template-columns: 1fr 1fr 1fr; }
}
