:root {
  --ink: #17312d;
  --ink-soft: #3f5753;
  --muted: #647773;
  --paper: #ffffff;
  --canvas: #f4f7f3;
  --canvas-warm: #fbf7ef;
  --line: #d9e4df;
  --green: #18685f;
  --green-dark: #0f4c45;
  --green-soft: #e7f2ee;
  --amber: #e4a650;
  --amber-soft: #fff3dc;
  --coral: #c76552;
  --danger: #a63c31;
  --shadow: 0 20px 50px rgba(31, 67, 59, .12);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font: 16px/1.58 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 9999; padding: 10px 14px; background: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: .76rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.muted { color: var(--muted); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(217, 228, 223, .85);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
}
.nav { min-height: 76px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 1.1rem; font-weight: 900; text-decoration: none; }
.brand img { width: 42px; height: 42px; }
.brand small { display: block; color: var(--muted); font-size: .64rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--ink-soft); font-size: .9rem; font-weight: 750; text-decoration: none; }
.nav-links a:hover { color: var(--green); }
.nav-actions { display: flex; align-items: center; gap: 9px; }
.menu-button { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: var(--green);
  color: #fff;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-1px); background: var(--green-dark); box-shadow: 0 10px 22px rgba(24, 104, 95, .18); }
.button.secondary { border-color: var(--line); background: #fff; color: var(--green-dark); }
.button.secondary:hover { background: var(--green-soft); }
.button.warm { background: var(--amber); color: #34210d; }
.button.small { min-height: 40px; padding-inline: 14px; font-size: .86rem; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 70px;
  background:
    radial-gradient(circle at 8% 18%, rgba(228, 166, 80, .19), transparent 26%),
    radial-gradient(circle at 88% 22%, rgba(47, 138, 120, .18), transparent 30%),
    linear-gradient(145deg, #fbfcf8 0%, #edf5f1 100%);
}
.hero::after { content: ""; position: absolute; right: -70px; bottom: -150px; width: 420px; height: 420px; border: 68px solid rgba(255,255,255,.55); border-radius: 50%; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.07fr .93fr; align-items: center; gap: 68px; }
.hero h1 { max-width: 760px; margin: 0 0 22px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 6vw, 5.7rem); font-weight: 500; line-height: .96; letter-spacing: -.045em; }
.hero h1 span { color: var(--green); }
.hero-copy { max-width: 680px; margin: 0 0 30px; color: var(--ink-soft); font-size: clamp(1.04rem, 2vw, 1.24rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; }
.trust-row { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px 18px; color: var(--muted); font-size: .84rem; font-weight: 750; }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }

.care-card { position: relative; padding: 18px; border: 1px solid rgba(255,255,255,.9); border-radius: 30px; background: rgba(255,255,255,.72); box-shadow: var(--shadow); }
.care-card-inner { min-height: 450px; padding: 30px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 20px; background: linear-gradient(155deg, #1b665d, #0e4c46); color: #fff; }
.care-card .status { align-self: flex-start; padding: 7px 10px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.1); font-size: .72rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.care-card h2 { max-width: 380px; margin: 22px 0 14px; font-family: Georgia, "Times New Roman", serif; font-size: 2.2rem; font-weight: 500; line-height: 1.05; }
.mini-chart { height: 118px; display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 8px; }
.mini-chart span { min-height: 18px; border-radius: 9px 9px 3px 3px; background: linear-gradient(#f6c47c, #e4a650); opacity: .88; }
.mini-chart span:nth-child(1) { height: 34%; }.mini-chart span:nth-child(2) { height: 52%; }.mini-chart span:nth-child(3) { height: 42%; }.mini-chart span:nth-child(4) { height: 78%; }.mini-chart span:nth-child(5) { height: 63%; }.mini-chart span:nth-child(6) { height: 88%; }.mini-chart span:nth-child(7) { height: 72%; }
.care-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.care-metrics div { padding: 13px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(255,255,255,.08); }
.care-metrics strong { display: block; font-size: 1.2rem; }.care-metrics small { color: rgba(255,255,255,.72); font-size: .7rem; }

.section { padding: 88px 0; }
.section.white { background: #fff; }
.section.warm { background: var(--canvas-warm); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section h2 { margin: 0 0 14px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 4vw, 3.5rem); font-weight: 500; line-height: 1.02; letter-spacing: -.025em; }
.section-head p { margin: 0; color: var(--muted); font-size: 1.06rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card { min-height: 250px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 12px 30px rgba(25,60,52,.055); }
.feature-card .icon { width: 48px; height: 48px; margin-bottom: 34px; display: grid; place-items: center; border-radius: 15px; background: var(--green-soft); color: var(--green); font-size: 1.3rem; font-weight: 900; }
.feature-card:nth-child(2n) .icon { background: var(--amber-soft); color: #89500d; }
.feature-card h3 { margin: 0 0 10px; font-size: 1.16rem; }.feature-card p { margin: 0; color: var(--muted); }

.workflow { display: grid; grid-template-columns: .82fr 1.18fr; gap: 62px; align-items: start; }
.steps { display: grid; gap: 12px; }
.step { padding: 20px; display: grid; grid-template-columns: 44px 1fr; gap: 15px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.step-number { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--green); color: #fff; font-weight: 900; }
.step h3 { margin: 0 0 5px; font-size: 1rem; }.step p { margin: 0; color: var(--muted); font-size: .9rem; }

.tool-band { padding: 34px; border-radius: 28px; background: var(--ink); color: #fff; }
.tool-band-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.tool-band h2 { max-width: 650px; color: #fff; }.tool-band p { color: #c3d0cc; }
.tool-list { margin-top: 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tool { min-height: 120px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(255,255,255,.055); }
.tool strong { font-size: .95rem; }.tool small { color: #a9bbb6; }
.notice { margin-top: 22px; padding: 14px 16px; border-left: 4px solid var(--amber); border-radius: 8px; background: rgba(255,255,255,.06); color: #dbe5e2; font-size: .86rem; }

.cta { padding: 70px 0; background: var(--green); color: #fff; }
.cta-grid { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cta h2 { max-width: 720px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 4vw, 3.6rem); font-weight: 500; line-height: 1.03; }
.cta .button { background: #fff; color: var(--green-dark); }

.site-footer { padding: 38px 0; background: #102d29; color: #d9e6e2; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: #bfceca; font-size: .85rem; text-decoration: none; }
.footer-note { max-width: 760px; margin: 18px 0 0; color: #9eb2ad; font-size: .78rem; }

/* Shared portal shell */
.portal-body { min-height: 100vh; background: #eef3f0; }
.portal-shell { min-height: 100vh; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.portal-sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px; display: flex; flex-direction: column; background: #123f39; color: #fff; }
.portal-sidebar .brand { padding: 0 8px 22px; color: #fff; }.portal-sidebar .brand small { color: #a7c0ba; }
.portal-nav { display: grid; gap: 5px; }
.portal-nav button { width: 100%; min-height: 45px; padding: 0 13px; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 11px; background: transparent; color: #c8dad5; font-weight: 750; text-align: left; cursor: pointer; }
.portal-nav button:hover, .portal-nav button.active { background: rgba(255,255,255,.11); color: #fff; }
.portal-nav .nav-glyph { width: 24px; color: #f0bd73; font-weight: 900; text-align: center; }
.portal-user { margin-top: auto; padding: 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.06); }
.portal-user strong, .portal-user small { display: block; }.portal-user small { color: #a8c0ba; }
.portal-main { min-width: 0; }
.portal-topbar { min-height: 76px; padding: 0 30px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); }
.portal-topbar h1 { margin: 0; font: 500 clamp(1.5rem,3vw,2rem)/1 Georgia,serif; }.portal-topbar .top-actions { margin-left: auto; display: flex; gap: 9px; }
.portal-menu { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.portal-content { padding: 30px; }
.portal-view { display: none; }.portal-view.active { display: block; }
.page-intro { margin-bottom: 24px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.page-intro h2 { margin: 0 0 6px; font: 500 2rem/1.05 Georgia,serif; }.page-intro p { margin: 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.stat small { color: var(--muted); font-weight: 750; }.stat strong { margin-top: 14px; display: block; font: 500 2rem/1 Georgia,serif; }.stat em { color: var(--green); font-size: .74rem; font-style: normal; font-weight: 800; }
.dashboard-grid { margin-top: 16px; display: grid; grid-template-columns: 1.4fr .6fr; gap: 16px; }
.panel { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.panel h3 { margin: 0 0 14px; font-size: 1rem; }.panel-headline { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.activity { display: grid; gap: 12px; }.activity-item { padding: 12px 0; display: grid; grid-template-columns: 11px 1fr auto; gap: 11px; align-items: start; border-bottom: 1px solid #edf1ef; }.activity-item:last-child { border-bottom: 0; }
.activity-dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--green); }.activity-item time { color: var(--muted); font-size: .74rem; }
.empty-state { padding: 34px 18px; border: 1px dashed #bfd0ca; border-radius: 15px; background: #f8fbf9; color: var(--muted); text-align: center; }
.data-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.data-table th, .data-table td { padding: 13px 15px; border-bottom: 1px solid #eaf0ed; text-align: left; }.data-table th { background: #f5f8f6; color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }.data-table tr:last-child td { border-bottom: 0; }
.status-pill { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: .72rem; font-weight: 850; }
.status-pill.amber { background: var(--amber-soft); color: #80501a; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }.field { display: grid; gap: 6px; }.field.full { grid-column: 1 / -1; }.field span { color: var(--ink-soft); font-size: .82rem; font-weight: 800; }.field input, .field select, .field textarea { width: 100%; padding: 11px 12px; border: 1px solid #c9d7d2; border-radius: 10px; background: #fff; color: var(--ink); }.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(47,138,120,.18); border-color: var(--green); }
.assessment-toolbar { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }.assessment-frame { width: 100%; min-height: 760px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.check-line { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-soft); font-size: .88rem; line-height: 1.45; }.check-line input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); flex: 0 0 auto; }
.letter-editor { min-height: 440px; max-height: 68vh; overflow: auto; padding: 24px; border: 1px solid #c9d7d2; border-radius: 12px; background: #fff; color: #172b27; line-height: 1.55; }.letter-editor:focus { outline: 3px solid rgba(47,138,120,.18); border-color: var(--green); }.letter-editor:empty::before { content: attr(data-placeholder); color: #84958f; }.letter-editor h1,.letter-editor h2,.letter-editor h3 { margin: 1.2em 0 .45em; font-family: Georgia,"Times New Roman",serif; }.letter-editor p { margin: .55em 0; }.letter-editor table { width: 100%; border-collapse: collapse; }.letter-editor th,.letter-editor td { padding: 7px; border: 1px solid var(--line); }
.alert { padding: 13px 15px; border-radius: 11px; background: var(--amber-soft); color: #704313; font-size: .88rem; }.alert.error { background: #fceae7; color: var(--danger); }.alert.success { background: var(--green-soft); color: var(--green-dark); }
.modal[hidden] { display: none; }.modal { position: fixed; inset: 0; z-index: 500; padding: 22px; display: grid; place-items: center; background: rgba(9,32,28,.58); }.modal-card { width: min(620px,100%); max-height: calc(100vh - 44px); overflow: auto; padding: 25px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }.modal-head h2 { margin: 0; font: 500 1.8rem/1 Georgia,serif; }.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }

@media (max-width: 980px) {
  .nav-links { display: none; position: absolute; inset: 76px 0 auto; padding: 18px 20px; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }.menu-button { display: inline-grid; place-items: center; }.nav-actions .secondary { display: none; }
  .hero-grid, .workflow { grid-template-columns: 1fr; }.hero-grid { gap: 45px; }.care-card { max-width: 680px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }.tool-list { grid-template-columns: repeat(2, 1fr); }
  .portal-shell { grid-template-columns: 1fr; }.portal-sidebar { position: fixed; left: -290px; z-index: 300; width: 270px; transition: left .2s ease; }.portal-sidebar.open { left: 0; box-shadow: 18px 0 35px rgba(0,0,0,.25); }.portal-menu { display: inline-grid; place-items: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }.dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 660px) {
  .container { width: min(100% - 24px, 1180px); }.nav { min-height: 68px; }.brand img { width: 38px; height: 38px; }.nav-actions .button { min-height: 40px; padding-inline: 12px; font-size: .78rem; }
  .hero { padding: 55px 0; }.hero h1 { font-size: clamp(2.8rem, 15vw, 4.4rem); }.care-card-inner { min-height: 390px; padding: 24px; }.care-metrics { grid-template-columns: 1fr; }.care-metrics div { padding: 10px 12px; }
  .section { padding: 64px 0; }.grid-3, .tool-list { grid-template-columns: 1fr; }.tool-band { padding: 25px 20px; }.tool-band-head, .cta-grid, .footer-grid { align-items: stretch; flex-direction: column; display: flex; }.cta .button { align-self: flex-start; }
  .portal-topbar { padding: 0 14px; }.portal-topbar .top-actions .button.secondary { display: none; }.portal-content { padding: 18px 12px 28px; }.page-intro { align-items: stretch; flex-direction: column; }.stats { grid-template-columns: 1fr 1fr; gap: 9px; }.stat { padding: 15px; }.stat strong { font-size: 1.55rem; }.panel { padding: 17px; }.form-grid { grid-template-columns: 1fr; }.field.full { grid-column: auto; }.assessment-frame { min-height: 640px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
