:root {
  --blue: #496d9d;
  --blue-dark: #35547a;
  --soft: #edf2f8;
  --text: #546172;
  --heading: #466b9a;
  --white: #fff;
  --border: #dfe7f0;
  --shadow: 0 14px 34px rgba(64, 87, 109, 0.08);
  --radius: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #f7f8fb;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.site-header {
  background: rgba(255,255,255,0.98);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.nav-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 76px; }
.logo { font-size: 34px; font-weight: 700; color: var(--blue); white-space: nowrap; }
.logo span { font-size: 24px; }
.main-nav { display: flex; gap: 26px; flex-wrap: wrap; justify-content: flex-end; }
.main-nav a { color: #5b6677; font-weight: 600; font-size: 15px; }
.main-nav a:hover { color: var(--blue); }
.hero {
  position: relative;
  min-height: 560px;
  background-image: url('https://images.unsplash.com/photo-1516589178581-6cd7833ae3b2?auto=format&fit=crop&w=1600&q=80');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(50,53,58,0.35), rgba(50,53,58,0.12)); }
.hero-content { position: relative; }
.hero-text { max-width: 580px; color: white; padding: 30px 0; }
.hero-text h1 { font-size: clamp(50px, 6vw, 76px); line-height: 1.05; margin: 0 0 18px; }
.hero-text p { font-size: 24px; margin: 0 0 24px; }
.btn {
  display: inline-block;
  background: var(--blue);
  color: white;
  border: 0;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--blue-dark); }
.btn-light { background: white; color: var(--blue); }
.section { padding: 62px 0; }
.soft-panel { background: var(--soft); }
.section h2, .page-hero h1, .post-single h1, .auth-card h1, .narrow h1, .dashboard-header h1 { color: var(--heading); margin-top: 0; }
.section h2 { font-size: 42px; margin-bottom: 10px; }
.section-intro { max-width: 1000px; font-size: 20px; margin-bottom: 30px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card, .content-card, .auth-card, .subscribe-box { background: white; border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-card { padding: 24px; display: flex; align-items: center; gap: 14px; }
.feature-card h3 { margin: 0; color: var(--heading); font-size: 22px; }
.icon { font-size: 34px; }
.section-header-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.text-link { color: var(--blue); font-weight: 700; }
.card-grid.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.content-card { overflow: hidden; }
.content-card img { width: 100%; height: 250px; object-fit: cover; }
.card-body { padding: 20px; }
.card-body h3 { margin: 0 0 8px; color: var(--heading); font-size: 26px; }
.meta { color: #8892a0; font-size: 14px; margin-bottom: 10px; }
.video-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.video-main { position: relative; }
.video-main img { height: 390px; object-fit: cover; }
.play-button {
  position: absolute; left: 28px; top: 28px; width: 82px; height: 82px; border-radius: 50%;
  background: rgba(255,255,255,0.88); color: var(--blue); display: grid; place-items: center; font-size: 36px;
}
.video-side-list { display: grid; gap: 20px; }
.compact-video-card img { height: 185px; }
.subscribe-wrap { padding-top: 12px; }
.subscribe-box { padding: 28px 30px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.subscribe-box h2 { margin: 0 0 5px; }
.subscribe-form, .contact-form { display: grid; gap: 14px; }
.subscribe-form { grid-template-columns: 1fr auto; min-width: min(100%, 440px); }
input, textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); font: inherit;
}
.page-hero.small { background: linear-gradient(180deg, #edf2f8, #f8f9fc); padding: 60px 0 36px; }
.page-hero.small h1 { font-size: 50px; margin-bottom: 8px; }
.prose { font-size: 18px; max-width: 820px; }
.post-single { max-width: 900px; }
.post-hero-image { border-radius: 20px; margin-bottom: 24px; max-height: 470px; object-fit: cover; width: 100%; }
.video-embed { position: relative; padding-bottom: 56.25%; margin-bottom: 22px; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 18px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.narrow { max-width: 720px; }
.auth-card { padding: 30px; }
.error { color: #c0392b; font-weight: 700; }
.success { color: #1b7f45; font-weight: 700; }
.small-note { color: #7f8a98; font-size: 14px; }
.dashboard-header, .dashboard-actions { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 24px; }
.dashboard-actions { justify-content: flex-start; }
.admin-panels { margin-top: 20px; }
.admin-list { display: grid; gap: 12px; }
.admin-list-item { background: white; border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; justify-content: space-between; gap: 12px; }
.site-footer { padding: 26px 0 38px; text-align: center; color: #7c8695; }
.footer-content { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .feature-grid, .card-grid.three, .two-col, .video-layout { grid-template-columns: 1fr; }
  .subscribe-box, .nav-row, .section-header-row, .dashboard-header { flex-direction: column; align-items: flex-start; }
  .main-nav { gap: 14px; }
  .hero-text p { font-size: 20px; }
  .hero { min-height: 480px; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 24px, 1180px); }
  .logo { font-size: 28px; }
  .hero-text h1 { font-size: 46px; }
  .section h2 { font-size: 34px; }
  .page-hero.small h1 { font-size: 40px; }
  .card-body h3 { font-size: 22px; }
  .subscribe-form { grid-template-columns: 1fr; }
}


.error { color: #9b1c1c; background: #fde8e8; padding: 12px 14px; border-radius: 10px; }
.admin-list-item-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-list-item-actions form { margin: 0; }

.search-panel {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
}
.search-panel select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font: inherit;
  background: white;
}
.compact-search { grid-template-columns: 1fr auto auto; padding: 12px; margin-bottom: 16px; }
.featured-resource {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 26px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.featured-resource h2 { margin: 0 0 8px; font-size: 32px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--blue); margin: 0 0 6px; }
.resource-card { min-height: 300px; }
.resource-card .card-body { height: 100%; display: flex; flex-direction: column; }
.resource-category { color: var(--blue); font-weight: 700; font-size: 14px; margin: 0 0 8px; }
.resource-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.resource-actions .btn { padding: 10px 14px; font-size: 14px; }
.inline-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-actions form { margin: 0; }
.checkbox-line { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.checkbox-line input { width: auto; }
@media (max-width: 760px) {
  .search-panel, .compact-search { grid-template-columns: 1fr; }
  .featured-resource { flex-direction: column; align-items: flex-start; }
}

/* Private care timeline */
.timeline-wrap {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: start;
}
.timeline-sidebar { display: grid; gap: 18px; position: sticky; top: 96px; }
.timeline-composer { margin-bottom: 26px; }
.timeline-feed { position: relative; display: grid; gap: 18px; }
.timeline-feed:before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--border);
}
.timeline-card {
  position: relative;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 22px 56px;
  border: 1px solid rgba(223,231,240,.85);
}
.timeline-card.pinned { border-color: var(--blue); background: #f8fbff; }
.timeline-dot {
  position: absolute;
  left: 9px;
  top: 28px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--blue);
  border: 4px solid white;
  box-shadow: 0 0 0 2px var(--border);
  z-index: 1;
}
.timeline-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.timeline-card-head time { color: #8892a0; font-size: 14px; white-space: nowrap; }
.badge {
  display: inline-block;
  background: var(--soft);
  color: var(--blue-dark);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 6px;
}
.admin-timeline-feed { margin-top: 24px; }
.admin-timeline-feed:before { display: none; }
.admin-timeline-feed .timeline-card { padding-left: 22px; }
@media (max-width: 900px) {
  .timeline-wrap { grid-template-columns: 1fr; }
  .timeline-sidebar { position: static; }
  .timeline-card-head { flex-direction: column; align-items: flex-start; }
}
.timeline-attachments { margin: 14px 0; padding: 12px 14px; background: #f7fafc; border-radius: 14px; border: 1px solid var(--border); }
.timeline-attachments p { margin: 6px 0; }
.timeline-comments { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.timeline-comments h4 { margin: 0 0 10px; }
.comment { background: #f8fbff; border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin: 10px 0; }
.comment p { margin: 6px 0; }
.comment-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 12px; }
.inline-form { display: inline; margin: 0; }
.link-button { border: 0; background: transparent; color: var(--blue); text-decoration: underline; cursor: pointer; padding: 0; font: inherit; }
.small-note { color: #64748b; font-size: 14px; }
@media (max-width: 700px) { .comment-form { grid-template-columns: 1fr; } }

/* Professional admin dashboard */
.admin-pro { background: linear-gradient(180deg,#f5f9ff 0%, #ffffff 55%); }
.pro-hero { display:flex; justify-content:space-between; gap:24px; align-items:center; padding:28px; border-radius:28px; background:linear-gradient(135deg,#123d68,#1c7c89); color:#fff; margin-bottom:24px; box-shadow:0 20px 50px rgba(18,61,104,.22); }
.pro-hero h1 { margin:0 0 8px; font-size: clamp(2rem,4vw,3.5rem); color:#fff; }
.pro-hero p { color:rgba(255,255,255,.88); max-width:760px; }
.eyebrow { text-transform:uppercase; letter-spacing:.14em; font-size:.78rem; font-weight:800; margin:0 0 8px; }
.pro-hero-actions { display:flex; gap:12px; flex-wrap:wrap; justify-content:flex-end; }
.pro-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:18px; margin:22px 0; }
.pro-card { display:block; background:#fff; border:1px solid #e4edf5; border-radius:24px; padding:22px; box-shadow:0 12px 30px rgba(18,61,104,.08); text-decoration:none; color:inherit; transition:.2s ease; }
.pro-card:hover { transform:translateY(-3px); box-shadow:0 18px 40px rgba(18,61,104,.14); }
.pro-icon { width:54px; height:54px; border-radius:18px; display:flex; align-items:center; justify-content:center; background:#eef8f6; font-size:1.8rem; margin-bottom:14px; }
.pro-card h3 { margin:0 0 8px; }
.pro-card p, .muted { color:#5c6b7a; }
.pro-panel { background:#fff; border:1px solid #e4edf5; border-radius:24px; padding:22px; box-shadow:0 12px 30px rgba(18,61,104,.07); }
.summary-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:12px; margin:12px 0 18px; }
.summary-cards div { border-radius:18px; background:#f7fbff; padding:16px; }
.summary-cards strong { display:block; font-size:2rem; color:#123d68; }
.summary-cards span { color:#5c6b7a; }
.dashboard-actions.stacked { flex-direction:column; align-items:stretch; }
.row-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.admin-list-item p { margin:.4rem 0 0; color:#5c6b7a; }
@media (max-width: 760px){ .pro-hero { flex-direction:column; align-items:flex-start; } .pro-hero-actions { justify-content:flex-start; } }


/* Care Team Connect tabs */
.care-tabs { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:18px; }
.care-tab { display:inline-flex; align-items:center; justify-content:center; padding:12px 18px; border-radius:999px; background:#fff; border:1px solid rgba(223,231,240,.95); color:var(--text); font-weight:800; box-shadow:var(--shadow); }
.care-tab.active { background:var(--blue); color:#fff; border-color:var(--blue); }
.care-tool-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:16px; margin-top:18px; }
.care-tool-card { display:grid; gap:8px; background:#fff; border:1px solid rgba(223,231,240,.95); border-radius:18px; padding:20px; box-shadow:var(--shadow); color:var(--text); }
.care-tool-card:hover { transform:translateY(-2px); }
.care-tool-card.primary { border-color:var(--blue); background:#f8fbff; }
.care-tool-icon { font-size:30px; }
.care-tool-card small { color:#7f8a98; font-weight:600; }

/* PWS Life Journey interactive page */
.pws-hero { background: radial-gradient(circle at 15% 20%, #e0f2fe 0, transparent 32%), linear-gradient(135deg,#f5f3ff,#ffffff 55%,#ecfeff); padding: 54px 0 30px; border-bottom: 1px solid #e8edf5; }
.pws-hero-inner { display:grid; grid-template-columns:1.4fr .7fr; gap:24px; align-items:center; }
.pws-hero h1 { font-size: clamp(2.4rem, 6vw, 5rem); line-height:1; margin:.1em 0 .2em; color:#2b1a78; letter-spacing:-.05em; }
.pws-hero p { color:#374151; max-width:780px; font-size:1.08rem; }
.pws-hero-card { background:#fff; border:1px solid #e6eaf2; border-radius:28px; padding:24px; box-shadow:0 18px 50px rgba(43,26,120,.10); display:grid; gap:8px; }
.pws-hero-card strong { color:#7c3aed; font-size:1.3rem; }
.pws-page { background:linear-gradient(180deg,#fff 0,#fbfdff 100%); }
.pws-slider-panel { background:#fff; border:1px solid #e4eaf4; border-radius:28px; padding:22px; box-shadow:0 18px 45px rgba(21,49,90,.08); margin-bottom:24px; }
.pws-slider-top { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.pws-slider-top h2 { margin:0; }
#pwsStageLabel { font-weight:900; color:#4f46e5; background:#eef2ff; border-radius:999px; padding:10px 16px; }
.pws-age-slider { width:100%; accent-color:#7c3aed; margin:20px 0; }
.pws-stage-tabs { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:10px; }
.pws-stage-tab { border:2px solid #e5e7eb; background:#fff; border-radius:18px; padding:13px 10px; cursor:pointer; font-weight:900; color:#263244; transition:.2s ease; }
.pws-stage-tab span { display:block; font-size:1.8rem; margin-bottom:3px; }
.pws-stage-tab.active { border-color:var(--stage-color); box-shadow:0 12px 24px rgba(15,23,42,.10); transform:translateY(-2px); color:var(--stage-color); background:linear-gradient(180deg,#fff,#fbfdff); }
.pws-stage-stagewrap { position:relative; min-height:620px; }
.pws-stage-card { display:none; opacity:0; transform:translateY(12px); }
.pws-stage-card.active { display:block; opacity:1; transform:translateY(0); animation:pwsFade .32s ease; }
@keyframes pwsFade { from { opacity:.2; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
.pws-stage-head { display:grid; grid-template-columns:90px 1fr; gap:22px; background:linear-gradient(135deg, color-mix(in srgb, var(--stage-color) 10%, white), white); border:1px solid #e7edf6; border-radius:30px; padding:28px; box-shadow:0 20px 50px rgba(15,23,42,.08); margin-bottom:20px; }
.pws-big-icon { width:84px; height:84px; border-radius:28px; display:flex; align-items:center; justify-content:center; font-size:3rem; background:#fff; border:3px solid var(--stage-color); box-shadow:0 14px 28px rgba(15,23,42,.10); }
.pws-stage-head h2 { margin:.1em 0 .3em; color:#172554; font-size:clamp(1.8rem,4vw,3rem); }
.pws-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.pws-info-card, .pws-action-card, .pws-adam-card, .pws-alert-card { background:#fff; border:1px solid #e7edf6; border-radius:24px; padding:22px; box-shadow:0 14px 35px rgba(15,23,42,.06); }
.pws-info-card h3, .pws-action-card h3, .pws-adam-card h3, .pws-alert-card h3 { margin-top:0; color:#172554; }
.pws-info-card ul, .pws-action-card ul { padding-left:20px; }
.pws-info-card li, .pws-action-card li { margin:.45em 0; }
.pws-bottom-grid { display:grid; grid-template-columns:1.2fr .9fr .9fr; gap:18px; margin-top:18px; }
.pws-adam-card { background:linear-gradient(135deg,#eef6ff,#fff); border-color:#bfdbfe; }
.pws-alert-card { background:linear-gradient(135deg,#fff7ed,#fff); border-color:#fed7aa; }
.pws-sources { color:#64748b; font-size:.92rem; margin:16px 4px; }
.pws-controls { display:flex; justify-content:center; gap:12px; flex-wrap:wrap; margin-top:20px; }
@media(max-width:900px){ .pws-hero-inner,.pws-grid,.pws-bottom-grid { grid-template-columns:1fr; } .pws-stage-head { grid-template-columns:1fr; } .pws-stage-stagewrap { min-height:auto; } }
