/* Shared visual system for the English care workspace. */
:root {
  --ink: #23364c;
  --ink-soft: #717982;
  --paper: #f8f7f3;
  --panel: #fff;
  --line: #e0dfd9;
  --teal: #23364c;
  --teal-deep: #23364c;
  --sand: #d4dbe0;
  --danger: #aa3d35;
  --ok: #657a65;
  --warn: #8a682c;
  --shadow: 0 4px 18px rgba(26, 53, 36, 0.035);
  --radius: 14px;
  --font-display: "Lora", Georgia, serif;
  --font-body:
    "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --touch-min: 48px;
}
html {
  font-size: 16px;
  scroll-padding-top: 130px;
}
body {
  font-size: 16px;
  line-height: 1.65;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font-family: var(--font-body);
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
[hidden] {
  display: none !important;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #93a87e;
  outline-offset: 4px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #91a4b2;
  outline-offset: 2px;
}
.bg-layer {
  background: var(--paper);
}
.bg-layer::after {
  display: none;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  background: var(--teal);
  color: #fff;
  padding: 12px 20px;
}
.skip-link:focus {
  top: 12px;
}
.icon {
  flex-shrink: 0;
  vertical-align: middle;
}
.btn-primary,
.btn-outline,
.btn-ghost,
.btn-inline {
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.5;
  box-shadow: none;
  transition:
    background 0.18s,
    transform 0.18s;
  border: 1px solid transparent;
  letter-spacing: 0;
  white-space: normal;
}
.btn-primary {
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover {
  background: var(--teal-deep);
  transform: translateY(-1px);
}
.btn-outline,
.btn-ghost {
  background: #fff;
  border-color: #d8dce0;
  color: var(--teal-deep);
}
.btn-outline:hover,
.btn-ghost:hover {
  background: #edf0f2;
  border-color: #aab5be;
}
.btn-danger-text {
  color: var(--danger);
}
.btn-inline {
  margin-top: 0;
}
.field input,
.field select,
.field textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
  border-radius: 7px;
  border: 1px solid #dcdedc;
  background: #fff;
  min-height: 48px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink);
  max-width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: #95999c;
  font-size: 13px;
}
label,
.field > span {
  font-size: 13px;
  font-weight: 500;
}
small,
.field-hint {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.65;
}
.field-error {
  font-size: 12px;
  color: #b53c34;
}
.toast-stack {
  z-index: 100;
  max-width: min(420px, calc(100vw - 32px));
  right: 20px;
  top: 20px;
}
.toast {
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 8px 35px #23364c15;
}
.inline-link {
  color: #376448;
  font-weight: 550;
}
/* A quiet, photographic sign-in experience. */
.auth-shell {
  max-width: 1440px;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  min-height: 100vh;
  align-items: stretch;
}
.brand-panel {
  position: relative;
  justify-content: center;
  padding: 120px 70px;
  isolation: isolate;
  margin: 20px;
  min-height: calc(100vh - 40px);
  border-radius: 14px;
  overflow: hidden;
  background: var(--teal-deep);
  color: #fff;
  animation: none;
}
.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, #14392cee 0%, #14392ce8 45%, #14392c8a 100%),
    url("../img/landing-hero.webp") 64% center/cover;
}
.brand-panel .auth-brand {
  position: absolute;
  top: 35px;
  left: 40px;
  display: flex;
  gap: 12px;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-size: 23px;
  letter-spacing: -0.5px;
  font-weight: 500;
}
.auth-brand .brand-symbol {
  width: 38px;
  height: 38px;
}
.brand-title {
  font-size: clamp(46px, 4.7vw, 70px);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -1px;
  margin: 0 0 25px;
  max-width: 9em;
  color: #fff;
}
.brand-desc {
  font-size: 14px;
  line-height: 1.9;
  color: #d8e2cf;
  max-width: 34em;
  margin: 0;
}
.auth-brand-note {
  position: absolute;
  bottom: 34px;
  left: 40px;
  right: 40px;
  font-size: 11px;
  color: #d6e1cf;
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-brand-note .icon {
  width: 17px;
  height: 17px;
}
.form-panel {
  padding: 64px 55px;
  align-self: center;
  display: block;
  min-width: 0;
}
.form-card,
.form-card-wide {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  max-width: 470px;
  margin: auto;
  animation: none;
}
.form-header {
  margin-bottom: 30px;
}
.form-header h2 {
  font-size: 43px;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.7px;
  line-height: 1.1;
  margin: 0 0 13px;
}
.form-header p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-soft);
  margin: 0;
}
.auth-form {
  gap: 20px;
}
.role-switch {
  padding: 0;
  border: 0;
  gap: 10px;
  margin-bottom: 4px;
  min-width: 0;
}
.role-switch legend {
  font-size: 11px;
  color: var(--ink-soft);
  margin-bottom: 9px;
}
.role-card {
  border: 1px solid #dde3d6;
  border-radius: 8px;
  background: #fff;
  padding: 14px 12px;
  min-height: 100px;
  box-shadow: none;
}
.role-card strong {
  font-size: 13px;
  font-weight: 600;
}
.role-card small {
  font-size: 10px;
  line-height: 1.6;
  margin-top: 6px;
}
.role-option input:checked + .role-card {
  background: #edf0f2;
  border-color: #7b92a3;
  box-shadow: 0 0 0 1px #7b92a3;
}
.role-option input:focus-visible + .role-card {
  outline: 3px solid #9cad85;
  outline-offset: 3px;
}
.field {
  gap: 8px;
}
.field > span {
  font-size: 12px;
  font-weight: 550;
}
.password-wrap input {
  padding-right: 65px;
}
.toggle-password {
  font-size: 11px;
  right: 9px;
  padding: 7px;
  border-radius: 4px;
  color: var(--teal-deep);
  font-weight: 550;
}
.auth-form > .btn-primary {
  margin-top: 4px;
  min-height: 50px;
  font-size: 13px;
}
.form-links {
  margin-top: 25px;
  justify-content: space-between;
  gap: 15px;
}
.form-links a {
  font-size: 11px;
  color: var(--teal-deep);
}
.form-section {
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 5px;
  gap: 16px;
}
.form-section-title {
  font-size: 15px;
  font-weight: 550;
  margin: 0 0 10px;
}
.bind-hint {
  margin-top: -3px;
}
.form-section.elder-bind-panel,
.form-section.family-bind-panel {
  background: transparent;
  border-radius: 0;
}
/* Workspace navigation and reusable panels. */
.home-topbar {
  background: rgba(255, 255, 253, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: blur(12px);
}
.home-topbar-inner {
  max-width: 1440px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 20px 40px;
  min-height: 88px;
}
.home-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--teal-deep);
}
.home-brand .brand-symbol {
  width: 34px;
  height: 34px;
}
.workspace-brand-title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.6px;
  display: block;
  line-height: 1.2;
}
.home-tagline {
  font-size: 7px;
  letter-spacing: 1.3px;
  margin-top: 5px;
  display: block;
  color: #7c8875;
}
.home-nav {
  flex: 1;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 3px;
}
.home-nav a {
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 11px;
  font-size: 11px;
  line-height: 1.5;
  border-radius: 6px;
  color: #6a7664;
}
.home-nav a:hover {
  background: #f3f5ee;
}
.home-nav a.is-active {
  color: var(--teal-deep);
  background: #edf2e7;
  font-weight: 600;
}
.home-user {
  gap: 12px;
}
.user-meta strong {
  font-size: 11px;
}
.user-meta span {
  font-size: 9px;
  max-width: 150px;
}
.home-user .btn-ghost {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 10px;
  background: transparent;
}
.user-avatar {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf0f2;
  color: #6c7f8e;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.home-content {
  max-width: 1360px;
  padding: 35px 40px 70px;
  gap: 25px;
}
.welcome-panel,
.page-hero {
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: none;
  animation: none;
}
.welcome-panel,
.welcome-panel.family-hero {
  background: #23364c;
  color: #fff;
  padding: 37px 40px;
  gap: 30px;
  position: relative;
  overflow: hidden;
}
.welcome-panel::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border: 1px solid #ffffff12;
  border-radius: 50%;
  right: -100px;
  top: -100px;
  box-shadow:
    0 0 0 50px #ffffff05,
    0 0 0 100px #ffffff03;
  pointer-events: none;
}
.welcome-kicker {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--ink-soft);
  text-transform: uppercase;
  font-weight: 550;
  margin-bottom: 13px;
}
.welcome-panel .welcome-kicker {
  color: #d7c1ac;
}
.welcome-copy h1 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  letter-spacing: -0.6px;
  margin-bottom: 16px;
}
.welcome-desc {
  font-size: 14px;
  line-height: 1.8;
  max-width: 58em;
}
.welcome-panel .welcome-desc {
  color: #d9e4d2;
}
.welcome-actions {
  margin-top: 23px;
  gap: 10px;
}
.welcome-panel .btn-primary {
  background: #e4ebd6;
  color: #23364c;
  border-color: #e4ebd6;
}
.welcome-panel .btn-primary:hover {
  background: #f3f6eb;
}
.welcome-panel .btn-outline {
  background: #ffffff06;
  border-color: #ffffff45;
  color: #f2f5e9;
}
.welcome-panel .btn-outline:hover {
  background: #ffffff15;
}
.welcome-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  position: relative;
  z-index: 1;
}
.stat-card {
  border: 1px solid var(--line);
  box-shadow: none;
  background: #fff;
  border-radius: 9px;
  padding: 17px 20px;
}
.welcome-panel .stat-card {
  background: #ffffff08;
  border: 1px solid #ffffff20;
}
.stat-label {
  font-size: 11px;
  margin-bottom: 8px;
  line-height: 1.4;
}
.stat-value {
  font-family: var(--font-body);
  font-size: 28px;
  letter-spacing: -1px;
  font-weight: 500;
  line-height: 1.2;
}
.stat-text {
  font-size: 18px !important;
  letter-spacing: -0.3px;
}
.stat-note {
  font-size: 10px;
  line-height: 1.7;
  margin-top: 7px;
}
.welcome-panel .stat-label,
.welcome-panel .stat-note {
  color: #c7d1d8;
}
.welcome-panel .stat-value {
  color: #fff;
}
.welcome-panel .inline-link {
  color: #d8e8bb;
}
.panel {
  background: #fff;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: none;
}
.panel-header h2 {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 550;
  letter-spacing: -0.4px;
  margin-bottom: 7px;
}
.panel-header p {
  font-size: 12px;
  line-height: 1.8;
  max-width: 65em;
}
.panel-header.compact {
  margin-bottom: 22px;
}
.module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 25px;
}
.module-card {
  grid-template-columns: auto 1fr;
  padding: 22px 18px;
  border: 1px solid #e0e6d9;
  border-radius: 9px;
  background: #f9faf6;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}
.module-card:hover {
  border-color: #9eb592;
  box-shadow: 0 6px 20px #23364c08;
}
.module-icon {
  width: 36px;
  height: 36px;
  background: #e8edf0;
  display: grid;
  place-items: center;
  color: #6e8495;
  border-radius: 9px;
}
.module-icon::after {
  display: none;
}
.module-icon .icon {
  width: 21px;
  height: 21px;
}
.module-title-row {
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}
.module-title-row h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.module-body p {
  font-size: 11px;
  line-height: 1.85;
  margin-top: 7px;
}
.module-badge {
  font-size: 9px;
  line-height: 1.5;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0;
  font-weight: 500;
}
.badge-ok {
  background: #e8efea;
  color: #657e68;
}
.home-bottom-row {
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.home-bottom-row > .mcp-token-panel {
  grid-column: 1/-1;
}
.task-item {
  background: #f5f5f1;
  border: 1px solid #e3e6e6;
  padding: 16px;
  border-radius: 8px;
  grid-template-columns: 80px 1fr;
  gap: 12px;
}
.task-item time {
  font-size: 10px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.task-item strong {
  font-size: 12px;
  font-weight: 550;
}
.task-item p {
  font-size: 11px;
  line-height: 1.8;
}
.task-item .inline-link {
  font-size: 10px;
}
.task-list {
  gap: 12px;
}
.task-item:has(> div:only-child) {
  grid-template-columns: 1fr;
}
.ro-grid {
  gap: 14px;
}
.ro-grid > div {
  background: #f5f5f1;
  border: 1px solid #e3e6e6;
  border-radius: 8px;
  padding: 15px 18px;
  min-width: 0;
}
.ro-grid dt {
  font-size: 10px;
  color: var(--ink-soft);
}
.ro-grid dd {
  font-size: 17px;
  font-weight: 500;
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.family-session-progress {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.family-session-item {
  grid-template-columns: 75px 1fr auto;
  padding: 13px;
  border-color: var(--line);
  background: #fafbf7;
  font-size: 12px;
}
.family-session-num,
.family-session-status {
  font-size: 9px;
}
.family-session-time {
  grid-column: 2/-1;
  font-size: 9px;
}
.mcp-token-panel > summary {
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  min-height: 35px;
  align-content: center;
}
.mcp-token-panel[open] > summary {
  margin-bottom: 22px;
}
.mcp-token-panel code {
  font-size: 11px;
}
.mcp-token-body {
  max-width: 860px;
}
.mcp-token-panel .panel-header h2 {
  font-size: 14px;
}
.speak-toolbar {
  gap: 15px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.speak-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.speak-btn {
  font-size: 11px;
  border: 1px solid #d6dfcd;
  border-radius: 6px;
  background: #f5f7ef;
  color: var(--teal-deep);
  min-height: 40px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 500;
}
.speak-btn.is-speaking {
  background: var(--teal);
  color: #fff;
}
.page-hero {
  background: #efefeb;
  padding: 30px 32px;
  gap: 25px;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: 43px;
  letter-spacing: -0.6px;
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 15px;
}
.hero-stats {
  gap: 12px;
  min-width: 0;
}
.hero-stats .stat-card {
  min-width: 110px;
}
.page-actions {
  gap: 10px;
}
.med-anchors {
  gap: 8px;
  flex-wrap: wrap;
}
.med-anchors a {
  font-size: 11px;
  min-height: 40px;
  background: white;
  border: 1px solid var(--line);
  padding: 10px 15px;
  border-radius: 6px;
  color: var(--teal-deep);
}
.week-task-day,
.week-day,
.med-item,
.todo-card,
.task-board-card,
.task-manage-card,
.cst-item {
  box-shadow: none;
  border-color: var(--line);
  border-radius: 9px;
}
.med-time {
  font-size: 16px;
}
.med-body strong,
.task-board-head strong {
  font-size: 15px;
}
.med-body p,
.med-body small,
.task-current-hint,
.empty-hint {
  font-size: 12px;
  line-height: 1.8;
}
.catalog-grid {
  gap: 15px;
}
.catalog-card {
  border-radius: 10px;
  box-shadow: none;
  border-color: var(--line);
  background: #fafbf7;
}
.catalog-card h3 {
  font-size: 16px;
}
.catalog-card p {
  font-size: 12px;
}
.ai-disclaimer {
  font-size: 11px;
  border-radius: 7px;
  background: #f3f5ed;
  border-color: var(--line);
  color: #677159;
}
.ai-bubble,
.chat-bubble,
.ws-bubble {
  border-radius: 9px;
  background: #f3f6ed;
  font-size: 14px;
}
.ai-role,
.chat-role {
  font-size: 10px;
}
.chat-input-row input {
  min-width: 0;
}
.chat-log {
  background: #fafbf8;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.chat-hint {
  font-size: 11px;
}
.companion-chip,
.option-chip,
.word-chip {
  border-radius: 7px;
  border-color: #d4decb;
  font-size: 14px;
  min-height: 46px;
  padding: 10px 15px;
}
.cst-num {
  background: #e7eeda;
  color: var(--teal);
  font-size: 19px;
}
.cst-body strong {
  font-size: 15px;
  font-weight: 550;
}
.cst-body p {
  font-size: 12px;
  line-height: 1.8;
}
.progress-ring-wrap .stat-note {
  font-size: 11px;
}
.task-elder-section .btn-primary,
.elder-btn {
  min-height: 56px;
  padding: 14px 22px;
  font-size: 18px;
}
.task-elder-step-text {
  font-size: 25px;
  line-height: 1.5;
}
.task-step-item {
  font-size: 14px;
}
.todo-card-main strong {
  font-size: 16px;
}
.todo-card-main p {
  font-size: 12px;
}
.task-status-pill {
  font-size: 11px;
}
.cst-session-content {
  max-width: 1280px;
}
.sec-desc {
  color: var(--ink-soft);
  font-size: 14px;
}
.quiz-prompt,
.card-speak-text,
.voice-focus-prompt {
  font-size: 20px;
  line-height: 1.6;
}
.curriculum-record-btn,
.card-speak-btn,
.voice-actions button {
  font-size: 14px;
  min-height: 48px;
  padding: 12px 18px;
}
.ws-assistant {
  right: 22px;
  bottom: 22px;
  z-index: 50;
}
.ws-assistant-fab {
  min-height: 48px;
  padding: 13px 21px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0;
  background: var(--teal);
  box-shadow: 0 6px 22px #23364c26;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ws-assistant-panel {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 20px;
  width: min(400px, calc(100vw - 32px));
  box-shadow: 0 15px 55px #23364c20;
}
.ws-assistant-header strong {
  font-size: 17px;
}
.ws-assistant-header p,
.ws-assistant-disclaimer,
.ws-assistant-status {
  font-size: 11px;
}
.ws-assistant-quick button {
  border-radius: 5px;
  min-height: 35px;
  font-size: 10px;
  font-weight: 500;
  padding: 7px 9px;
}
.ws-assistant-form input {
  font-size: 12px;
  min-height: 46px;
}
.ws-assistant .btn-inline {
  font-size: 11px;
  padding: 10px 14px;
}
.ws-assistant-close {
  min-height: 35px;
  min-width: 35px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1200px) {
  .home-topbar-inner {
    gap: 18px;
    padding: 17px 28px;
    flex-wrap: wrap;
  }
  .home-brand {
    flex: 1;
  }
  .home-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-top: 5px;
  }
  .home-nav a {
    font-size: 12px;
    padding: 10px 15px;
  }
  .home-tagline {
    font-size: 8px;
  }
  .home-content {
    padding: 28px 28px 70px;
  }
  .home-user .btn-ghost {
    font-size: 12px;
  }
  .page-hero {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    display: flex;
    flex-wrap: wrap;
  }
  .hero-stats .stat-card {
    flex: 1;
  }
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .brand-panel {
    padding: 120px 40px;
  }
  .form-panel {
    padding: 60px 36px;
  }
  .home-user .user-meta {
    display: none;
  }
}
@media (max-width: 850px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .brand-panel {
    min-height: 330px;
    margin: 14px;
    padding: 110px 30px 55px;
    border-radius: 10px;
  }
  .brand-panel .auth-brand {
    left: 30px;
    top: 25px;
    font-size: 20px;
  }
  .brand-title {
    font-size: 49px;
    max-width: 12em;
    margin-bottom: 15px;
  }
  .brand-desc {
    font-size: 13px;
    max-width: 45em;
  }
  .auth-brand-note {
    display: none;
  }
  .form-panel {
    padding: 35px 28px 55px;
  }
  .form-card {
    max-width: 540px;
  }
  .form-header h2 {
    font-size: 38px;
  }
  .home-bottom-row {
    grid-template-columns: 1fr;
  }
  .home-content {
    gap: 19px;
  }
  .home-nav {
    gap: 3px;
  }
  .home-nav a {
    min-height: 44px;
  }
  .welcome-panel,
  .welcome-panel.family-hero {
    padding: 28px;
  }
  .welcome-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stat-card {
    padding: 14px;
  }
  .stat-value {
    font-size: 25px;
  }
  .stat-text {
    font-size: 15px !important;
  }
  .family-session-progress {
    grid-template-columns: 1fr;
  }
  .page-hero {
    padding: 25px;
  }
  .home-bottom-row > .mcp-token-panel {
    grid-column: auto;
  }
  .home-user {
    width: auto;
  }
  .home-topbar-inner {
    display: flex;
    align-items: center;
  }
  .home-nav {
    width: 100%;
  }
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .speak-btn {
    width: auto;
  }
  .family-session-item {
    grid-template-areas: none;
    grid-template-columns: 75px 1fr auto;
  }
  .family-session-num,
  .family-session-title,
  .family-session-status,
  .family-session-time {
    grid-area: auto;
  }
  .family-session-time {
    grid-column: 2/-1;
  }
  .home-bottom-row .panel {
    min-width: 0;
  }
}
@media (max-width: 600px) {
  .home-topbar-inner {
    padding: 15px 20px 8px;
    gap: 10px;
  }
  .workspace-brand-title {
    font-size: 16px;
  }
  .home-brand .brand-symbol {
    width: 30px;
    height: 30px;
  }
  .home-tagline {
    font-size: 6px;
    letter-spacing: 1px;
  }
  .home-user {
    gap: 8px;
  }
  .user-avatar {
    display: none;
  }
  .home-user .btn-ghost {
    font-size: 10px;
    padding: 8px 10px;
  }
  .home-nav a {
    font-size: 11px;
    padding: 10px 12px;
  }
  .home-content {
    padding: 22px 17px 95px;
  }
  .welcome-panel,
  .welcome-panel.family-hero {
    padding: 27px 22px;
    gap: 25px;
  }
  .welcome-copy h1 {
    font-size: 39px;
  }
  .welcome-desc {
    font-size: 13px;
  }
  .welcome-kicker {
    font-size: 9px;
    letter-spacing: 1.4px;
  }
  .welcome-actions {
    gap: 9px;
  }
  .welcome-actions > a {
    flex: 1 1 auto;
    min-height: 48px;
    font-size: 12px;
    padding: 12px;
  }
  .welcome-stats {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .welcome-panel .stat-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 10px;
    padding: 13px 15px;
  }
  .welcome-panel .stat-label {
    margin: 0;
  }
  .welcome-panel .stat-value {
    font-size: 23px;
    grid-column: 2;
    grid-row: 1/3;
    max-width: 160px;
    text-align: right;
  }
  .welcome-panel .stat-note {
    margin: 0;
    font-size: 9px;
  }
  .welcome-panel .stat-text {
    font-size: 14px !important;
  }
  .panel {
    padding: 21px;
  }
  .panel-header h2 {
    font-size: 17px;
  }
  .panel-header p {
    font-size: 12px;
  }
  .module-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }
  .module-card {
    padding: 18px;
    align-items: start;
  }
  .module-title-row {
    align-items: center;
  }
  .module-title-row h3 {
    font-size: 14px;
  }
  .module-body p {
    font-size: 12px;
  }
  .module-badge {
    font-size: 9px;
  }
  .ro-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .ro-grid > div {
    padding: 13px;
  }
  .ro-grid dd {
    font-size: 15px;
  }
  .page-hero {
    padding: 24px 21px;
  }
  .page-hero h1 {
    font-size: 36px;
  }
  .page-hero .welcome-desc {
    font-size: 13px;
  }
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .hero-stats .stat-card {
    min-width: 0;
    padding: 14px;
  }
  .stat-label {
    font-size: 10px;
  }
  .stat-note {
    font-size: 11px;
  }
  .task-item {
    grid-template-columns: 65px 1fr;
    padding: 14px;
    gap: 10px;
  }
  .task-item strong {
    font-size: 13px;
  }
  .task-item p {
    font-size: 12px;
  }
  .speak-toolbar-actions {
    width: 100%;
  }
  .speak-toolbar-actions > a,
  .speak-toolbar-actions > .speak-btn {
    flex: 1;
  }
  .btn-primary,
  .btn-outline,
  .btn-ghost {
    min-height: 46px;
    font-size: 13px;
  }
  .todo-card {
    align-items: flex-start;
    gap: 15px;
  }
  .task-progress-meta {
    font-size: 11px;
  }
  .med-item {
    padding: 17px;
  }
  .chat-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
  }
  .chat-input-row input {
    width: 100%;
    flex: 1 1 100%;
  }
  .chat-input-row button {
    width: 100%;
  }
  .ws-assistant {
    right: 16px;
    bottom: 16px;
  }
  .ws-assistant-fab {
    min-height: 48px;
    font-size: 12px;
  }
  .task-elder-step-text {
    font-size: 23px;
  }
  .family-session-item {
    grid-template-columns: 65px 1fr auto;
  }
  .family-session-title {
    font-size: 11px;
  }
  .brand-panel {
    min-height: 325px;
    padding: 102px 25px 34px;
  }
  .brand-panel .auth-brand {
    left: 25px;
    top: 24px;
  }
  .brand-title {
    font-size: 45px;
  }
  .form-panel {
    padding: 28px 23px 45px;
  }
  .form-links a {
    font-size: 11px;
  }
  .role-card {
    padding: 13px 11px;
    min-height: 100px;
  }
  .role-card strong {
    font-size: 12px;
  }
  .role-card small {
    font-size: 10px;
  }
  .form-header p {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* V2: editorial brand, flatter work surfaces, fewer decorative containers. */
:root {
  --radius: 4px;
  --font-display: "Lora", Georgia, serif;
  --paper: #f8f7f3;
  --shadow: none;
}
.auth-shell {
  max-width: none;
  grid-template-columns: 1.05fr 1fr;
}
.brand-panel {
  margin: 0;
  border-radius: 0;
  min-height: 100vh;
  padding: 130px 65px;
}
.brand-panel::before {
  background:
    linear-gradient(180deg, rgba(30, 46, 63, 0.8), rgba(30, 46, 63, 0.66)),
    url("../img/life-together-v2.webp") 65% center/cover;
}
.brand-panel .auth-brand {
  top: 38px;
  left: 45px;
  font:
    500 26px "Lora",
    Georgia,
    serif;
  letter-spacing: -0.8px;
}
.auth-brand .brand-symbol {
  color: #dfb38d;
}
.brand-title {
  font-family: "Lora", Georgia, serif;
  font-size: clamp(45px, 4.7vw, 69px);
  line-height: 1.14;
  letter-spacing: -2px;
}
.brand-desc {
  color: #e3e2db;
  font-size: 14px;
  line-height: 1.9;
}
.auth-brand-note {
  left: 45px;
  bottom: 35px;
  color: #d1d5d8;
}
.form-header h2 {
  font-family: "Lora", Georgia, serif;
  font-size: 39px;
  line-height: 1.2;
}
.form-panel {
  padding: 65px 65px;
}
.role-card {
  border-radius: 3px;
}
.role-option input:checked + .role-card {
  border-color: #8799a8;
  box-shadow: none;
  background: #edf0f2;
}
.btn-primary,
.btn-outline,
.btn-ghost,
.btn-inline,
.field input,
.field select,
.field textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
  border-radius: 3px;
  box-shadow: none;
}
.home-brand .brand-symbol {
  color: #ac543c;
}
.workspace-brand-title {
  font:
    500 20px "Lora",
    Georgia,
    serif;
  letter-spacing: -0.8px;
}
.home-tagline {
  letter-spacing: 1.2px;
  color: #92989d;
  font-size: 7px;
  margin-top: 5px;
}
.home-topbar {
  background: rgba(249, 248, 244, 0.98);
}
.home-nav a {
  border-radius: 0;
  border-bottom: 2px solid transparent;
}
.home-nav a.is-active {
  background: transparent;
  border-color: #ac543c;
  color: #23364c;
}
.home-nav a:hover {
  background: #efefea;
}
.home-content {
  padding-top: 45px;
  gap: 29px;
}
.welcome-panel,
.welcome-panel.family-hero {
  background: transparent;
  color: var(--ink);
  border: 0;
  padding: 0 0 3px;
  overflow: visible;
  gap: 30px;
}
.welcome-panel::after {
  display: none;
}
.welcome-panel .welcome-kicker {
  color: #ac543c;
  font-size: 9px;
  letter-spacing: 1.8px;
}
.welcome-copy h1 {
  font:
    400 53px/1.2 "Lora",
    Georgia,
    serif;
  letter-spacing: -1.8px;
  margin-bottom: 18px;
}
.welcome-panel .welcome-desc {
  color: #737d84;
  font-size: 13px;
}
.welcome-panel .btn-primary {
  background: #23364c;
  color: #fff;
  border-color: #23364c;
}
.welcome-panel .btn-primary:hover {
  background: #3c5268;
}
.welcome-panel .btn-outline {
  color: #23364c;
  border-color: #d6d9d9;
  background: transparent;
}
.welcome-panel .btn-outline:hover {
  background: #efefeb;
}
.welcome-stats {
  gap: 0;
  border-block: 1px solid #dcdedb;
  padding-block: 20px;
}
.welcome-panel .stat-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0 24px;
  border-right: 1px solid #dcdedb;
}
.welcome-panel .stat-card:first-child {
  padding-left: 0;
}
.welcome-panel .stat-card:last-child {
  border-right: 0;
}
.welcome-panel .stat-label,
.welcome-panel .stat-note {
  color: #828990;
}
.welcome-panel .stat-value {
  color: #23364c;
  font-weight: 450;
}
.welcome-panel .inline-link {
  color: #82634e;
}
.panel,
.page-hero,
.stat-card,
.module-card,
.todo-card,
.task-board-card,
.task-manage-card,
.med-item,
.catalog-card,
.cst-item {
  border-radius: 4px;
  box-shadow: none;
}
.page-hero {
  background: transparent;
  border: 0;
  padding: 0 0 25px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-family: "Lora", Georgia, serif;
  font-size: 42px;
  letter-spacing: -1.4px;
}
.hero-stats .stat-card {
  background: transparent;
  border: 0;
  border-left: 1px solid #dcdedb;
}
.modules-panel {
  background: transparent;
  border: 0;
  padding: 0;
}
.module-grid {
  gap: 0;
  border: 1px solid #dcdedb;
  background: white;
}
.module-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #e6e7e3;
  padding: 25px;
}
.module-card:not(:nth-child(3n)) {
  border-right: 1px solid #e6e7e3;
}
.module-card:hover {
  background: #f1f2f0;
  transform: none;
  box-shadow: none;
}
.module-icon {
  background: transparent;
  color: #a06448;
  border-radius: 0;
  width: 29px;
  height: 29px;
}
.module-icon .icon {
  width: 24px;
  height: 24px;
}
.module-badge {
  background: #eeeee8;
  color: #81877e;
  border-radius: 2px;
  font-size: 8px;
}
.badge-ok {
  color: #6c8068;
  background: #edf1eb;
}
.panel-header h2 {
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.4px;
}
.ro-grid > div {
  border: 0;
  border-left: 1px solid #e1e3de;
  border-radius: 0;
  background: transparent;
}
.ro-grid > div:first-child {
  border-left: 0;
  padding-left: 0;
}
.family-session-item {
  border-radius: 2px;
  background: transparent;
}
.family-session-item.is-current {
  background: #f2e9dc;
  border-color: #deccb6;
}
.family-session-item.is-completed {
  background: #edf1eb;
  border-color: #d9e2d3;
}
.ws-assistant-fab {
  background: #23364c;
  border-radius: 3px;
  box-shadow: 0 4px 12px #23364c15;
}
.ws-assistant-panel {
  border-radius: 5px;
}
@media (max-width: 1200px) {
  .module-card:not(:nth-child(3n)) {
    border-right: 0;
  }
  .module-card:nth-child(odd) {
    border-right: 1px solid #e6e7e3;
  }
  .form-panel {
    padding: 55px 40px;
  }
  .brand-panel {
    padding-inline: 45px;
  }
  .home-topbar-inner {
    gap: 20px;
  }
}
@media (max-width: 850px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .brand-panel {
    min-height: 360px;
    padding: 112px 35px 45px;
  }
  .brand-panel .auth-brand {
    left: 35px;
    top: 28px;
    font-size: 24px;
  }
  .brand-title {
    font-size: 47px;
    max-width: 12em;
    letter-spacing: -1.4px;
  }
  .form-panel {
    padding: 43px 30px 55px;
  }
  .welcome-panel,
  .welcome-panel.family-hero {
    padding: 0;
  }
  .welcome-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .welcome-copy h1 {
    font-size: 45px;
  }
  .hero-stats {
    padding-block: 8px;
  }
  .hero-stats .stat-card {
    padding-left: 16px;
  }
  .module-card {
    padding: 22px;
  }
}
@media (max-width: 600px) {
  .welcome-copy h1 {
    font-size: 36px;
    letter-spacing: -1.3px;
  }
  .welcome-stats {
    grid-template-columns: 1fr;
    padding-block: 0;
    gap: 0;
  }
  .welcome-panel .stat-card,
  .welcome-panel .stat-card:first-child,
  .welcome-panel .stat-card:last-child {
    border: 0;
    border-bottom: 1px solid #e2e4df;
    padding: 16px 0;
    display: grid;
    grid-template-columns: 1fr auto;
  }
  .welcome-panel .stat-card:last-child {
    border-bottom: 0;
  }
  .welcome-panel .stat-label {
    color: #6c7781;
  }
  .welcome-panel .stat-value {
    color: #23364c;
  }
  .welcome-panel .stat-note {
    color: #8c9397;
  }
  .module-grid {
    grid-template-columns: 1fr;
  }
  .module-card:nth-child(odd) {
    border-right: 0;
  }
  .workspace-brand-title {
    font-size: 17px;
  }
  .home-tagline {
    font-size: 6px;
  }
  .home-topbar-inner {
    gap: 12px;
  }
  .brand-panel {
    min-height: 340px;
    padding: 100px 26px 35px;
  }
  .brand-panel .auth-brand {
    left: 26px;
    top: 26px;
    font-size: 22px;
  }
  .brand-title {
    font-size: 43px;
  }
  .brand-desc {
    font-size: 13px;
  }
  .form-panel {
    padding: 34px 24px 45px;
  }
  .form-header h2 {
    font-size: 34px;
  }
  .page-hero h1 {
    font-size: 34px;
  }
  .panel {
    padding: 22px;
  }
  .ro-grid > div {
    padding: 12px 0;
    border: 0;
  }
  .ro-grid > div:nth-child(even) {
    border-left: 1px solid #e1e3de;
    padding-left: 16px;
  }
  .home-content {
    padding-top: 30px;
  }
  .hero-stats .stat-card {
    padding-left: 12px;
  }
}
